DELUGE/AVR: image (with eeprom section) preparation and programming corrupts program #179
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.
There is problem with deluge ihex image processing.
The "eeprom" (EEMEM tag) section in AVR model is mapped to address 0x810000
that is encoded with 0x04 ihex command. Before patch there is not support for 0x04 and "eeprom" data fatally overrides program at beginning of program flash (address 0x0) by tosboot.
The tos-build-deluge-image should support for ihex 0x04 command.
The tosboot booltloader should check valid ranges for flash programming.
The patch is not complete. Platform like PLATFORM_TELOSB, PLATFORM_EPIC, PLATFORM_TINYNODE, PLATFORM_MULLE should be checked and code added in range check (see TODO in patch).
M.C>
PS: example output of patched tos-build-deluge-image: