Integrate with Renode Simulation Framework for load and debug
See original GitHub issueWhat kind of issue is this?
- Feature Request.
What is Renode?
Renode is an open source software development framework with commercial support from Antmicro that lets you develop, debug and test multi-node device systems reliably, scalably and effectively.
Renode is a fantastic tool to simulate applications on multiple boards. As an example, it supports boards from STMicro and some RISC-V boards like SiFive HiFive1, Kendryte K210 and many more.
Full board list: https://renode.readthedocs.io/en/latest/introduction/supported-boards.html
This integration would be the best of both worlds where one can develop in PlatformIO and debug/simulate on Renode without requiring hardware. Renode is available for Windows, Mac and Linux just adjusting the execution path.
I’ve started testing the available options and identified Renode can be started as a Telnet server (over a choosen port) and issued commands to it.
As an example to run the HiFive 1 ZephyrOS Hello World project, I did (on MacOS):
- Open Renode with Telnet option:
/Applications/Renode.app/Contents/MacOS/macos_run.command -P 1234
- Connected to the Renode Telnet server:
telnet 1234
- Loaded the HiFive1 board script:
include @scripts/single-node/sifive_fe310.resc
- Started Renode remote debugger port:
machine StartGdbServer 3333 True
- Loaded my “Hello World” ELF binary built on PlatformIO:
sysbus LoadELF @/Users/cdepaula/Documents/PlatformIO/Projects/200303-171147-zephyr-hello-world/.pio/build/hifive1/firmware.elf
- Start simulation with:
start

To start over, issue the command Clear
on Renode console.
Another option is loading Renode with command line execute parameters as:
/Applications/Renode.app/Contents/MacOS/macos_run.command \
-e "include @scripts/single-node/sifive_fe310.resc" \
-e "machine StartGdbServer 3333 True" \
-e "sysbus LoadELF @/Users/cdepaula/Documents/PlatformIO/Projects/200303-171147-zephyr-hello-world/.pio/build/hifive1/firmware.elf" \
-e "start"
I successfully integrated the PlatformIO debugger to an existing instance of Renode by adding debug_port = localhost:3333
to platformio.ini
on my project. Added a test breakpoint and interacted with the debugging on the simulation:
- Open Renode with Telnet option:
/Applications/Renode.app/Contents/MacOS/macos_run.command -P 1234
- Connected to the Renode Telnet server:
telnet 1234
- Loaded the HiFive1 board script:
include @scripts/single-node/sifive_fe310.resc
- Started Renode remote debugger port:
machine StartGdbServer 3333 True
From there, I clicked the debugger “Play” and PlatformIO built and loaded my application into Renode.

Continued the breakpoint:

I just was not able to “Reset” and start over via debugging or software without issuing the Clear
command on Renode and loading everything from start (it’s fast though).
I’m wiling to help writing this support if I can get some tips.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:21 (5 by maintainers)
Hi @carlosedp glad to see this! I already had an integration with pio written up internally and was thinking how to make this public, so glad you went along and did this 😉
We were busy with the Renode 1.9 relase which just went out this week - https://github.com/renode/renode/releases/tag/v1.9.0 - but now that it’s past, happy to support this effort - @PiotrZierhoffer bringing to your attention.
@carlosedp thanks for the great research! It can be easy integrated in PlatformIO. It will look for you as:
We will back soon to this issue!