Crate hpm_rt

Source
Expand description

Minimal startup / runtime for HPMicro MCUs.

§Getting Start

cargo add hpm-rt --build

§Example

Run in RAM, usually used when debugging.

// build.rs
use hpm_rt::*;

fn main() {
    RuntimeBuilder::from_ram(Family::HPM6700_6400)
        .build()
        .unwrap();

    println!("cargo:rerun-if-changed=build.rs");
}

Here is a minimal example of booting from flash on the HPM6750EVKMINI board.

// build.rs
use hpm_rt::*;

fn main() {
    let xpi_nor_cfg = XpiNorConfigurationOption::new();

    RuntimeBuilder::from_flash(Family::HPM6700_6400, xpi_nor_cfg)
        .xpi0_flash_size(8 * 1024 * 1024)
        .build()
        .unwrap();

    println!("cargo:rerun-if-changed=build.rs");
}

Modules§

Family
HPMicro MCU family memory info

Structs§

Device
Device definition
Memory
Memory definition
RuntimeBuilder
Boot Image builder
XpiNorConfigurationOption
XPI NOR flash configuration info

Enums§

FlashInterface
Flash interface type
FlashSize
Flash size
FlashType
Flash type
IOVoltage
Flash I/O Voltage
Instance
Indicate which XPI instance is used
MemoryType
Memory partitions.
PinGroup
XPI pin group
PortConnection
XPI connection type
QuadIOEnableSequence
Quad I/O enable sequence
SectorEraseSize
Sector erase size
SectorSize
Sector size