<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/25896872/59688582-4ea95c00-91de-11e9-93e6-1b1ad080ed2c.png"><img src="https://user-images.githubusercontent.com/25896872/59688582-4ea95c00-91de-11e9-93e6-1b1ad080ed2c.png" alt="Riotboot_flash_slot0" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/25896872/59688587-510bb600-91de-11e9-93c7-b5120a9c9155.png"><img src="https://user-images.githubusercontent.com/25896872/59688587-510bb600-91de-11e9-93c7-b5120a9c9155.png" alt="Riotboot_flash_slot0_term" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/25896872/59688590-52d57980-91de-11e9-9977-d5984f501d23.png"><img src="https://user-images.githubusercontent.com/25896872/59688590-52d57980-91de-11e9-9977-d5984f501d23.png" alt="Riotboot_flash_slot1" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/25896872/59688593-549f3d00-91de-11e9-9932-1be6f79f2976.png"><img src="https://user-images.githubusercontent.com/25896872/59688593-549f3d00-91de-11e9-9932-1be6f79f2976.png" alt="Riotboot_flash_slot1_term" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/25896872/59688599-56690080-91de-11e9-9b4d-a92f62550b5d.png"><img src="https://user-images.githubusercontent.com/25896872/59688599-56690080-91de-11e9-9b4d-a92f62550b5d.png" alt="Riotboot_flash_combined_slot0" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/25896872/59688605-5832c400-91de-11e9-88fd-1d770ccb83b9.png"><img src="https://user-images.githubusercontent.com/25896872/59688605-5832c400-91de-11e9-88fd-1d770ccb83b9.png" alt="Riotboot_flash_combined_slot0_term" style="max-width:100%;"></a></p>
<p>Test that failed using RIOT's cc2538-bsl programmer<br>
It currently flashes to slots 0 and 1 successfully. However the bootloader does not select the newer firmware.<br>
I performed the test as follows:</p>
<ol>
<li>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).</li>
<li>Flash "bootloaders/riotboot/bin/cc2538dk/riotboot.bin" to board.</li>
<li>Disable flash CCA in ldscript, then disable the "-e, -v" in  FFLAGS.</li>
<li>Flash firmware via "riotboot/flash-slot0"....This successfully boots in slot 0.</li>
<li>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.</li>
<li>Flash newer firmware via "riotboot/flash-slot0"....Slot 1 still boots!</li>
</ol>
<p>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.<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/25896872/59690761-38050400-91e2-11e9-8124-3891e8046a47.png"><img src="https://user-images.githubusercontent.com/25896872/59690761-38050400-91e2-11e9-8124-3891e8046a47.png" alt="Uniflash" style="max-width:100%;"></a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/11665?email_source=notifications&email_token=ABE7WYDU3DHRXIDWJKO5WMLP3DTKBA5CNFSM4HWQ5WX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX6XIWA#issuecomment-503149656">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHENVKC4DDOV6IGTB3P3DTKBANCNFSM4HWQ5WXQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYCGLNNGE4XHKIFRQMLP3DTKBA5CNFSM4HWQ5WX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX6XIWA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11665?email_source=notifications\u0026email_token=ABE7WYDU3DHRXIDWJKO5WMLP3DTKBA5CNFSM4HWQ5WX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX6XIWA#issuecomment-503149656",
"url": "https://github.com/RIOT-OS/RIOT/pull/11665?email_source=notifications\u0026email_token=ABE7WYDU3DHRXIDWJKO5WMLP3DTKBA5CNFSM4HWQ5WX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX6XIWA#issuecomment-503149656",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>