klonyyy / stmviewer Goto Github PK
View Code? Open in Web Editor NEWReal-time STM32 variable & trace viewer
License: GNU General Public License v3.0
Real-time STM32 variable & trace viewer
License: GNU General Public License v3.0
jlink RTT is more efficient than SWO
It would be convenient to have an option to display the contents of an array (e.g. like the output of a fft) and update that continously. Sometimes it would also be good to only display a part of that array e.g. an index-range.
Can we use STM logger (STtrace) library for buffered high data rate plotting? i'm also in motor control and sine is barely visible there :)
... the title says all.
Looks like version 1.11 of spdlog is hardcoded. On arch-linux there is actually 1.13.
Hi!
Small issue - after adding a new variable I am unable to rename it using GUI. I am able to write a new name after double click, but I havent found the way to save it - enter does not work and if I click away then the variable changes back to default "new0".
As a workaround I can create new variable, save config, rename variable in .cfg file and then open config.
I am on Ubuntu 20.04.6 LTS.
Overall its a great tool, thank you!
Hi, I coud not locate .deb package for linux and winows installers. Can you please guide.
Thank you.
When configuring the active ITM ports to consume, the code uses the same mask for both ITM_TER
and ITM_TPR
:
STMViewer/src/TraceReader/StlinkTraceDevice.cpp
Lines 66 to 67 in 4ee8555
While it is correct for ITM_TER
(each port is a bit in the 32-bit register, max 32 ports), the ITM_TPR
register has only 4 bits usable, which represent the ports in groups of 8:
This considers Cortex-M4, but the registers work in equivalent way for other variants with ITM.
The QuickStart is not very clear on how to use this tool.
I can start it, I can select a variable.
But how to "download"? My application is flashed and I use the board ST-Link (nucleo-h563zi).
Maybe a more elaborate description will help.
thx
Hi,
Sorry if this has been mentioned before but I am struggling to add variables into Var Viewer, it would just end up showing NOT FOUND! and UNKNOWN for both Address and Type.
I added the same .elf file into STM Studio and the name and address showed up normally so I don't know whether this is an issue with the compiler not including the variable or the GDB not able to read. I have also updated the GDB and is currently using version 13.2 on Windows.
I include some images describing my problem.
Here is the .elf file that I am trying to read.
firmware.zip
One has to manually enter the full name (mangled) of a variable to watch. If one use C++ with templates this is tedious, because one has to look into the .elf-file to get the mangled names: e.g. _ZN4GFSMI7DevicesI10ESC_FOC_016ConfigN3Mcu3Stm9Stm32G431EEE10mDebugTickE
is such a name in my case.
It would be beautiful to get a drop-down-list with the de-mangled names: e.g. GFSM<Devices<ESC_FOC_01, Config, Mcu::Stm::Stm32G431> >::mDebugTick
I want to use 3 debugers(stlink v2 programer) because i use 3 stm32, is it possible to integrate it ?
Thanks.
For now, STMViewer supports only 20000 points as max, so if a high freq signal comes, it will only show a very small piece of data point stream.
Hi,
I came across your project, I am really interested in using it as I am also very frustrated with STM Studio.
Seing this project a few months ago, I thought it would be great to have a web version of what you are doing, but now I see it's a lot of work.
Will your project work with any version of the Stlink ?
I would like to promote your project here if you don't mind.
Hey!
Just saw your great post on the Interrupt blog and would love to use this tool as well!
Sadly we are not using STM MCUs but processors from Silabs and Nordic.
If it is possible to support those the versatility of this tool would greatly be increased.
Below I will describe the things I found might be necessary to support those processors.
Development boards by both companies are shipped with a debugger that runs Segger J-Link software.
As far as I can tell they would be able to at least support the Variable Viewer feature. Because this debug probe can also view memory at run time.
The biggest problem for implementing support is that there is no open source implementation of Segger J-Link debugger similar to stlink
library.
But it seems to be possible to access J-Link probes with their dynamic library that they ship with their J-Link tools binary: https://www.segger.com/downloads/jlink (Installs library in /opt/SEGGER/JLink/libjlinkarm.so on Linux)
There is a this Python library that does exactly that: https://github.com/square/pylink
They do this by wrapping the calls in this library here: https://github.com/square/pylink/blob/master/pylink/library.py
An example on how to read memory can be found here: https://github.com/square/pylink/blob/master/pylink/jlink.py#L2889
For STMViewer it would be necessary to create a new JlinkHandler
to replace the current StlinkHandler.
This JlinkHandler
would then use libjlinkarm
to open debugger and read memory in the same way.
When I find time I might try to create a draft PR for this support.
But already thanks for this great tool!
Hi,
Thanks for your tool :)
The Debian package in the release page depends on dev dependencies even though it is a binary package.
I think this is the packages that need to be put as dependencies (according to readelf -d /usr/local/STMViewer/STMViewer | grep NEEDED
):
libglfw3 | libglfw3-wayland
libgl1
libglib2.0-0
libgtk-3-0
libstdc++6
libusb-1.0-0
I also suggest to add a line Categories=Development;
in STMViewer.desktop so STMViewer is put in the Development menu (next to STM32CubeIDE for example):
Hello, I want to express my gratitude for creating such a fantastic application that proves to be highly useful for robotics. I have downloaded the application and carefully followed the instructions, but I encountered an issue where the variables do not get updated, and the addresses are not displayed as expected.
I would appreciate any suggestions, hints, or insights you could provide regarding the issue I'm facing with.
Thank You.
Hello!
The problem observe with attached ELF-file & STMViewer 0.1.2.
Before subscribe this ticket ELF-file was seccesfully tested using J-Scope software.
Please investigate observed problem.
I have an elf file compiled under arm-gcc, and there's a global variable extern "C" volatile uint32_t os_ticks
in the code, however when i try the viewer by the instructions, after click the update button and a black cmd window showed off, nothing changed, so I check the disassmeble of elf and didn't find any symbol like os_ticks
, is that a problem?
Trying to build gives:
STMViewer/src/main.cpp:33:2: error: "Your system is not supported!"
I can build on linux but my daily driver is macos, I do a lot of development on there.
If there is no good reason, I will spend some time to see if I can make it work.
Currently trying to install the STMViewer on windows, but not getting anyware...
Could you please point out a bit more in detail what exactly has to be done on windows (Installation section in the readme):
Make sure you've got GDB installed and added to your PATH -> What exactly is needed to be installed using MinGW (eventually step by step or a link directly to the required things to be installed)
Download and run the STMViewer installer: where do we get the installer from?
Thanks already for all the nice development effort and sharing
Just tried to compile/install STMViewer on arch linux with no luck from master.
I get the followin errors:
In Datei, eingebunden von /home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/StlinkHandler.hpp:4,
von /home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/StlinkHandler.cpp:1:
/home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/ITargetMemoryHandler.hpp:14:33: Fehler: »uint32_t« wurde nicht deklariert
14 | virtual bool readMemory(uint32_t address, uint32_t* value) = 0;
| ^~~~~~~~
/home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/ITargetMemoryHandler.hpp:14:51: Fehler: »uint32_t« wurde nicht deklariert
14 | virtual bool readMemory(uint32_t address, uint32_t* value) = 0;
| ^~~~~~~~
/home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/ITargetMemoryHandler.hpp:15:34: Fehler: »uint32_t« wurde nicht deklariert
15 | virtual bool writeMemory(uint32_t address, uint8_t* buf, uint32_t len) = 0;
| ^~~~~~~~
/home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/ITargetMemoryHandler.hpp:15:52: Fehler: »uint8_t« wurde nicht deklariert
15 | virtual bool writeMemory(uint32_t address, uint8_t* buf, uint32_t len) = 0;
| ^~~~~~~
/home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/ITargetMemoryHandler.hpp:15:66: Fehler: »uint32_t« wurde nicht deklariert
15 | virtual bool writeMemory(uint32_t address, uint8_t* buf, uint32_t len) = 0;
| ^~~~~~~~
/home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/StlinkHandler.hpp:15:14: Fehler: »bool StlinkHandler::readMemory(uint32_t, uint32_t*)« als »override« markiert, überschreibt aber nicht
15 | bool readMemory(uint32_t address, uint32_t* value) override;
| ^~~~~~~~~~
/home/lmeier/Projekte/STMViewer/STMViewer/src/TargetMemoryHandler/StlinkHandler.hpp:16:14: Fehler: »bool StlinkHandler::writeMemory(uint32_t, uint8_t*, uint32_t)« als »override« markiert, überschreibt aber nicht
16 | bool writeMemory(uint32_t address, uint8_t* buf, uint32_t len) override;
I remember I came across this simulation a long time ago that seems to use the same UI library:
This got me thinking, do you want to keep this tool generic or are you thinking about adding customizations capabilities in the future ?
A few examples I have in mind:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.