facontidavide / PlotJuggler

The Time Series Visualization Tool that you deserve.
https://www.plotjuggler.io
Mozilla Public License 2.0
4.33k stars 602 forks source link

[Feature Request] "STMStudio like" input plugin #367

Open martonmiklos opened 3 years ago

martonmiklos commented 3 years ago

Hey folks!

I am using a tool called STMStudio for debugging ARM microcontrollers made by ST.

This tool basically parsing the elf files DWARF section with GDB to create a list from the used variables. (Btw. it smells GPL violation because they using a modified gdb without source code publication)

Then these extracted variables could be added onto several types of graphs and could be monitored in real time through the ST's debugger hardware.

For the later part (streaming variables from the target) we could use the openocd which would allow to use this solution with wide variety of microcontrollers (including different vendors and architectures).

I opened this issue to host some brainstorming/idea exchange in this topic because I might spend some time on implementing something similar once I manage to allocate some free time to this.

facontidavide commented 3 years ago

Be my guest!

facontidavide commented 3 years ago

How is it going? I guess this is your fork https://github.com/Rescube/PlotJuggler

martonmiklos commented 3 years ago

Thanks for asking!

You are correct this is the fork on what I am working on.

I did some investigation on what and how ST implemented in their STM studio.

Basically they using the GDB to extract the variables and their memory address and type from the ELF file. I have implemented the same approach in Qt/C++. Performance wise it has some are of improvement, but the general approach (using an external tool for elf parsing) seems feasible for me.

As a next step I will create a treeview and a model for displaying the available variables. The current elf parsing takes a while and I would like to improve it by a couple of things:

This ELF parsing and UI is just a small part of the story. I will have need to figure what is the best way to dump the selected memory regions (i.e. variables) continuously with background memory access via openOCD. My initial plan is to use the openOCD TCP socket interface and use the memory access commands.