Help using SystemView on an STM32 Nucleo board with re-flashed ST-Link #jlink #stm32
Hello:
I remembered that Anas Nashif wrote a post about this subject:
https://www.planux.com/index.php/2018/08/21/tracing-zephyr-applications-with-segger-systemview/
HTH, Regards,
El domingo, 4 de abril de 2021 3:15:14 (CEST) carlos.rodriguez via lists.zephyrproject.org escribió:
Hello:
I was wondering if the community could help me with using SystemView with Zephyr.
When I connect to the board using JLink and then try to record with Systemview, I get a message telling me that the RTT control block was not detected. If I force the call to SEGGER_SYSVIEW_Start() by either setting CONFIG_SEGGER_SYSTEMVIEW_BOOT_ENABLE=y or by putting it in my main function, what I get instead is a message to the effect that it can't find the SystemView buffer.
I believe I've been following the instructions correctly as outlined here:
https://docs.zephyrproject.org/2.4.0/guides/debugging/probes.html?highlight=segger.
and here
https://docs.zephyrproject.org/1.9.0/samples/subsys/debug/sysview/README.html
I am using Zephyr 2.4.9 with the 0.11.4 SDK on Ubuntu 20.4.
For the image, I am using the hello_world example and adding the following to the prj.conf file:
CONFIG_TRACING=y
CONFIG_SEGGER_SYSTEMVIEW=y
CONFIG_THREAD_NAME=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_SEGGER_SYSTEMVIEW_BOOT_ENABLE=y
CONFIG_STDOUT_CONSOLE=y
It's interesting to note that JLink itself appears to connect just fine:
Connecting to target via SWD
Found SW-DP with ID 0x4BA01477
STM32 (Protection Detection): Unexpected IDCODE DEV_ID 0x 461 found. Only checking the 1st flash bank for write protection.
Found SW-DP with ID 0x4BA01477
DPv0 detected
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>
I am working on a Nucleo-L496ZG board, but the same thing happens on a Nucleo-F429Zi or a Nucleo-L4R5zi. I am following the SEGGER instructions to flash the onboard ST-Links with JLink firmware, which appears to work fine.
Any help will be appreciated.
Best regards:
-Carlos Rodriguez.
--
Raúl Sánchez Siles
SW Engineer
K-LAGAN EID