Giter Site home page Giter Site logo

klonyyy / stmviewer Goto Github PK

View Code? Open in Web Editor NEW
494.0 26.0 55.0 80.89 MB

Real-time STM32 variable & trace viewer

License: GNU General Public License v3.0

CMake 0.27% C++ 2.61% C 96.84% Assembly 0.25% Dockerfile 0.01% Shell 0.01% Batchfile 0.01% Python 0.01%
debugger real-time stlink stm32 stmstudio analyzer cubemonitor logger trace

stmviewer's People

Contributors

amurzeau avatar klonyyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stmviewer's Issues

Display (parts of) arrays

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.

High speed plotting

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 :)

Problem with changing variables name

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!

ITM port configuration issue

When configuring the active ITM ports to consume, the code uses the same mask for both ITM_TER and ITM_TPR:

stlink_write_debug32(sl, STLINK_REG_ITM_TER, activeChannelMask);
stlink_write_debug32(sl, STLINK_REG_ITM_TPR, activeChannelMask);

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:

https://developer.arm.com/documentation/ddi0439/b/Instrumentation-Trace-Macrocell-Unit/ITM-programmers-model/ITM-Trace-Privilege-Register--ITM-TPR

This considers Cortex-M4, but the registers work in equivalent way for other variants with ITM.

Quick Start not clear

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

Problem with using Var Viewer with .elf compiled by platformIO stm32duino framework.

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.
image
image

Here is the .elf file that I am trying to read.
firmware.zip

Add drop-down-list to select a variable to watch

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

Multi debug

I want to use 3 debugers(stlink v2 programer) because i use 3 stm32, is it possible to integrate it ?
Thanks.

Unlimited data points enhancement

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.

Hello

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.

Support for J-Link Debug Probes

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!

Debian binary package contains dev dependencies

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):
image

Problem Updating Variable

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.

Unobserve variables from ELF

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.

WCH1.zip

Can't update variable address

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?

Double precision support

image
Hello! I am getting weird data when trying to read double-precision floating point. Are they not supported or am I doing something wrong? Thanks!

Importing variable

Thanks again for this tool, I use it a lot.
The new feature for importing variables works well so far, I only have a little comment.
After importing a variable:
image
An update is required to get the variable's address:
image

It's not a big deal but I thought I would mention it.

Any reason not to run on macos?

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.

Installation on Windows

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):

  1. 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)

  2. Download and run the STMViewer installer: where do we get the installer from?

Thanks already for all the nice development effort and sharing

Compiling STMViewer on ArchLinux

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;

Custumization capabilities

I remember I came across this simulation a long time ago that seems to use the same UI library:
image

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:

  • being able to provide a short description for a variable
  • being able to provide a unit for a variable
  • new UI elements - sliders,gauges,checkboxes(would require min/max/step to be set by the user)
  • combobox/radio buttons (might be complicated if it needs descriptions to match values)
  • being able to resize/move the plots
  • being able to group plots/tables and use tabs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.