rust-embedded / cortex-m-quickstart

Template to develop bare metal applications for Cortex-M microcontrollers
809 stars 167 forks source link

Update linker snippet in README to include stack start #56

Closed jonte closed 5 years ago

jonte commented 5 years ago

Without this, my STM32F3 device generates a hard fault when zeroing the bss.

adamgreig commented 5 years ago

Hi, and thanks for the PR!

That sounds like it might be a different bug, as the main cortex-m-rt linker script provides _stack_start to exactly that if unspecified here. There's some explanation of these values in the example memory.x too.

Is this change to memory.x definitely the only thing you change that makes the difference between faults and working OK?

jonte commented 5 years ago

Hm, you're right.. Now that I removed that statement, it still works.

I also fiddled with the sizes of RAM and FLASH, but I thought for sure I tested in between modifying those.

Sorry for the noise, it looks like there's no issue after all.

Thanks for the great work on these crates. I'm having tons of fun using it! :)