Realtime variable plotting tool for Linux
Hello everyone! I’ve struggled with the problem, that I cannot graphically monitor my variable in real-time many times. I’ve used STMStudio on windows long times ago, but for Linux, there is no such tool. I have written a small python script, based on Matplotlib plotting library, which can connect to running OpenOCD session and monitor variable by its address. What do you think?
https://github.com/leechwort/OCDPlot
How to use it in system workbench:
1. Create a new debug session. Run-> Debug configuration and double-click on ‘Ac6 STM32 Debugging’.
2. In this new session, we do not want to start GDB(we’ll connect to OpenOCD with OCDPlot). I have not found way to just disable running OpenOCD and skip GDB run, so I’ve replaced GDB binary in “Debugger” tab on “/bin/bash” binary. See screenshot. This will lead to error in the first start, but OpenOCD still runs.
3. Also, we do not need to flash our target, we just want to connect. Uncheck “Load Image” and “Load Symbols” checkboxes on “Startup” tab.
4. Run Debug. There will be error message “Could not determine GDB version using command”, just press “Ok”
5. Run ocdplot.py script:
$ ./ocdplot.py -a 0x40000024 -t uint32_t -n 100
where -a is the address of variable we want to watch, -t its type, -n - watching interval.
If you like this tool, feel free to commit new features into the repo!:)