projects
/
fw
/
stlink
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
If no read size is given, read the whole flash
[fw/stlink]
/
src
/
stlink-common.c
diff --git
a/src/stlink-common.c
b/src/stlink-common.c
index b49e21ab046afeb36e7b27ae605320381ef85215..77ab98d0275e0584c3bb1f9c499ef6cde0d2649d 100644
(file)
--- a/
src/stlink-common.c
+++ b/
src/stlink-common.c
@@
-812,6
+812,9
@@
int stlink_fread(stlink_t* sl, const char* path, stm32_addr_t addr, size_t size)
return -1;
}
+ if (size <1)
+ size = sl->flash_size;
+
if (size > sl->flash_size)
size = sl->flash_size;