When compiling the program encountered the following problems, encountered several times, also do not know how to solve the problem. Today, I met again, or looked for a long time. In order not to let himself be recorded here, memory is really not.
Recommend a blog here, write or good http://www.cnblogs.com/wanyao/archive/2011/06/27/2091666.html.
Arm-linux-gcc-wall-o2 Led.c-o Main.cgi/opt/toolschain/4.5.1/arm-none-linux-gnueabi/sys-root/usr/lib/crt1.o:in function ' _start ':
INIT.C: (. text+0x34): Undefined reference to ' main '
Collect2:ld returned 1 exit status
Makefile:11:recipe for Target ' main.cgi ' failed
Make: * * * [main.cgi] Error 1
The above error, in fact, their own makefile error, in the generation of the main file, you have to write the main () function at the beginning of the dependency. For example, there are three files main.c
ADC.C fun.c of three files. If your order is ADC.C fun.c main.c, the above error will appear after make, and the correct order is main.c start.