Hi,
I want to rename the main function mentioned in my question, but I can't find out, how should I do it. If I change the name in the "startup_<device_name>.S" based on the function I created in my main.c source, the compiler returns an error message:
"...crt0.o: In function `_start':
(.text+0x4a): undefined reference to `main'"
There is two problems with the crt0.o:
- this file is part of a prebuilt library
- crt0.o is a part of the compiler
I implemented a line in linker script, as follows:
main = created_main;
With this change I could compile my code, and it works perfectly.
What is the best way instead of this solution to make it working? Thanks!
Hi Darnai Adam,
According to the statement, I've learned that you want to rename the main function in the main.c file.
And I wan wondering if you can upload your demo, as the different IDE has its particular startup files.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------