Skip to content

hopter-project/hopter-quick-start

Repository files navigation

Hopter's Logo

Hopter Quick Start Guide

This tutorial demonstrates the key features of the Hopter embedded operating system by blinking the four LEDs on a development board. It covers essential topics, including:

  • Project setup
  • System initialization and the main task
  • Normal, restartable, and breathing tasks
  • Interrupt handling (IRQ)
  • Synchronization primitives
  • Panic and stack overflow protection

The source code src/main.rs includes detailed explanations for each topic.

This guide also serves as a good starting point for building your own projects.

Choose a Board

The tutorial currently supports four boards:

There is nothing to do if the code runs with an STM32F407G-Discovery board.

For other boards, apply the corresponding patch to the source code. The patch rewrites a few configuration parameters and slightly changes the API call to the HAL library to match the chosen board.

For example with F411, run the following command.

patch -p1 < stm32f411-discovery.patch

Install Prerequisite

Rust Compiler

Hopter requires a customized Rust compiler toolchain. The easiest way to get it is by downloading a prebuilt version for your system. Follow the instructions here.

OpenOCD

The tutorial code uses OpenOCD to flash the board.

For MacOS, run brew install open-ocd.

For Ubuntu, run apt install openocd.

Flash the Board

Run cargo build --release to compile the code. Run cargo run --release to flash the board.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published