arm

Stack Backtrace for ARM core using GCC compiler (when there is a MSP to PSP switch)

為{幸葍}努か 提交于 2020-01-16 17:20:30
问题 Core - ARM Cortex-M4 Compiler - GCC 5.3.0 ARM EABI OS - Free RTOS I am doing stack backtrace using gcc library function _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn,void*); In our project, MSP stack is used for exception handling. In other cases, PSP stack is used. When I call _Unwind_Backtrace() inside the exception handler, I am able to back trace properly up to the first function which is called inside exception. Until this the stack is MSP. But before exception, we were not able

Illegal instruction in Raspberry Pi

孤街醉人 提交于 2020-01-16 10:17:11
问题 Today, I compiled the opencv-master downloaded from github . With these instructions in the webpage http://ariandy1.wordpress.com/2013/02/13/raspberry-pi-rasbian-opencv/ , and finally the OpenCV compiled successfully. But when I wrote a simple C++ program, link it with the -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_video , run it in terminal. An error occured, says Illegal instruction . But when I remove the OpenCV -dependent code, and recompile, it can run successfully. I doubt

valgrind 编译海思

感情迁移 提交于 2020-01-15 19:07:41
https://blog.csdn.net/understand125/article/details/80689564 https://blog.csdn.net/fengbingchun/article/details/97756419 创建一个脚本build.sh, 内容如下: ./configure --host=arm-hisiv100nptl-linux --prefix=/`pwd`/valgrind CC=arm-hisiv100nptl-linux-gcc CPP=arm-hisiv100nptl-linux-cpp AR=arm-hisiv100nptl-linux-ar 检测命令 ./valgrind --tool=memcheck --leak-check=full ./main 来源: CSDN 作者: ren1204 链接: https://blog.csdn.net/ren1204/article/details/103989773

Struct layout in apcs-gnu ABI

感情迁移 提交于 2020-01-15 10:35:06
问题 For this code: struct S { unsigned char ch[2]; }; int main(void) { _Static_assert( sizeof(struct S) == 2, "size was not 2"); } using GCC (various versions) for ARM with the ABI apcs-gnu (aka. OABI, or EABI version 0), I get the assertion fails. It turns out the size of the struct is 4 . I can work around this by using __attribute__((packed)) ; but my questions are: What is the rationale for making this struct size 4 ? Is there any documentation specifying the layout of structs in this ABI? On

How many least-significant bits are the same for both an unsigned and a signed multiplication?

那年仲夏 提交于 2020-01-15 09:44:12
问题 ARM processors, for example, have a mul instruction, which performs a 32-bit x 32-bit multiplication and returns the least-significant 32-bits of the result. They also have umull and smull instructions, which again do a 32-bit x 32-bit multiplication, but return a full 64-bit result. umull does an unsigned multiplication, and smull does a signed multiplication. Why is it not necessary to have separate unsigned and signed versions of mul ? In the case of a 32-bit x 32-bit multiplication,

Pushing images to Docker Hub for multiple architectures (e.g. amd64, arm64) and pulling the correct one automatically

梦想与她 提交于 2020-01-15 08:52:10
问题 I'm trying to create one image for different architectures, namely for amd64 and arm64. The Dockerfile I've created is identical in its contents. When I build from this Dockerfile on my main machine, which is on amd64, the resultant image will run on all other amd64 machines. However, when I attempt to run this image on arm64, I will see exec errors. The main culprit seems to stem from my use of Ubuntu as the base image ( FROM: ubuntu:latest ), which somehow "knows" which architecture on

Crosscompile using llvm from desktop to arm

▼魔方 西西 提交于 2020-01-15 07:54:11
问题 I am writing c code on my laptop and I would like to cross compile it to ARM v7 architecture using the llvm-clang toolchain. I am following this website http://llvm.org/docs/HowToCrossCompileLLVM.html using this command to configure cmake: I am using the following command and getting the following errors (see below). Any idea what is wrong? Thank you -------------------------------START---------------------------------------------- cmake -G Ninja /home/user/Desktop/llvm/llvm -DCMAKE

Crosscompile using llvm from desktop to arm

时光总嘲笑我的痴心妄想 提交于 2020-01-15 07:54:06
问题 I am writing c code on my laptop and I would like to cross compile it to ARM v7 architecture using the llvm-clang toolchain. I am following this website http://llvm.org/docs/HowToCrossCompileLLVM.html using this command to configure cmake: I am using the following command and getting the following errors (see below). Any idea what is wrong? Thank you -------------------------------START---------------------------------------------- cmake -G Ninja /home/user/Desktop/llvm/llvm -DCMAKE

How to interpret ARM's SMC calls?

守給你的承諾、 提交于 2020-01-15 07:35:22
问题 I have been reading Android's kernel to see how dynamic power management for CPU cores (aka DVFS, DCVS) is being done. The code I found here makes some calls to the following function (defined here) which in turn calls the SMC assembly instruction. ARM has a document that explains SMC calling convention, but I haven't been able to use it to make sense of the following function. How can I track down the SMC instruction further to see what it actually does based on its input operands? s32 scm

Emulatin Big Endian ARM system with QEMU

╄→гoц情女王★ 提交于 2020-01-15 07:11:48
问题 Is it possible to compile some Linux Kernel and run it over QEMU, emulating some Big Endian ARM processor? If QEMU is not capable of that, I'd love to hear about other system emulators than can. My basic goal is to run and debug dedicated Big Endian ELFs in as much as possible native environment. Every close solution or idea would help! 回答1: QEMU has support for big-endian ARM CPUs, but it does not currently have support for emulation of any specific machines (boards) which have big-endian