Omnimaga

Omnimaga => Our Projects => Ndless => Topic started by: fb39ca4 on June 30, 2011, 04:42:21 pm

Title: Problems with keyboard functions
Post by: fb39ca4 on June 30, 2011, 04:42:21 pm
When I try to compile a program that uses isKeyPressed, I get errors:
Code: [Select]
$ make
nspire-gcc -Os -Wall -W -c main.c
main.c: In function 'main':
main.c:26:7: warning: unused variable 'oldtime'
main.c:25:7: warning: unused variable 'time'
main.c:20:8: warning: unused variable 'timer'
nspire-ld  main.o utils.o math.o -o raycaster.elf
c:/program files (x86)/yagarto/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../ar
m-none-eabi/bin/ld.exe: c:/ndless-v2.0/sdk/lib\libndls.a(touchpad.o): Unknown ma
ndatory EABI object attribute 44
c:/program files (x86)/yagarto/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../ar
m-none-eabi/bin/ld.exe: failed to merge target specific data of file c:/ndless-v
2.0/sdk/lib\libndls.a(touchpad.o)
collect2: ld returned 1 exit status
make: *** [raycaster.tns] Error 1
EDIT: It only happens when I try to use the arrow keys. I already had isKeyPressed(KEY_NSPIRE_ESC) and it works fine.
EDIT: It's not just isKeyPressed. Anything that might need to access the touchpad gives the same error, such as wait_key_pressed.
EDIT: It actually happened to me with sleep(), so yeah, a lot of functions aren't working. I do know printf is fine, though.
Title: Re: Problems with keyboard functions
Post by: ExtendeD on July 01, 2011, 06:59:37 pm
Which version of YAGARTO are you using? Make sure to use the latest one (http://www.yagarto.de/).
Title: Re: Problems with keyboard functions
Post by: fb39ca4 on July 01, 2011, 07:20:34 pm
I was on the version with gcc 4.52, but after upgrading to 4.60, it works! Thanks!