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

Default crt0.o startup for GCC - Cortex M0

I am trying to write a bootloader that fits within a 4Kbyte space and I'm trying to keep the essential code as small as possible.

However, with the standard default setup from the CMSDK Cortex M0 enviroment, even with a empty main(), I notice that it has already taken up almost 2.5Kbytes

Looking further into the compiled code, I noticed that crt0.o uses some functions which are taking up space some of them below ( dumped from *nm)

What does crt0.o do anyways and I thought all the necessary copy-downs from Flash to RAM are already defined in startup_CMSDK_CM0.s.

Can I exclude calling this file and go straight to startup_CMSDK_CM0.s?

Also looking at the linker script sections.ld there are references to crt and ctors. Can I exclude those as well?

Just starting out with programming on Cortex M0 so any help is appreciated, cheers.

0