Bare-metal software for the sounding rocket payload.

Overview

CanSat

Software for the sounding rocket payload.

Prerequisites

  • cargo-make
  • cargo-embed - Requires libusb, see cargo-embed's README.md for instructions.
  • thumbv7em-none-eabihf platform target
cargo install cargo-make cargo-embed
rustup target add thumbv7em-none-eabihf

Run

cargo make embed cansat-stm32f446

Log filters

You can specify log levels using DEFMT_LOG environment variable.

cargo make --env DEFMT_LOG=debug embed cansat-stm32f446

See https://defmt.ferrous-systems.com/filtering.html for details.

Comments
  • blink task using rtic

    blink task using rtic

    Considered all 4 approaches from examples:

    1. Using sysclock - simplest and runs without problems
    2. Using timer5 - as simple as sysclock but the timing was much less accurate - need more research
    3. Using interrupts - Easiest way to make some code asynchronous. Interrupts need an unsafe clausure- was advised not to use this solution.
    4. Using DWT - Simmilar to the first 2 but gives more options with stopwatch "lap times" and measuring ticks as time. A bit more complicated.

    I chose the 1 approach becouse of simplicity. DWT seem the most usefull though.

    opened by Bartosz-Slowik 3
  • Add GPS

    Add GPS

    opened by wiktorwieclaw 3
  • Concurrency methods discussion

    Concurrency methods discussion

    I know a couple of ways to achieve concurrency:

    • threads - not available with #![no_std]
    • raw Interrupts - complex, feels like there is a proper abstraction missing, see stm32f4xx-hal example
    • async - easy to use, but lack ability to add priorities to tasks
    • cortex-m-rtic - provides a nice abstraction for interrupt based tasks. This seems awesome and mature enough for our use case. See rtic-* examples in stm32f4xx-hal

    Further reading

    opened by wiktorwieclaw 2
  • Added reading GPS messages

    Added reading GPS messages

    Design notes

    • Configured usart3
    • Added usart3 interrupt handler that reads data into static ringbuffer
    • Added a loop in idle task that reads messages from ringbuffer and logs them

    Related issues

    • #5
    opened by wiktorwieclaw 0
  • Added github actions CI

    Added github actions CI

    closes #2

    Design Notes

    • This PR adds a CI that builds, formats, and lints the code for every PR.
    • It leverages cargo-make crate to allow building all the crates from workspace root. cargo make build changes directories before building particular crates, so it uses their .cargo/config.toml, as opposed to cargo build.
    • I also added a new cargo-make task called embed to cansat-stm32f446 crate that runs cargo embed, but changes the default log level to info.
    opened by wiktorwieclaw 0
  • Setup rtic to allow for ergonomic concurrency

    Setup rtic to allow for ergonomic concurrency

    RTIC - Real-Time Interrupt-driven Concurrency framework for ARM Cortex-M microcontrollers

    Related issues

    • https://github.com/grupacosmo/cansat/issues/11
    enhancement 
    opened by wiktorwieclaw 0
  • Swap rtt_target crate for defmt crate

    Swap rtt_target crate for defmt crate

    https://github.com/knurling-rs/defmt

    It supports multiple logging levels that you can set using env variables. It's especially useful for disabling logging entirely in release builds. defmt is also great for performance, as it defers formatting to the host machine

    enhancement 
    opened by wiktorwieclaw 0
  • cansat-stm32f446: setup blinking led

    cansat-stm32f446: setup blinking led

    Led should blink every 1 second. See stm32f4xx-hal for examples. There are 4 blinky examples as there are multiple ways you can implement delays: dwt, timer, syst and irq. Do a little research, chose one implementation and explain the differences in the PR.

    enhancement low priority 
    opened by wiktorwieclaw 0
  • setup CI

    setup CI

    What we want is something of this structure: https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml, so check, fmt, clippy and maybe test.

    Cargo is a bit primitive as it doesn't support building all crates from root in a single command if they target different platforms. We could use cargo-make to define proper build tasks and simplify CI scripts.

    enhancement 
    opened by wiktorwieclaw 0
  • Setup DMA transfer for GPS

    Setup DMA transfer for GPS

    GPS will frequently trigger interrupts because there is a constant stream of data. This will waste precious CPU cycles.

    Useful resources

    • https://dev.to/apollolabsbin/stm32f4-embedded-rust-at-the-hal-dma-controllers-daf
    • https://docs.rust-embedded.org/embedonomicon/dma.html
    enhancement low priority 
    opened by wiktorwieclaw 0
  • Add Lora

    Add Lora

    We need to be able to send data such as position, altitude and whetever we will find useful.

    I think we should use SX1276 or similar lora module. There are multiple libraries and examples for this particular module such as sx127x_lora.

    enhancement high priority 
    opened by wiktorwieclaw 0
  • Add SDMMC

    Add SDMMC

    We need an SD card for persistent logs during the flight. There is a embedded-sdmmc crate that we should use, it even supports logging through defmt crate. Latest release is quite old, we'd need to download the crate directly from github to access defmt-log feature.

    enhancement high priority 
    opened by wiktorwieclaw 0
