Giter VIP home page Giter VIP logo

drone-stm32-map's Introduction

crates.io maintenance

Drone STM32 Map

STM32 peripheral mappings for Drone, an Embedded Operating System.

This crate uses CMSIS-SVD files provided by STMicroelectronics to automatically generate Drone register and interrupt bindings. However only the corresponding Reference Manual is the single source of truth. A difference between this crate bindings and the Reference Manual is considered a bug. Fixing such a bug is not a breaking change.

This crate re-exports the contents of [drone_cortexm::map] module and is a drop-in replacement for it.

Supported Devices

drone_stm32_map Core name Reference manual Available features
stm32f100 ARM® Cortex®-M3 r1p1 RM0041 dma gpio spi tim
stm32f101 ARM® Cortex®-M3 r1p1 RM0008 dma gpio spi tim
stm32f102 ARM® Cortex®-M3 r1p1 RM0008 dma gpio spi tim
stm32f103 ARM® Cortex®-M3 r1p1 RM0008 dma gpio spi tim
stm32f107 ARM® Cortex®-M3 r1p1 RM0008 dma gpio spi tim
stm32f303 ARM® Cortex®-M4F r0p1 RM0316 adc dma exti gpio i2c tim
stm32f401 ARM® Cortex®-M4F r0p1 RM0368 adc dma exti gpio i2c spi tim uart
stm32f405 ARM® Cortex®-M4F r0p1 RM0090 adc dma exti gpio i2c spi tim uart
stm32f407 ARM® Cortex®-M4F r0p1 RM0090 adc dma exti gpio i2c spi tim uart
stm32f410 ARM® Cortex®-M4F r0p1 RM0401 adc dma exti gpio i2c spi tim uart
stm32f411 ARM® Cortex®-M4F r0p1 RM0383 adc dma exti gpio i2c spi tim uart
stm32f412 ARM® Cortex®-M4F r0p1 RM0402 adc dma exti gpio i2c spi tim uart
stm32f413 ARM® Cortex®-M4F r0p1 RM0430 adc dma exti gpio i2c spi tim uart
stm32f427 ARM® Cortex®-M4F r0p1 RM0090 adc dma exti gpio i2c spi tim uart
stm32f429 ARM® Cortex®-M4F r0p1 RM0090 adc dma exti gpio i2c spi tim uart
stm32f446 ARM® Cortex®-M4F r0p1 RM0390 adc dma exti gpio i2c spi tim uart
stm32f469 ARM® Cortex®-M4F r0p1 RM0386 adc dma exti gpio i2c spi tim uart
stm32l4x1 ARM® Cortex®-M4F r0p1 RM0394 dma exti gpio i2c rtc spi tim uart
stm32l4x2 ARM® Cortex®-M4F r0p1 RM0394 dma exti gpio i2c rtc spi tim uart
stm32l4x3 ARM® Cortex®-M4F r0p1 RM0394 dma exti gpio i2c rtc spi tim uart
stm32l4x5 ARM® Cortex®-M4F r0p1 RM0351 dma exti gpio i2c rtc spi tim uart
stm32l4x6 ARM® Cortex®-M4F r0p1 RM0351 dma exti gpio i2c rtc spi tim uart
stm32l4r5 ARM® Cortex®-M4F r0p1 RM0432 adc dma exti gpio i2c rtc spi tim uart
stm32l4s5 ARM® Cortex®-M4F r0p1 RM0432 adc dma exti gpio i2c rtc spi tim uart
stm32l4r7 ARM® Cortex®-M4F r0p1 RM0432 adc dma exti gpio i2c rtc spi tim uart
stm32l4s7 ARM® Cortex®-M4F r0p1 RM0432 adc dma exti gpio i2c rtc spi tim uart
stm32l4r9 ARM® Cortex®-M4F r0p1 RM0432 adc dma exti gpio i2c rtc spi tim uart
stm32l4s9 ARM® Cortex®-M4F r0p1 RM0432 adc dma exti gpio i2c rtc spi tim uart

