Linker/ESPTOOL issue--can't generate bin from elf
Posted: Mon Jun 14, 2021 5:53 pm
Hi,
Background:
Up until about a week ago, I've been building and uploading code to a Saola board via VSCode and Platformio. Last week I suddenly had trouble with build paths pointing to non-existent directories. This morning, I was able to get past that by essentially deleting Platformio and reinstalling it.
Now I am seeing the following issue:
My code now builds again, however, after linking, esptool.py throws the following error while trying to generate a .bin from the .elf file:
"A fatal error occurred: Segment loaded at 0x3f000120 lands in same 64KB flash mapping as segment loaded at 0x3f000020. Can't generate binary. Suggest changing linker script or ELF to merge sections."
Looking at the latest (I think) esptool.py code on GitHub, the explanation of this error shown in comments within the code is:
" # check for multiple ELF sections that are mapped in the same flash mapping region.
# this is usually a sign of a broken linker script, but if you have a legitimate
# use case then let us know (we can merge segments here, but as a rule you probably
# want to merge them in your linker script.)"
Can someone please suggest a way for me to fix this issue?
Thanks!
Background:
Up until about a week ago, I've been building and uploading code to a Saola board via VSCode and Platformio. Last week I suddenly had trouble with build paths pointing to non-existent directories. This morning, I was able to get past that by essentially deleting Platformio and reinstalling it.
Now I am seeing the following issue:
My code now builds again, however, after linking, esptool.py throws the following error while trying to generate a .bin from the .elf file:
"A fatal error occurred: Segment loaded at 0x3f000120 lands in same 64KB flash mapping as segment loaded at 0x3f000020. Can't generate binary. Suggest changing linker script or ELF to merge sections."
Looking at the latest (I think) esptool.py code on GitHub, the explanation of this error shown in comments within the code is:
" # check for multiple ELF sections that are mapped in the same flash mapping region.
# this is usually a sign of a broken linker script, but if you have a legitimate
# use case then let us know (we can merge segments here, but as a rule you probably
# want to merge them in your linker script.)"
Can someone please suggest a way for me to fix this issue?
Thanks!