Title: STM32N647: OpenOCD halt/debug fails with UNDEFINED while CubeIDE works · Issue #44 · STMicroelectronics/OpenOCD · GitHub
Open Graph Title: STM32N647: OpenOCD halt/debug fails with UNDEFINED while CubeIDE works · Issue #44 · STMicroelectronics/OpenOCD
X Title: STM32N647: OpenOCD halt/debug fails with UNDEFINED while CubeIDE works · Issue #44 · STMicroelectronics/OpenOCD
Description: Dear ST Support Team, I am reporting a debug issue on STM32N647 where debugging works correctly in STM32CubeIDE, but fails when using OpenOCD (ST fork) with ST-LINK. Summary On STM32N647 (Cortex-M55, TrustZone), OpenOCD is able to connec...
Open Graph Description: Dear ST Support Team, I am reporting a debug issue on STM32N647 where debugging works correctly in STM32CubeIDE, but fails when using OpenOCD (ST fork) with ST-LINK. Summary On STM32N647 (Cortex-M5...
X Description: Dear ST Support Team, I am reporting a debug issue on STM32N647 where debugging works correctly in STM32CubeIDE, but fails when using OpenOCD (ST fork) with ST-LINK. Summary On STM32N647 (Cortex-M5...
Opengraph URL: https://github.com/STMicroelectronics/OpenOCD/issues/44
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"STM32N647: OpenOCD halt/debug fails with UNDEFINED while CubeIDE works","articleBody":"Dear ST Support Team,\n\nI am reporting a debug issue on STM32N647 where debugging works correctly in STM32CubeIDE, but fails when using OpenOCD (ST fork) with ST-LINK.\n\nSummary\nOn STM32N647 (Cortex-M55, TrustZone), OpenOCD is able to connect to the target and enumerate the core, but any attempt to halt/pause/step the CPU results in an `UNDEFINED debug reason`. The same hardware, firmware, and debug authentication state work correctly when debugging with STM32CubeIDE using ST-LINK.\n\n# Hardware\n- MCU: STM32N647X0HxQ\n- Debug probe: ST-LINK (V2J46S7)\n- Target voltage: ~3.3 V\n\n# Software / Tools\n- STM32CubeIDE: Debug works normally (halt/step/breakpoints OK)\n- ST-LINK Server: API v3, FW 2.1.1\n- OpenOCD: 0.12.0+dev-00623-g0ba753ca7 (STMicroelectronics fork)\n- VS Code + cortex-debug 1.12.1\n\n# Project / Boot Mode\n- Boot mode: Internal SRAM boot\n- Program under debug: FSBL\n- Debug mode: load and run\n- Debug Authentication: OPEN (confirmed, since CubeIDE debugging works)\n\n# OpenOCD Behavior\n\nOpenOCD connects successfully:\n- SWD/DAP connection OK\n- Cortex-M55 detected\n- Registers and memory can be read\n\n## However, when GDB connects or when “Pause” is issued:\n\n\u003e halted due to undefined\n\u003e undefined debug reason 8 (UNDEFINED)\n\n## VS Code / cortex-debug then reports:\n\n\u003e Received readMemory request while busy (SCB fault registers)\n\u003e Returning dummy thread-id / stack frame to workaround pause button not working\n\nHalt, step, and breakpoints never work. Changing reset configuration, SWD speed, or OpenOCD options does not change the behavior.\n\n# Questions\n- Is OpenOCD (ST fork) officially expected to support full halt/step debugging on STM32N647?\n- Is there a known limitation or missing Secure Debug / TrustZone handling in OpenOCD for STM32N6?\n- Is there a recommended OpenOCD configuration, patch, or restriction note for STM32N647?\n\nI can provide full OpenOCD logs, CubeIDE screenshots, and configuration files if needed.","author":{"url":"https://github.com/songshuaisong","@type":"Person","name":"songshuaisong"},"datePublished":"2025-12-25T06:42:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/44/OpenOCD/issues/44"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:14ec690b-c168-30b5-475c-6cf864b0b429 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C376:2B9CDD:43AD94F:59C75ED:6A5D7BFD |
| html-safe-nonce | 986f4cc6d94828e90ef050d6fb6bac235e27ca3b51ee3607155d30bca11a1b50 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzc2OjJCOUNERDo0M0FEOTRGOjU5Qzc1RUQ6NkE1RDdCRkQiLCJ2aXNpdG9yX2lkIjoiNjAyNzUzNDkxMjg5NDg5MzA1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 58d37f0acaf89745f301ccd264fdd283dd3ccba314906e0c808287ceda23ffed |
| hovercard-subject-tag | issue:3761500127 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/STMicroelectronics/OpenOCD/44/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7606aadd6348aa136a8cdc9efda547207e0e2e47a3839b439d3be425815e8382/STMicroelectronics/OpenOCD/issues/44 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7606aadd6348aa136a8cdc9efda547207e0e2e47a3839b439d3be425815e8382/STMicroelectronics/OpenOCD/issues/44 |
| og:image:alt | Dear ST Support Team, I am reporting a debug issue on STM32N647 where debugging works correctly in STM32CubeIDE, but fails when using OpenOCD (ST fork) with ST-LINK. Summary On STM32N647 (Cortex-M5... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | songshuaisong |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/STMicroelectronics/OpenOCD git https://github.com/STMicroelectronics/OpenOCD.git |
| octolytics-dimension-user_id | 10744877 |
| octolytics-dimension-user_login | STMicroelectronics |
| octolytics-dimension-repository_id | 226140039 |
| octolytics-dimension-repository_nwo | STMicroelectronics/OpenOCD |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226140039 |
| octolytics-dimension-repository_network_root_nwo | STMicroelectronics/OpenOCD |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width