1、Modifying Flash Partitions:

Bootloader:0x60000000-0x6007FFFF 512K
   APP:0x60100000-0x601FFFFF 1024K
   Backup:0x60300000-0x603FFFFF 1024K
   Download:0x60500000-0x605FFFFF 1024K
   OTAFlag:0x60700000-0x6071FFFF 128K
2、add four flash function:flash_erase,flash_write,flash_read and flash_copy
This commit is contained in:
wgzAIIT
2023-04-11 11:10:00 +08:00
parent 669ef1eb2b
commit d615793063
6 changed files with 148 additions and 12 deletions
@@ -27,6 +27,10 @@ status_t FLASH_EraseSector(uint32_t addr);
status_t FLASH_Read(uint32_t addr, const uint8_t *buf, uint32_t len);
uint32_t FLASH_Test(uint32_t startAddr, uint32_t len);
uint32_t FLASH_GetProgramCmd(void);
status_t flash_erase(uint32_t start_addr, uint32_t byte_cnt);
status_t flash_write(uint32_t start_addr, uint8_t *buf, uint32_t byte_cnt);
status_t flash_read(uint32_t addr, uint8_t *buf, uint32_t len);
status_t flash_copy(uint32_t srcAddr,uint32_t dstAddr, uint32_t imageSize);
#endif