Skip to content
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
@Tiwalun

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 and static RESET public
  • Add the #[no_mangle] attribute to EXCEPTIONS and RESET
  • use core::ptr::read_volatile and write_volatile for peripheral access

If this looks okay, I'll make a pull request with these changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions