Hi, I'm trying to compile a project using Keil and GNUARM. Compiler compiles .c file but linker writes: Build target 'Target 1' assembling Startup.s... compiling Serial.c... compiling Blinky.c... linking... /cygdrive/c/Program Files/GNUARM/Bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008000 startup.o: In function 'LoopZI': /cygdrive/c/Projekty/Apos/FreeRTOS/Free RTOS/Startup.s(400): error: undefined reference to '_start' /cygdrive/c/Projekty/Apos/FreeRTOS/Free RTOS/Startup.s(400): error: undefined reference to '_data' collect2: ld returned 1 exit status Target not created I've just installed bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4.exe and in KEIL "Components, Environment and Books"->"Folders/Extensions" I Checked "Use GNU Compiler", wrote "arm-elf-" into "GNU-Tool-Prefix" and "C:\Program Files\GNUARM\" into "Cygnus Folder". Then I createn a new project for Philips LPC2129 and copied and includfed .c files from example Blinky into the project. What can be wrong??? Thank You and happy easter. Mirek Fiala
I't s me again, I think I've found why "_start" couldn't be found. (now it misses only "_data") I've unchecked "Do not use Standart System Startup Filec" and error "undefined reference to '_start'" dissapeared. But I still have "undefined reference to '_start'". Why? Thanx, Mirek
Having spent nearly a week trying to successfully get a newer version of GNU to work with uVision, I would like to pass on the results of that nightmare. First of all, you DO need to use the standard system startup files, so that box on the Linker options tab needs to be unchecked. Second, there are two versions of the Startup.s file out there, one of which works, and one which doesn't. The one found in C:\Keil\ARM\GNU\Examples\Blinky ends with: B _start which will cause you no end of grief with the C library in the newer GNU tools. What you need is the one in C:\Keil\ARM\GNU\Boards\Keil\MCB2100\Blinky which ends with: # Enter the C code ADR LR, __main_exit LDR R0, =main BX R0 __main_exit: B __main_exit Branching to _start is the kiss of death if you add any call to the string libraries which brings in more of libc. It will never get to main, after taking an SWI interrupt which is expecting something called semi-hosting. Keil is aware of and has acknowledged this problem. Kathy Moser
Thank You, it seems that the problem realy was in startup.s. M.F.