[riot-notifications] [RIOT-OS/RIOT] Add Riotboot support for CC2538 (#11665)

brent7984 notifications at github.com
Tue Jun 18 16:03:12 CEST 2019


![Riotboot_flash_slot0](https://user-images.githubusercontent.com/25896872/59688582-4ea95c00-91de-11e9-93e6-1b1ad080ed2c.png)
![Riotboot_flash_slot0_term](https://user-images.githubusercontent.com/25896872/59688587-510bb600-91de-11e9-93c7-b5120a9c9155.png)
![Riotboot_flash_slot1](https://user-images.githubusercontent.com/25896872/59688590-52d57980-91de-11e9-9977-d5984f501d23.png)
![Riotboot_flash_slot1_term](https://user-images.githubusercontent.com/25896872/59688593-549f3d00-91de-11e9-9932-1be6f79f2976.png)
![Riotboot_flash_combined_slot0](https://user-images.githubusercontent.com/25896872/59688599-56690080-91de-11e9-9b4d-a92f62550b5d.png)
![Riotboot_flash_combined_slot0_term](https://user-images.githubusercontent.com/25896872/59688605-5832c400-91de-11e9-88fd-1d770ccb83b9.png)

Test that failed using RIOT's cc2538-bsl programmer
It currently flashes to slots 0 and 1 successfully. However the bootloader does not select the newer firmware. 
I performed the test as follows: 

1. Enable flash cca in ldscript --> This ensures the firmware generated is always 512KB and it aligns the code according to how the CC2538 requires it. It contains the 44 bytes of CCMA at the end, which is required to enable the "internal CC2538 bootloader". Note, most of the 512KB is "0xFFFF" (fillers, dependent on the size of firmware).
2. Flash "bootloaders/riotboot/bin/cc2538dk/riotboot.bin" to board. 
3. Disable flash CCA in ldscript, then disable the "-e, -v" in  FFLAGS.
4. Flash firmware via "riotboot/flash-slot0"....This successfully boots in slot 0.
5. Flash firmware via "riotboot/flash-slot1"....The image then boots into slot 1, even if its an older image. I assume if i used "make flash" instead of "make clean all flash" it uses the older image. Note, i copied an older slot1 image into the bin folder.
6. Flash newer firmware via "riotboot/flash-slot0"....Slot 1 still boots!

Note, that if i repeated the above steps, using  TI's Uniflash tool instead of RIOT's cc2538-bsl programmer, the bootloader selects the newer firmware correctly.
![Uniflash](https://user-images.githubusercontent.com/25896872/59690761-38050400-91e2-11e9-8124-3891e8046a47.png)






-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11665#issuecomment-503149656
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190618/e0acf28a/attachment.html>


More information about the notifications mailing list