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.
Starting with Beepy firmware 3.0, firmware is loaded in two stages.
The first stage is a modified version of pico-flashloader.
It allows updates to be flashed to the second stage firmware while booted.
The second stage is the actual Beepy firmware.
Reading
REG_UPDATE_DATA
will return an update status codeUPDATE_OFF = 0
UPDATE_RECV = 1
UPDATE_FAILED = 2
UPDATE_FAILED_LINE_OVERFLOW = 3
UPDATE_FAILED_FLASH_EMPTY = 4
UPDATE_FAILED_FLASH_OVERFLOW = 5
UPDATE_FAILED_BAD_LINE = 6
UPDATE_FAILED_BAD_CHECKSUM = 7
Firmware updates are flashed by writing byte-by-byte to
REG_UPDATE_DATA
:+
e.g.+Beepy
By default,
REG_UPDATE_DATA
will be set toUPDATE_OFF
.After writing,
REG_UPDATE_DATA
will be set toUPDATE_RECV
if more data is expected.If the update completes successfully:
REG_UPDATE_DATA
will be set toUPDATE_OFF
REG_SHUTDOWN_GRACE
)Please wait until the system reboots on its own before removing power.
If the update failed,
REG_UPDATE_DATA
will contain an error code and the firmware will not be modified.The header line
+...
will reset the update process, so an interrupted or failed update can be retried by restarting the firmware write.After building firmware:
build/app/i2c_puppet.uf2
: flashable image with preloaded and Beepy firmwarebuild/app/firmware.hex
: Intel HEX format Beepy firmware (add the header line+Beepy
to the beginning of the file before writing)