Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post/2019-01-03-arm-cortex-m-startup-code-for-c-and-c/ #7

Open
utterances-bot opened this issue May 9, 2024 · 2 comments
Open

post/2019-01-03-arm-cortex-m-startup-code-for-c-and-c/ #7

utterances-bot opened this issue May 9, 2024 · 2 comments

Comments

@utterances-bot
Copy link

ARM Cortex-M Startup code (for C and C++) - AllThingsEmbedded

When developing bare metal applications it is required to supply some functions that we normally take for granted when developing code for mainstream OS’s. Setting the startup code is not inherently difficult but beware: some of the nastiest bugs you will ever see on bare metal can come from the startup code.
What is actually needed to start the execution of the main function? Well, there are a few things that the C and C++ language specifications assume when starting a new program.

https://allthingsembedded.com/post/2019-01-03-arm-cortex-m-startup-code-for-c-and-c/

Copy link

g40 commented May 9, 2024

Hello Javier, a useful post, thank you. It would be very helpful to also have a matching linker script? Not sure if this stuff is on Github?

@Javier-varez
Copy link
Member

Hi @g40, I have used this startup code as a base for multiple projects. You could have a look at this project, that implements an uclinux boot loader for STM32. In particular:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants