This repository has been archived by the owner on Sep 26, 2018. It is now read-only.
This repository has been archived by the owner on Sep 26, 2018. It is now read-only.
Make code work with optimization #19
Open
Description
First of all, thanks for writing this book, it was a great help getting Rust code to run on my Cortex M4. 👍
While experimenting with my code, I found a way how it can be compiled with optimization, without everything being optimized away.
The following steps have to be done:
- Make
mod vector_table
,static EXCEPTIONS
andstatic RESET
public - Add the
#[no_mangle]
attribute toEXCEPTIONS
andRESET
- use
core::ptr::read_volatile
andwrite_volatile
for peripheral access
If this looks okay, I'll make a pull request with these changes.
Metadata
Assignees
Labels
No labels
Activity