2 unstable releases

0.2.0 Apr 6, 2021
0.1.0 Nov 23, 2020

#1489 in Hardware support

Custom license

72KB
1.5K SLoC

msp432p401r-hal crates.io

Hardware Abstraction Layer for MSP432P401R microcontroller

Currently under development:

  • Watchdog
  • GPIO
  • Clock
  • PCM
  • Flash Control
  • TimerA
  • Timer32
  • PWM (TimerA)
  • Port MAP
  • ADC
  • DMA
  • RTC
  • SPI - EUSCI
  • I²C - EUSCI
  • UART - EUSCI
  • Cap. Touch IO
  • CRC32
  • AES256
  • Shared Reference (REF A)
  • Comparator
  • LCD Control
  • FPU
  • Random Seed
  • Reset Controller
  • System Controller
  • Power Supply System
  • Cortex M4 Periph

Running the examples

Make sure you have OpenOCD and GNU ARM Embedded toolchain installed and up-to-date

$ brew install openocd --HEAD

Setup Rust nightly and add the ARM build platform target:

$ rustup default nightly
$ rustup target add thumbv7em-none-eabihf

Clone and compile the project:

$ git clone https://github.com/msp432-rust/msp432p401r-hal.git
$ cd msp432p401r-hal
$ example=hello_world
$ cargo build --example $example

Open a OpenOCD server and leave it open in a terminal:

$ openocd

On a separate terminal, open the GDB client:

$ arm-none-eabi-gdb -q target/thumbv7em-none-eabihf/debug/examples/$example
$ (gdb) target extended-remote :3333
$ (gdb) load
$ (gdb) monitor arm semihosting enable
$ (gdb) continue

Dependencies

~6MB
~155K SLoC