Browse Source
target: Make the buffers used to program a target's Flash better bounded in lifetime and memory usage
v1.8
dragonmux
2 years ago
No known key found for this signature in database
GPG Key ID: 64861EA89B35507A
1 changed files with
5 additions and
0 deletions
-
src/target/target.c
|
|
@ -271,6 +271,11 @@ int target_flash_write(target *t, |
|
|
|
dest += tmplen; |
|
|
|
src += tmplen; |
|
|
|
len -= tmplen; |
|
|
|
/* If the current chunk of Flash is now full from this operation
|
|
|
|
* then finish operations on the Flash chunk and free the internal buffer. |
|
|
|
*/ |
|
|
|
if (dest == f->start + f->length) |
|
|
|
ret |= target_flash_done_buffered(f); |
|
|
|
} |
|
|
|
return ret; |
|
|
|
} |
|
|
|