-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allocated memory for the PFS buffer dynamically. Saves 60 bytes. #394
base: master
Are you sure you want to change the base?
Allocated memory for the PFS buffer dynamically. Saves 60 bytes. #394
Conversation
f42d1a1
to
abedea7
Compare
thanks @microbit-sam. Do you think this is ready to go, or does it need more testing? |
I need to test partial flashing still works, running a local instance of MakeCode has changed since I last did it so haven't had time to get it going again I'll add testing to my Monday todo list |
ACK - thanks. |
Sorry for the delay this week, been testing this afternoon and it's not resetting after flashing. Will update ASAP |
@@ -200,6 +200,11 @@ void MicroBitPartialFlashingService::flashData(uint8_t *data) | |||
|
|||
packetCount++; | |||
|
|||
// Reallocate block | |||
if(block == NULL) { | |||
(uint32_t*) malloc(16 * sizeof(uint32_t)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be block = ....
???
@@ -200,6 +200,11 @@ void MicroBitPartialFlashingService::flashData(uint8_t *data) | |||
|
|||
packetCount++; | |||
|
|||
// Reallocate block | |||
if(block == NULL) { | |||
(uint32_t*) malloc(16 * sizeof(uint32_t)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(uint32_t*) malloc(16 * sizeof(uint32_t)); | |
block = (uint32_t*) malloc(16 * sizeof(uint32_t)); |
Please don't merge yet - still need to completely test Partial Flashing
This PR only allocates the large buffer used in partial flashing when it's required