Description
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.