New installation 1.7.0 on Ubuntu 18.04 - "Failed to parse flash type or unrecognized flash type" #1242
-
I'm editing this as my work today (4/9/2022) has yielded progress but led me to a specific problem preventing me from using the tool. The problem I'm encountering is unable to flash device - the STLINK device itself is being detected, and it can detect the target device properly (chip ID 0x412), however, the two errors below tell me that st-flash may not be performing the task required of it. I populated /usr/local/stlink/chips (which was not installed when I installed 1.7.0 .deb package) by copying the /chips/ directory to /usr/local/stlink/chips. The target is STM32F103C6T6 low-density type (0x412), 32K flash, and is being correctly identified. Below are sessions where I have attempted to erase the target device, and then attempted to read back from the target device (expecting erased flash, FF bytes.) I removed the prefix characters from comment lines in the chips file as this was interacting with HTML. st-flash erase yields "Failed to parse flash type or unrecognized flash type" and does not appear to run. $ st-flash --debug erase 0x08000000 4096 st-flash 1.7.0-186-gc4762e6 detected chip_id parametres Device Type: STM32F1xx_LD chip_id 0x412 2022-04-09T19:48:55 DEBUG read_write.c: *** stlink_read_debug32 0000000000 at 0x1ffff7e0 st-flash --flash=32k still yields "Failed to parse flash type or unrecognized flash type" but appears to run. $ st-flash --flash=32k erase 0x08000000 4096 st-flash 1.7.0-186-gc4762e6 detected chip_id parametres Device Type: STM32F1xx_LD chip_id 0x412 2022-04-09T19:51:06 INFO common.c: STM32F1xx_LD: 10 KiB SRAM, 0 KiB flash in at least 1 KiB pages. $ After erase, expect FF bytes, however, without --flash=32k option, the read file contains no data bytes. $ st-flash --debug read read.bin 0x08000000 32768 st-flash 1.7.0-186-gc4762e6 detected chip_id parametres Device Type: STM32F1xx_LD chip_id 0x412 2022-04-09T19:57:12 DEBUG read_write.c: *** stlink_read_debug32 0000000000 at 0x1ffff7e0 Expect command to generate read.bin of length 32768 bytes filled with FF bytes $ ls -l read.bin Now read again, but this time with --flash=32k option (and debug disabled). The file now contains the expected number of data bytes, however, the data bytes are 00 rather than FF. $ st-flash --flash=32k read read.bin 0x08000000 32768 st-flash 1.7.0-186-gc4762e6 detected chip_id parametres Device Type: STM32F1xx_LD chip_id 0x412 2022-04-09T19:59:59 INFO common.c: STM32F1xx_LD: 10 KiB SRAM, 0 KiB flash in at least 1 KiB pages. $ Resulting file: $ ls -l read.bin File expected to contain FF bytes $ xxd read.bin | more |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is a duplicate of #1240. |
Beta Was this translation helpful? Give feedback.
-
This issue is now fixed in the current |
Beta Was this translation helpful? Give feedback.
This issue is now fixed in the current
nightly
branch (commit aee9a47).It will merge into the
develop
branch soon.