drone_stm32_map config flag should be set at the application level according to this table.

Documentation

The API documentation intentionally skips auto-generated [reg] and [thr] bindings. Otherwise it would use several gigabytes of space and would be very slow to render in a browser. One should refer to the Reference Manual instead. And to get an idea of what the API looks like on the Drone side, look at the [drone_cortexm::map] module documentation.

Usage

Add the crate to your Cargo.toml dependencies:

[dependencies]
drone-stm32-map = { version = "0.15.0", features = [...] }

Add or extend host feature as follows:

[features]
host = ["drone-stm32-map/host"]

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

drone-stm32-map's People

Contributors

alfredch avatar davehylands avatar lysseslukker avatar rmja avatar valff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

drone-stm32-map's Issues

Unclear where to put generic drivers

I want to contribute an SPI driver leveraging drone_stm32_map_periph_spi::SpiPeriph. Code organization wise, does that belong in this group of crates, or should a new drone-stm32 crate be created for that purpose?

Support for the STM32L1xx series?

Hi,
Considering switching to Rust for microcontrollers in this project:

http://mbari.org/esp

What would be involved in adding support for the STM32L1xx series of microcontrollers?
(The STM32L152 in particular)

Would this just involve creating the required peripheral bindings, or do the STML1xxx chips lack some features critical for Drone core?

Here's an detailed comparison of the L1 and L4 chips:
http://web.eece.maine.edu/~zhu/book/STM32L4/STM32L1%20vs%20STM32L4.pdf

svd2rust

Hi!

Just curiosity; Why wasn't svd2rust chosen to generate Rust code out of svd files?

No feature "FPU"

Hi there, thanks so much for this amazing project!

I ran drone new --device stm32l4x6 --flash-size 1024k --ram-size 96k hello-world, and when running just build, it returns an error:

error: failed to select a version for `drone-stm32-map`.
    ... required by package `hello-world v0.1.0`
versions that meet the requirements `^0.10.0` are: 0.10.1, 0.10.0

the package `hello-world` depends on `drone-stm32-map`, with features: `fpu` but `drone-stm32-map` does not have these features.


failed to select a version for `drone-stm32-map` which could resolve this conflict

No support for `cluster` in SVD files

Hi,

I am trying to create a register map for the nrf9160, however in their SVD files, they use clusters in the peripheral registers.
I'll see if I can write up a solution to this.

Docs not showing up

Hi, I saw that in the peripheral subcrates, in the macros, documentation is written for the components of those peripherals.
However, I can't find the documentation in the resulting just doc anywhere..

cant't build for stm32l4x2 case by error 'not found in `drone_stm32_map_pieces::reg::usart3::brr'

    |
253 | /         periph::map! {
254 | |             #[doc = $uart_macro_doc]
255 | |             pub macro $uart_macro;
256 | |
...   |
451 | |             }
452 | |         }
    | |_________^ not found in `drone_stm32_map_pieces::reg::usart3::brr`
...
591 | / map_uart! {
592 | |     "Extracts USART3 register tokens.",
593 | |     periph_usart3,
594 | |     "USART3 peripheral variant.",
...   |
636 | |     (LBDCF),
637 | | }
    | |_- in this macro invocation

can't build the drone book 'full speed' example for stm32f303

Hi, when trying to build this, it says:

error[E0599]: no method named set_pllsrc found for mutable reference &mut drone_stm32_map::reg::rcc::cfgr::Hold<'_, drone_core::reg::prelude::Srt> in the current scope
--> src/tasks/root.rs:77:11
|
77 | r.set_pllsrc() // HSE oscillator clock selected as PLL input clock
| ^^^^^^^^^^ help: there is an associated function with a similar name: set_i2ssrc

Sorry, I'm new to drone and I'm not sure if it's an issue with this repo or the book repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.