๐ Debugging a Space System with QEMU in One Terminal Window
๐ก Newskategorie: Linux Tipps
๐ Quelle: reddit.com
I am working on a moon rover for Carnegie Mellon University which will be launching next year to look for water ice at the South Pole. Specifically, I am working on a flight computer called the ISIS OBC (On Board Computer) and I am trying to find out how to first run QEMU in a terminal in the background, and then run GDB to connect to the QEMU instance I just backgrounded. I have tried running QEMU in the background with &
as well as using the flag -daemonize
but this causes QEMU's GDB server to not work at all. The goal is to be able to debug our flight software in GDB in one terminal window so that I can run it from inside a Docker container mounted on the repository's root.
My current solution was to just run QEMU in another gnome-terminal I initialized in the debug script when I wasn't using docker to do this, but this method will not work once dockerized since I cannot open a new terminal form inside docker. I will include the entire debug script in the comments as to not clutter up the question, since it is just extra, probably unnecessary detail.
Anyways, I would much prefer to run something like this to achieve my goal:
./../obc-emulation-resources/obc-qemu/iobc-loader -f sdram build/app.isis-obc-rtos.bin -s sdram -o pmc-mclk -- -serial stdio -monitor none -s -S > /tmp/qemu-gdb
rather than what I am running now:
gnome-terminal -- bash -c './../obc-emulation-resources/obc-qemu/iobc-loader -f sdram build/app.isis-obc-rtos.bin -s sdram -o pmc-mclk -- -serial stdio -monitor none -s -S > /tmp/qemu-gdb; $SHELL' --name="QEMU-iOBC" --title="QEMU-iOBC" -p
"iobc-loader" is a wrapper used to run the QEMU command by the way."app.isis-obc-rtos.bin" is of course the binary I am trying to run and "isis-obc-rtos.elf" contains the symbols used to debug it. Apologies if the answer is obvious, I am a student!
Here is an awesome picture of the rover wrapped in its gold thermal blanket: https://imgur.com/a/0ZILUoD
[link] [comments] ...