d6231bd3ec
It seems like the rom_table_lookup missed one level of pointer dereferencing. After comparing it to the working call to reset_usb_boot() in https://github.com/jannic/rp-microcontroller-rs/blob/master/util/rp2040-panic-usb-boot/src/lib.rs, I changed the code until it generated basically the same assembly. With that change, I was able to successfully call rom_data::reset_to_usb_boot() I still don't like the type RomTableLookupFn, which just returns some generic T without any checks, and I think rom_table_lookup should be unsafe. But as none of those are pub, it doesn't matter too much. So I just made the changes necessary to make the code work. |
||
---|---|---|
.cargo | ||
boards/pico-bsp | ||
rp2040-hal | ||
.gitignore | ||
APACHE2.0 | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
MIT | ||
README.md |
rp-hal
A Rust HAL impl for the RP family of microcontrollers from the Raspberry Pi Foundation
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Getting Started
To get a local copy up and running follow these simple steps.
Prerequisites
- A Rust toolchain
Installation
- Clone the repo or use the crate
orgit clone https://github.com/rp-rs/rp-hal
cargo install rpXXXX-hal
Usage
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
Roadmap
NOTE This HAL is under active development. As such, it is likely to remain volatile until a 1.0.0 release.
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT OR Apache2.0 License. See MIT
or APACHE2.0
for more information.
Contact
Project Link: https://github.com/rp-rs/rp-hal/issues