When I want to upload a binary file
executable.bin to the STM32F407G device, I connect it to the PC using the mini-USB cable and execute the command
sudo st-flash write executable.bin 0x08000000
Now I want to upload the binary file in a similar way to the NUCLEO-F207ZG device:
but this time
sudo st-flash write executable.bin 0x08000000 throws an error
st-flash 1.6.1 2020-07-14T18:42:02 WARN common.c: unknown chip id! 0x374b Failed to connect to target
What am I doing wrong?
I also installed
pyocd command to flash the code.
pyocd list returns the following information about the device:
Probe Unique ID STM32 STLink 066DFF485550755187123543
On the physical device, I see a number
F207ZG and one target in
pyocd list --target is
stm32f207zg, thus I try to
flash the code with the following command:
pyocd flash --target stm32f207zg -0connect_mode=under-reset --base-address 0x08000000 executable.bin
but receive an error:
pyocd.core.exceptions.ProbeError: STLink error (9): Get IDCODE error
What am I doing wrong in this case?