https://lupyuen.github.io/pinetime-rust-mynewt/articles/simu...
942 karma · joined May 24, 2018
https://lupyuen.github.io/pinetime-rust-mynewt/articles/simu...
https://lupyuen.github.io/pinetime-rust-mynewt/articles/clou...
sudo mount -o remount,rw /
Then we can sudo apt install anything...
sudo apt install gcc gdb git make libgles2-mesa-dev
But the more I probed, the more it looked like plain Ubuntu with Wayland and AppArmor, without X11 :-)
Check out what I found: https://lupyuen.github.io/pinetime-rust-mynewt/articles/wayl...
https://lupyuen.github.io/pinetime-rust-mynewt/articles/dfut...
https://lupyuen.github.io/pinetime-rust-mynewt/articles/mcub...
We'll be using SPI Flash in the MCUBoot Bootloader for storing the old firmware, so that MCUBoot can roll back to the old firmware if the new firmware doesn't start.
https://lupyuen.github.io/pinetime-rust-mynewt/articles/spif...
(Lemme know if you're keen to use Retro Games as a Watch Face!) https://lupyuen.github.io/pinetime-rust-mynewt/articles/chip...
VSCode Debugger with ST-Link can help!
Lemme show you how I used the debugger for my first contact with RIOT-OS...
It’s a great way to learn how real IoT products are created… At a fraction of the cost of professional embedded tools and workstations!
Here are the steps to configure a Raspberry Pi (1, 2, 3 or 4, with 1 GB RAM or more) for debugging the Rust+Mynewt Firmware for PineTime…
Also explains how bindgen creates Rust bindings for importing C functions.
Presented in an experimental comics style. Enjoy! :-)
Like the Mynewt Sensor Framework. It really saves you a lot of trouble when building IoT devices. Just pick a sensor driver from their library, and Mynewt handles all the sensor polling for you...
https://mynewt.apache.org/latest/os/modules/sensor_framework...
Adding Rust to the core Mynewt OS may cause "Abstraction Bloat", I think. We will start adding layers of wrappers on top of bare metal to make the OS look tidily object-oriented, to fit all past, present and future microcontrollers, peripherals, data interfaces, ... Then add another layer to make it easy for app developers to call.
No offence to the Embedded Rust community, but I fear that Mynewt with Rust will become a complicated OS with this GPIO code...
https://rust-embedded.github.io/book/static-guarantees/desig...
The best way forward I think: Get embedded app developers to move away from C and port their embedded apps to Rust. Build the apps with safe Rust wrappers on top of the OS.
Once we figure out what kind of APIs the embedded Rust apps really need (e.g. Sensor Framework), then we dig deeper and restructure the OS with Rust. This could work with any embedded OS: Mynewt, Zephyr, FreeRTOS, ...