Owner
COSMO PK Group
Science Club of Cracow University of Technology
COSMO PK Group
Inertia.js implementations for Rust. Currently supports Rocket.

Inertia.rs Inertia.js implementations for Rust. Currently supports Rocket. Why Inertia? From inertiajs.com Inertia is a new approach to building class

Stuart Hinson 15 Dec 2, 2022
Rust Rocket MongoDB token-authorization REST API boilerplate

Rust Rocket MongoDB token-auth REST API boilerplate In this repository, you can find backend Rust rocket mongodb rest-api boilerplate with token autho

null 6 Dec 7, 2022
Heavy Metal Leptos Stack with Tailwind, Axum, Sqlite, and Cargo Leptos

Heavy Metal Stack Leptos stack with Axum, TailwindCSS, and Sqlite This example creates a basic todo app with an Axum backend that uses Leptos' server

Ben Wishovich 7 Dec 31, 2022
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
A language-based OS to run Rust on bare metal

RustOS A simple, language-based OS. Current features: Simple VGA for seeing output Some Rust libraries (core, alloc, collections) already in Working (

null 402 Dec 8, 2022
A language-based OS to run Rust on bare metal

RustOS A simple, language-based OS. Current features: Simple VGA for seeing output Some Rust libraries (core, alloc, collections) already in Working (

null 79 Dec 3, 2022
A prototype implementation of the Host Identity Protocol v2 for bare-metal systems, written in pure-rust.

Host Identity Protocol for bare-metal systems, using Rust I've been evaluating TLS replacements in constrained environments for a while now. Embedded

null 31 Dec 12, 2022
Proof of Concept / Experiment: Use IDF-HAL-LL from bare metal Rust

Proof of Concept / Experiment: Use IDF-HAL-LL from BM Rust idf-ll-compile pre-compiles a static library for ESP32C3 and ESP32 esp-ll a simple crate th

Björn Quentin 0 Aug 11, 2022
Composable n-gram combinators that are ergonomic and bare-metal fast

CREATURE FEATUR(ization) A crate for polymorphic ML & NLP featurization that leverages zero-cost abstraction. It provides composable n-gram combinator

null 3 Aug 25, 2022
WIP / POC for using the ESP32C3 wifi drivers in bare-metal Rust

Wifi on ESP32C3 (on bare-metal Rust) About This is experimental and work-in-progress! You are welcome to contribute but probably shouldn't use this fo

Björn Quentin 135 Jan 2, 2023
WIP / POC for using the ESP32C3 and ESP32 wifi drivers in bare-metal Rust

Wifi on ESP32C3 and ESP32 (on bare-metal Rust) About This is experimental and work-in-progress! You are welcome to experiment with it and contribute b

esp-rs 135 Jan 2, 2023
Esp-backtrace - backtrace for ESP32 bare-metal

esp-backtrace - backtrace for ESP32 bare-metal supports ESP32, ESP32C3, ESP32S2, ESP32S3 optional features: panic-handler, exception-handler (will ena

Björn Quentin 10 Dec 14, 2022
Backtrace for ESP32 bare-metal

esp-backtrace - backtrace for ESP32 bare-metal supports ESP32, ESP32C3, ESP32S2, ESP32S3 optional features: panic-handler, exception-handler (will ena

esp-rs 10 Dec 14, 2022
ESP32-C3 interfacing to a PS/2 Keyboard (bare-metal Rust)

ESP32-C3 interfacing to a PS/2 Keyboard (bare-metal Rust) Very simplified example of connecting a PS/2 keyboard to ESP32-C3 You need to build it with

Björn Quentin 3 Dec 5, 2022
Allocation-free UnionFind library for bare metal environments

Allocation-free UnionFind library for bare metal environments The library provides the following algorithms that is used with UnionFind. QuickFind Qui

Budi Syahiddin 7 Dec 10, 2022
implementations of standard library components for bare-metal aarch64

aarch64-std aarch64-std implements components from the Rust standard library in a way suitable for no_std or bare metal ARM applications. Design Goals

Chris 2 Dec 15, 2022
A bare metal STM32F103C8T6/STM32F103 MCU program written in pure Rust

A bare metal (register level) STM32F103C8T6/STM32F103 MCU program written in pure Rust without any IDE, SDK, HAL or library, and no assembly code, the only tool required is the Rust compiler.

Hema Shushu 105 Dec 18, 2022
INA219 and ESP32-C3 / bare-metal Rust

ESP32-C3 Current Sensing with INA219 Read the current measured by INA219 (Adafruit breakout board) on ESP32-C3 (bare-metal Rust) and print it to be vi

Björn Quentin 5 Oct 1, 2023
An async no_std HTTP server suitable for bare-metal environments, heavily inspired by axum

picoserve An async no_std HTTP server suitable for bare-metal environments, heavily inspired by axum. It was designed with embassy on the Raspberry Pi

Samuel Hicks 81 Oct 7, 2023
Some WIP payload in Rust running on M1.

m1saka Some WIP payload in Rust running on M1. Project informations The aim of this payload is to provide exploration capabilities while providing a s

Mary 10 Mar 7, 2021