Arm Mbed OS support forum

Trying to run debugger on the target b-l4s5i-iot1a , get rw_IRAM1 outside segment

I have two types of st discovery brds, the disco-l475-iot01a which works great able to connect and debug.
The second board is the b-l4s5i-iot0a1, when I try to connect and debug I get the rw_IRAM1 outside of segment. Then of course the gdbserver gets the exception individual must not cross memory region boundary. I seen this occurred before with other entries but I have not see a solution or a work around.
Note I have the latest version of studio and the the tools are up to date.

Any help cause we are developing a target brd with the stm32l4, it is important to get this going.

Thanks

warning: []
[2020-11-18T16:33:56.178] [INFO] root/mbs-debug - log: Loadable section “RW_IRAM1” outside of ELF segments
[]
[2020-11-18T16:33:56.255] [INFO] root/mbs-debug - stdout: done.
[]
[2020-11-18T16:33:56.288] [INFO] root/mbs-debug - stdout: 0001952:INFO:gdbserver:One client connected!
[]
[2020-11-18T16:33:56.325] [INFO] root/mbs-debug - log: warning: Loadable section “RW_IRAM1” outside of ELF segments
[]
[2020-11-18T16:33:56.326] [INFO] root/mbs-debug - log: warning: Overlapping regions in memory map: ignoring
[]
[2020-11-18T16:33:56.398] [INFO] root/mbs-debug - stdout: EvrRtxMutexError (mutex_id=, status=) at .\mbed-os\cmsis\device\rtos\source/mbed_rtx_handlers.c:141
[]
[2020-11-18T16:33:56.400] [INFO] root/mbs-debug - stdout: 141 }
[]
[2020-11-18T16:33:56.401] [INFO] root/mbs-debug - stdout: 0002015:INFO:gdbserver:Attempting to load Argon
0002016:INFO:gdbserver:Attempting to load FreeRTOS
[]
[2020-11-18T16:33:56.402] [INFO] root/mbs-debug - stdout: 0002016:INFO:gdbserver:Attempting to load Zephyr
[]
[2020-11-18T16:33:56.402] [INFO] root/mbs-debug - stdout: 0002017:INFO:gdbserver:Attempting to load RTX5
[]
[2020-11-18T16:33:56.403] [INFO] root/mbs-debug - stdout: 0002017:INFO:gdbserver:RTX5 loaded successfully
[]
[2020-11-18T16:33:56.403] [INFO] root/mbs-debug - console: Attached to debugger on port 50004 []
[2020-11-18T16:33:56.404] [DEBUG] MbedStudio - telemetry/progress [ { percent: 0, message: ‘Loading Image’ } ]
[2020-11-18T16:33:57.036] [DEBUG] MbedStudio - telemetry/progress [ { percent: 100, message: ‘Loading Image’ } ]
[2020-11-18T16:33:57.106] [INFO] root/mbs-debug - console: Image loaded: c:/Users/SSchatzkin/Mbed Programs/blinky_b-l4s5i/BUILD/B_L4S5I_IOT01A/ARMC6/blinky_b-l4s5i.elf []
[2020-11-18T16:33:57.415] [INFO] root/mbs-debug - stdout: 0002963:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries
Traceback (most recent call last):
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 383, in handle_message
reply = handler(msg[msgStart:])
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 610, in v_command
return self.v_cont(cmd)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 625, in v_cont
if self.is_threading_enabled():
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 1157, in is_threading_enabled
return (self.thread_provider is not None) and self.thread_provider.is_enabled
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py”, line 408, in is_enabled
return self.get_kernel_state() != 0 and not self._target.in_thread_mode_on_main_stack()
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py”, line 446, in get_kernel_state
return self._target_context.read8(self._os_rtx_info + RTX5ThreadProvider.KERNEL_STATE_OFFSET)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\core\memory_interface.py”, line 64, in read8
return self.read_memory(addr, 8, now)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\debug\cache.py”, line 33, in read_memory
return self._memcache.read_memory(addr, transfer_size, now)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 233, in read_memory
data = self.read_memory_block8(addr, 1)[0]
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 253, in read_memory_block8
if not self._check_regions(addr, size):
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 225, in _check_regions
raise MemoryAccessError(“individual memory accesses must not cross memory region boundaries”)
pyocd.cache.memory.MemoryAccessError: individual memory accesses must not cross memory region boundaries
[]
[2020-11-18T16:33:57.417] [INFO] root/mbs-debug - stderr: “0002963:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries”
[]
[2020-11-18T16:33:57.418] [INFO] root/mbs-debug - log: warning: Remote failure reply: E01
[]
[2020-11-18T16:33:57.420] [INFO] root/mbs-debug - stdout: 0002963:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries
Traceback (most recent call last):
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 383, in handle_message
reply = handler(msg[msgStart:])
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 610, in v_command
return self.v_cont(cmd)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 625, in v_cont
if self.is_threading_enabled():
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 1157, in is_threading_enabled
return (self.thread_provider is not None) and self.thread_provider.is_enabled
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py”, line 408, in is_enabled
return self.get_kernel_state() != 0 and not self._target.in_thread_mode_on_main_stack()
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py”, line 446, in get_kernel_state
return self._target_context.read8(self._os_rtx_info + RTX5ThreadProvider.KERNEL_STATE_OFFSET)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\core\memory_interface.py”, line 64, in read8
return self.read_memory(addr, 8, now)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\debug\cache.py”, line 33, in read_memory
return self._memcache.read_memory(addr, transfer_size, now)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 233, in read_memory
data = self.read_memory_block8(addr, 1)[0]
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 253, in read_memory_block8
if not self._check_regions(addr, size):
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 225, in _check_regions
raise MemoryAccessError(“individual memory accesses must not cross memory region boundaries”)
pyocd.cache.memory.MemoryAccessError: individual memory accesses must not cross memory region boundaries
0003044:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries
Traceback (most recent call last):
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 383, in handle_message
reply = handler(msg[msgStart:])
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 858, in handle_query
resp = self.handle_query_xml(b’threads’, int(data[0], 16), int(data[1].split(b’#’)[0], 16))
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 1047, in handle_query_xml
xml = self.get_threads_xml()
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 1137, in get_threads_xml
if not self.is_threading_enabled():
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py”, line 1157, in is_threading_enabled
return (self.thread_provider is not None) and self.thread_provider.is_enabled
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py”, line 408, in is_enabled
return self.get_kernel_state() != 0 and not self._target.in_thread_mode_on_main_stack()
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py”, line 446, in get_kernel_state
return self._target_context.read8(self._os_rtx_info + RTX5ThreadProvider.KERNEL_STATE_OFFSET)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\core\memory_interface.py”, line 64, in read8
return self.read_memory(addr, 8, now)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\debug\cache.py”, line 33, in read_memory
return self._memcache.read_memory(addr, transfer_size, now)
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 233, in read_memory
data = self.read_memory_block8(addr, 1)[0]
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 253, in read_memory_block8
if not self._check_regions(addr, size):
File “c:\Users\SSchatzkin\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\cache\memory.py”, line 225, in _check_regions
raise MemoryAccessError(“individual memory accesses must not cross memory region boundaries”)
pyocd.cache.memory.MemoryAccessError: individual memory accesses must not cross memory region boundaries
[]
[2020-11-18T16:33:57.421] [INFO] root/mbs-debug - stderr: “0002963:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries”
[]
[2020-11-18T16:33:57.421] [INFO] root/mbs-debug - stdout:
Program []
[2020-11-18T16:33:57.422] [INFO] root/mbs-debug - stdout: stopped.

Hi @stevenscully,

To our knowledge pyOCD team is aware of this issue and is currently investigating it also for a different target: https://github.com/pyocd/pyOCD/issues/895. I recommend commenting on that thread or opening a new issue for it in https://github.com/pyocd/pyOCD/issues.

Thanks,
Arek - Mbed Studio team

Having similar problems on my STM32F429 (Nucleo). I’ve posted on the thread as you suggest. Even some of the template code won’t debug.

Any update on this one? Still getting this on 1.4.3