Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not found RTT #7

Open
Lechuck101984 opened this issue Oct 9, 2024 · 4 comments
Open

Not found RTT #7

Lechuck101984 opened this issue Oct 9, 2024 · 4 comments

Comments

@Lechuck101984
Copy link

Lechuck101984 commented Oct 9, 2024

HI,
PREMISE: I use this app with 4 types of ST uC and it works very well. thanks for all, your job is very appreciated
Yesterday I tried with STM32C011F6P6 and it didn't work.
I added the -v 4 option and I see that it doesn't find the RTT zone... In the details I see in the source code that it gives the following error log:
case STLINK_SWD_AP_FAULT:
/* git://git.ac6.fr/openocd commit 657e3e885b9ee10
* returns ERROR_OK with comment:
* Changing error state when reading external RAM.
* This fix allows the CDT plugin to view memory.
*/
LOG_DEBUG("STLINK_SWD_AP_FAULT");

Note: This uC has an MPU but in my case it is disabled
Note2: I tried to use
strtt-v 4 -ramstart 0x20000028 -tcp
log.txt
but it doesn't fix the bug
Here is my *.map
.bss._SEGGER_RTT
0x0000000020000028 0xa8 ./Core/Src/SEGGER/SEGGER_RTT.o
0x0000000020000028 _SEGGER_RTT
.bss._acDownBuffer
0x00000000200000d0 0x10 ./Core/Src/SEGGER/SEGGER_RTT.o
.bss._acUpBuffer
0x00000000200000e0 0x200 ./Core/Src/SEGGER/SEGGER_RTT.o

Note3: with a SEGGER J-LINK + Jlink RTT viewer...without change FW...it works very well

@Rodrigodd
Copy link

I am hitting the same problem with STM32C011F4P6, passing -ramsize 4 fixed the problem for me.

What appear to be happening is that strtt tries to read the entire RAM but fail at certain point, and give up on searching for the RTT. Changing the source code to ignore the error and still search the memory read so far appears to fix this problem (not sure if it would cause other problems though).

@Rodrigodd
Copy link

Just discovered that pyOCD also supports reading RTT console from the ST-LINK:

pyocd pack update                    # install your board, if missing
pyocd install stm32c011              #

pyocd list --targets | grep stm32c0  # find your board

pyocd rtt --target stm32c011f4px     # read it

@dufguix
Copy link

dufguix commented Jan 29, 2025

Any update on this ?

@Rodrigodd Why do you use -ramsize 4 ?
STM32C011 has 6 kB.

EDIT: It works for me. I just forgot to pass my RTT init function while debugging.

@Rodrigodd
Copy link

Why do you use -ramsize 4? STM32C011 has 6 kB.

@dufguix I found 4 by try and error. I should use 6, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants