This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Undefined reference to __main

Hi,

I am trying to port an existing startup code (which compiles fine using arm compiler 6.18) to compile with GNU toolchain for arm (arm-none-eabi).

The startup code includes a jump to __main which doesnt exist in my codebase presumably because its part of some sort of C runtime library.

But when I try and compile it with gcc cross-compiler, it complains about "undefined reference __main".

How do I resolve this pls?

Thanks

Sarah