Building an older version of firmware?

Hi,

What is the best way to build an older version of PX4 firmware? In the past I used version 1.5.0 and had no issues with my mixer. Now with the latest version 1.6, I believe my mixer is too big according to a similar setup here Unable to control all PWM channels with custom mixer setup

I set my branch to the v1.5.0 commit 2518210 and get “HEAD is now at 2518210 Ensure NuttX build depends on defconfig”

Upon running “make px4fmu_v2 default”, I get

Checked NuttX submodule, ACTION REQUIRED:

Different commits:

  • NuttX 93df871…44ad7e2:
    Warn: NuttX doesn’t contain commit 93df87120129e90f6d1a71ecabdcc7fde3e6bb4b

  • IF YOU DID NOT CHANGE THIS FILE (OR YOU DON’T KNOW WHAT A SUBMODULE IS): *
  • Hit ‘u’ and to update ALL submodules and resolve this. *
  • (performs git submodule sync --recursive *
  • and git submodule update --init --recursive ) *

Only for EXPERTS:
NuttX submodule is not in the recommended version.
Hit ‘y’ and to continue the build with this version. Hit to resolve manually.
Use git add NuttX && git commit -m ‘Updated NuttX’ to choose this version (careful!)

I hit “u” and enter and get a number of errors such as “CMakeFiles/nuttx_export_px4fmu-v2.dir/build.make:75: recipe for target ‘px4fmu-v2.export’ failed” and

“gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
gcc: error: unrecognized command line option ‘-mthumb’
gcc: error: unrecognized command line option ‘-mthumb’”

Any thoughts or suggestions?

Best,

After checking out the commit of the Firmware you want, run git submodule update --init --recursive in the Firmware directory to make sure all submodules are at the commit that they need to be for the given Firmware version.

Gotcha, it believe that was the core problem, my submodules were not at right commit for the firmware version.

Is there a good way of figuring that out? Should I just go my the date of the PX4 firmware commit and find the commits for all the submodules at that same date?

You, can see whether the submodules are in sync or not by running git status in the Firmware directory. Submodules which are not at the commit that the current version of Firmware wants them to be will shown as uncommited changes, same as modified files.