Building ArduPilot for Pixhawk/2/PX4 on Linux with Make

I Followed every steps from here.

https://dev.px4.io/en/setup/building_px4.html

But some problem with make file while compiling the code.

it shows

make[4]: Nothing to be done for ‘context’ several times and no px4 code is building.

I checked my make files for Tabs and spaces, i thought it’s fine.

make[4] : Nothing to be done for 'context’
make[4] : Nothing to be done for 'context’
make[4] : Nothing to be done for 'context’
make[4] : Nothing to be done for 'context’
make[4] : Nothing to be done for ‘context’

I think you’re getting confused by the names.

PX4 and ArduPilot are two separate softwares. If you want help building ArduPilot, this is the right place. If you want help building PX4, these are the right forums: http://discuss.px4.io/

ardupilot.org/dev/docs/building-the-code.html

Building ArduPilot/ArduPane code is not successful for me. I i compiled and build Pixhawk Firmware code. It is success in Ubuntu.

Thank you sir, now the confusion is over. Your information helped me.

1 Like

what problems did you have? To set up the build environment in Ubuntu -
sudo apt-get -qq -y install git
git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git submodule update --init --recursive
./Tools/scripts/install-prereqs-ubuntu.sh -y
~/.profile

Then logout, log back in, and good to go
cd ardupilot
./waf configure --board sitl
./waf copter

For building the px4 firmware, I have tried the command make px4-v2. But I think the cloned ardupilot library have some problems in the files. When I run this command, it shows error in some .c programs. Also showing make[4] : Nothing to be done for ‘context’ error.

please use waf. Did you follow the steps above?

Yes sir, I have followed the same steps only.

What is the result of:
./waf configure --board sitl
./waf copter
when run from the ardupilot directory?

i compled the code.

after that tried ./waf and it’s success.

after that, how can i use the silt?

Thank you very much for the steps.

now without any error, it’s compiling in ubuntu. i used ./waf plane and it is compiled. how to use this sitl?

http://ardupilot.org/dev/docs/setting-up-sitl-on-linux.html#setting-up-sitl-on-linux