2020-06-26 07:10 AM
Not able to flash GPIO_EXTI program on STM32F746ZG board using CubeIDE tool
Source code : https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32F746ZG-Nucleo/Examples/GPIO/GPIO_EXTI
Environment : Ubuntu 18.04.4 LTS
Cube IDE : STM32CubeIDE Version: 1.3.1 Build: 6291_20200406_0752 (UTC)
CubeMX : STM32CubeMX - STM32 Device Configuration Tool Version: 5.6.1-RC1 Build: 20200405-2303 (UTC)
ST Link Version : V2J36M26
Log Status :
/home/default/STM32Cube/Repository/STM32Cube_FW_F7_V1.16.0/Projects/STM32F746ZG-Nucleo/Examples/GPIO/GPIO_EXTI/SW4STM32/STM32746ZG_Nucleo/Debug/st-link_gdbserver_log.txt
[0.000] initConfigParams(): Configuration flags start
[0.000] initConfigParams(): external-init false
[0.000] initConfigParams(): pend-halt-timeout (null)
[0.000] initConfigParams(): halt false
[0.000] initConfigParams(): config-file ""
[0.000] initConfigParams(): persistent false
[0.000] initConfigParams(): +log-file "/home/default/STM32Cube/Repository/STM32Cube_FW_F7_V1.16.0/Projects/STM32F746ZG-Nucleo/Examples/GPIO/GPIO_EXTI/SW4STM32/STM32746ZG_Nucleo/Debug/st-link_gdbserver_log.txt"
[0.000] initConfigParams(): +log-level 31
[0.000] initConfigParams(): +port-number 61234
[0.000] initConfigParams(): +verbose true
[0.000] initConfigParams(): refresh-delay 15
[0.000] initConfigParams(): +verify true
[0.000] initConfigParams(): +swd true
[0.000] initConfigParams(): swo-port 61234
[0.000] initConfigParams(): cpu-clock 8000000
[0.000] initConfigParams(): swo-clock-div 128
[0.000] initConfigParams(): initialize-reset false
[0.000] initConfigParams(): debuggers false
[0.000] initConfigParams(): serial-number ""
[0.000] initConfigParams(): +apid 0
[0.000] initConfigParams(): +attach true
[0.000] initConfigParams(): shared false
[0.000] initConfigParams(): erase-all false
[0.000] initConfigParams(): memory-map ""
[0.000] initConfigParams(): ext-memory-loaders false
[0.000] initConfigParams(): extload ""
[0.000] initConfigParams(): +stm32cubeprogrammer-path "/opt/st/stm32cubeide_1.3.0/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_1.3.0.202002181050/tools/bin"
[0.000] initConfigParams(): temp-path ""
[0.000] initConfigParams(): preserve-temps false
[0.000] initConfigParams(): frequency -1
[0.000] initConfigParams(): licenses false
[0.000] initConfigParams(): ignore-rest false
[0.000] initConfigParams(): version false
[0.000] initConfigParams(): help false
[0.000] initConfigParams(): Configuration flags end
[0.000] init(): STMicroelectronics ST-LINK GDB server. Version 5.5.0
Copyright (c) 2019, STMicroelectronics. All rights reserved.
[0.003] Device_Initialise(): Target connection mode: Attach
[0.007] reset_hw_wtchpt_module(): Hardware watchpoint supported by the target
[0.010] Device_Initialise(): COM frequency = 4000 kHz
[0.010] Device_Initialise(): ST-LINK Firmware version : V2J36M26
[0.010] Device_Initialise(): Device ID: 0x449
[0.010] Device_Initialise(): PC: 0x0
[0.010] Device_GetStatus(): ST-LINK device status: RUN_MODE
[0.011] Device_Initialise(): ST-LINK detects target voltage = 3.25 V
[0.011] Device_Initialise(): ST-LINK device status: RUN_MODE
[0.011] initServerContext(): ST-LINK device initialization OK
[0.011] WaitConnection(): Waiting for connection on port 61234...
[2.028] WaitConnection(): Accepted connection on port 61234...
[2.029] haltOnConnect(): Try halt...
[11.718] haltOnConnect(): Halt timeout (0s) exceeded.
Exception Details : Error in final launch sequence:
Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
Remote communication error. Target disconnected.: Connection reset by peer.
Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
Remote communication error. Target disconnected.: Connection reset by peer.
Remote communication error. Target disconnected.: Connection reset by peer.
2020-06-30 07:35 AM
Same issue if you try some other example projects?
From logs it seems as if your debug config is using "Reset Behavior Type = None".
GDB-server seem to fail to halt the core. This can happen if the core has already gone to sleep or similar, but the example you are referring to is just GPIO_EXTI. I dont think it uses sleep modes.
Anyway, try changing to "Connect under reset". I also assume you have not modified any pin configuration and by mistake mapped the PA13/14 to some AF? That would mess with the debug connection especially when using attach...