klonyyy / STMViewer

Real-time STM32 variable & trace viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quick Start not clear

42Bastian opened this issue · comments

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

Hello, what do you mean by "download"? STMViewer's variable viewer is used to connect to a running target and reading the memory values off addresses based on the application *.elf file.

Fell free to suggest improvements as some things might be obvious for me and maybe I'm not aware of thing that could be unclear.

@Candas1 thanks for the video! I'm also planning on making an official one sometime soon ;)

For the QuickStart: It is not clear it directly connects to a running target.

Ok, the big red button was misleading. I clicked on it, and it either says "STOPPED STLink not found" (true, I have STCubeProgrammer connected) or "STOPPED STM32 target not found!"

Could it be, it does not work with STM32H563ZI? I tried CubeMonitor and this one works (though I'd prefer this simpler interface).

Could you attach the logs (either ~/STMViewer/logs/ or C:\Users\<USER>\AppData\Roaming\STMViewer\logs\ on Windows) ? Did you build the STMViewer yourself or used the attached installers?

Here the log:

[2024-02-22 11:20:08.824] [logger] [info] Starting STMViewer!
[2024-02-22 11:20:08.824] [logger] [info] Version: 0.4.0
[2024-02-22 11:20:08.824] [logger] [info] Commit hash 4d22bcdeb6d0a01148aff162177f075b49920258
[2024-02-22 11:20:09.103] [logger] [info] GDB version: 132
[2024-02-22 11:20:18.379] [logger] [info] Adding variable: counter
[2024-02-22 11:20:18.379] [logger] [info] Adding plot: new plot0
[2024-02-22 11:20:18.379] [logger] [info] Adding series: counter
[2024-02-22 11:20:18.379] [logger] [info] Adding trace plot: CH0
[2024-02-22 11:20:18.379] [logger] [info] Adding trace plot: CH1
[2024-02-22 11:20:18.379] [logger] [info] Adding trace plot: CH2
[2024-02-22 11:20:18.379] [logger] [info] Adding trace plot: CH3
[2024-02-22 11:20:18.379] [logger] [info] Adding trace plot: CH4
[2024-02-22 11:20:18.379] [logger] [info] Adding trace plot: CH5
[2024-02-22 11:20:18.379] [logger] [info] Adding trace plot: CH6
[2024-02-22 11:20:18.380] [logger] [info] Adding trace plot: CH7
[2024-02-22 11:20:18.380] [logger] [info] Adding trace plot: CH8
[2024-02-22 11:20:18.380] [logger] [info] Adding trace plot: CH9
[2024-02-22 11:20:18.380] [logger] [info] Project config path: Z:/home/bastian/develop/sciopta2.7/exp/krn/arm/hello/stmviewer.cfg
[2024-02-22 11:20:24.772] [logger] [error] Can not connect to target. Please use 'connect under reset' and try again
[2024-02-22 11:20:24.773] [logger] [error] Can not connect to target. Please use 'connect under reset' and try again
[2024-02-22 11:20:30.707] [logger] [info] Exiting trace plot handler thread
[2024-02-22 11:20:30.711] [logger] [info] Exiting GUI main thread
[2024-02-22 11:20:31.285] [logger] [info] Closing STMViewer!

Not sure where I could select "connect under reset".

I did use the installer.

This is in case in which no other program uses the STLink? Could you make sure, for example by repluging the stlink before trying again? Also could you check (for example using STM32 Cube programmer) if these params match your STM32:

# Chip-ID file for STM32H5xx device
#
dev_type STM32H5xx
ref_manual_id 0481
chip_id 0x484                // STM32_CHIPID_H5xx
flash_type L5_U5_H5
flash_size_reg 0x08fff80c
flash_pagesize 0x2000        // 8 KB
sram_size 0xa0000            // 640 KB
bootrom_base 0x0bf80000
bootrom_size 0x8000          // 32 KB
option_base 0x0
option_size 0x0
flags dualbank

these are the params from the stlink library used by the STMViewer. Maybe there's some issue with the STM32H5 config.

I am checking, but having trouble finding the addresses in the STM manuals.
At least the chip_id, flash page and total size and sram_size fit.

In STMCubeMonitor I had to set the access port to 1 instead 0. But do not see if this can be done via .chip file.

Are you working with SWD or JTAG?

Are you working with SWD or JTAG?

SWD

Ok, I give up. Thanks for replies. I tried FOSS stlink tool, but it crashes.