RTOS Proxy (ThreadX Cortex-M7) disconnects during flash when using J-Link GDB
I am experiencing a problem with RTOS Proxy in STM32CubeIDE 2.0.0/2.1.0 when debugging a ThreadX application on STM32H753 using a SEGGER J-Link.
The same setup works correctly with STM32CubeIDE 1.19.0, but after upgrading to 2.0.0/2.1.0 the debugger aborts during the flash download when RTOS Proxy is enabled. If I use J-Link Kernel Awareness instead RTOS Proxy everything works fine.
Configuration
MCU: STM32H753BI
RTOS: ThreadX
STM32CubeIDE: 2.0.0
RTOS Proxy: ThreadX / Cortex-M7
Debug probe: SEGGER J-Link Ultra+
J-Link GDB Server: V8.80
Interface: SWD
Debug configuration:
- RTOS Awareness: Enabled
- RTOS Kernel Awareness: RTOS Proxy
- RTOS: ThreadX (Cortex-M7)
Problem
When starting a debug session, the debugger stops at the point where the firmware should be downloaded.
The following error appears:
Remote communication error. Target disconnected: Not a directory.
Failed to execute MI command:
load <path>/app_1500_xg.elf
where <path> is the correct and full absolute path to my elf file.
After the abort, only 664 bytes are written to flash.
RTOS Proxy log
STMicroelectronics RTOS Proxy. Version 0.17.0
Loading RTOS driver... ThreadX
ThreadX, port driver created: cortex_m7
Port driver loaded: cortex_m7
Connecting to GDB server 127.0.0.1 on port 2331 ... Connected
Listen for GDB connection on port: 60000 ... Connected
_tx_thread_current_ptr:0x2403cfa4
_tx_thread_created_ptr:0x2403cfac
_tx_thread_system_state:0x240005a0
_tx_semaphore_created_ptr:0x2403cf70
_tx_mutex_created_ptr:0x2403cf88
_tx_timer_created_ptr:0x2403d0e4
_tx_queue_created_ptr:0x2403cf78
_tx_event_flags_created_ptr:0x2403cf80
_tx_block_pool_created_ptr:0x2403cf90
_tx_byte_pool_created_ptr:0x2403cf98
Lost connection to GDB Client
Proxy stopped.
J-Link GDB server log (excerpt)
SEGGER J-Link GDB Server V8.80
Downloading 664 bytes @ address 0x08000000 - Verified OK
GDB closed TCP/IP connection
It looks like the RTOS Proxy terminates the GDB connection during the load command.
Additional observations
If I disable RTOS Awareness, the firmware downloads correctly and debugging works.
If I select RTOS Kernel Awareness: J-Link instead of RTOS Proxy, everything works correctly and ThreadX threads are displayed.
The issue only appears when RTOS Proxy is enabled.
Question
Is RTOS Proxy currently supported with the SEGGER J-Link GDB server in STM32CubeIDE 2.0.0/2.1.0, or is this a known issue?
Has anyone successfully used RTOS Proxy with ThreadX + Cortex-M7 + J-Link in CubeIDE > = 2.0.0?
Any hints or workarounds would be appreciated.
Thank you.
