We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi to all! I'm trying to create a new project with µVision3 using only assembler language. I used an existing Startup.s and Target.ld files for GCC compiler, but it doesn't work if my main is "project_name.s" with a "main:" label (the error is: undefined reference to 'main'). Otherwise, if I include a "project_name.c" file with a main function, It works. Thanks to all Fabrizio
Hi! first of all thanks for your help!
1) my startup file call _start and not _main (is for GCC compiler not for RealView compiler).
3) I tried to insert in my project_name.s a global label and under your suggestion, I have tried to export but nothing still work.
Seems as the compiler would have a main function! but I'm in assembler!!
an other suggest?
I would not call _start. I would call YOUR assembly language function (what ever its name is).
Sorry Robert, but I don't understand. Is _start directive necessary for linker, doesn't it? I have already tried to call my function name and if my function is in the same "startup.s" file all seems to work; hoterwise, if my function is located in another file, it doesn't work. Thanks
you must export the function name from the file it is in and import it where you are using it.
Suvidh