r/Zephyr_RTOS

Zephyr-native implementation of Meshtastic
▲ 15 r/Zephyr_RTOS+1 crossposts

Zephyr-native implementation of Meshtastic

I've been experimenting at writing a Zephyr-first version of Meshtastic to get a truly platform independent stack that can "just work™" on the 100s of boards already supported in Zephyr and leverages Zephyr features around power management, sensor framework abstraction, settings mgmt, Bluetooth stack, etc.

Results are _really_ promising so far. Compiles in like 10 seconds, boots immediately, ... Curious to hear people's thoughts!

github.com
u/kartben — 9 hours ago
▲ 14 r/Zephyr_RTOS+3 crossposts

Light Tasking Ada Runtime for Zephyr on Arm Cortex M

I am a big fan of the Zephyr RTOS, of Home Assistant and of the programming language Ada SPARK and the use of formal methods to deliver better software to the world.

There was limited support for Ada on Zephyr, so I sat down this weekend and vibe-coded a light tasking runtime for Zephyr. The substack post with the backstory is here:

The actual repository is here:

https://gitlab.com/close-hauled/light-tasking-zephyr

What does this give you? The opportunity to write better software on Zephyr and statically (during compile time) prove the absence of runtime errors and prove functional correctness of (parts of) an algortihm.

I used it on a Pico 2W to report pH and TDS values to my home assistant setup.

Interested in Ada and want to give it a try, all the tools are open source, lots of getting started materials are here https://ada-lang.io/.

open.substack.com
u/Shot-Confusion8356 — 11 hours ago
▲ 13 r/Zephyr_RTOS+1 crossposts

Vanilla Zephyr port of Qorvo DW3xxx UWB SDK [open source, debugging help welcomed]

Qorvo’s UWB SDK ships with deprecated nRF5 SDK 17.1.0 + FreeRTOS. No public reference exists for porting it to vanilla Zephyr. Nordic confirmed this on their DevZone in 2023. Most people end up using br101’s open-source decadriver (no FiRa MAC) or staying on FreeRTOS.

I needed the full MAC for a project, so I spent a couple of weeks writing the port: https://github.com/amstrdm/dw3xxx-sdk-zephyr

Feel free to have a look if it’s of interest to you I‘d appreciate a star since that increases the chance of someone from qorvo seeing it and helping to get the rest working :)

You’re also very welcome to help drive this forward just submit an issue/PR

I achieved west module integration, DT bindings for DW3xxx family, Kconfig, all OSAL shims rewritten for Zephyr (qsignal/qtimer/qthread/qspi/qgpio/qpwr), mcps_crypto wrapper on mbedTLS, SPI/wake/IRQ, FiRa session init, Block 0 fires and completes.

As a note there is some stuff that still has issues and/or doesn’t work properly yet. Block 1 never fires. After Block 0, the MAC binary does ~46 SPI transactions then goes silent. Chip is healthy (IDLE_PLL, clean status). Since the MAC is a precompiled .a, can’t debug from outside. Probably a FreeRTOS assumption the OSAL shims don’t capture, but I’m guessing.

The README documents architecture, all the patches needed, and known limitations. If you’ve debugged blob-on-different-RTOS issues before, the Block 1 failure might be obvious to you. If you’re looking at vanilla Zephyr + DW3xxx, the working layers are a solid starting point even if you skip the MAC.

Footprint on nRF52833 with MAC linked: ~85% flash, ~70% RAM before app logic. 52840/5340 recommended.

u/cuzimrave — 2 days ago