How Can We Help?
Ardupilot Firmware build
Step1
Open windows settings ⚙️ —> go to “turn on and off features “ —> turn on
-Virtual Machine Platform
-Windows Subsystem for Linux
(If already turned on ignore)
Then restart your pc/laptop
Step2
Go to microsoft store and search
-ubuntu 20.04.xx lts and download
Step3
Open ubuntu 20.04 and sign up by any username and password
After that you should see something like this
Username@name:~
In this terminal paste this command-
sudo apt update && sudo apt upgrade -y
It will upgrade and ready to install python 3
After that hit this command
sudo apt install python3 python3-pip python3-dev -y no
It will take some time so wait…
After finished download some other tools
sudo apt install git wget curl zip make gcc g++ gawk cmake ninja-build exiftool -y
Step4
Go to google chrome and search github
Create your GitHub account..
Then go to —>
https://github.com/ArduPilot/ardupilot.git
And fork ardupilot repo to your GitHub repo
Give it a simple name like (ardupilotX or ardupilotY)
Step5
Go to you GitHub account
Copy the weburl (in the code section)
Go back to your ubuntu terminal
And paste that weburl after git clone—>
Example—>
git clone https://github.com/your_username/ardupilotX.git (using ardupiltX forked name)
Now it will start downloading files from your github repository
Make sure you have a stable internet 🛜
Step6
After downloading file write this command->
cd ardupilotX
(please have in mind i am using forked name,you should use yours)
Then in ardupilotX
Write this —>
git submodule update –init –recursive
Step7
Now install dependencies
Tools/environment_install/install-prereqs-ubuntu.sh -y
This process might take 1-4 hours to download and setup so please be patient
After setup is complete paste this ->
. ~/.profile
After executing this line go to windows poweshell and paste this line —>
wsl –shutdown
After this close all programs
Step8
Open file explorer in pc/laptop
Go to linux🐧
Then subsystem
Then home/ardupilotX/libraries/AP_HAL_chibiOS/hwdef
Inside this folder create a new folder named your flight controller (ex-synerduinof405)
Inside folder build of copy-paste another board files named
-hwdef.dat
-hwdef_bl.dat
Change the board identifier name to yours
Example
From -APJ_BOARD_ID AP_HW_ATOMRCF405
To -APJ_BOARD_ID AP_HW_SYNERDUINOF405
Change this both inside
-hwdef.dat
-hwdef_bl.dat
Hit save
Now go to /ardupilotX/Tools/AP_Bootloaders
Find a file named-
board_types.txt
inside this file scroll down you will see a lot of fc names with a number
Ex-AP_HW_MAZZYSTARDRONE 188
Now under this add your board with a unique number
Ex -AP_HW_SYNERDUINO405. 369
Now hit SAVE
Now go to /ardupilotX/Tools/bootloaders
Inside,Creat a new file named SynerduinoF405
I am using SYNERDUINO and ardupilotX as examples
Now copy-paste the AtomRCF405NAVI_bl.bin
(Only if you are using atomrc files ⬇️)
-hwdef.dat
-hwdef_bl.dat
Hit SAVE..
Step9
After everything done go to ubuntu
Make sure you are in ardupilotX
If you are not write
cd ardupilotX
Then write this
./waf configure –board SYNERDUINOF405
It will compile,run and clean
Then write this
./waf copter (If you want to build copter)
./waf plane (If you want to build plane)
It will compile all the build codes
After this you will find your .hex
Inside /ardupilotX/build/SYNERDUINOF405/bin