Omnimaga
Calculator Community => TI Calculators => Calculator C => Topic started by: fb39ca4 on July 10, 2010, 01:59:17 pm
-
Does anyone know why nspire C programs are compiled into ARM7 binaries, rather than ARM9?
-
Does anyone know why nspire C programs are compiled into ARM7 binaries, rather than ARM9?
Must be some setting in the compiler. Not that it matters much anyway, since it produces usable code (and ARM9 doesn't offer all that much over ARM7)
-
Well, the Makefile does say
ASFLAGS = -mcpu=arm7tdmi
GCCFLAGS = -mcpu=arm7tdmi
-
I changed this:
ASFLAGS = -mcpu=arm7tdmi
GCCFLAGS = -mcpu=arm7tdmi
to this:
ASFLAGS = -mcpu=arm9tdmi
GCCFLAGS = -mcpu=arm9tdmi
and the program I compiled ran just fine. We might as well use it, because we do have an ARM9 processor.
-
I changed this:
ASFLAGS = -mcpu=arm7tdmi
GCCFLAGS = -mcpu=arm7tdmi
to this:
ASFLAGS = -mcpu=arm9tdmi
GCCFLAGS = -mcpu=arm9tdmi
and the program I compiled ran just fine. We might as well use it, because we do have an ARM9 processor.
Maybe you should try arm926ej-s, since that is the exact model of the Nspire (arm9tdmi is a little different)
Edit: typo
-
That gives an error.
arm-elf-gcc -mcpu=arm926ej-s -O3 -Wall -W -fpie -fno-merge-constants -c -I./head
ers -D NON_CAS main.c
main.c: In function 'main':
main.c:66: warning: passing argument 2 of 'sprite' discards qualifiers from poin
ter target type
graphics.h:3: note: expected 'char *' but argument is of type 'const char *'
main.c:74: warning: passing argument 1 of '270019872u' discards qualifiers from
pointer target type
main.c:74: note: expected 'char *' but argument is of type 'const char *'
arm-elf-gcc -mcpu=arm926ej-s -O3 -Wall -W -fpie -fno-merge-constants -c -I./head
ers -D NON_CAS syscalls.c
arm-elf-gcc -mcpu=arm926ej-s -O3 -Wall -W -fpie -fno-merge-constants -c -I./head
ers -D NON_CAS utils.c
arm-elf-gcc -mcpu=arm926ej-s -O3 -Wall -W -fpie -fno-merge-constants -T ./syste
m/ldscript ./system/crt0.s main.o syscalls.o utils.o -o demo.elf
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../a
rm-elf/lib\libc.a(lib_a-atexit.o) uses FPA instructions, whereas demo.elf does n
ot
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib\libc.a(lib_a-atexit.o)
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../a
rm-elf/lib\libc.a(lib_a-exit.o) uses FPA instructions, whereas demo.elf does not
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib\libc.a(lib_a-exit.o)
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../a
rm-elf/lib\libc.a(lib_a-impure.o) uses FPA instructions, whereas demo.elf does n
ot
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib\libc.a(lib_a-impure.o)
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../a
rm-elf/lib\libc.a(lib_a-init.o) uses FPA instructions, whereas demo.elf does not
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib\libc.a(lib_a-init.o)
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../a
rm-elf/lib\libc.a(lib_a-memset.o) uses FPA instructions, whereas demo.elf does n
ot
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib\libc.a(lib_a-memset.o)
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../a
rm-elf/lib\libc.a(lib_a-__atexit.o) uses FPA instructions, whereas demo.elf does
not
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib\libc.a(lib_a-__atexit.o)
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../a
rm-elf/lib\libc.a(lib_a-__call_atexit.o) uses FPA instructions, whereas demo.elf
does not
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib\libc.a(lib_a-__call_atexit.o)
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/crtend.o uses
FPA instructions, whereas demo.elf does not
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/crtend.o
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: error: c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/crtn.o uses F
PA instructions, whereas demo.elf does not
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld
.exe: failed to merge target specific data of file c:/program files/yagarto/bin/
../lib/gcc/arm-elf/4.4.2/crtn.o
collect2: ld returned 1 exit status
make: *** [demo] Error 1
It seems like the compiler and the linker are not on the same page.
-
My first necropost I think ;)
Well I tried also to build for arm926ej-s...
and it works fine, seems as if the current release of Yagarto (29.04.2011) hasn't this problem any-more.
As of now I build ndless itself and a few smaller programs successfully ( as in no error at compile or runtime ).
Can someone confirm that it works? (To be sure I didn't mess up somewhere :P )