salvatore benedetto
2012-Jul-22 19:51 UTC
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Sun, Jul 22, 2012 at 9:42 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:>> Any suggestions? > Try to specify CPU explicitly.Already did. clang++ -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple thumbv7m-none-gnueabi testReference.cpp -c -mcpu=cortex-m3 fatal error: error in backend: CPU: 'cortex-m3' does not support ARM mode execution! S.
Anton Korobeynikov
2012-Jul-22 19:57 UTC
[LLVMdev] Setting up a cross-compiler for cortex-m3
> clang++ -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple > thumbv7m-none-gnueabi testReference.cpp -c -mcpu=cortex-m3 > fatal error: error in backend: CPU: 'cortex-m3' does not support ARM > mode execution!Ok, and what's about -mthumb then? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
salvatore benedetto
2012-Jul-22 20:05 UTC
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Sun, Jul 22, 2012 at 9:57 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:>> clang++ -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple >> thumbv7m-none-gnueabi testReference.cpp -c -mcpu=cortex-m3 >> fatal error: error in backend: CPU: 'cortex-m3' does not support ARM >> mode execution! > Ok, and what's about -mthumb then?$ clang++ -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple thumbv7m-none-gnueabi testReference.cpp -c -mcpu=cortex-m3 -mthumb $ arm-none-linux-gnueabi-readelf -A testReference.o Attribute Section: aeabi File Attributes Tag_CPU_name: "Cortex-M3" Tag_CPU_arch: v7 Tag_CPU_arch_profile: Microcontroller Tag_THUMB_ISA_use: Thumb-2 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_align_preserved: 8-byte, except leaf SP Tag_DIV_use: Not allowed That did the trick. Although it's a lot of options. Thanks a lot! S.
Possibly Parallel Threads
- [LLVMdev] Setting up a cross-compiler for cortex-m3
- [LLVMdev] Setting up a cross-compiler for cortex-m3
- [LLVMdev] Setting up a cross-compiler for cortex-m3
- [LLVMdev] Setting up a cross-compiler for cortex-m3
- [LLVMdev] Setting up a cross-compiler for cortex-m3