Page 1 of 1

esp32.common.ld:58 cannot move location counter backwards

Posted: Sun Sep 16, 2018 8:57 pm
by jumjum123
Compiling our application with V3.1 this message comes up
esp-idf/components/esp32/ld/esp32.common.ld:58 cannot move location counter backwards (from 0000000040080400 to 0000000040080000)
Any idea what to do now ?

Re: esp32.common.ld:58 cannot move location counter backwards

Posted: Mon Sep 17, 2018 1:47 am
by ESP_Angus
What version are you upgrading from?

The linker script starts the IRAM section with a set of exception vectors at address 0x4008000 in the top of IRAM. The error message suggest that some other linker script has already linked 0x400 bytes to the iram0_seg segment ahead of this instruction, so it can't "go backwards".

(Odd coincidence, the exception vectors size is also 0x400 bytes.)

I'm not sure why this would cause errors now, as this part of the linker script dates from pre-v1.0.

Does your project contain any custom linker scripts that might be being included before esp32.common.ld?