owned this note
owned this note
Published
Linked with GitHub
# Oxidize impl days
https://tinyurl.com/oxidizeimpl
## Venues
Co.up Adalbertstraße 7
Ferrous Systems Office Ohlauer Straße 43
## Tools
| Tool | Who |
| -------- | -------- |
| Saleae 8ch Logic Anylizer for non-commercial useText| [Luciano Moretti](https://www.linkedin.com/in/lucianomoretti/) |
| JLink-EDU Probe | [Luciano Moretti](https://www.linkedin.com/in/lucianomoretti/) |
| JLink-Ultra+ | [Michał Fita](https://www.linkedin.com/in/michalfita/) |
## Projects
### Multi-core support for RISC-V
Trying to use both cores on Kendryte K210.
There are two major problems:
* K210 openocd does not support any interaction with second core
* flashing utility behaves in a bad way: firmware is not uploaded consistently, resulting in a mix of old and new code chunks
Additionally, due to inability to start execution on the second core in gdb, the only possible way of using both cores -- starting from the SPI flash. This approach requires a hack in `riscv-rt` with additional jump from `0x8000_0000` to `0x4000_0000` upon entry (by default, bootrom code starts execution of firmware from `0x8000_0000`).
Approach with parking and then waking up via CLINT was implemented. Firmware actually boots on both cores, but crashes in a different ways due to an inconsistency of firmware image.
-Vadim
### Running Rust on RIOT on RISC-V
Should work out of the box, shouldn't it?
We've stumbled over some stones on the way, but nothing major -- the largest issues were finding the right toolchain and setting a few flags here and there.
<!--
Steps required on Debian:
* Checkout RIOT from https://github.com/RIOT-OS/RIOT.git
* Download OpenOCD and GCC from SiFive: https://www.sifive.com/boards
* In any RIOT example (eg. saul), `export TARGET_ARCH=somewhere/bin/riscv64-unknown-elf` and `export OPENOCD=somewhere/bin/openocd`
* `make BOARD=hifive1 all flash term`
That should get you a RIOT prompt -- without Rust, so far
In a checkout of <https://gitlab.com/etonomy/riot-examples>:
* Change `CARGO_TARGET` to `riscv32imac-unknown-none-elf`
* Add the exports from above
* `make BOARD=hifive1` fails so far; probably because riot-sys passes RIOT's GCC-based CFLAGS to the clang inside bindgen. So far, error messages keep "improving" by adding `--target=riscv32` to the RIOT_CFLAGS and removing everything clang complains about...
-->
First Rust code was executed on a HiFive1 board running on RIOT-OS at on 2019-05-28 at 11:35 local time! Multi-threaded execution followed soon after.
The [`riot-examples`](https://gitlab.com/etonomy/riot-examples/) now all run on the hifive1 board out of the box, assisted by updates to the `riot-sys` crate. Installation of adaequate GCC and OpenOCD is manual and may require adding lines to the Makefile, but that is explained in the examples' README.
--Christian (chrysn), Vadim (Disasm)
### Monotron! (github.com/thejpster, @therealjpster)
> An 8-bit style home computer built out of a Cortex-M4 microcontroller. 32 KiB
RAM, 256 KiB flash, 400x600 @ 60 Hz VGA.
I have two boards available. You can write applications in C or Rust and load
them into RAM over Serial or from the SD card. Or you can hack on the kernel -
sprites? better audio synth? Rust code for the Atmel keyboard controller?
See github.com/thejpster/monotron/issues and github.com/thejpster/monotron-apps/issues
*SUCCESS* - we managed to fix the interrupt routines that control the video and
massively reduce the timing jitter when running code in a tight loop (e.g. when
running BASIC). I then went on to look at the file system API.
-- Jonathan 'theJPster' Pallant
### USB on STM32L432
SoloKeys makes open source security keys (USB + NFC, FIDO2 and soon PGP/PKCS#11), unfortunately in C so far.
Also unfortunately, no USB device drivers available so far.
https://github.com/solokeys/solo-bsc/issues/1
Want to get the basics (CDC, HID) to run, using
- https://github.com/dmitrystu/libusb_stm32 (minimal C impl, stm32l433cc target)
- https://github.com/mvirkkunen/usb-device
- https://github.com/mvirkkunen/stm32f103xx-usb
Stretch goal is "via RTFM" :)
I have some keys I can distribute.
-- Nicolas 'nickray' Stalder
### ed25519 on Cortex-M4
Cortex-M4 has constant time operations allowing efficient Curve25519 field operations: https://github.com/BjoernMHaase/fe25519 ([more links](https://github.com/dalek-cryptography/curve25519-dalek/issues/228)).
The goal would be to get NaCl running with these.
-- Nicolas 'nickray' Stalder
### probe-rs ([link text](https://github.com/Yatekii/probe-rs))
Rust native ARM (for now) debug support for various probes (ST-Link, JLink, you name it).
We are aiming to have a (near) complete ARM ADIv5.2 lib to flash, debug, inspect, trace ARM chips from any Rust application with future possibility of cargo integration.
Looking for folks interested in the idea, discussing solutions, writing code.
-- Noah 'Yatekii' Hüsser
### Standardized Protocol Generation
A lot of protocols such as Zigbee, Bluetooth, etc. require a byte/bit level protocol which needs to be translated into Rust types.
Instead of every project implementing its own, I would love to discuss ideas and possibilities and the different implementations that already exist and aim for a proc-macro based library that can automatically generated a protocol specific Rust API to parse, sanitize and build packets.
-- Noah 'Yatekii' Hüsser
### Network abstractions in the style of embedded-hal
Now that there are a few network libraries around (smoltcp, jnet, RIOT), maybe it's time to introduce traits at some points. What should those points be? "A truncatable network buffer", possibly with lower-level address data? "A readable and a writable CoAP message"?
(Not particularly followed up on during impl days; from some small chats, next steps would be just to sketch something up for myself and others to toy with, without trying to build the ultimate solution.)
--Christian (chrysn)
### Internet of Streams
I've been working on building an open source [sensor network](https://github.com/ferrous-systems/internet-of-streams) based on the DWM1001-DEV board (the one from the workshops on Friday). This work has been [streamed online](https://www.youtube.com/playlist?list=PLX44HkctSkTewrL9frlUz0yeKLKecebT1), and aims to be a good example of a growing set of embedded Rust applications.
I'll be working on some things today, including:
* Updating Internet of Streams to use the new nrf52-hal 0.8.0 release
* Adding support for the Rubble bluetooth stack to the boards
If you have a DWM1001 from the workshop, come work with me and let's get some boards talking to eachother!
-- [James Munns](https://twitter.com/bitshiftmask)
### ATSAMS70Q21
Bringing up board based on Atmel/Microchip ATSAMS70Q21 in preparation for HAL development.
After several more evenings of efforts: https://github.com/michalfita/atsams70-rust
-- [Michał Fita](https://www.linkedin.com/in/michalfita/)
### Rust Anywhere
Develop your application logic without being tied down by hardware by creating a hardware simulator using desktop UI widgets. Our project shows a pattern to build application code and integrate it into a desktop simulator, or into a binary to be flashed onto hardware.
https://github.com/junelife/rust-anywhere
### Micromath: Embedded arithmetic, vector, and statistics library
https://github.com/NeoBirth/micromath
The [`accelerometer` crate](https://crates.io/crates/accelerometer) contains the beginnings of an advanced embedded arithmetic library featuring fast, safe floating point approximations for common arithmetic operations, 2D and 3D vector types, and statistical analysis, which is useful for many more things than just accelerometers.
Impl day goal: extract the generally useful math parts out into a new crate: `micromath`. The goal is to use fast, state-of-the-art approximations which sacrifice precision for performance (as opposed to the `libm` crate, which is high precision but uses FPU-intensive operations)
RESULT: **RELEASED!!!** https://crates.io/crates/micromath
-- [Tony Arcieri](https://twitter.com/bascule)
### Rust on the Adafruit PyPortal (ATSAMD51J20)
The PyPortal is a touchscreen SAMD51 device with WiFi (Espressif ESP32). Help us port Rust to it for the first time!
RESULT: **SUCCESS!!!** https://github.com/atsamd-rs/atsamd/pull/55
-- [Tony Arcieri](https://twitter.com/bascule) and Shella Stephens
### Rust on the Adafruit PyPortal Part II: ILI9341 display controller support
We got Rust ported to the PyPortal yesterday. Today we'd like to attempt to control the [ILI9341 TFT LCD chip](https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf) in order to use the device's built-in display.
There is a Rust crate for it here:
https://github.com/yuri91/ili9341-rs
There is also a WIP branch on the `atsamd-rs` project which attempts to add ADC support:
https://github.com/sajattack/atsamd/commit/d6e4ed5163846c401ae4feb32694330b4d4e80c2
There's something not quite right though. Via the upstream maintainer:
> I'm not getting all zeroes anymore, but I'm not getting good readings either
If there's anyone around with a logic analyzer, we could use help debugging the ADC. (NOTE: we're not quite ready yet. This afternoon?)
-- [Tony Arcieri](https://twitter.com/bascule) and Shella Stephens
RESULT: Stuck on ILI9341 display bus support. Opened an upstream issue here: https://github.com/yuri91/ili9341-rs/issues/2
### `esp32spi` crate
Goal: Write a crate for communicating with the Espressif ESP32 Wi-Fi coprocessor via the SPI interface. We can port the AdaFruit CircuitPython crate to Rust:
https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI
-- [Tony Arcieri](https://twitter.com/bascule)
### Try to put Embedded-Hal into Tock
Tock has its own HIL but I'd like to see how quickly we can switch it out for embedded-hal. I'll be first bringing up the CC1352 with embedded-hal but if someone wants to leap ahead with their nrf52 knowledge, I'd be happy to support.
-- Louis Thiery
### Bitcoin/Lightning Network Vending Machine
Porting my Snacks Vending Machine Project from Python running on a Raspberry Pi Zero to an Embedded Rust project. Need help choosing appropriate hardware.
[Demo](https://www.youtube.com/watch?v=OgIIBA__6XA)
[Python Code](https://github.com/fjahr/lightning_vendor)
-- [Fabian Jahr](https://www.twitter.com/fjahr)
### IPv6 SLAAC for smoltcp
IPv6 autoconfiguration shall get your networked device an address so that it can be reached from anywhere in the world.
[astro](https://github.com/astro)
### Serial over BLE
There are a few unoffical implementations of Bluetooth Classic serial ports over BLE. These are [Nordic UART Service](https://devzone.nordicsemi.com/f/nordic-q-a/10567/what-is-nus-nordic-uart-service) and [connectBlue SSP](https://stackoverflow.com/questions/24303691/btle-4-0-connectblue-low-energy-serial-port-service). The Nordic version seems to be more popular and supported by hardware. Might be worth using as an example for Rubble.
-- [Tristan Lostroh](https://twitter.com/tl8roy)
### Rust running on an STM32F302R8 Nucleo Board
Managed to get Rust running on the STM32F302R8 Nucleo Board that I have. It only blinks the LED but it does run. (https://github.com/tl8roy/stm32f302r8_rust)
-- [Tristan Lostroh](https://twitter.com/tl8roy)
## Misc
I have a spare transit ticket if anyone wants it (edit: placed it on the table by the fridge)- [Luciano Moretti](https://www.linkedin.com/in/lucianomoretti/)