Git Product home page Git Product logo

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  avatar  avatar  avatar

stmviewer's Issues

High DPI font size

On Windows, on 4K (set to 150% dpi) or laptop "3K" (set to 200%dpi) monitors the font looks tiny.
image

Changing the font size in settings doesn't work great and it's not sharp:
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.

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!

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

Building - STM32 Target not found

Everything works fine when I use release.

However when I build myself (main of jlink_hss branch) I get this:
image

unknown chip id! 0x410 ?? Not sure if that's even related.

Any ideas?

Max points setting not respected

Max points parameter from settings seems to be not respected. Way to reproduce:

  1. set max viewport points to 100
  2. set max points to 100
  3. stop and see that there are points before the viewport that aren't cleared.

Can't flash board when acquisition is running

It's an obvious limitation.

One solution is to use https://www.st.com/en/development-tools/st-link-server.html. But I never seen it work. It requires both apps to support it. It is not a common setup people have.

But there might be a simple workaround which should work for everyone:

  1. when elf is deleted or change is detected, stop the acquisition and allow the board to be flashed by another program
  2. refresh the variable addresses automatically
  3. restart acquisition after e.g 5s.

Each step shall be controlled in Options.
The feature should be off by default.

Each step is useful IMO, and can be implemented one after another.

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!

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

Dimm start button when depressed

Tiny issue.

I have delay before acquisition starts. I found myself clicking the button multiple times because of delayed reaction.

Use different colors for the button active to give instant feedback that the button is depressed.

STMViewer/src/Gui/Gui.cpp

Lines 220 to 222 in 4d22bcd

ImGui::PushStyleColor(ImGuiCol_Button, color);
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, color);
ImGui::PushStyleColor(ImGuiCol_ButtonActive, color);

Invalid data read in sleep mode (WFI)

When microcontroller is in sleep mode (not deep sleep) sometimes I get wrong values. I know that JLink can read data when chip is WFI, not sure about STLink. Maybe in case when STMViewer cannot read data because of sleep it shouldn't display wrong values, and just skip this data read operation. Or find the way how to read data in sleep mode.
I also wonder how stlink_read_debug32 function differs from stlink_read_mem32, I couldn't find any description of those functions.
I tried to compile project and check it, but couldn't build it with CMake and MinGW, I've got compiler errors at very beginning of the build. Maybe you have some guide or commands how to build it on Windows?
P.S. Project is great! Thank you

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.

My time base is wrong

This is 100 Hz signal directly from ADC. As you see my there is a problem about timing.

image
image

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.

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

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.

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!

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

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

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.

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

CPU/GPU usage when idle

Windows 11.
There is constant small CPU/GPU usage even when acquisition is stopped and app is minimized.

Can we pause the rendering at least under those conditions?

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.

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.

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

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.

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?

Counter Plotting

Hello,

I would like to thank you for the great software.

I have a question :

I tried to profile some function and counters and it works well
for example

while(1){
ITM->PORT[0].u32 = size;
size++;
}

And the plot is as expected

image_2024-04-24_105301500

but when i tried to plot a cycle counter

while(1){
ITM->PORT[0].u32 = DWT->CYCCNT;
}

i get a fixed value so i'm not able to see the progression of this counter

image_2024-04-24_105554230

I would like to know if there is any solution or method to be able to get the correct plotting

Thanks a lot

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.