-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32F4DISCOVERY: st-flash failure "addr not a multiple of pagesize, not supported" #663
Comments
I can reproduce this problem on my F401 board, with start address set to 0x803c000 (0x804c000 is out of bound on my board). I am doing some initial testing. The current finding indicates a misconfigured page size. To be clear, the page size info is right when
with src/common.c: ILOG("SRAM size: %#x bytes (%d KiB), Flash: %#x bytes (%d KiB) in pages of %u bytes\n",
sl->sram_size, sl->sram_size / 1024, sl->flash_size, sl->flash_size / 1024,
(unsigned int)sl->flash_pgsz); The page size changes, however when doing the alignment check. } else if (addr & (sl->flash_pgsz - 1)) {
printf("DEBUG: addr=0x%x, st->flash_pgsz=0x%lx\n", addr, sl->flash_pgsz);
// DEBUG line is added myself for testing
ELOG("addr not a multiple of pagesize, not supported\n");
return -1;
} This debug output would give
|
i'm quite sure that f401 some bigger pages at then end of its flash - i need to check RM, but that flash start address might be in that area. |
From RM:
so, yeah, we're in a middle of a 128kB page - code is right but traces are misleading as only half right. |
Fine, shall we put that into v1.6.1 as well then? Whoever is interested, please assign the ticket to yourself. |
I would like to deal with this.
|
Maybe we should add a second short note like "Check page start address (see RM |
It would be indeed better, while it would be more complex, with the need to identify chips and their corresponding RM. If it looks necessary, I will turn my PR as a draft and add more contents. |
We shouldn't make it too complicated. Maybe we can also write "Check page start address and compare with flash module organisation in related ST reference manual of your device." |
Added |
Programmer/board type: Stlink/v2
Programmer firmware version: not available/ not known
Operating system: Linux Raspbian (on Raspberry Pi 3) Linux raspberry-pi 4.1.19-v7+ [doc/trivial] Fix st-flash manpage read example #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
Stlink tools version and/or git commit hash: commit 1969148 / st-flash 1.4.0-13-g1969148
Stlink commandline tool name:
st-flash
Target chip (and optional board): STM32F4DISCOVERY (STM32F407)
Hello,
I compiled on Raspberry pi 3 the source of contained in this repository.
Now I am trying to flash an .hex image on the STM32F4DISCOVERY board
Output:
Expected/description:
Flash should complete with string "Flash written and verified! jolly good!" as we are trying to write to an address (0x804c000) which is multiple of the page size (16384/ 4000Hex)
Thanks a lot!
The text was updated successfully, but these errors were encountered: