Some parts of #BL602 Bootloader are located in ITCM Cache Memory (instead of XIP Flash) ... Maybe that's why the Bootloader is able to overwrite itself in XIP Flash Memory 🤔
https://github.com/lupyuen/bl_iot_sdk/releases/download/v8.0.2/bl602_boot2.map
Linker Script for #BL602 Bootloader says that some System Functions will be placed in ITCM (0x2201 0000) ... Like Global Register (GLB), Power (PDS), XIP Flash and eFuse 🤔
#BL602 Application Firmware also has a Table of ROM API Functions ... But it's located at 0x4200 C000 (DTCM) 🤔
https://github.com/lupyuen/bl_iot_sdk/releases/download/v8.0.1/sdk_app_blinky.map
#BL602 Bootloader has a Table of ROM API Functions at 0x2201 0000 (ITCM) ... How is this table used? 🤔
https://github.com/lupyuen/bl_iot_sdk/releases/download/v8.0.2/bl602_boot2.map
Matching the #BL602 Bootloader Code ... With the Partition Table that's flashed to BL602 🤔
#BL602 Bootloader installs the Application Firmware ... With eFuse Protection (optional)
Quick check of #BL602 Boot2 Disassembly ... To be sure that it matches the Boot2 Bootloader that we have been flashing to BL602. Great exercise for learning #RISCV Assembly! 👍
https://github.com/lupyuen/bl_iot_sdk/releases/download/v8.0.2/bl602_boot2.S
When #BL602 boots, it runs the Boot2 Bootloader Firmware at 0x2300 0000 ... Which loads the Application Firmware into (yikes!) 0x2300 0000 ... Let's investigate how the Bootloader makes this self-overlay possible
#BL602 Linker Map shows Boot2 Code is always loaded at 0x2300 0300 ... Let's find out what's inside
https://github.com/lupyuen/bl_iot_sdk/releases/download/v8.0.1/sdk_app_blinky.map
My hunch: #BL602 Boot2 and ESP32 Secure Boot V2 have similar bootloader features 🤔
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/security/secure-boot-v2.html
#BL602 "Boot2" ... The Boot Code that starts every BL602 Firmware ... Shall I unravel and document the code? 🤔
https://github.com/bouffalolab/bl_iot_sdk/tree/master/customer_app/bl602_boot2/bl602_boot2
Ah Heng Chicken Curry Bee Hoon Mee (Michelin Recommended)
Here's why our #BL602 Simulator runs a stream of Simulation Events
https://lupyuen.github.io/articles/wasm?20#why-simulate-a-stream-of-events
Will our #BL602 Simulator run Actual BL602 Firmware in #WebAssembly? It might be possible!
https://lupyuen.github.io/articles/wasm?19#can-we-simulate-any-bl602-firmware
IoT Techie and Educator / Apache NuttX PMC