Building Copter-3.4 with Eclipse

I’m only able to to generate the ArduCopter-v2.px4 file if I remove the line below from the px4_targets.mk file:

$(v) arm-none-eabi-size $(PX4_ROOT)/Build/px4fmu-v2_APM.build/firmware.elf

The above was added by tridge, does anyone know why that is needed now?

I think the purpose of that line is to show the firmware size. Many Pixhawks (older ones in particular) have a 1MB flash limit (flash is where the program code is held) so I suspect this is to help us keep track of when we are going over that limit.

By using the recommended toolchain you will have this tool, which is used as @rmackay9 explained.

The recommended toolchain should not be mandatory or a constraint. We have built the firmware in the past without it. Anyway, we were able to build Copter-3.4 after commented out that line.

it’s not mandatory, but the size tool is pretty standard on toolchain packages and should be available.

I had problems to build the newest version also, but here is the compiler message I’ve got:

from d:/Programming/GitHub/Ardupilot/libraries/AP_ADC/AP_ADC_ADS1115.cpp:2:
d:/Programming/GitHub/Ardupilot/libraries/AP_Common/missing/byteswap.h: In function 'uint16_t __bswap_16(uint16_t)':
d:/Programming/GitHub/Ardupilot/libraries/AP_Common/missing/byteswap.h:11:42: error: '__builtin_bswap16' was not declared in this scope

I don’t use linux boards with ads1115, so I just removed corresponding sources (AP_ADC_ADS1115.cpp/AP_ADC_ADS1115.h) and commented the link to AP_ADC_ADS1115.h in AP_ADC.h and was able to finally build.

What could cause the problem?

I’ll bet you are on Windows and still aren’t using the last toolchain: Updated windows installer to resolve “__builtin_bswap16” compile error

1 Like

This is certainly related to the compiler version change that the new tool chain resolves. See the wiki here for the link to the new toolchain: http://ardupilot.org/dev/docs/building-px4-with-make.html#building-px4-with-make

direct link to the new toolchain: http://firmware.ardupilot.org/Tools/PX4-tools/pixhawk_toolchain_installer_latest.exe