Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pyocd/debug/rtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ def __init__(self, target: SoCTarget, address: int = None,

def _find_control_block(self) -> Optional[int]:
addr: int = self._cb_search_address & ~0x3
search_addr: int = addr
search_size: int = self._cb_search_size_bytes
if search_size < len(self._control_block_id):
search_size = len(self._control_block_id)
Expand All @@ -435,7 +436,7 @@ def _find_control_block(self) -> Optional[int]:

while search_size:
read_size = min(search_size, 32)
data = self.target.read_memory_block8(addr, read_size)
data = self.target.read_memory_block8(search_addr, read_size)

if not data:
break
Expand All @@ -454,6 +455,8 @@ def _find_control_block(self) -> Optional[int]:
if offset == id_len:
break

search_addr += read_size

return addr if offset == id_len else None

def start(self):
Expand Down