3 ms·
If you need a template to work from, you might find this handy: https://github.com/neykov/armboot/blob/master/Makefile https://github.com/neykov/armboot/blob/m
by jnbiche 13y ago
If you need a template to work from, you might find this handy:
https://github.com/neykov/armboot/blob/master/Makefile https://github.com/neykov/armboot/blob/master/Makefile
It's a Makefile and basic framework for creating bare metal projects on the STM32 using Rust. Rust emits LLVM, which is then compiled to the Thumb instruction set for use on the Arm device. If py2llvm emits proper llvm, it should work if you switch the Rust compiler out for py2llvm.
Note that you'll need clone and build the LLVM repo directly, since the latest stable release of LLVM (3.3) doesn't yet include the brand-new Thumb mode that you need for the Cortex m4.
- TheLegace 13y agoOh wow thank you, how did you manage to find the project? Just by googling? I have been having trouble finding projects related to the microcontroller I'm working on, there aren't to many but there are a few that exist on github. Of the few that I was able to find, were goldmines.
- jnbiche 13y agoI actually have been learning Rust, and since I'm also interested in bare metal programming, I immediately looked into this project when it was on the #rustlang tag on Twitter. Please let me know if you try to use it for your project, I'm eager to hear if it works for you. llvm is a fascinating project -- if you get it working on your STM32, you also may eventually be able to also use it on Arduino since an avr target for llvm is in the works.