Hello, I am encountering the following error while compiling the ArduPilot firmware:
[1019/1027] Compiling ArduCopter/UserCode.cpp
[1020/1027] Compiling ArduCopter/landing_gear.cpp
[1021/1027] Linking build/geprc_f405/bin/arducopter
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld:common.ld:202 cannot move location counter backwards (from 0000000008100b60 to 0000000008100000)
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/home/yusuf/ardupilot/build/geprc_f405`
Build failed
-> task in 'bin/arducopter' failed (exit status 1)
Details:
The error occurs in the linker stage at a line in the common.ld file.
The “cannot move location counter backwards” error generally indicates an issue with memory layout and occurs when an attempt is made to move to an earlier address range.
Solutions I’ve Tried:
- I updated the build toolchain.
- I checked the build options, but the problem persists.
System Information:
- GCC version: 10.3.1
- Build platform: Geprc F405
- Operating System: Linux
Additional Information:
If anyone can help solve this error or provide more insight, it would be very helpful.
Thank you!