Hi,
The compiler for ARM7 doesn't work. Or I can't make it work.
I am trying to compile some source for the ARM7 processor (it doesn't matter, but it is the DSGUI library).
Some parts of it are for ARM7 processor. The compiler gives the error:
Error: selected processor does not support `bx lr
The error is systematic, whatever the source. It seems that the problem is in gcc for arm.
Platform: Windows
Compiler version : arm-eabi-gcc.exe (devkitARM release 26) 4.4.0
Example:
essai.c:
void nothing() { }
Command line:
$ arm-eabi-gcc -mcpu=arm7 -save-temps -c source/essai.c -o release/essai.o
essai.s: Assembler messages:
essai.s:25: Error: selected processor does not support `bx lr'
The .s file contains:
.cpu arm7
.fpu softvfp
.eabi_attribute 23, 1
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
.eabi_attribute 30, 2
.eabi_attribute 18, 4
.file "essai.c"
.text
.align 2
.global nothing
.type nothing, %function
nothing:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
bx lr
.size nothing, .-nothing
.ident "GCC: (devkitARM release 26) 4.4.0"
The compiler generate the bx lr instruction but the assembler for the same cpu doesn't know it???
What can I do ? Help !!!
Thanks
Michel(gre)
Error: selected processor does not support `bx lr...
Re: Error: selected processor does not support `bx lr...
So I looked for another toolchain for ARM, found the Yagarto one:
http://yagarto.de/
The difference is that he is already using gcc-4.4.1. I replaced in my makefile your CC compiler by his, and it could compile it.
The difference is in the generated assembly code: the return instruction is now:
mov pc, lr
instead of bx lr.
=> upgrade devKitARM to gcc4.1.1 asap ?
Thanks.
Michel(gre)
http://yagarto.de/
The difference is that he is already using gcc-4.4.1. I replaced in my makefile your CC compiler by his, and it could compile it.
The difference is in the generated assembly code: the return instruction is now:
mov pc, lr
instead of bx lr.
=> upgrade devKitARM to gcc4.1.1 asap ?
Thanks.
Michel(gre)
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Error: selected processor does not support `bx lr...
If this is for the arm7 processor in the DS then you want -mcpu=arm7tdmi. If you're compiling for an actual arm7 then you need to add -mno-thumb-interwork. gcc 4.4.1 doesn't currently change anything and technically devkitARM doesn't support anything older than armv4t architecture.
Re: Error: selected processor does not support `bx lr...
Thank you very much. Yes it is for DS. I did this, and it works now, this is what I needed. I don't know why the original makefile uses "arm7", and I am just a beginner in DS programming...
Thanks again.
Thanks again.
Who is online
Users browsing this forum: No registered users and 1 guest