bigdragon1977 / stm32flash

Automatically exported from code.google.com/p/stm32flash
0 stars 0 forks source link

[PATCH] add support for flash writes not starting at offset 0 #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm doing some fancy image generation and flashing; effectively using three 
firmware images (a "bootloader" and two "firmware" images) that need to be 
flashed (and more importantly, erased) independently.  

The attached patch adds support for specifying a page offset into the flash, 
for reads, erases, and writes.  

The patch also fixes an off-by-one error in the erase function -- the byte 
after the erase command is "number of pages -1" ie a value of 12 means that 13 
pages will be erased. (see pg 21 of ST's AN3155 "USART Protocol used in the 
STM32 bootloader" rev 2)

Original issue reported on code.google.com by peachi...@gmail.com on 8 Aug 2011 at 2:01

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, committed to source

Original comment by ge...@spacevs.com on 4 Oct 2011 at 2:43