2024-08-01 03:04 PM - edited 2024-08-01 05:20 PM
I'm trying to program the STM32MP1 processor over the ST-LINK V2 probe.
But I'm facing some issues. My device cannot be found.
STMicroelectronics ST-LINK GDB server. Version 7.8.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
First of all, I have made my own STM32MP1 board (https://github.com/DanielMartensson/STM32-Computer) and my goal is to install Linux onto it. But I having some issues with that too. So therefore I will try to program it with ST-LINK V2 in debug mode.
Soldering of the pins:
Software:
I have configure the Software Debug pins.
And the debug settings.
Other:
Even if I remove the cables that connect my ST-LINK V2 to the home made STM32MP1 board. I still get the same issue. So it seems that I don't have any connection, rather than NRST, VCC, GND, UART, USB etc.
So it cannot be bad soldering, and it cannot be bad PCB routing. So what can it be then? It must be a software issue? Right?
Update:
I assume that BOOT2 must be 1 i guess? Well, I don't have that soldered, so I cannot use BOOT2 = 1. Right now, it's BOOT2 = 0, BOOT1 = 0, BOOT = 0. Only BOOT1 can be 1 or 0 depending on a switch.
So is there no walkaround for this?
I have heard that I could flash my CPU via the UART and also the USB OTG. But not sure how I can do that over STM32CubeIDE or STM32CubeProgrammer.
I have also heard that it's possible to force the CPU to boot by changing the BOOT0/1/2 in software.
CubeProgrammer connect to UART interface - STMicroelectronics Community
If I try to connect UART to STM32CubeProgrammer when all BOOT pins are LOW.
02:15:46 : Serial Port COM6 is successfully opened.
02:15:46 : Port configuration: parity = none, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
02:15:50 : Timeout error occured while waiting for acknowledgement.
02:15:50 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...
Solved! Go to Solution.
2024-08-02 06:52 AM
HI @DMårt
few clarifications
- STLINK is only for debug purpose (so should connect to at least SWD pins SWDIO and SWCLK and GND/VDD, you did not mention those ones)
- To use ST-Link to debug Cortex-M4 FW, you must be either
- in production mode (i.e. Linux up and running from flash and M4 FW loaded thru USB SSH by CubeIDE). this is described in https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware
- in development boot (aka engineering boot), using BOOT[2:0] = 0b100
See https://wiki.st.com/stm32mpu/wiki/STM32CubeIDE#Arm-C2-AE_Cortex-C2-AE-M_debug_on_STM32_MPU_device
Regards.
2024-08-02 06:52 AM
HI @DMårt
few clarifications
- STLINK is only for debug purpose (so should connect to at least SWD pins SWDIO and SWCLK and GND/VDD, you did not mention those ones)
- To use ST-Link to debug Cortex-M4 FW, you must be either
- in production mode (i.e. Linux up and running from flash and M4 FW loaded thru USB SSH by CubeIDE). this is described in https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-EV1/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4/Modify,_rebuild_and_reload_a_firmware
- in development boot (aka engineering boot), using BOOT[2:0] = 0b100
See https://wiki.st.com/stm32mpu/wiki/STM32CubeIDE#Arm-C2-AE_Cortex-C2-AE-M_debug_on_STM32_MPU_device
Regards.