2023-10-09 05:55 AM
Hi,
I am new to this community and working with the STM32 family. I am doing some experiments using the following settings:
I am trying to deploy a simple code (blinking LED) on the board using only the terminal.
I tried to code on the board before using the cubeIDE and works fine.
I used the make command and I have the .elf file, but when I try:
% st-flash write code_application_CM4.elf 0x08000000
st-flash 1.7.0
2023-10-09T14:36:43 INFO usb.c: Unable to match requested speed 1800 kHz, using 1600 kHz
2023-10-09T14:36:43 WARN common.c: unknown chip id! 0x497
Failed to connect to target
I also tried:
% st-util --verbose=99
st-util
2023-10-09T14:37:17 DEBUG common.c: *** looking up stlink version
2023-10-09T14:37:17 DEBUG common.c: st vid = 0x0483 (expect 0x0483)
2023-10-09T14:37:17 DEBUG common.c: stlink pid = 0x374e
2023-10-09T14:37:17 DEBUG common.c: stlink version = 0x3
2023-10-09T14:37:17 DEBUG common.c: jtag version = 0x7
2023-10-09T14:37:17 DEBUG common.c: swim version = 0x0
2023-10-09T14:37:17 DEBUG common.c: notice: the firmware doesn't support a swim interface
2023-10-09T14:37:17 DEBUG common.c: stlink current mode: debug (jtag or swd)
2023-10-09T14:37:17 DEBUG usb.c: JTAG/SWD freq set to 0
2023-10-09T14:37:17 DEBUG common.c: *** set_swdclk ***
2023-10-09T14:37:17 INFO usb.c: Unable to match requested speed 1800 kHz, using 1600 kHz
2023-10-09T14:37:17 DEBUG common.c: stlink current mode: debug (jtag or swd)
2023-10-09T14:37:17 DEBUG common.c: *** stlink_reset ***
2023-10-09T14:37:17 DEBUG common.c: *** stlink_read_debug32 0x01010000 at 0xe000edf0
2023-10-09T14:37:17 DEBUG common.c: *** stlink_jtag_reset ***
2023-10-09T14:37:17 DEBUG common.c: *** stlink_jtag_reset ***
2023-10-09T14:37:17 DEBUG common.c: *** stlink_read_debug32 0x03010000 at 0xe000edf0
2023-10-09T14:37:17 DEBUG common.c: *** stlink_read_debug32 0x01010000 at 0xe000edf0
2023-10-09T14:37:17 DEBUG common.c: Loading device parameters....
2023-10-09T14:37:17 DEBUG common.c: *** stlink_core_id ***
2023-10-09T14:37:17 DEBUG common.c: core_id = 0x6ba02477
2023-10-09T14:37:17 DEBUG common.c: *** stlink_read_debug32 0x410fc241 at 0xe000ed00
2023-10-09T14:37:17 DEBUG common.c: *** stlink_read_debug32 0x10016497 at 0xe0042000
2023-10-09T14:37:17 WARN common.c: unknown chip id! 0x497
2023-10-09T14:37:17 DEBUG gdb-server.c: Chip ID is 0x00000497, Core ID is 0x6ba02477.
2023-10-09T14:37:17 INFO gdb-server.c: Listening at *:4242...
I checked stlink/inc/stm32.h and it seems that the ID is correct:
STM32_CHIPID_WLE = 0x497,
So I don't understand why is unknown or what I can do to fix it.
Thanks for your help; Cristina.
Solved! Go to Solution.
2023-10-09 06:07 AM
st-flash and st-util aren't ST programs and it looks like the last release was over 2 years ago. Perhaps contact the authors for support.
https://github.com/stlink-org/stlink/releases
Or consider using STM32CubeProgrammer instead, which has a command line utility as well.
https://www.st.com/en/development-tools/stm32cubeprog.html
2023-10-09 06:07 AM
st-flash and st-util aren't ST programs and it looks like the last release was over 2 years ago. Perhaps contact the authors for support.
https://github.com/stlink-org/stlink/releases
Or consider using STM32CubeProgrammer instead, which has a command line utility as well.
https://www.st.com/en/development-tools/stm32cubeprog.html