Skip to content
This is a simple experiment to generate a minimal semihosted "Hello World" program for the ARM Cortex-M platform (specifically the STM32F429I-Disco board) using the Rust programming language and libcore.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo
rust @ b6b98ea
src
.gitignore
.gitmodules
.travis.yml
Cargo.lock
Cargo.toml
README.md
gdb.sh
layout.ld
openocd.sh

README.md

Build status

ARM Cortex-M Semihosted "Hello World" in Rust with libcore

This is a simple experiment to see what is required to create a simple ARM Cortex-M "Hello World" program in Rust with only libcore. It was tested on an STM32F429I-DISCO board using an Arch Linux 64-bit development PC.

Dependencies

This project needs a GNU ARM Cortex-M cross-compiling toolchain for the linker, GDB, and other binary utilities. The one I used can be donwloaded from GNU Tools for ARM Embedded Processors.

Build

Build with cargo build --release.

Execution

With the STM32F429I-DISCO board connected to the host PC via USB, run openocd.sh in one terminal session and gdb.sh in another terminal session. In the GDB terminal session, type the following to deploy the binary to the board and begin execution:

monitor reset halt
load
monitor reset init
continue

You should then see "The number is x" printed repeatedly in the OpenOCD terminal session, with x increasing each time.

You can’t perform that action at this time.