Error: selected processor does not support `bx lr...

support for the ARM toolchain
Post Reply
michelgre
Posts: 4
Joined: Wed Oct 14, 2009 9:14 pm

Error: selected processor does not support `bx lr...

Post by michelgre » Wed Oct 14, 2009 9:34 pm

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)

michelgre
Posts: 4
Joined: Wed Oct 14, 2009 9:14 pm

Re: Error: selected processor does not support `bx lr...

Post by michelgre » Wed Oct 14, 2009 10:24 pm

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)

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Error: selected processor does not support `bx lr...

Post by WinterMute » Thu Oct 15, 2009 12:27 pm

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.
Help keep devkitPro toolchains free, Donate today

Personal Blog

michelgre
Posts: 4
Joined: Wed Oct 14, 2009 9:14 pm

Re: Error: selected processor does not support `bx lr...

Post by michelgre » Sat Oct 17, 2009 11:56 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest