ArduPilot / ArduPilot/CustomBuild
Builds that do not fit within the FC's flash should produce a better failure message
- Dominant language
- Python
- Stars
- 32
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
This issue is in response to this [4.6.0-beta1 user report](https://discuss.ardupilot.org/t/copter-custom-firmware-build-issue-with-remote-id-support-latest-not-4-5-7/125177) in which the user saw a linker error and was unable to produce a firmware for their autopilot.
The issue turned out to simply be that the build would not fit in the autopilot's flash. We should improve the message so that the user knows they can resolve the issue by de-selecting some features.
The current message is something like this
```
[1215/1222] Linking ../CubeOrangePlus/bin/arducopter
/home/custom/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld:common.ld:202 cannot move location counter backwards (from 0000000008201e60 to 0000000008200000)
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/mnt/volume_nyc3_01/custom/base/tmp/copter:CubeOrangePlus:4d31a7320a1d2c38e2d742ae63c34f914febaa8f:a440fcafd32cc20580367b5d6fc30a97/CubeOrangePlus'
Build failed
```
A better message would be something like, "flash overflow, reduce the number of features selected"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the custom build server's Waf/linking failure path that produces the shown linker error and “Build failed” output. Confirm how flash overflow is reported, then make the failure explain that fewer selected features are needed and verify the resulting build output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100