Building Pixhawk with Make on Windows

692 views
Skip to first unread message

Randy Mackay

unread,
Jul 17, 2015, 10:40:15 PM7/17/15
to drones-...@googlegroups.com

Jefferson,

 

     I can’t help with building for px4/pixhawk on Linux but I can help re windows.

 

     Can you follow these instructions and report back on the specific place where it fails?

             http://dev.ardupilot.com/wiki/building-the-code/building-px4-with-make/

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Jefferson Romney
Sent: 18-Jul-15 8:13 AM
To: drones-...@googlegroups.com
Subject: [drones-discuss] Re: Building Pixhawk with Make on Linux

 

I am having the same problem and I have installed the toolchain with the script file and then redid it with the instructions you posted as well as the instructions on ardupilot's website. I haven't had success in compiling the ardupilot for pixhawk in windows with make or eclipse with multiple different methods used. I looked at the instructions for setting it up in linux and it seemed simple so I tried it and nothing seems to work right. Is there something I keep missing in all of this?

(so far all the problems have been with the submodules: UAVCAN, NUTTX, Px4Firmware. haven't had a problem compiling the actual ardupilot code for APM2 in linux or windows)

also, I entered this into the terminal:
arm-none-eabi-gcc
and it did recognized it. It popped up an error because no file was specified to compile, but the command is there. Why can't make see the command?

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jefferson Romney

unread,
Jul 20, 2015, 4:21:43 AM7/20/15
to drones-...@googlegroups.com
Okay, so this morning, I uninstalled everything I had done, deleted all my repositories, and started from scratch. somehow it did compile this time. I'm not sure where the difference was. The only thing I did differently was I used the "Clone in Desktop" Button on Github instead of cloning it by CLI with the github shell.

It compiled but at the end popped up two (I'm assuming non-critical) errors. here is the end of the output from the compiler:




LINK:    /c/Users/jeffy/Documents/GitHub/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.elf
BIN:     /c/Users/jeffy/Documents/GitHub/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.bin
%% Generating /c/Users/jeffy/Documents/GitHub/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build/firmware.px4
make[2]: Leaving directory `/c/Users/jeffy/Documents/GitHub/ardupilot/modules/PX4Firmware/Build/px4fmu-v2_APM.build'
%% Copying /c/Users/jeffy/Documents/GitHub/ardupilot/modules/PX4Firmware/Images/px4fmu-v2_APM.px4
make[1]: Leaving directory `/c/Users/jeffy/Documents/GitHub/ardupilot'
fatal: Not a git repository: c:/Users/jeffy/Documents/GitHub/ardupilot/modules/../../.git/modules/modules/PX4Firmware
Failed to get px4 hash
fatal: Not a git repository: c:/Users/jeffy/Documents/GitHub/ardupilot/modules/PX4NuttX/nuttx//../../.git/modules/modules/PX4NuttX
Failed to get nuttx hash
PX4 ArduCopter Firmware is in ArduCopter-v2.px4

Tom Pittenger

unread,
Jul 20, 2015, 4:46:56 AM7/20/15
to drones-discuss

Success! That error is normal. What you're looking for is that the firmware .px4 file was generated.

Jefferson Romney

unread,
Jul 20, 2015, 10:55:33 AM7/20/15
to drones-...@googlegroups.com
Okay so I'll just ignore that error.  Maybe we can mention that on the list of common errors on the wiki on the page here so others don't have to wonder.

Jefferson Romney

unread,
Jul 23, 2015, 11:19:35 AM7/23/15
to drones-discuss, jeffy...@gmail.com
I am now trying to compile the 3.2.1 code and keep getting a python import error. Any ideas there?

It can't find the genmsg.template_tools module. It says install empy and catkin_pkg but they already are installed.

I've had this issue many times now and started from scratch a few times but it always pops up. 

Jefferson Romney

unread,
Jul 23, 2015, 11:19:49 AM7/23/15
to drones-discuss, rmac...@yahoo.com
Well now that I have successfully built v 3.3, I am trying to build 3.2.1 and having trouble. I first got an error with the gencpp and genmsg. I found those online and installed them. Then I found them in the mk/PX4/Tools directory also. Now I get the error right at the end of the build that 
make[1]: *** No rule to make target `px4fmu-v2_APM'.  Stop.

Is this also a build environment problem?


On Saturday, July 18, 2015 at 4:40:15 AM UTC+2, Randy Mackay wrote:

Wang Eric

unread,
Oct 14, 2015, 10:02:20 AM10/14/15
to drones-discuss


the same problem. Does it matter?
在 2015年7月18日星期六 UTC+8上午10:40:15,Randy Mackay写道:

Tom Pittenger

unread,
Oct 14, 2015, 1:25:32 PM10/14/15
to drones-discuss
Build using make, not "Eclipse".

Wang Eric

unread,
Oct 14, 2015, 9:45:27 PM10/14/15
to drones-discuss
Then how to debug?

在 2015年10月15日星期四 UTC+8上午1:25:32,Tom Pittenger写道:

Tom Pittenger

unread,
Oct 14, 2015, 11:07:57 PM10/14/15
to drones-discuss

Depends on what you're wanting to test. SITL works fine for most things and you don't compile in eclipse for that either.

Chuk Rhodes

unread,
Oct 28, 2015, 5:07:43 PM10/28/15
to drones-discuss

These changes in ardupilot/mk/px4_targets.mk will fix the errors at the end of the compile.


And I have it working in Eclipse. It took a few tries, but it seems if you follow the directions and get a successful build in "px4 console", then launch "px4 eclipse", it works fine. You do have to use the Make Target window, where it shows "px4-v2", etc. I'm also using Eclipse Mars, just modified the toolchain/msys/1.0/px4_eclipse.bat to point to the new version.


Reply all
Reply to author
Forward
0 new messages