Skip to content

Question - How to include custom startup code? #352

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

Closed
xC0000005 opened this issue Oct 8, 2018 · 1 comment
Closed

Question - How to include custom startup code? #352

xC0000005 opened this issue Oct 8, 2018 · 1 comment

Comments

@xC0000005
Copy link
Contributor

I'm adding support for a couple of boards by Malyan (the M200 V1 and V2, STM32F103 and 070, respectively). I have these working with STM32GENERIC, but these have some odd startup code requirements. The booloader doesn't set SP, so on the 103, I need to load the SP in the startup assembler, and in both cases, there's some form of interrupt that watches a few key values in RAM that cause the printer to fault. If I disable interrupts and faults until after variable initialization, it works fine (at that point, the core's code is in control 100%).

Right now, I've modified the startup_stm32f103xb.s file to include the required changes, but is there a way we can extend the core to allow a variant to include a startup file instead? I don't mind making such a change, but it's not clear to me yet how the .s files are selected for compliation. I've looked at platform.txt and see the -I settings, but not how we're matching the files.

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

2 participants