pyOCD icon indicating copy to clipboard operation
pyOCD copied to clipboard

RTT control block search code malfunction

Open elfmimi opened this issue 1 year ago • 2 comments

RTT control block search code functions incorrectly in certain cases.

A typical case is when the control block ID string is located across a 32-byte boundary.

error message for rtt subcommand:

0001919 C Control block not found [main]

error message for gdbserver subcommand, shown in gdb side:

Error: Control block not found

workaround:

try changing the base address by offset of 16 bytes. that is, one out of the following two should succeed. pyocd rtt --target cortex_m -a 0x20000000 -s 0x10000 pyocd rtt --target cortex_m -a 0x20000010 -s 0x10000

or force 16-byte alignment for RTT control block.

elfmimi avatar Jan 14 '24 14:01 elfmimi

Hello, how could we push to get this fix officially in pyocd? The erroneous behavior when trying to use RTT is still there (e.g. python -m pyocd rtt --target nrf52832) and @elfmimi 's implementation fixes the issue.

rkyurpan256 avatar Dec 12 '24 13:12 rkyurpan256

Also hitting this issue. Happy to do any testing/reviews to help move it forward

Dillonmcewan avatar Dec 19 '24 17:12 Dillonmcewan