Replies: 2 comments
-
Nice! I actually went the exact different route and returned to doing basic init in assembly after reading rust-embedded/cortex-m-rt#300. This decision was later reinforced when I realized that you cannot rely on the compiler to not reorder register manipulations done through Might have been a situation where I wanted to re-set the stack pointer, but function prologue operations always came in first. But naked functions might have helped, so I’m not sure if it was this example. All in all, I personally feel more safe having bss and stack prepared in assembly, and thus having the basics of the abstract machine sound when we start with Rust. In your code's comments I saw the reference to rust-embedded/cortex-m-rt#300 as well, but haven’t yet checked the other resources you mentioned regarding this discussion. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I took note of pointer provenance woes and switched to pointer+size to make it valid. While messing SP is still a possibility, making the very first function extremely small (just set SP and call follow up function) makes it very unlikely. I will keep an eye on this, but so far happy to make it boot without involving any asm. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Was trying to find through which medium to contact @andre-richter, but hey, this is as good as any.
Some fun: pure Rust chain bootloader for Raspberry Pi
:)
Beta Was this translation helpful? Give feedback.
All reactions