kopia lustrzana https://github.com/stlink-org/stlink
Limit reading from RAM to the SRAM Size
rodzic
b95e4aa8a4
commit
a1a949fa55
|
@ -148,6 +148,12 @@ int main(int ac, char** av)
|
|||
}
|
||||
else /* read */
|
||||
{
|
||||
if ((o.addr >= sl->flash_base) &&
|
||||
(o.addr < sl->flash_base + sl->flash_size))
|
||||
o.size = sl->flash_size;
|
||||
else if ((o.addr >= sl->sram_base) &&
|
||||
(o.addr < sl->sram_base + sl->sram_size))
|
||||
o.size = sl->sram_size;
|
||||
err = stlink_fread(sl, o.filename, o.addr, o.size);
|
||||
if (err == -1)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue