2019-11-07 08:45 PM
I've just installed the latest version of STMCubeIDE on a Mac and am trying to flash a simple program generated by the IDE. I have installed the L4 pack.
The firmware on the ST-LINK has been updated.
I have no other ST boards and I am not sure if it is an issue with the processor support or my installation.
I get a "Problem Occured" popup with the details:
Error in final launch sequence:
Failed to execute MI command:
load /Users/****/STM32CubeIDE/workspace_1.0.2/Try3/Debug/Try3.elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load /Users/****/STM32CubeIDE/workspace_1.0.2/Try3/Debug/Try3.elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load /Users/****/STM32CubeIDE/workspace_1.0.2/Try3/Debug/Try3.elf
Error message from debugger back end:
Error finishing flash operation
Error finishing flash operation
When I enable the GDB debug output I get . the following. Notice lines 47-48.
STMicroelectronics ST-LINK GDB server. Version 5.3.2
Copyright (c) 2019, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
LogFile Name : /Users/****/STM32CubeIDE/workspace_1.0.2/Try3/Debug/st-link_gdbserver_log.txt
Logging Level : 31
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Enabled
SWD Debug : Enabled
Target connection mode: Attach
Hardware watchpoint supported by the target
COM frequency = 4000 kHz
ST-LINK Firmware version : V2J34M25
Device ID: 0x461
PC: 0x1000000
ST-LINK device status: RUN_MODE
ST-LINK detects target voltage = 3.25 V
ST-LINK device status: RUN_MODE
ST-LINK device initialization OK
Waiting for debugger connection...
Waiting for connection on port 61234...
Accepted connection on port 61234...
Debugger connected
Try halt ...
ST-LINK device status: HALT_MODE
Enter STM32_AppReset() function
NVIC_DFSR_REG = 0x00000009
NVIC_CFGFSR_REG = 0x00000000
XPSR = 0x01000000
------ Switching to STM32CubeProgrammer -----
[36m[01m -------------------------------------------------------------------
[39;49m[36m[01m STM32CubeProgrammer v2.2.0
[39;49m[36m[01m -------------------------------------------------------------------
[39;49m[39;49m
[39;49m[39;49mLog output file: /tmp/STM32CubeProgrammer_O3bfOt.log
[39;49m[39;49m[39;49m[39;49m[90mST-LINK SN : 0671FF393430533457012229
[39;49m[90mST-LINK FW : V2J34M25
[39;49m[90mVoltage : 3.25V
[39;49m[90mSWD freq : 4000 KHz
[39;49m[90mConnect mode: Under Reset
[39;49m[90mReset mode : Hardware reset
[39;49m[90mCannot identify the device
[39;49m[00;31mError: unknown or unsupported device (DevID = 0x0000)
[39;49m[39;49m
[39;49m[39;49mMemory Programming ...
[39;49m[39;49mOpening and parsing file: ST-LINK_GDB_server_i7QNkR.srec
[39;49m[39;49m File : ST-LINK_GDB_server_i7QNkR.srec
[39;49m[39;49m Size : 9184 Bytes
[39;49m[39;49m Address : 0x08000000
[39;49m[39;49m
[39;49m[39;49m[39;49mErasing memory corresponding to segment 0:
[39;49m[39;49m[39;49mDownload in Progress:
[39;49m[39;49m[39;49m[39;49m[39;49m[39;49m[00;32m[==================================================] 100%
[39;49m[39;49m[39;49m
[39;49m[00;32mFile download complete
[39;49m[39;49mTime elapsed during download operation: 00:00:00.071
[39;49m[39;49m
[39;49m[39;49m
Verifying ...
[39;49m[39;49m
[39;49m[39;49mRead progress:
[39;49m[39;49m[39;49m[00;32m[=========== ] 22%
[39;49m[39;49m
[39;49mError: Data mismatch found at address 0x08000000 (byte = 0x38 instead of 0x00)
[39;49m[39;49m
[39;49m[00;31mError: Download verification failed
[39;49m[39;49m
[39;49mEncountered Error when opening /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_1.1.0.201910081157/tools/bin/STM32_Programmer_CLI
------ Switching context -----
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...
Any suggestions on how to resolve this?
Thank you for your help.
2019-11-08 12:10 AM
According numerous post about sounds CubeProgrammer issue on MacOS. ST-Link GDB server is relying on so ...
In sync. with some other post get a try relying on OpenOCD probe … sounds such is working better (not relying on CubeProgrammer flash feature). Drawback about is some debug features are not OpenOCD supported. Up to you ...
2019-11-14 10:20 AM
I converted the onboard ST-LINK to a JLINK per the Segger instructions and it works fine. I've worked around the issue for now, but there must be an issue either with the driver or my installation.