4 releases

0.1.3 Sep 12, 2020
0.1.2 Aug 31, 2020
0.1.1 Aug 23, 2020
0.1.0 Aug 20, 2020

#635 in #embedded

Apache-2.0

1MB
2.5K SLoC

Rust 2K SLoC // 0.0% comments C 254 SLoC // 0.6% comments Python 116 SLoC // 0.1% comments Scons 80 SLoC // 0.1% comments

rttrust

Rust wrapper for rt-thread

Usage guide can be found in example folder.

Supported rt-thread APIs

  1. Kernal object
  2. Memory
  3. Thread
  4. Timer
  5. IPC
    1. Spin lock (rt_enter_critical)
    2. Semaphore
    3. Mutex
    4. Event
    5. Mailbox
    6. Message queue
    7. Signal
  6. Interrupt
  7. Device
    1. Device register
    2. Device access
    3. UART, PIN, ... (device specific APIs)

Advanced features

  • Allocator
  • print! and println!

Platforms

  • stm32f4xx

Requirements

  • rust toolchain: nightly
  • rust target: thumbv7em-none-eabihf
  • libclang
  • gcc-arm-none-eabi

lib.rs:

rttrust

Rust wrapper for rt-thread

TODO

  1. communication
    1. rt_mailbox
    2. rt_messagequeue
    3. rt_signal

Dependencies

~0.1–2MB
~38K SLoC