Contenido principal

Resolve Firmware Build Failure Due to Flash Memory Overflow

R2026b

Issue

When you build PX4® firmware using the default board build target file (such as cubepilot_cubeorange_default), the build might fail with a flash memory overflow error.

Build output showing a flash memory overflow error message

This error occurs because the source code size increased in PX4 firmware v1.16.1. When all modules are enabled in the default build target file, the compiled firmware can exceed the available flash memory on the hardware.

Possible Solutions

Use an Airframe-Specific Build Target File

Select a build target file that includes only the modules required for your airframe type. For some autopilots, airframe-specific variants of the default build target file are available with unnecessary controller modules already disabled.

For example, if you are using Cube Orange and the cubepilot_cubeorange_default build target file causes a flash memory overflow, use the appropriate variants for your airframe instead:

  • cubepilot_cubeorange_multicopter for multicopter airframes

  • cubepilot_cubeorange_fixedwing for fixed-wing airframes

  • cubepilot_cubeorange_VTOL for VTOL airframes

Create a Custom Build Target File

If no airframe-specific variant exists for your autopilot, manually create one by editing the default build target file. Remove modules that your airframe type does not require. For example, if you are designing a multicopter, remove fixed-wing controller modules.

For more information, see Disabling Modules in PX4board Build Target File.

See Also

Topics