[riot-notifications] [RIOT-OS/RIOT] stm32l0: add riotboot support (#11141)

Francisco notifications at github.com
Thu Mar 14 09:52:54 CET 2019

@danpetry So I took another look at riotboot, the reason this failed even though we have enough flash size is because of how the slots are calculated:


Basically the second slot is sized at roughly half the flash size (minus bootloader), so slot1 is written from or around address 0x08018000, and since this is in bank 2, it prints an error because it doesn't find the second flash bank and doesn't flash correctly

`Info : Device: STM32L0xx (Cat.5)`
`Info : STM32L flash has dual banks. Bank (0) size is 96kb, base address is 0x8000000`
`Warn : no flash bank found for address 0x08018800`
`wrote 0 bytes from file /home/francisco/workspace/RIOT/examples/hello-world/bin/nucleo-l073rz/hello-world-slot1.riot.bin in 0.002467s (0.000 KiB/s)`
`Error: checksum mismatch - attempting binary compare`
`diff 0 address 0x08018800. Was 0x00 instead of 0x52`
`diff 1 address 0x08018801. Was 0x00 instead of 0x49`
`diff 2 address 0x08018802. Was 0x00 instead of 0x4f`
`diff 3 address 0x08018803. Was 0x00 instead of 0x54`
`diff 4 address 0x08018804. Was 0x00 instead of 0x86`
`diff 5 address 0x08018805. Was 0x00 instead of 0x12`
`diff 6 address 0x08018806. Was 0x00 instead of 0x8a`
`diff 7 address 0x08018807. Was 0x00 instead of 0x5c`
`diff 8 address 0x08018809. Was 0x00 instead of 0x89`
`diff 9 address 0x0801880a. Was 0x00 instead of 0x01`
`diff 10 address 0x0801880b. Was 0x00 instead of 0x08`
`diff 11 address 0x0801880c. Was 0x00 instead of 0xb3`
`diff 12 address 0x0801880d. Was 0x00 instead of 0x9d`

In this case I tried to write something and nothing was written,  you would also get this error when doing the flash_extended_slot0. What is actually done in the new stm32l0_dual_bank.cfg is just add the configuration line for that bank:

`# Add the second flash bank.`
`set _FLASHNAME $_CHIPNAME.flash1`
`flash bank $_FLASHNAME stm32lx 0 0 0 0 $_TARGETNAME`

One work around we could think would be to just add this to our one stm32l0.cfg files, but this doesn't work on its own, you also need to modify the flash size in other config files in opeoncd, and recompile. 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190314/f7b5a288/attachment.html>

More information about the notifications mailing list