boot: Image contains multiple DROM segments. Only the last one will be mapped. 编译正常,执行bootloader报错多个DROM

MashroomMan
Posts: 1
Joined: Sun Oct 09, 2022 8:45 am

boot: Image contains multiple DROM segments. Only the last one will be mapped. 编译正常,执行bootloader报错多个DROM

Postby MashroomMan » Sun Oct 09, 2022 8:58 am

使用的是esp32c3,外接flash为4M,在初始的工程加入部分代码无问题,可以正常执行。
继续加入多个.a后,出现了第二个DROM,readelf可以看到多了一个 [17] .eh_frame。此时编译无问题,但是执行时报错boot: Image contains multiple DROM segments. Only the last one will be mapped.
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .rtc.text NOBITS 50000000 184000 000010 00 WA 0 0 1
[ 2] .rtc.force_fast PROGBITS 50000010 184020 000000 00 W 0 0 1
[ 3] .rtc.data PROGBITS 50000010 184010 000010 00 WA 0 0 8
[ 4] .rtc_noinit PROGBITS 50000020 184020 000000 00 W 0 0 1
[ 5] .rtc.force_slow PROGBITS 50000020 184020 000000 00 W 0 0 1
[ 6] .iram0.text PROGBITS 40380000 0d6000 00fae6 00 AX 0 0 256
[ 7] .dram0.dummy NOBITS 3fc80000 0c3000 00fc00 00 WA 0 0 1
[ 8] .dram0.data PROGBITS 3fc8fc00 0d2c00 002c78 00 WA 0 0 8
[ 9] .noinit PROGBITS 3fc92878 184020 000000 00 W 0 0 1
[10] .dram0.bss NOBITS 3fc92880 0d5878 0044c8 00 WA 0 0 16
[11] .flash.text PROGBITS 42000020 0e6020 09d95a 00 AX 0 0 2
[12] .flash_rodata_dum NOBITS 3c000020 001020 0a0000 00 WA 0 0 1
[13] .flash.appdesc PROGBITS 3c0a0020 0a1020 000100 00 A 0 0 16
[14] .flash.rodata PROGBITS 3c0a0120 0a1120 021318 00 WA 0 0 16
[15] .got PROGBITS 3c0c1438 0c2438 00000c 04 WA 0 0 4
[16] .got.plt PROGBITS 3c0c1444 0c2444 000008 04 WA 0 0 4
[17] .eh_frame PROGBITS 3c0c1450 0c2450 0007e8 00 A 0 0 8
[18] .flash.rodata_nol NOBITS 3c0c1c38 0c2c38 0020e6 00 A 0 0 4
[19] .iram0.text_end NOBITS 4038fae6 0e5ae6 00011a 00 WA 0 0 1
[20] .iram0.data PROGBITS 4038fc00 184020 000000 00 W 0 0 1
[21] .iram0.bss PROGBITS 4038fc00 184020 000000 00 W 0 0 1
[22] .dram0.heap_start NOBITS 3fc96d48 0d5878 000008 00 WA 0 0 1
[23] .debug_info PROGBITS 00000000 184020 26331c 00 0 0 1
[24] .debug_abbrev PROGBITS 00000000 3e733c 04ad18 00 0 0 1
[25] .debug_loc PROGBITS 00000000 432054 0fcd82 00 0 0 1
[26] .debug_aranges PROGBITS 00000000 52edd8 00b920 00 0 0 8
[27] .debug_ranges PROGBITS 00000000 53a6f8 010750 00 0 0 1
[28] .debug_line PROGBITS 00000000 54ae48 1aad78 00 0 0 1
[29] .debug_str PROGBITS 00000000 6f5bc0 059ebe 01 MS 0 0 1
[30] .comment PROGBITS 00000000 74fa7e 00005b 01 MS 0 0 1
[31] .riscv.attributes RISCV_ATTRIBUTE 00000000 74fad9 00002a 00 0 0 1
[32] .debug_frame PROGBITS 00000000 74fb04 02a3d0 00 0 0 4
[33] .debug_loclists PROGBITS 00000000 779ed4 0195ab 00 0 0 1
[34] .debug_rnglists PROGBITS 00000000 79347f 001b21 00 0 0 1
[35] .debug_line_str PROGBITS 00000000 794fa0 003078 01 MS 0 0 1
[36] .symtab SYMTAB 00000000 798018 021cb0 10 37 3252 4
[37] .strtab STRTAB 00000000 7b9cc8 027b19 00 0 0 1
[38] .shstrtab STRTAB 00000000 7e17e1 0001e7 00 0 0 1

segments段如下
[0;32mI (226) esp_image: segment 0: paddr=00010020 vaddr=3c0a0020 size=2142ch (136236) map[0m
[0;32mI (298) esp_image: segment 1: paddr=00031454 vaddr=3fc8fc00 size=02c78h ( 11384) load[0m
[0;32mI (360) esp_image: segment 2: paddr=000340d4 vaddr=40380000 size=0d374h ( 54132) load[0m
[0;32mI (421) esp_image: segment 3: paddr=00041450 vaddr=3c0c1450 size=007e8h ( 2024) map[0m
[0;32mI (482) esp_image: segment 4: paddr=00041c40 vaddr=4038d374 size=02774h ( 10100) load[0m
[0;32mI (543) esp_image: segment 5: paddr=000443bc vaddr=50000010 size=00010h ( 16) load[0m
[0;32mI (603) esp_image: segment 6: paddr=000443d4 vaddr=00000000 size=0bc44h ( 48196) [0m
[0;32mI (664) esp_image: segment 7: paddr=00050020 vaddr=42000020 size=9d95ch (645468) map[0m
[0;32mI (820) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (821) boot: Disabling RNG early entropy source...[0m
D (826) boot: Mapping segment 0 as DROM[0m
[0;31mE (830) boot: Image contains multiple DROM segments. Only the last one will be mapped.[0m

向各位大佬求救~~

Who is online

Users browsing this forum: Google [Bot] and 101 guests