| .. | ||
| boards | ||
| circuitpy | ||
| common-hal | ||
| supervisor | ||
| tools | ||
| background.c | ||
| background.h | ||
| link.ld | ||
| Makefile | ||
| mpconfigport.h | ||
| mpconfigport.mk | ||
| mphalport.c | ||
| mphalport.h | ||
| qstrdefsport.h | ||
| README.md | ||
| renode.resc | ||
| Simple32kHz.cs | ||
Renode
Renode is an emulator targeting microcontroller-class devices. This port is a minimal version of CircuitPython that runs under Renode. Renode is designed to mimic full microcontrollers but CP uses more peripherals than what Renode has implemented so far. This port allows us to run on a variety of CPUs without worrying about peripherals.
Running
- Get Renode: https://renode.io/#downloads
cd ports/renodemake BOARD=renode_cortex_m0plus- In another tab:
tio /tmp/cp-uart renode- In renode:
include @renode.resc startpausequit
Step 4 sets up tio to talk to CircuitPython via UART <-> PTY bridge.
Other stuff
Emulator logging
Renode modules have debug logging that can be enabled with logLevel with an int
between -1 for NOISY and 3 for errors only.
GDB
Renode can provide a GDB server. It is very useful for precisely controlling the emulator's execution.
machine StartGdbServer 3333 true
Execution profiling
In renode do cpu EnableProfiler CollapsedStack $ORIGIN/profile.folded before starting
the emulation. You can view it using Speedscope. CircuitPython calls
a lot of functions and may overwhelm speedscope. You can enable this tracing over a specific
section of CircuitPython execution to limit the capture size.
Execution tracing
If you want to see every instruction run you can do: cpu CreateExecutionTracing "tracer_name" $ORIGIN/instruction_trace.txt Disassembly.