Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overwrite launch request with attach one #806

Merged
merged 1 commit into from
Jan 9, 2024
Merged

overwrite launch request with attach one #806

merged 1 commit into from
Jan 9, 2024

Conversation

umbynos
Copy link
Contributor

@umbynos umbynos commented Dec 20, 2023

For some reason, lauch openOCD request causes the gdb-server to fail with:

xPSR: 0x01000003 pc: 0x3f081a3e msp: 0x2407ff88
Error: error reading data: (null)
Error: CMSIS-DAP command mismatch. Sent 0x3 received 0x5
Error: CMSIS-DAP command CMD_DISCONNECT failed.
Info : SWD DPIDR 0x6ba02477
Error: Failed to read memory at 0xe00e1008
Error: mem2array: Read @ 0xe00e1004, w=4, cnt=1, failed
Error executing event examine-end on target stm32h7x.cpu0:
/home/umberto/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/bin/../share/openocd/scripts/target/stm32h7x.cfg:236: Error: 
in procedure 'ocd_process_reset' 
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 260
in procedure 'stm32h7x_dbgmcu_mmw' called at file "/home/umberto/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/bin/../share/openocd/scripts/target/stm32h7x.cfg", line 172
in procedure 'stm32h7x_mmw' called at file "/home/umberto/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/bin/../share/openocd/scripts/target/stm32h7x.cfg", line 260
in procedure 'stm32h7x_mrw' called at file "/home/umberto/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/bin/../share/openocd/scripts/target/stm32h7x.cfg", line 242
at file "/home/umberto/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/bin/../share/openocd/scripts/target/stm32h7x.cfg", line 236
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0x3f081a3e msp: 0x2407ff88
shutdown command invoked
[2023-12-20T11:55:49.834Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

With this patch, everything seems to be working just fine (tested only on GIGA but ported to every STM32H7). Pressing the "start debug" button after uploading does not require the board to be put in bootloader mode.

@kittaakos
Copy link

Hello, is there an ETA for the next release with this fix? Thank you!

@umbynos
Copy link
Contributor Author

umbynos commented Jan 16, 2024

This change is included in 4.1.0 which currently is in the package_staging_index.json. I don't know when this will get into the main package index

@pennam pennam deleted the attach-openocd branch February 5, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants