How to use Renode
The Renode simulator is a software tool developed by Antmicro that the Controls team uses to run unmodified binaries identical to the ones one would normally flash onto target hardware. Put simply, it simulates the hardware and allows us to run and debug tests in preparation for hardware testing. It supports GDB (GNU Debugger) and Telnet usage and is incredibly useful for ironing out higher level software bugs.
Step-by-step guide
In order to use Renode:
- Open your codespace
- Open a terminal by pressing control+tilde.
- Compile code for the Renode simlulator by running make leader TEST=test_name_here (exclude Test_ and .c, ex: compile Test_ReadCarCan.c with )
- To start Renode, run
Scripts/start_renode.sh
- At this point, Debugger can also be used to debug the code. Additionally, telnet can be use to view the UART (?) output in terminal.
Renode has commands that allows us to start and quit. They also have single letter aliases.
- To start the simulation, enter
start
ors
- To exit or quit the simultaion, enter
quit
orq
. Renode will then ask you to confirm if you want to exit the simulation by enteringy
orn
for yes or no.
Troubleshooting
- "Please add your load_env_vars.sh script to your .bashrc file.": The script is looking for certain environment variables that need to be set. This is done in the load_env_vars.sh script. We can fix this issue by running this script in the .bashrc file, which runs every time we start up a new terminal.
Find your
.bashrc
script usingcd ~
and thenls -a
(since it is usually in the home folder):- Type
code .bashrc
to edit the file - At the end of the file, add
. <path/to/load_env_vars.sh/from/.bashrc/file>load_env_vars.sh
<path/to>load_env_vars.sh
is the script to run.
means to run the script in the current session rather than a new session- If this doesn't work, check the bash message to make sure it was able to find the script. If it says "no such file or directory is found," it means the path to the file is incorrect
in progress
Related articles
Welcome to the University Wiki Service! Please use your IID (yourEID@eid.utexas.edu) when prompted for your email address during login or click here to enter your EID. If you are experiencing any issues loading content on pages, please try these steps to clear your browser cache.