Add LZSS encoding/decoding for MKRNB 1500 SBU#551
Merged
aentinger merged 5 commits intoarduino:masterfrom Jul 24, 2020
Merged
Conversation
Remove symlink + cleanup code
aentinger
approved these changes
Jul 24, 2020
Contributor
aentinger
left a comment
There was a problem hiding this comment.
LGTM 👍 Successfully tested with MKR NB 1500 👍 Thank you @giulcioffi 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR provides the possibility to store a .lzss compressed binary in the SARA-R410M module and decode it back to a binary during the reboot by the SBU. The example
SBU_LoadLZSS.inoallows to test it.The lzss library is provided under
/libraries/SBU/extras/SBUBootwith a symlink to/libraries/SBU/examples/SBU_LoadLZSS.First of all, the function
void lzss_init(uint32_t const sketch_start, bool LZSStoBIN)must be called. There are 2 possibilities:The function
int lzss_encode(const char buf_in[], uint32_t size)reads the incoming buffer (from BINARY.H), performs the lzss encoding by chunks of 512 bytes and writes the obtained characters into the Sara modem in a file called "UPDATE.BIN.LZSS".On the other hand, the function
void lzss_decode()reads the encoded "UPDATE.BIN.LZSS", decodes it back to a binary stream and writes it into the flash.