Page 1 of 1

can't enable secureboot and encryption together

Posted: Sun Jun 24, 2018 8:52 pm
by dmlee05a
I've been trying to enable secureboot with flash encryption without success. Had success with each independently. I followed the programming guide, but after flashing the bootloader, then the app, I get the following on reboot:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (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:0x3fff0018,len:4
load:0x3fff001c,len:9856
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:21792
csum err:0x67!=0xff
ets_main.c 371
ets Jun 8 2016 00:22:57

Where do I look to debug this? Efuses were not burned. Thanks.

Re: can't enable secureboot and encryption together

Posted: Mon Jun 25, 2018 3:15 am
by WiFive
dmlee05a wrote:Had success with each independently. Efuses were not burned.
How? You were using separate esp32 units?

Re: can't enable secureboot and encryption together

Posted: Mon Jun 25, 2018 5:39 am
by ESP_Mahavir
dmlee05a wrote:I've been trying to enable secureboot with flash encryption without success. Had success with each independently. I followed the programming guide, but after flashing the bootloader, then the app, I get the following on reboot:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (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:0x3fff0018,len:4
load:0x3fff001c,len:9856
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:21792
csum err:0x67!=0xff
ets_main.c 371
ets Jun 8 2016 00:22:57

Where do I look to debug this? Efuses were not burned. Thanks.
It appears that 2nd stage bootloader size is bigger than its size limit of 28K (this may overflow partition table located at 0x8000). You may try to reduce verbosity of debugging message in bootloader (Bootloader config -> Bootloader log verbosity) to reduce size or can also adjust partition table offset from here https://github.com/espressif/esp-idf/bl ... jbuild#L38

Re: can't enable secureboot and encryption together

Posted: Mon Jun 25, 2018 6:00 pm
by dmlee05a
Thanks ESP-MJ,
Turning off debug in the bootloader config did the trick. Really appreciate the help!

Re: can't enable secureboot and encryption together

Posted: Mon Jun 25, 2018 6:03 pm
by dmlee05a
WiFIve... yes, i used different units to test encryption and secure boot independently.