I'm trying to debug an STM32 but when i try to launch the debugger, it comes up with the error in the image attached.
The following results are attempts with no local board.txt defined.
Here is the output when uploading using the STLink External 2.1 with OpenOCD method
Uploading 'SAIN' to 'Nucleo-64' using 'COM3'
Uploader started for board Nucleo-64
Upload method will be: bootloader
Uploading via Bootloader
C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin\openocd.exe -d2 -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -f "interface/stlink.cfg" -f "board/st_nucleo_l4.cfg" -c "echo -n {****[vMicro]**** Uploading ELF :}" -c "reset_config; telnet_port disabled; program {C:\Users\Richa\AppData\Local\Temp\VMBuilds\SAIN\STM32_~1\Debug/SAIN.ino.elf} reset;reset_config;shutdown"
Open On-Chip Debugger 0.10.0+dev-01058-g853a05287 (2020-02-13-16:41)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Warn : Interface already configured, ignoring
Error: already specified hl_layout stlink
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
****[vMicro]**** Uploading ELF :Info : clock speed 500 kHz
Info : STLINK V2J35M26 (API v2) VID:PID 0483:374B
Info : Target voltage: 6.087302
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x1fff3f3a msp: 0x20002c68
** Programming Started **
Info : device idcode = 0x20016462 (STM32L45/L46xx - Rev: Y)
Info : flash size = 256kbytes
Info : flash mode : single-bank
Warn : no flash bank found for address 0x08040000
Warn : no flash bank found for address 0x0804fe60
** Programming Finished **
** Resetting Target **
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
shutdown command invoked
The upload process has finished.
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination:
# MI Debugger Properties
{
"serverLaunchTimeout": 5000,
"filterStdout": false,
"filterStderr": true,
"targetArchitecture": "arm",
"stopAtEntry": false,
"externalConsole": false,
"MIMode": "gdb",
"MIDebuggerServerAddress": "localhost:3333",
"cwd": ,
"MIDebuggerPath": "{runtime.tools.arm-none-eabi-gcc.path}/bin\\arm-none-eabi-gdb.exe",
"MIDebuggerArgs": "",
"debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.exe",
"debugServerArgs": "-d2 -l g/SAIN.ino_DebugOpenOCD.log}\" -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"interface/stlink.cfg\" -f \"board/st_nucleo_l4.cfg\" -c \"init; reset halt\"",
"program": elf",
"logging": {
"moduleLoad": false,
"trace": false,
"engineLogging": false,
"programOutput": false,
"exceptions": false,
"traceResponse": false
},
"visualizerFile": \debugger_tmp.natvis",
"showDisplayString": true
}
Output when using STM32CubeProgrammer upload method.
Uploading 'SAIN' to 'Nucleo-64' using 'COM3'
Uploader started for board Nucleo-64
Upload method will be: bootloader
Uploading via Bootloader
ls\win\stm32CubeProg.bat 0 "C:\Users\Richa\AppData\Local\Temp\VMBuilds\SAIN\STM32_~1\Debug/SAIN.ino.bin" -g
-------------------------------------------------------------------
STM32CubeProgrammer v2.6.0
-------------------------------------------------------------------
ST-LINK SN : 0663FF525750877267234013
ST-LINK FW : V2J35M26
Board : NUCLEO-L452RE-P
Voltage : 6.07V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x462
Revision ID : Rev Y
Device name : STM32L45x/L46x
Flash size : 256 KBytes
Device type : MCU
Device CPU : Cortex-M4
Memory Programming ...
Opening and parsing file: SAIN.ino.bin
File : SAIN.ino.bin
Size : 327832 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 160]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:10.062
The upload process has finished.
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination:
RUNNING Program ...
Address: : 0x8000000
Application is running
Start operation achieved successfully
# MI Debugger Properties
{
"serverLaunchTimeout": 5000,
"filterStdout": false,
"filterStderr": true,
"targetArchitecture": "arm",
"stopAtEntry": false,
"externalConsole": false,
"MIMode": "gdb",
"MIDebuggerServerAddress": "localhost:3333",
"cwd": ,
"MIDebuggerPath": "{runtime.tools.arm-none-eabi-gcc.path}/bin\\arm-none-eabi-gdb.exe",
"MIDebuggerArgs": "",
"debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.exe",
"debugServerArgs": "-d2 -l g/SAIN.ino_DebugOpenOCD.log}\" -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"interface/stlink.cfg\" -f \"board/st_nucleo_l4.cfg\" -c \"init; reset halt\"",
"program": elf",
"logging": {
"moduleLoad": false,
"trace": false,
"engineLogging": false,
"programOutput": false,
"exceptions": false,
"traceResponse": false
},
"visualizerFile": \debugger_tmp.natvis",
"showDisplayString": true
}
Cheers!
Richard