Servers by jDrones

Following manual to build code on windows make does not work

arducopter

(MrB) #1

I follow manual instruction to build arducopter code in http://ardupilot.org/dev/docs/building-px4-with-make.html but no success.

steps:

  1. clone the source code from https://github.com/ArduPilot/ardupilot.git
  2. go to directory <base_folder>/ArduCopter
  3. open the PX4Console
  4. run this command:
    make px4-v2
  5. this error is shown:
    $ make px4-v2
    …/mk/apm.mk:25: /cygdrive/c/ardupilot/src/modules/uavcan/libuavcan/include.mk: No such file or directory
    make: *** No rule to make target ‘/cygdrive/c/ardupilot/src/modules/uavcan/libuavcan/include.mk’. Stop.

Can someone help me please where did I get it wrong?

Thank you!


(Peter Hall) #2

did you update the submodules?

git submodule init
git submodule update --recursive


(Andre-K) #3

In any case, if you aim to fly the firmware you build, don’t use windows… Only few does.


(MrB) #4

Thanks Pete,
I did not, but when I do, I still end up with this different error:

$ make px4-v2
/usr/bin/find: paths must precede expression: AP_Rally.cpp
Usage: /usr/bin/find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path…] [expression]
/bin/sh: /cygdrive/c/ardupilot/src/Build.ArduCopter/make.flags.new: No such file or directory
…/mk/sketch_sources.mk:94: recipe for target ‘/cygdrive/c/ardupilot/src/Build.ArduCopter/make.flags’ failed
make: *** [/cygdrive/c/ardupilot/src/Build.ArduCopter/make.flags] Error 1

In any case, I saw after the git ‘submodule’ commands, significant ammoun of code and files being downloaded, notably on
<base_folder>/modules.

any clue? I wonder if latest commit is always ensured ‘build-able’?


(MrB) #5

Thanks @Andre-K, may I know which OS you are using?
I’d be glad to follow proven good OS for Ardupilot dev.

Also, could you enlighten me what is the main problem with windows to be used as development OS?


(jpkh) #6

Windows, MAC and Linux are all ok for the development. ArduPilot firmware is not depended in anyways of the underlying OS.

We are now using waf based buildsystem, old px4-make is a bit outdated and we are working to update docs for it.

I would suggest to use cygwin environment if you want to build under Winxx OS. Just follow cygwin guide and you are fine.

Cygwin guide in here: http://ardupilot.org/dev/docs/building-setup-windows-cygwin.html

Base buildsystem works great under cygwin. For automatic upload (waf xx --upload), we made small patch that is fixing cygwin uploads and it will be in master soon.

Before that patch is in master, you can use it from here: https://github.com/ArduPilot/ardupilot/blob/343bc160219b08e58e5fd17abafc455d67f172de/Tools/ardupilotwaf/px_uploader.py

Just update px_uploader.py file to your Tools/ardupilotwaf folder and you are fine on the uploads too.


(Andre-K) #7

I am using Linux, (Ubuntu) but as pointed out, cygwin is as safe bet too.


(MrB) #8

Thanks guys, I switch to Ubuntu OS and I don’t have any issue anymore.

I believe Windows would still be ok, but I’d stick to Ubuntu this time round first.


(jpkh) #9

Yes Ubuntu is fine for development. Cygwin is rather similar to ubuntu/*nix. I think if we look main developers, majority are doing it in Linux. Is it native or in virtual box is another thing. Also quite many are doing development in mac. I personally use all those 3 platforms. After python and compiler packets are properly installed, waf works exactly same way on all platforms.


(Andras Schaffer) #10

Just for my two cents, Windows Subsystem for Linux Ubuntu in Windows 10 runs the build environment just fine.


(Amilcar Lucas) #11

Windows development environments work (Both Windows Subsystem for Linux Ubuntu in Windows 10 and cygwin) but you do need to read and correctly execute at the setup steps posted on the website. The problem is that you did not even install cygwin…


(MrB) #12

Thanks @amilcarlucas, as per docs in building the code,http://ardupilot.org/dev/docs/building-the-code.html,
there are several ways to build, for windows at least:

  1. Build environment on Windows using cygwin
    http://ardupilot.org/dev/docs/building-setup-windows-cygwin.html
  2. Building on windows with Make
    http://ardupilot.org/dev/docs/building-px4-with-make.html

I believed you refer to 1st one, but I was following 2nd option.


(wkf94025) #13

+1 @Eosbandi. I build ArduPlane almost daily under Ubuntu/WSL and it works fine.

Kelly


(matt paul) #14

The best platform is mac for the purpose of developing and we need to for on the API as well. The best API developers can be contacted on https://babasupport.org/apple/iphone-error-4005/ who have variety of projects.