Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use powershell to compile .hex/.bin #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 170 additions & 0 deletions Compile-Betaflight.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<#
Use this to create .hex files from Betaflight Code.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably add that this will only ever work on Windows because your paths are Windows specific.

Also, please note that this way of building Betaflight on Windows has been superseded by using WSL, which provides a much better experience. It is only kept around for users of versions of Windows (or non-Windows-OS) that do not support WSL.


1. Install Docker Desktop
2. Clone Betaflight repo "https://github.com/betaflight/betaflight"
3. Use this script to compile .hex/.bin files

Created by: Ted Elmenheim, 2021-01-18

#>

#Clone/Download the betaflight repo you want.
$workdir = "C:\GITHUB\betaflight-3.5.6\betaflight" #Path to your betaflight repo

#Add/remove the Flightcontrollers you need
$FlightControllers = @(
"AG3X" #Add one Flightcontroller per line
"AIKONF4"
"AIR32"
"AIRBOTF7"
"AIRF7"
"AIRHEROF3"
"ALIENFLIGHTF1"
"ALIENFLIGHTF3"
"ALIENFLIGHTF4"
"ALIENFLIGHTNGF7"
"ALIENWHOOP"
"ANYFCF7"
"ANYFCM7"
"BEEBRAIN_V2F"
"BEEROTORF4"
"BETAFLIGHTF3"
"BETAFLIGHTF4"
"BLUEJAYF4"
"CC3D"
"CHEBUZZF3"
"CJMCU"
"CLRACINGF4"
"CLRACINGF7"
"COLIBRI"
"COLIBRI_RACE"
"CRAZYBEEF3FR"
"CRAZYFLIE2"
"DALRCF405"
"DALRCF722DUAL"
"DOGE"
"EACHIF3"
"ELINF722"
"ELLE0"
"EXF722DUAL"
"F4BY"
"FF_FORTINIF4"
"FF_PIKOBLX"
"FF_PIKOF4"
"FF_RACEPIT"
"FISHDRONEF4"
"FLYWOOF411"
"FLYWOOF7DUAL"
"FOXEERF405"
"FOXEERF722DUAL"
"FRSKYF3"
"FRSKYF4"
"FURYF3"
"FURYF4"
"HAKRCF405"
"HAKRCF411"
"HAKRCF722"
"IFLIGHT_H743_AIO"
"IFLIGHT_H7_TWING"
"IMPULSERCF3"
"IRCFUSIONF3"
"ISHAPEDF3"
"JHEF7DUAL"
"KAKUTEF4"
"KAKUTEF7"
"KISSFC"
"KISSFCV2F7"
"KIWIF4"
"KROOZX"
"LUMBAF3"
"LUXMINIF7"
"LUX_RACE"
"MAMBAF411"
"MAMBAF722"
"MATEKF405"
"MATEKF411"
"MATEKF411RX"
"MATEKF722"
"MATEKF722SE"
"MATEKH743"
"MERAKRCF405"
"MERAKRCF722"
"MICROSCISKY"
"MIDELICF3"
"MOTOLAB"
"MOTOLABF4"
"MULTIFLITEPICO"
"NAZE"
"NERO"
"NOX"
"NUCLEOF103RG"
"NUCLEOF303RE"
"NUCLEOF446RE"
"NUCLEOF7"
"NUCLEOF722"
"NUCLEOH723ZG"
"NUCLEOH725ZG"
"NUCLEOH743"
"NUCLEOH7A3ZI"
"OMNIBUS"
"OMNIBUSF4"
"OMNIBUSF4FW"
"OMNIBUSF4NANOV7"
"OMNIBUSF7"
"OMNIBUSF7NANOV7"
"OMNINXT"
"PYRODRONEF4"
"RACEBASE"
"RCEXPLORERF3"
"REVO"
"REVOLT"
"REVONANO"
"RG_SSD_F3"
"RUSHCORE7"
"SINGULARITY"
"SIRINFPV"
"SITL"
"SKYZONEF405"
"SPARKY"
"SPARKY2"
"SPEEDYBEEF4"
"SPEEDYBEEF7"
"SPEKTRUMF400"
"SPRACINGF3"
"SPRACINGF3EVO"
"SPRACINGF3MINI"
"SPRACINGF3NEO"
"SPRACINGF4EVO"
"SPRACINGF4NEO"
"SPRACINGF7DUAL"
"SPRACINGH7EXTREME"
"SPRACINGH7NANO"
"SPRACINGH7ZERO"
"STM32F3DISCOVERY"
"STM32F411DISCOVERY"
"STM32F4DISCOVERY"
"STM32_UNIFIED"
"TINYFISH"
"TMOTORF4"
"TMOTORF7"
"TRANSTECF411"
"TRANSTECF7"
"UAVPNG030MINI"
"VGOODRCF4"
"VRRACE"
"WORMFC"
"XILOF4"
"X_RACERSPI"
"YUPIF4"
"YUPIF7"
)

#No need to edit anything beyond this point
Foreach($FlightController in $FlightControllers){

$target = "TARGET=$($FlightController)"
$workdir = "$($workdir):/opt/betaflight"
docker run -e $($target) --rm -ti -v $workdir betaflight/betaflight-build
}