RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.88k stars 1.98k forks source link

Support for Riotee boards #19905

Open chrysn opened 1 year ago

chrysn commented 1 year ago

Description

The Riotee module is an SMD module housing both an nRF52840 and an MSP430FR5962, which the original firmware only uses for "suspend-to-disk". It features all the hardware needed to run on energy harvesting: an MPP tracker, voltage regulators, and voltage monitoring to initiate suspend-to-disk. The module does not expose the nRF's USB port.

As a full board it is sold as the "Riotee board", which adds a USB RP2040 CMSIS-DAP debugger (with some custom extras to switch around the power supply) and feather-style pins, and has wings for sensors, capacitors and solar panels.

Notes

Quickstart

You can already play around with it by running USEMODULE+=stdio_rtt make -C examples/nimble_heart_rate_sensor BOARD=nrf52840dongle PROGRAMMER=openocd OPENOCD_DEBUG_ADAPTER=dap all flash term. It may be necessary to use the provided riotee-probe software to riotee-probe target-power --on before, as that example probably exceeds the solar power budget.

See screenshots at https://chaos.social/@chrysn/110950792138810265

Useful links

Full board description on their crowdfunding campaign at https://www.crowdsupply.com/nessie-circuits/riotee, docs at https://www.riotee.nessie-circuits.de/. Software and hardware (with the notable exception of the module itself) are open at https://github.com/NessieCircuits/. The riotee-probe tool can be installed through pip install riotee-probe (as always, I recommend doing that in a venv).


CC'ing @geissdoerfer who is behind the board in case you're interested in keeping an eye on this. If not: Sorry for the noise, I trust you'll find the unsubscribe button.

geissdoerfer commented 1 year ago

Great to see first steps toward running Riot-OS on Riotee!

* I didn't get the UART pass-through to work by setting the right pins. Then again, I'm not a big fan of serial debug anyway -- and stdio_rtt works just as expected.

Did you have difficulties configuring UART on Riot-OS side or is there anything that wasn't quite clear on Riotee side?

* The nRF can be accessed either through openocd or through pyocd. Their riotee-probe tool provides options to write the MSP's firmware, and given it's a thin tool on top of pyocd, I suspect that should also give direct MSP430 access.

With direct access, do you mean proper debugging with a tool like gdb? That would indeed be possible by just adding a few more spy-bi-wire primitives in the Riotee Probe Firmware and then implementing a probe in msp-debug, for example.

See screenshots at https://chaos.social/@chrysn/110950515515409728.

The link seems broken.

chrysn commented 1 year ago

Did you have difficulties configuring UART on Riot-OS side or is there anything that wasn't quite clear on Riotee side?

Frankly, I don't know. I set up the UART to pins D0 / P0.21 and D1 / P0.8, connected to the ttyACM0 UART, it didn't work, and then I thought twice about that I don't really like those anyway (I'm using the thing that is an actual debugger that auto-configures well and has pretty direct RAM access, so why bother going through a physical UART that I'd have to set matching baud rates on and pray it never overflows, when RTT is just picking the right module away?), so I switched to the simpler thing.

With direct access, do you mean proper debugging with a tool like gdb?

Yes -- but that works pretty fine out of the box, as both OpenOCD and pyOCD give gdb access, so make debug in RIOT dropped me into a debugger shell.

Link broken

No clue how that happened -- https://chaos.social/@chrysn/110950792138810265 is the right one, original post is fixed.

geissdoerfer commented 1 year ago

Did you have difficulties configuring UART on Riot-OS side or is there anything that wasn't quite clear on Riotee side?

Frankly, I don't know. I set up the UART to pins D0 / P0.21 and D1 / P0.8, connected to the ttyACM0 UART, it didn't work, and then I thought twice about that I don't really like those anyway (I'm using the thing that is an actual debugger that auto-configures well and has pretty direct RAM access, so why bother going through a physical UART that I'd have to set matching baud rates on and pray it never overflows, when RTT is just picking the right module away?), so I switched to the simpler thing.

I see. Having an active SWD session doesn't really go well with intermittency, so I often rely on UART for that scenario. Anyway if you have troubles with the USB-UART bridge, feel free to open an issue.

With direct access, do you mean proper debugging with a tool like gdb?

Yes -- but that works pretty fine out of the box, as both OpenOCD and pyOCD give gdb access, so make debug in RIOT dropped me into a debugger shell.

Right, debugging is fully supported for the nRF52. But for the MSP430, debugging is currently not supported. We only provide a limited set of CMSIS-DAP vendor commands that allow uploading firmware to the MSP430.

Link broken

No clue how that happened -- https://chaos.social/@chrysn/110950792138810265 is the right one, original post is fixed.