#103371 - OOPMan - Thu Sep 21, 2006 12:05 pm
Or something...
Right, if anyone recalls I discovered a thread library called MTClib a while back that has support for ARM7.
The default dev environment for compiling the ARM7 version is not devkitPro, though. Rather, a file for the official ARM SDT is included, which isn't much time. Included are Makefiles for Cygwin and DJGPP, so I grabbed one of those an modified it with some devkitPro specific stuff...
Of course, things aren't compiling nicely and I was wondering if anyone could give me an insight into why the following error is cropping up:
The code in the file that seems to be causing the problem is this:
From what I can tell it seems like arm-eabi-gcc doesn't like the __asm directive thing being used. Can I assume that this is a directive that is specific the the official ARM SDT and doesn't work?
Or is there some deeper problem? Maybe something along the lines of "Foolish n00b, that will never work!"...
Any insight would be nice :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
Last edited by OOPMan on Sat Sep 23, 2006 5:55 pm; edited 1 time in total
Right, if anyone recalls I discovered a thread library called MTClib a while back that has support for ARM7.
The default dev environment for compiling the ARM7 version is not devkitPro, though. Rather, a file for the official ARM SDT is included, which isn't much time. Included are Makefiles for Cygwin and DJGPP, so I grabbed one of those an modified it with some devkitPro specific stuff...
Of course, things aren't compiling nicely and I was wondering if anyone could give me an insight into why the following error is cropping up:
Quote: |
$ make
arm-eabi-gcc -c -Wall -W -Wunused -Wpointer-arith -Wwrite-strings -Wcast-qual -W cast-align -Wshadow -Wno-nested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -mthumb -mthumb-interwork -mcpu=arm7tdmi -mtune=arm7tdmi -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion -Wmultichar -Wunknown-pr agmas -Wno-sign-compare -O3 -fomit-frame-pointer -DMTC_SCHEDULE=0 -I../../source -I../../include -DNDEBUG -o rel/armsdt.obj ../../source/armsdt/armsdt.c In file included from ../../source/armsdt/armsdt.c:26: ../../source/platform.h:166: warning: '__regparm__' attribute directive ignored ../../source/platform.h:167: warning: '__regparm__' attribute directive ignored ../../source/platform.h:168: warning: '__regparm__' attribute directive ignored ../../source/platform.h:169: warning: '__regparm__' attribute directive ignored ../../source/platform.h:170: warning: '__regparm__' attribute directive ignored ../../source/platform.h:171: warning: '__regparm__' attribute directive ignored ../../source/platform.h:172: warning: '__regparm__' attribute directive ignored ../../source/armsdt/armsdt.c: In function 'TimeoutDPC': ../../source/armsdt/armsdt.c:225: warning: unused parameter 'pv' ../../source/armsdt/armsdt.c: In function 'MTC_PlatformThreadFree': ../../source/armsdt/armsdt.c:365: warning: cast increases required alignment of target type ../../source/armsdt/armsdt.c: In function 'MTC_PlatformThreadSwitch': ../../source/armsdt/armsdt.c:385: warning: cast increases required alignment of target type ../../source/armsdt/armsdt.c:388: warning: cast increases required alignment of target type ../../source/armsdt/armsdt.c: In function 'PlatformSwitchStack': ../../source/armsdt/armsdt.c:411: error: expected '(' before '{' token ../../source/armsdt/armsdt.c:412: error: 'mov' undeclared (first use in this fun ction) ../../source/armsdt/armsdt.c:412: error: (Each undeclared identifier is reported only once ../../source/armsdt/armsdt.c:412: error: for each function it appears in.) ../../source/armsdt/armsdt.c: At top level: ../../source/armsdt/armsdt.c:510: error: expected '=', ',', ';', 'asm' or '__att ribute__' before 'void' ../../source/armsdt/armsdt.c:515: error: stray '#' in program ../../source/armsdt/armsdt.c:520: error: expected '=', ',', ';', 'asm' or '__att ribute__' before 'int' ../../source/armsdt/armsdt.c:526: error: stray '#' in program ../../source/armsdt/armsdt.c:536: warning: '__regparm__' attribute directive ign ored ../../source/armsdt/armsdt.c: In function 'MTC_AtomicCmpXchg': ../../source/armsdt/armsdt.c:562: warning: implicit declaration of function 'dis able' ../../source/armsdt/armsdt.c:569: warning: implicit declaration of function 'ena ble' make: *** [rel/armsdt.obj] Error 1 |
The code in the file that seems to be causing the problem is this:
Quote: |
/*
* Switch stacks */ void* PlatformSwitchStack( register void* pvStack) { __asm { mov r1, r13 mov r13, pvStack mov pvStack, r1 } return pvStack; } |
From what I can tell it seems like arm-eabi-gcc doesn't like the __asm directive thing being used. Can I assume that this is a directive that is specific the the official ARM SDT and doesn't work?
Or is there some deeper problem? Maybe something along the lines of "Foolish n00b, that will never work!"...
Any insight would be nice :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
Last edited by OOPMan on Sat Sep 23, 2006 5:55 pm; edited 1 time in total