feat: flash sketch in ram #12
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Arduino apps require that the micro is in sync with the orchestration handled by
arduino-app-cli. In particular, at boot, we need the micro to wait for thearduino-app-cli, and start only to execute the sketch of the default app or some other app decided by the user.For this reason, we need to use the flash on RAM feature of the
zephyrplatform, which allows. In this way, the micro loses the code at every boot, and thearduino-app-clican reflash it with the correct app at boot.Change description
Update the flash mode to RAM, and handle the case in which the micro was previously flashed from the IDE2 with an in-flash sketch.
As a general note, a sketch could be flashed in RAM only if the micro is waiting for a sketch, which means that if there is a sketch already running from the flash, it should be removed by flashing an empty one.
Change description
Additional Notes
Reviewer checklist
main.