Difference in build output file in new FW version

Hi All,

I’m very confused. I’ve been working with PX4 firmware version 1.5 for over a year now, making small modifications to it every now and then.
I’ve just cloned the latest firmware with the plan of moving over my mods to this version. However when I go to build the firmware, it’s completely different!

The old firmware built to the following location
/Firmware/build_px4fmu-v2_default/src/firmware/nuttx/nuttx-px4fmu-v2-default.px4

When I try to build the latest version it goes here
/Firmware/build/px4fmu-v2_default/px4fmu-v2_default.px4
and to boot, there is also this folder
/Firmware/build/px4io-v2_default
Which i’ve never seen before.

When I flash the newly-built firmware to my Pixhawk, it doesn’t work. The flash goes fine, but the pixhawk doesn’t communicate with my computer, and the big status light doesn’t turn on, no sound from the buzzer, either.

What did I do wrong?

Thanks,
Patrick

These are changes I made along with a newer NuttX build that should be much faster.

A pixhawk is a really 2 separate boards both running nuttx (px4fmu-v2 + px4io-v2). The px4io-v2 binary is built and copied into the ROMFS of the px4fmu-v2 for flashing. This was always being built before, but hidden within the px4fmu-v2 build directory.

Does a regular PX4 Firmware master build work on your pixhawk? If not can you attach a console (https://dev.px4.io/en/debug/system_console.html) and watch the bootup?
My guess is something is broken or misconfigured in your bootup.

Thanks for the reply!
A clean clone of the master does not work either, but when I go back and make + upload my modified 1.5 again, it works fine.

I check out the boot with a console when I’m back at the lab and let you know the results. In the mean time, does this give you a clue?
Before I was uploaded the firmware using qgroundcontrol. Only today did I try to do “make px4-v2_default upload” in terminal, and noticed it didn’t work.
“make” alone goes fine, but when I do make + upload with 1.6, it throws this error.

– Build Type: MinSizeRel
– PX4 VERSION: v1.6.5-1535-gaa92ef3ca
– CONFIG: nuttx-px4fmu-v2-default
– The ASM compiler identification is GNU
– Found assembler: /usr/local/bin/arm-none-eabi-gcc
– Found PythonInterp: /Users/pleschinski/anaconda3/bin/python (found version “3.6”)
– Found PY_jinja2: /Users/pleschinski/anaconda3/lib/python3.6/site-packages/jinja2
– C compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
– C++ compiler: arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
– Building and including px4io-v2
– NuttX: px4fmu-v2 nsh cortex-m4
– ROMFS: px4fmu_common
– Configuring done
– Generating done
– Build files have been written to: /Users/pleschinski/src/Firmware/build/px4fmu-v2_default
[2/614] Building px4io-v2
– Build Type: MinSizeRel
– PX4 VERSION: v1.6.5-1535-gaa92ef3ca
– CONFIG: nuttx-px4io-v2-default
– The ASM compiler identification is GNU
– Found assembler: /usr/local/bin/arm-none-eabi-gcc
– Found PythonInterp: /Users/pleschinski/anaconda3/bin/python (found version “3.6”)
– Found PY_jinja2: /Users/pleschinski/anaconda3/lib/python3.6/site-packages/jinja2
– C compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
– C++ compiler: arm-none-eabi-g++ (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
– NuttX: px4io-v2 nsh cortex-m3
– Configuring done
– Generating done
– Build files have been written to: /Users/pleschinski/src/Firmware/build/px4io-v2_default
[153/153] Linking CXX executable nuttx_px4io-v2_default.elf
[613/614] uploading /Users/pleschinski…x4fmu-v2_default/px4fmu-v2_default.px4
Traceback (most recent call last):
File “/Users/pleschinski/src/Firmware/Tools/px_uploader.py”, line 731, in
main()
File “/Users/pleschinski/src/Firmware/Tools/px_uploader.py”, line 606, in main
fw = firmware(args.firmware)
File “/Users/pleschinski/src/Firmware/Tools/px_uploader.py”, line 128, in init
self.image.append(’\xff’)
TypeError: an integer is required
FAILED: src/firmware/nuttx/CMakeFiles/upload
cd /Users/pleschinski/src/Firmware/build/px4fmu-v2_default && /Users/pleschinski/anaconda3/bin/python /Users/pleschinski/src/Firmware/Tools/px_uploader.py --port “/dev/tty.usbmodemPX*,/dev/tty.usbmodem*” /Users/pleschinski/src/Firmware/build/px4fmu-v2_default/px4fmu-v2_default.px4
ninja: build stopped: subcommand failed.
make: *** [px4fmu-v2_default] Error 1

Hi, I see the same error, too. I discarded the Firmware and downloaded the newest and clean version. But I still see the same error. It shouhd be something wrong in the source code. Does anyone find
a solution?

It might be a python compatibility issue. Note in the configure section it’s using the python interpreter found in anaconda.

As a quick work around do the compile on it’s own then upload with QGC or directly with the ./Tools/px_upload.py script.