we are using (amongst other STM32 CPUs) a STM32F405. At one series of our mainboards, we are unable to transmit the firmware to the target via TrueStudio V 9.0.0.
The connection between our PC and our target is a ST-LINK/V2. The STM32 ST-LINK Utility is able to detect our target and to update the firmware (from a .hex file) with the settings which are seen in "Settings.png".
Contrary, TrueStudio reports the following after we press the "Debug" button:
Starting server with the following options:
Persistant Mode : Disabled
LogFile Name : debug_log.txt
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
Device connect error
Error in initializing ST-Link device.
Reason: Failed to connect to device. Please check power and cabling to target.
We assume that we should reconfigure TrueStudio to use the settings which are successful for the STM32 ST-LINK Utility, but we did not figure out yet how we could achieve this. When we open "Run" and choose "Debug Configurations..." and go to the "Startup Scripts", we have no settings within "Target Hardware Initialization Script". Within "Target Software Startup Scripts", we have the default settings:
# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers
# 2=32 bit, 1=16 bit and 0=8 bit parallelism mode
monitor flash set_parallelism_mode 2
# Set character encoding
set host-charset CP1252
set target-charset CP1252
# Load the program executable
load
# Reset the chip to get to a known state. Remove "monitor reset" command
# if the code is not located at default address and does not run by reset.
monitor reset
# Enable Debug connection in low power modes (DBGMCU->CR)
set *0xE0042004 = (*0xE0042004) | 0x7
# Set a breakpoint at main().
tbreak main
# Run to the breakpoint.
continue
Is this script the place where we can reconfigure the connection settings and the reset mode to the configuration which is working with the STM32 ST-LINK Utility? If yes, what shall we configure there in order to achieve the same settings?
If no, what can we do in order to become able to program and to debug this target via TrueStudio V 9.0.0?
Thanks in Advance,
M