It seems that build for debug mode is success but the debugging fails,
I get following error
Processing nucleo_l476rg (platform: ststm32@17.5.0; board: nucleo_l476rg; framework: zephyr)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/nucleo_l476rg.html
PLATFORM: ST STM32 (17.5.0) > ST Nucleo L476RG
HARDWARE: STM32L476RGT6 80MHz, 96KB RAM, 1MB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)
PACKAGES:
- framework-zephyr @ 2.30600.240316 (3.6.0)
- tool-cmake @ 3.21.3
- tool-dtc @ 1.4.7
- tool-ninja @ 1.9.0
- toolchain-gccarmnoneeabi @ 1.120301.0 (12.3.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Checking size .pio\build\nucleo_l476rg\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 6.7% (used 6587 bytes from 98304 bytes)
Flash: [= ] 10.2% (used 106864 bytes from 1048576 bytes)
========================= [SUCCESS] Took 9.65 seconds =========================
Reading symbols from C:\Users\coolspot\CLionProjects\PIO_L476RG_Dev\.pio\build\nucleo_l476rg\firmware.elf...
Warning: 'set target-async', an alias for the command 'set mi-async', is deprecated.
Use 'set mi-async'.
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = stlink
PlatformIO: Initializing remote target...
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-15:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : STLINK V2J34M25 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.273448
Info : [stm32l4x.cpu] Cortex-M4 r0p1 processor detected
Info : [stm32l4x.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32l4x.cpu on pipe
Info : accepting 'gdb' connection from pipe
[stm32l4x.cpu] halted due to debug-request, current mode: Handler MemManage
xPSR: 0x01000004 pc: 0x080174c0 msp: 0x20001340
Info : device idcode = 0x10076415 (STM32L47/L48xx - Rev 4 : 0x1007)
Info : RDP level 0 (0xAA)
Info : flash size = 1024 KiB
Info : flash mode : dual-bank
Info : device idcode = 0x10076415 (STM32L47/L48xx - Rev 4 : 0x1007)
Info : RDP level 0 (0xAA)
Info : OTP size is 1024 bytes, base address is 0x1fff7000
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1042 ms). Workaround: increase "set remotetimeout" in GDB
0x080174c0 in arch_system_halt (reason=2) at F:\DevEnvs\Surface7Pro\.platformio\packages\framework-zephyr\kernel\fatal.c:30
30 for (;;) {
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
[stm32l4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080038a0 msp: 0x20000fc0
Loading section rom_start, size 0x188 lma 0x8000000
Loading section text, size 0x18248 lma 0x80001c0
Loading section .ARM.extab, size 0x134 lma 0x8018408
Loading section .ARM.exidx, size 0x1c0 lma 0x801853c
Loading section initlevel, size 0x70 lma 0x80186fc
Loading section device_area, size 0xc8 lma 0x801876c
Loading section sw_isr_table, size 0x290 lma 0x8018834
Loading section ctors, size 0xc lma 0x8018ac4
Loading section init_array, size 0x8 lma 0x8018ad0
Loading section rodata, size 0x1ad8 lma 0x8018ad8
Loading section datas, size 0x710 lma 0x801a5b0
Loading section device_states, size 0x14 lma 0x801acc0
Loading section k_mutex_area, size 0x28 lma 0x801acd4
Loading section .last_section, size 0x4 lma 0x801acfc
Info : Padding image section 0 at 0x08000188 with 56 bytes
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
[stm32l4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080038a0 msp: 0x20000fc0
Start address 0x080038a0, load size 109768
Transfer rate: 30 KB/sec, 5488 bytes/write.
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
Unable to match requested speed 500 kHz, using 480 kHz
[stm32l4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080038a0 msp: 0x20000fc0
[stm32l4x.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080038a0 msp: 0x20000fc0
Temporary breakpoint 1 at 0x80020fe: file src\main.cpp, line 3.
Note: automatically using hardware breakpoints for read-only addresses.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = tbreak main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
I do not know what causes the issue, I would be happy to know what causes this issue?
Thanks