Skip to content
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

DELUGE/AVR: image (with eeprom section) preparation and programming corrupts program #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcerveny
Copy link
Contributor

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:

Ihex read complete:
  61022 bytes starting at 0x0
      2 bytes starting at 0x810000
  61024 bytes in 2 sections
CRCs:
  0x89B8 0xFC38 0x0DD3 0xCEE6 0xAD9B 0x357C 0x30A5 
  0x2785 0xA317 0xD723 0xD89B 0xF4E8 0x5E60 0xA69C 
  0x7ADF 0xF47F 0x67D3 0x7429 0xF0D4 0x2F80 0x9BB1 
  0x1694 0x2C8B 0x7091 0x15F4 0x8D89 0x2D4C 0xA0B3 
  0x4DA0 0xCBBA 0x09DB 0x01DA 0xD12F 0x8700 0xF785 
  0xA0B0 0x07CD 0x509F 0xC44D 0x22F5 0x1599 0xD5C9 
  0xDC11 0x1671 0x63E4 0x33B5 0xCE38 0x8184 0x973D 
  0xBF45 0x208F 0xB74B 0x73D4 0x43B0 0x6A22 0xF2AA 

@phil-levis
Copy link
Contributor

I'm not comfortable pulling this until the MSP430 platforms have been tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants