RTOSDemo for DAVE3

mgiaco82 wrote on Wednesday, July 04, 2012:

Hello,

Has anyone already compiled a RTOSDemo for the XMC4500 Infineon Cortex M4 with DAVE3 IDE?
I use the atollic demo as a startup but i get some errors from the linker.

./src/Common_Demo_Source/semtest.o ./src/Common_Demo_Source/sp_flop.o  ./src/main_blinky.o ./src/main_full.o  ./Startup/startup_XMC4500.o ./Startup/system_XMC4500.o  ./Main.o   
c:/dave-3.1.0/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0xc): undefined reference to `_sbrk'
c:/dave-3.1.0/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-abort.o): In function `abort':
abort.c:(.text+0xa): undefined reference to `_exit'
c:/dave-3.1.0/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-signalr.o): In function `_kill_r':
signalr.c:(.text+0xe): undefined reference to `_kill'
c:/dave-3.1.0/arm-gcc/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib/armv7e-m\libg.a(lib_a-signalr.o): In function `_getpid_r':
signalr.c:(.text+0x28): undefined reference to `_getpid'
collect2: ld returned 1 exit status
make: *** [test.elf] Error 1

So there are some syscalls missing!
So i can fix some calls but i do not know why i need
_exit, _kill_r and _getpid_r

Thanks for you help
mgiaco

rtel wrote on Thursday, July 05, 2012:

Can you compare the command line generated by Dave with that generated by the official FreeRTOS demo?  Presumably it is including additional files or libraries to provide the system calls - or it is using different start up files that have the system calls included.

Regards.

mgiaco82 wrote on Thursday, July 05, 2012:

Hello,

Tanks for your help. So i use the Attolic Demo with all the startup files and linker files. I also check the compiler flags everything seems to be the same.

I think you that Dave3 is the new and free IDE from Infineon wich is comming with the free GNU ARM Compiler. So i think the problem is the newlib use with this toolchain.

Are there any plans to prepare a Demo for this free IDE?

Regards,

rtel wrote on Thursday, July 05, 2012:

If it is using Newlib then it might be that it simply doesn’t have system calls implemented, as these are not generic.  Search the FreeRTOS/Semo directory for a file called syscalls.c.  This has a few stub functions that you might be able to adapt to get your project to link.   It is included in some demos that use Newlib I think.

Also search the archive for “syscalls yagarto” for (possibly) more information  http://www.freertos.org/FreeRTOS_Support_Forum_Archive/freertos_support_forum_archive_index.html

Regards.