Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Option: ignore flash size reported by chip #305

@LupinIII

Description

@LupinIII

I have a small dev board from ebay (like this http://www.ebay.com/itm/321569700934 ; available from many sellers) with a F103C8T6. According to the specs it should have 64k of flash. That is also what st-flash reports when writing to it.
But, and I don't know why this is actually possible, when I use the the "Flash Loader Demonstrator" from ST and flash via UART (setting bootloader pins accordingly) I can select a target "STM32F1_Med-density_128K" from a dropdown list (the only other entry being "STM32F1_Med-density_64K" for a F103C8T6). It is no problem to flash a bin (hex works of course, too, but with a bin it's easy to tell how much you really write) that is larger than 64k. It verifies the contents of the flash and whatever is written to the flash also works after that.
If I try to flash the same bin file with st-flash I get these messages:

INFO: SRAM size: 0x5000 bytes (20 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
INFO: Attempting to write 112892 (0x1b8fc) bytes to stm32 address: 134217728 (0x8000000)
ERROR: addr too high

and the write fails. Obviously it sees a bin that's too large for the flash and stops. But as seen before at least for the chips I have it's totally possible to write more than that sucessfully.

So it would be nice to have an option to either ignore the reported flash size completely or specify it on the command line (so verifying could still work and not stop reading prematurely)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions