User Tools

Site Tools


rust

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rust [2024/07/13 07:57] – created riverrust [2025/04/02 10:51] (current) river
Line 21: Line 21:
 ''cargo embed'' seems to be corrupting the rtt output. Using probe-rs directly works better. ''cargo embed'' seems to be corrupting the rtt output. Using probe-rs directly works better.
 e.g. ''probe-rs attach --chip STM32F429ZITx target/thumbv7em-none-eabihf/debug/disco-test'' e.g. ''probe-rs attach --chip STM32F429ZITx target/thumbv7em-none-eabihf/debug/disco-test''
- 
  
 https://github.com/stm32-rs - peripheral access crates. Gives access to named registers, for all STM32s. https://github.com/stm32-rs - peripheral access crates. Gives access to named registers, for all STM32s.
  
 +
 +===== Debug print, I/O Interfaces =====
 +
 +  * Semihosting
 +  * RTT
 +  * SWO
 +  * UART
 +
 +RTT - works well with probe-rs, recommended. rprintln!
 +
 +Semihosting not recommended. An ARM thing, uses special instructions. Slow. hprintln!
 +https://developer.arm.com/documentation/dui0471/g/Bgbjjgij
 +
 +===== RTOSen =====
 +
 +  * [[https://rtic.rs/2/book/en/|RTIC]]
 +  * [[https://embassy.dev/|Embassy]]
 +
 +
 +===== Learning material =====
 +
 +https://mikecoats.com/stm32-blinky-rust-part-2-debug/
 +
 +https://www.st.com/en/evaluation-tools/32f429idiscovery.html#documentation
 +
 +===== Abstractions =====
 +
 +  * Can work with registers directly.
 +  * PAC - peripheral access crates.
 +  * HAL - hardware abstraction layer.
 +  * BSP - Board support package.
 +
 +RCC.constrain() - takes PAC level RCC and returns a more limited HAL compatible interface to it. You may not be able to use the PAC again after doing this, but it might be possible to get PAC interface back with some implementations.
 +
 +GPIO.split - Returns separate GPIO ports.
  
rust.1720857423.txt.gz · Last modified: by river

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki