msp432p401r-hal

Crates.iomsp432p401r-hal
lib.rsmsp432p401r-hal
version0.2.0
sourcesrc
created_at2020-11-23 18:57:54.880815
updated_at2021-04-06 21:49:19.849468
descriptionMSP432P401R Hardware Abstraction Layer
homepage
repositoryhttps://github.com/msp432-rust/msp432p401r-hal
max_upload_size
id315501
size85,070
Caio Tavares (caiotavares)

documentation

README

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
Commit count: 162

cargo fmt