Building Custom Firmware For Pixhawk

For some project I edited the ArduCopter 3.2.1 with some custom controllers and some sensor drivers, I currently have a Pixhawk 1 board but I can not build the code with make or cygwin as a .px4 file to upload. When i use the make px4-v2 command with the PX4 Toolchain I get the following error ;

/bin/sh: line 0: cd: C:/Users/muham/vsworkspace/deneme/px4/PX4Firmware/NuttX/nuttxtools: No such file or directory
make[1]: *** [Makefile:179: /cygdrive/c/Users/muham/vsworkspace/deneme/px4/PX4Firmware/Archives/px4fmu-v2.export] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/muham/vsworkspace/deneme/px4/PX4Firmware'
make: *** [C:/Users/muham/vsworkspace/deneme/ardupilot/new_workspace/mk/px4_targets.mk:133: C:/Users/muham/vsworkspace/deneme/px4/PX4Firmware/Archives/px4fmu-v2.export] Error 2

I edited the “config.mk” file as such ;

 # Select 'mega' for the 1280 APM1, 'mega2560' otherwise
BOARD = px4

# HAL_BOARD determines default HAL target.
HAL_BOARD ?= HAL_BOARD_PX4

# The communication port used to communicate with the APM.
PORT = COM3

# uncomment and fill in the path to Arduino if installed in an exotic location
# ARDUINO = /path/to/Arduino

# PX4Firmware tree: fill in the path to PX4Firmware repository from github.com/diydrones:
PX4_ROOT=C:/Users/muham/vsworkspace/deneme/px4/PX4Firmware

# PX4NuttX tree: fill in the path to PX4NuttX repository from github.com/diydrones:
NUTTX_SRC=C:/Users/muham/vsworkspace/deneme/px4/PX4Firmware/NuttX/nuttx
# VRBRAIN Firmware tree:
#VRBRAIN_ROOT=../VRNuttX

# VRBRAIN NuttX tree:
#VRBRAIN_NUTTX_SRC=../VRNuttX/NuttX/nuttx

All help is appreciated :slight_smile:

Port your drivers and changes to ArduCopter 4.5.0 and use the waf toolchain and it will compile fine and be future proof.
ArduCopter 3.2.1 stopped 10 years ago.

1 Like