espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.33k stars 7.2k forks source link

flash.rodata link to wrong place < 3f400040> (IDFGH-4928) #6720

Closed rqbh closed 3 years ago

rqbh commented 3 years ago

I have done nothing to the ld script of esp-idf, but my cpp project cannot be made into .bin by esptool. after my look for the reason carefully, found the reason: flash.rodata section linked start from 3f400040, it should be start at 3f400020, so esptool cannot do sha256 part,

link map of rodata section:tag

.flash.rodata 0x000000003f400040 0xae4a4

0x000000003f400040 _rodata_start = ABSOLUTE (.) (.rodata_desc .rodata_desc.) .rodata_desc 0x000000003f400040 0x100 esp-idf/app_update/libapp_update.a(esp_app_desc.c.obj) 0x000000003f400040 esp_app_desc (.rodata_custom_desc .rodata_custom_desc.)

esp32_out.ld part

dram0_0_seg (RW) : org = 0x3FFB0000 + 0xdb5c, len = (0x40000000 - 0x3FFB0000) - 0xdb5c / Flash mapped constant data / drom0_0_seg (R) : org = 0x3F400020, len = 0x400000-0x20

Alvin1Zhang commented 3 years ago

@rqbh Thanks for reporting, seems this ticket duplicates https://github.com/espressif/esp-idf/issues/6719, could we close one? Thanks.

rqbh commented 3 years ago

@Alvin1Zhang Yes, please close this, network delay make mistake.

Alvin1Zhang commented 3 years ago

@rqbh Thanks for the info.