codesourcery

Cross-Compiling for RaspBerry Pi

那年仲夏 提交于 2019-12-02 23:19:34
With a RaspBerry Pi and from my computer, I'm trying to cross-compile a simple helloWorld written in C++. I'm using Code Sourcery toolchain for linux to compile. When copy the helloWorld binary to raspBerry by TFTP and give it execution permissions with chmod, the next error appears: "Illegal instruction" If make a 'file' over binary I get: "raspberry: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped" This is because I used "-static -static-libstdc++" when linking. If I don't use static linking, the error is: "Segmentation fault" The Code: /* * main.cpp * * Created

Unknown GCC error, while compiling for ARM NEON (Critical)

安稳与你 提交于 2019-12-02 05:24:15
问题 I have a ARM NEON Cortex-A8 based processor target. I was optimizing my code by making use of NEON. But when I compile my code I get this strange error. Don't know how to fix this. I'm trying to compile the following code (PART 1) using Code Sourcery (PART2) on my host. And I get this strange error (PART3). Am I doing something wrong here? Can anyone else compile this and see if they also get the same compilation error? The strange part is, in the code if I comment out the else if(step_size =

Unknown GCC error, while compiling for ARM NEON (Critical)

╄→尐↘猪︶ㄣ 提交于 2019-12-02 00:20:40
I have a ARM NEON Cortex-A8 based processor target. I was optimizing my code by making use of NEON. But when I compile my code I get this strange error. Don't know how to fix this. I'm trying to compile the following code (PART 1) using Code Sourcery (PART2) on my host. And I get this strange error (PART3). Am I doing something wrong here? Can anyone else compile this and see if they also get the same compilation error? The strange part is, in the code if I comment out the else if(step_size == 4) part of the code, then the error vanishes. But, sadly my optimization is not complete with out it,

How to solve bad instruction `vadd.i16 q0,q0,q0' when attempting to check gcc for neon instruction

可紊 提交于 2019-11-29 16:54:03
Checking gcc supports failed for neon instruction vadd.i16 q0,q0,q0 test.c int main () { __asm__("vadd.i16 q0, q0, q0"); return 0; } arm-linux-androideabi-gcc test.c /tmp/ccfc8m0G.s: Assembler messages: /tmp/ccfc8m0G.s:24: Error: bad instruction `vadd.i16 q0,q0,q0' Tried with flags -mcpu=cortex-a8 -mfpu=neon but stil no success Above code was used to test gcc support for neon instruction. Actually i am trying to build x264 with NEON support for ARM platformAfter running configure script x264 config log file contains Command line options: "--cross-prefix=arm-linux-androideabi-" "--enable-pic" "

When is .ARM.exidx is used

╄→гoц情女王★ 提交于 2019-11-28 13:24:11
I am working on Contiki 2.7 with the mbxxx target. While building my code the linker complained about an overlap of .ARM.exidx and .data sections . After some tinkering around with the linker script contiki-2.7/cpu/stm32w108/gnu-stm32w108.ld I fixed the problem by replacing: __exidx_start = .; __exidx_end = .; with: .ARM.exidx : { __exidx_start = .; *(.ARM.exidx* .gnu.linkonce.armexidx.*) __exidx_end = .; } >ROM_region Later when I tried to see the header listing of some other example applications by using objdump -h I did not find this particular .ARM.exidx section, while it is present in my

GCC alias to function outside of translation unit -AKA- is this even the right tool for the job?

喜夏-厌秋 提交于 2019-11-28 11:19:01
I'm working with FreeRTOS on an STM32 (Cortex-M3), and using the CMSIS library from ST to bootstrap everything. The CMSIS library defines the weak symbol SVC_Handler in the startup ".s" file. It must be overridden somewhere in order to get your ISR in the interrupt vector table. FreeRTOS defines vPortSVCHandler , which is the ISR I want to have handle the SVC interrupt. I would like to "glue" the two together using my application code (i.e. w/o modifyng FreeRTOS or the CMSIS source code). I thought an alias would be the right tool for the job, so I tried this (in a separate source file, main.c

How to solve bad instruction `vadd.i16 q0,q0,q0' when attempting to check gcc for neon instruction

点点圈 提交于 2019-11-28 11:16:29
问题 Checking gcc supports failed for neon instruction vadd.i16 q0,q0,q0 test.c int main () { __asm__("vadd.i16 q0, q0, q0"); return 0; } arm-linux-androideabi-gcc test.c /tmp/ccfc8m0G.s: Assembler messages: /tmp/ccfc8m0G.s:24: Error: bad instruction `vadd.i16 q0,q0,q0' Tried with flags -mcpu=cortex-a8 -mfpu=neon but stil no success Above code was used to test gcc support for neon instruction. Actually i am trying to build x264 with NEON support for ARM platformAfter running configure script x264

Is it possible to run a native arm binary on a non-rooted android phone?

*爱你&永不变心* 提交于 2019-11-28 03:24:45
Well, I've been diving in the murky waters of low-level Android programming (native C/C++ using the CodeSourcery toolchain). I tried out the executable on an emulator and it worked. I'd like to try it out on a real device. So I plugged in my nexus and pushed the files on to the filesystem. Then I tried to execute the binary, and I got a permission error. It really doesn't matter how I mount it, or where I send it, I'm not root and it's not letting me execute it. Is there any way to run a program like this on a non-rooted phone? After using the toolchain included in the Android NDK to compile

When is .ARM.exidx is used

故事扮演 提交于 2019-11-27 07:38:27
问题 I am working on Contiki 2.7 with the mbxxx target. While building my code the linker complained about an overlap of .ARM.exidx and .data sections . After some tinkering around with the linker script contiki-2.7/cpu/stm32w108/gnu-stm32w108.ld I fixed the problem by replacing: __exidx_start = .; __exidx_end = .; with: .ARM.exidx : { __exidx_start = .; *(.ARM.exidx* .gnu.linkonce.armexidx.*) __exidx_end = .; } >ROM_region Later when I tried to see the header listing of some other example

GCC alias to function outside of translation unit -AKA- is this even the right tool for the job?

拈花ヽ惹草 提交于 2019-11-27 06:01:23
问题 I'm working with FreeRTOS on an STM32 (Cortex-M3), and using the CMSIS library from ST to bootstrap everything. The CMSIS library defines the weak symbol SVC_Handler in the startup ".s" file. It must be overridden somewhere in order to get your ISR in the interrupt vector table. FreeRTOS defines vPortSVCHandler , which is the ISR I want to have handle the SVC interrupt. I would like to "glue" the two together using my application code (i.e. w/o modifyng FreeRTOS or the CMSIS source code). I