Page 1 of 1

[已解决] 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 2:39 am
by linshc
今天刚更新的4.4.2,编译程序下载固件时,发现多了这几句的打印。请问一下,这是在检查什么配置?

Code: Select all

SHA-256 comparison failed:
Calculated: 2b5934d67e29f49b386b3a8671a900a5698c3ea9ec14cf7180ac2386d42b412e
Expected: c71fd8098647f7f10f5f00266b33ff2dd9928133340f81ebe7e51c21a472fb48
Attempting to boot anyway...

Re: 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 2:55 am
by ESP_Gargamel
你是否直接烧录的第三方的 boot bin?是否在烧录时设置了 mode 或 size?

Re: 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 3:29 am
by linshc
没有烧入第三方的bin,我是直接下载的IDF-4.4.2.zip。替换了IDF-4.4.1后,重新配置了环境。mode是什么mode,这个我没有修改应该是默认的,size是指flash_size吗?改成了8M

Code: Select all

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x1654
load:0x403c9700,len:0xbb8
load:0x403cc700,len:0x2f88
SHA-256 comparison failed:
Calculated: 2b5934d67e29f49b386b3a8671a900a5698c3ea9ec14cf7180ac2386d42b412e
Expected: c71fd8098647f7f10f5f00266b33ff2dd9928133340f81ebe7e51c21a472fb48
Attempting to boot anyway...
entry 0x403c9954
I (43) boot: ESP-IDF v4.4.2-dirty 2nd stage bootloader
I (43) boot: compile time 19:35:01
I (43) boot: chip revision: 0
I (45) boot.esp32s3: Boot SPI Speed : 80MHz
I (50) boot.esp32s3: SPI Mode       : DIO
I (55) boot.esp32s3: SPI Flash Size : 8MB
I (59) boot: Enabling RNG early entropy source...
I (65) boot: Partition Table:
I (68) boot: ## Label            Usage          Type ST Offset   Length
I (76) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (83) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (91) boot:  2 factory          factory app      00 00 00010000 00100000
I (98) boot: End of partition table
I (102) esp_image: segment 0: paddr=00010020 vaddr=3c070020 size=12f10h ( 77584) map
I (125) esp_image: segment 1: paddr=00022f38 vaddr=3fc96ac0 size=041d4h ( 16852) load
I (129) esp_image: segment 2: paddr=00027114 vaddr=40374000 size=08f04h ( 36612) load
I (139) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=6968ch (431756) map
I (216) esp_image: segment 4: paddr=000996b4 vaddr=4037cf04 size=09bb4h ( 39860) load
I (225) esp_image: segment 5: paddr=000a3270 vaddr=50000000 size=00010h (    16) load
I (226) esp_image: segment 6: paddr=000a3288 vaddr=600fe000 size=00020h (    32) load
I (239) boot: Loaded app from partition at offset 0x10000
I (239) boot: Disabling RNG early entropy source...
I (254) cpu_start: Pro cpu up.
I (254) cpu_start: Starting app cpu, entry point is 0x40375330
0x40375330: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v4.4.2/components/esp_system/port/cpu_start.c:160

I (0) cpu_start: App cpu up.
I (268) cpu_start: Pro cpu start user code
I (268) cpu_start: cpu freq: 160000000
I (268) cpu_start: Application information:
I (271) cpu_start: Project name:     wifi_station
I (276) cpu_start: App version:      1
I (281) cpu_start: Compile time:     Aug 16 2022 19:34:45
I (287) cpu_start: ELF file SHA256:  c3bde964363e84d4...
I (293) cpu_start: ESP-IDF:          v4.4.2-dirty
I (298) heap_init: Initializing. RAM available for dynamic allocation:
I (305) heap_init: At 3FC9E760 len 000418A0 (262 KiB): D/IRAM
I (312) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (319) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (325) heap_init: At 600FE020 len 00001FE0 (7 KiB): RTCRAM
I (332) spi_flash: detected chip: gd
I (382) spi_flash: flash io: dio
I (383) sleep: Configure to isolate all GPIO pins in sleep state
I (383) sleep: Enable automatic switching of GPIO sleep configuration
I (433) cpu_start: Starting scheduler on PRO CPU.

Re: 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 3:37 am
by ESP_Gargamel
你是如何烧录固件的?正常的话,直接 idf.py flash 是不会出这样的问题的。

Re: 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 4:02 am
by linshc
使用vscode里面的ESP-IDF插件下载的

Re: 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 6:01 am
by ESP_Gargamel
可能的原因是你 menuconfig 里 flash 的参数配置和烧录时不一致,比如 menuconfig 配了 4MB,但烧录时选择了 8MB,导致烧录时改写了 boot bin 的 header,从而导致对 boot bin 的校验不通过。

Code: Select all

I (45) boot.esp32s3: Boot SPI Speed : 80MHz
I (50) boot.esp32s3: SPI Mode       : DIO
I (55) boot.esp32s3: SPI Flash Size : 8MB
你看下你 menuconfig 里对 flash 的设置,然后看下 IDF 插件里对应的配置。

Re: 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 7:44 am
by linshc
你好,正如你所说,menuconfig里面的配置和实际flash大小不一样,就会造成这个错误。比如:flash实际大小为8M,但menuconfig中设置flash为4M,编译、烧入完就会造成这个错误。在IDF-4.4.1版本中,这样配置不会有这个提示。
感谢您的解答,以后配置flash时,按照实际的来选择就好了。因为之前跑例程时,会忘记修改内存,运行时,没有上述的提示。

Re: 关于4.4.2版本boot打印的疑问

Posted: Thu Aug 18, 2022 7:56 am
by ESP_Gargamel
OK,如问题已解决,请修改标题,前面加上 “[已解决] ”。