Commit 1e9756d5 authored by Federico Vaga's avatar Federico Vaga

Merge branch 'release/v2.0.3' into master

parents 2c744a27 fdb159c5
......@@ -2,6 +2,12 @@
Change Log
==========
2.0.3 - 2021-03-22
==================
Fixed
-----
- sw: fix SVEC flasher size
2.0.2 - 2021-03-16
==================
Changed
......
......@@ -237,6 +237,7 @@ int flash_program(uint32_t addr, const uint8_t * data, int size, uint32_t flash_
int ret = 0;
int sector_size;
int *sector_map;
int sector_map_size;
if (flash_id == ID_M25P128)
sector_size = FLASH_SECTOR_SIZE_M25P128;
......@@ -245,12 +246,13 @@ int flash_program(uint32_t addr, const uint8_t * data, int size, uint32_t flash_
else
return -ENODEV;
sector_map = (int *)malloc(sizeof(int) * FLASH_SIZE / sector_size);
sector_map_size = sizeof(int) * FLASH_SIZE / sector_size;
sector_map = (int *)malloc(sector_map_size);
if (sector_map == NULL)
return -ENOMEM;
memset(sector_map, 0, sizeof(sector_map));
memset(sector_map, 0, sector_map_size);
const uint8_t *p = data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment