Re: [arm-gnu] thumb code calling arm subroutine causes undefined insn exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] thumb code calling arm subroutine causes undefined insn exception
- To: "arm-gnu@xxxxxxxxxxxxxxxx" <arm-gnu@xxxxxxxxxxxxxxxx>
- Subject: Re: [arm-gnu] thumb code calling arm subroutine causes undefined insn exception
- From: "Andrew Kohlsmith (mailing lists account)" <aklists@xxxxxxxxxx>
- Date: Sun, 25 Apr 2010 23:25:03 -0400
On Sunday 25 April 2010 10:43:51 pm Mark Mitchell wrote:
> Andrew Kohlsmith (mailing lists account) wrote:
> > Since I am already using -mcpu=arm7tdmi, would this indicate that there
> > is a bug in the compiler wherein it is assuming that the BLX instruction
> > exists on the ARM7TDMI/TDMI-S?
> Please post your exact options for all of (a) code compiled with
> GCC/G++, (b) code assembled with GAS, (c) link line.
For thumb code:
arm-none-eabi-gcc -o main.o -c -std=gnu99 -g -Os -fno-builtin -nostdlib -
mcpu=arm7tdmi-s -march=armv4t -mthumb -mthumb-interwork -DNDEBUG -ffunction-
sections -fdata-sections main.c
For ARM code (irq handler):
arm-none-eabi-gcc -o irq.o -c -std=gnu99 -g -Os -fno-builtin -nostdlib -
mcpu=arm7tdmi-s -march=armv4t -mthumb-interwork -DNDEBUG -ffunction-sections -
fdata-sections irq.c
arm-none-eabi-as -o boot.o boot.s
arm-none-eabi-gcc -o kernel_test -std=gnu99 -g -Os -fno-builtin -nostdlib -
mcpu=arm7tdmi-s -march=armv4t -mthumb -mthumb-interwork -DNDEBUG -T rom.ld -
Wl,-Map=kernel_test.map -Wl,--cref -Wl,--gc-sections boot.o main.o irq.o
I am working on a cut-down codebase to generate this.
-A.