fdcavalcanti opened a new pull request, #17195: URL: https://github.com/apache/nuttx/pull/17195
## Summary - arch/xtensa: update MCUBoot and virtual E-Fuse offset Updates MCUBoot version and default address for virtual E-Fuse, depending if MCUBoot is enabled. - documentation: update MCUBoot flash allocation on ESP32|S2|S3 Add description of flash allocation when using MCUBoot. This PR adds changes to MCUBoot builds on Xtensa Espressif devices. There is now a 64kb gap between bootloader and first slot to support virtual E-Fuses. ## Impact - Impact on user: No. - Impact on build: Yes. If using MCUBoot, the slot 0 image is now on 0x20000 instead of 0x10000. - Impact on hardware: No. - Impact on documentation: Yes. Updates documentation on flash memory allocation when using MCUBoot. - Impact on security: No. - Impact on compatibility: No. ## Testing ### Building Build the MCUBoot example. - ./tools/configure.sh esp32-devkitc:mcuboot_nsh - make bootloader - make ### Running When flashing, verify the esptool command shows the following: ``` Bootloader on 0x1000 Virtual e-fuse on 0x10000 Firmware on 0x20000 ``` ``` esptool.py -c esp32 -p /dev/ttyUSB1 -b 921600 write_flash -fs detect -fm dio -ff "40m" 0x1000 .//mcuboot-esp32.bin 0x10000 vefuse.bin 0x20000 nuttx.bin ``` This is also seem during flash process: ``` Flash will be erased from 0x00001000 to 0x00008fff... Flash will be erased from 0x00010000 to 0x0000ffff... Flash will be erased from 0x00020000 to 0x0011ffff... ``` ### Results Board should boot normally: ``` rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff7c98,len:6972 ho 0 tail 12 room 4 load:0x40078000,len:13428 load:0x40090000,len:8712 entry 0x4007b41c [esp32] [INF] *** Booting MCUboot build v2.2.0-118-gaa4fa2b6 *** [esp32] [INF] [boot] chip revision: v3.0 [esp32] [INF] [boot.esp32] SPI Speed : 40MHz [esp32] [INF] [boot.esp32] SPI Mode : DIO [esp32] [INF] [boot.esp32] SPI Flash Size : 4MB [esp32] [INF] [boot] Enabling RNG early entropy source... [esp32] [INF] Primary image: magic=good, swap_type=0x1, copy_done=0x3, image_ok=0x1 [esp32] [INF] Scratch: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 [esp32] [INF] Boot source: primary slot [esp32] [INF] Image index: 0, Swap type: none [esp32] [INF] Disabling RNG early entropy source... [esp32] [INF] br_image_off = 0x20000 [esp32] [INF] ih_hdr_size = 0x20 [esp32] [INF] Loading image 0 - slot 0 from flash, area id: 1 [esp32] [INF] DRAM segment: start=0x22b68, size=0x8c4, vaddr=0x3ffb1f60 [esp32] [INF] IRAM segment: start=0x20080, size=0x2ae8, vaddr=0x40080000 [esp32] [INF] start=0x400819a4 IROM segment aligned lma 0x00040000 vma 0x400d0000 len 0x01204c (73804) DROM segment aligned lma 0x00030000 vma 0x3f410000 len 0x002fa0 (12192) NuttShell (NSH) NuttX-10.4.0 nsh> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
