初始化提交

This commit is contained in:
王立帮
2024-07-20 22:09:06 +08:00
commit c247dd07a6
6876 changed files with 2743096 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#!/bin/bash
# 加,
if [ -n "$TOOL_PATH" ]; then
export TOOL_PATH=",$TOOL_PATH"
fi
# 生成构建配置
echo -e "\e[93mGenerate build.option.json\e[0m"
cat <<EOF > $BUILD_HOME/build.option.json
{
"additionalFiles": "",
"builtInLibrariesFolders": "$ARDUINO_PATH/libraries",
"customBuildProperties": "$BUILD_CONF",
"fqbn": "$BOARD_CONF",
"hardwareFolders": "$ARDUINO_PATH/hardware,$BUILD_HOME/Arduino/hardware",
"otherLibrariesFolders": "$BUILD_HOME/Arduino/libraries",
"toolsFolders": "$ARDUINO_PATH/tools-builder,$ARDUINO_PATH/hardware/tools/avr$TOOL_PATH"
}
EOF
cat $BUILD_HOME/build.option.json
echo -e "\e[93mGenerated complete.\e[0m"
echo -e "\e[42mStart compiling...\e[0m"
# 遍历ino文件
for sketch in `find $TARGET_LIB -name '*.ino'`
do
echo -e "\e[32mCompiling:$sketch\e[0m"
$ARDUINO_PATH/arduino-builder -build-cache $BUILD_HOME/build_cache -build-options-file $BUILD_HOME/build.option.json $sketch
ret=$?
if [ $ret -ne 0 ]; then
echo -e "\e[101mCompile failed:$ret:$sketch\e[0m"
fi
done
echo -e "\e[32mBuild completed\e[0m"

View File

@@ -0,0 +1,53 @@
#!/bin/bash
# 下载ArduinoIDE Linux64版本
echo -e "\e[93mDownload ArduinoIDE...\e[0m"
appveyor DownloadFile $ARDUINO_URL -FileName $BUILD_HOME/arduino-linux64.tar.xz
# 提取ArduinoIDE文件
echo -e "\e[93mExtract ArduinoIDE...\e[0m"
tar xf $BUILD_HOME/arduino-linux64.tar.xz -C $BUILD_HOME
# 下载目标板支持包
if [ -n "$LIB_URL" ]; then
echo -e "\e[93mDownload $TARGET...\e[0m"
appveyor DownloadFile $LIB_URL -FileName $BUILD_HOME/$TARGET.zip
# 提取板支持包
echo -e "\e[93mExtract $TARGET...\e[0m"
unzip $BUILD_HOME/$TARGET.zip -d $BUILD_HOME > /dev/null
echo -e "\e[93mInstall $TARGET...\e[0m"
mkdir -p $HWLIB_PATH
# 执行指定平台安装脚本
echo -e "\e[93mRun the $TARGET install script\e[0m"
if [ "$TARGET" == "ESP8266" ]; then
# 从库中复制工具链索引文件
cp -R $BUILD_HOME/$LIB_VER $HWLIB_PATH/esp8266
cp -R $TARGET_LIB/test/package $HWLIB_PATH/esp8266/package
cd $HWLIB_PATH/esp8266/tools
python get.py
elif [ "$TARGET" == "ESP32" ]; then
# 从库中复制工具链索引文件
mkdir -p $HWLIB_PATH
cp -R $BUILD_HOME/$LIB_VER $HWLIB_PATH/esp32
cd $HWLIB_PATH/esp32/tools
python3 get.py
echo -e "\e[93mInstall PySerial.\e[0m"
sudo pip install pyserial
fi
else
echo -e "\e[93mNo package set, skip.\e[0m"
fi
# 安装第三方库
if [ -n "$OTHER_LIB" ]; then
# 解析字符串为数组
readarray -td, libs <<<"$OTHER_LIB,"
unset 'libs[-1]'
for lib in "${libs[@]}"
do
echo -e "\e[93mCloning $lib...\e[0m"
cd $BUILD_HOME/Arduino/libraries
# 克隆最近的release
git clone --depth=1 $lib
done
fi
echo -e "\e[93mInstall Done.\e[0m"

View File

@@ -0,0 +1,302 @@
{
"packages": [
{
"name": "esp8266",
"maintainer": "ESP8266 Community",
"websiteURL": "https://github.com/esp8266/Arduino",
"email": "ivan@esp8266.com",
"help": {
"online": "https://esp8266.com/arduino"
},
"platforms": [
{
"category": "ESP8266",
"name": "esp8266",
"url": "",
"version": "",
"architecture": "esp8266",
"archiveFileName": "",
"boards": [
{
"name": "Generic ESP8266 Module"
},
{
"name": "Generic ESP8285 Module"
},
{
"name": "ESPDuino (ESP-13 Module)"
},
{
"name": "Adafruit Feather HUZZAH ESP8266"
},
{
"name": "Invent One"
},
{
"name": "XinaBox CW01"
},
{
"name": "ESPresso Lite 1.0"
},
{
"name": "ESPresso Lite 2.0"
},
{
"name": "Phoenix 1.0"
},
{
"name": "Phoenix 2.0"
},
{
"name": "NodeMCU 0.9 (ESP-12 Module)"
},
{
"name": "NodeMCU 1.0 (ESP-12E Module)"
},
{
"name": "Olimex MOD-WIFI-ESP8266(-DEV)"
},
{
"name": "SparkFun ESP8266 Thing"
},
{
"name": "SparkFun ESP8266 Thing Dev"
},
{
"name": "SweetPea ESP-210"
},
{
"name": "LOLIN(WEMOS) D1 R2 & mini"
},
{
"name": "LOLIN(WEMOS) D1 mini Pro"
},
{
"name": "LOLIN(WEMOS) D1 mini Lite"
},
{
"name": "WeMos D1 R1"
},
{
"name": "ESPino (ESP-12 Module)"
},
{
"name": "ThaiEasyElec's ESPino"
},
{
"name": "WifInfo"
},
{
"name": "Arduino"
},
{
"name": "4D Systems gen4 IoD Range"
},
{
"name": "Digistump Oak"
},
{
"name": "WiFiduino"
},
{
"name": "Amperka WiFi Slot"
},
{
"name": "Seeed Wio Link"
},
{
"name": "ESPectro Core"
}
],
"toolsDependencies": [
{
"packager": "esp8266",
"version": "2.5.0-3-20ed2b9",
"name": "xtensa-lx106-elf-gcc"
},
{
"packager": "esp8266",
"version": "2.5.0-3-20ed2b9",
"name": "mkspiffs"
},
{
"packager": "esp8266",
"version": "3.7.2-post1",
"name": "python"
}
],
"help": {
"online": ""
}
}
],
"tools": [
{
"version": "3.7.2-post1",
"name": "python",
"systems": [
{
"host": "x86_64-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/python-3.7.2.post1-embed-win32v2.zip",
"archiveFileName": "python-3.7.2.post1-embed-win32v2.zip",
"checksum": "SHA-256:26665d2925ee75118bb7d8620e9ee988adc2ca3e660a9f4c06a09a06c94c0c29",
"size": "6431781"
},
{
"host": "i686-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/python-3.7.2.post1-embed-win32v2.zip",
"archiveFileName": "python-3.7.2.post1-embed-win32v2.zip",
"checksum": "SHA-256:26665d2925ee75118bb7d8620e9ee988adc2ca3e660a9f4c06a09a06c94c0c29",
"size": "6431781"
},
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/python-placeholder.tar.gz",
"archiveFileName": "python-placeholder.tar.gz",
"checksum": "SHA-256:3b32fdb0905abf97e923ff968b6a0da8ce85d632b27845d7e2fc759778778785",
"size": "193"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/python-placeholder.tar.gz",
"archiveFileName": "python-placeholder.tar.gz",
"checksum": "SHA-256:3b32fdb0905abf97e923ff968b6a0da8ce85d632b27845d7e2fc759778778785",
"size": "193"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/python-placeholder.tar.gz",
"archiveFileName": "python-placeholder.tar.gz",
"checksum": "SHA-256:3b32fdb0905abf97e923ff968b6a0da8ce85d632b27845d7e2fc759778778785",
"size": "193"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/python-placeholder.tar.gz",
"archiveFileName": "python-placeholder.tar.gz",
"checksum": "SHA-256:3b32fdb0905abf97e923ff968b6a0da8ce85d632b27845d7e2fc759778778785",
"size": "193"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/python-placeholder.tar.gz",
"archiveFileName": "python-placeholder.tar.gz",
"checksum": "SHA-256:3b32fdb0905abf97e923ff968b6a0da8ce85d632b27845d7e2fc759778778785",
"size": "193"
}
]
},
{
"version": "2.5.0-3-20ed2b9",
"name": "xtensa-lx106-elf-gcc",
"systems": [
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/aarch64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "aarch64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:2192512ff6e33d4126722b2bfea02c1d8293b0a90094f84a9ac494d5fcaa0f45",
"size": "40974297"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/arm-linux-gnueabihf.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "arm-linux-gnueabihf.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:861c4ab7f6f04344f7ee656d90288e6904d7efac83ffe4835b66df3eba35b0a0",
"size": "37013753"
},
{
"host": "i686-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"archiveFileName": "i686-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"checksum": "SHA-256:38b9ccc3b286546b026fb8a29fb2bd8fdab32c4711816a1a3cb0f11250b5c541",
"size": "44935132"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-linux-gnu.xtensa-lx106-elf-1f24aeae.tar.gz",
"archiveFileName": "i686-linux-gnu.xtensa-lx106-elf-1f24aeae.tar.gz",
"checksum": "SHA-256:96b106fbc814155e92d1805d3227d36096b88d3d54cfcd885804a0e9cf5631d7",
"size": "42500158"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-apple-darwin14.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "x86_64-apple-darwin14.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:fd29ae844915fb2dd800d99ad7967be0e890601c18b80555efbc4eca2dd808c2",
"size": "44378513"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "x86_64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:039f87e2d881b6488a0be8c7fda86cacb1d38502a236cc6768a2dbc2a20ca9cd",
"size": "43778575"
},
{
"host": "x86_64-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"archiveFileName": "x86_64-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"checksum": "SHA-256:cc8c19a458129e49ec195d9438a53c6ce2c1287a04ea1ea22b81dcc65db511a8",
"size": "48635537"
}
]
},
{
"version": "2.5.0-3-20ed2b9",
"name": "mkspiffs",
"systems": [
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/aarch64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "aarch64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:5f1e6a1f0eff4522bed90c539f88efe48ecc9c9ee72b0e3cad35f8b09c334168",
"size": "51017"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/arm-linux-gnueabihf.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "arm-linux-gnueabihf.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:edc5ea2080f90f33aed84e5a9b6986bf905431e09155cdca96b648eae9656d94",
"size": "44050"
},
{
"host": "i686-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-w64-mingw32.mkspiffs-7fefeac.zip",
"archiveFileName": "i686-w64-mingw32.mkspiffs-7fefeac.zip",
"checksum": "SHA-256:ec661fb02c2635ac722eaaedf0a0c35474c43c72008f0ceefffb19af2f739d15",
"size": "337874"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-linux-gnu.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "i686-linux-gnu.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:d080b3b50ee00ac56b7204f8d08b95cd53872a2e09da590775ee631bcb279cad",
"size": "54276"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-apple-darwin14.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "x86_64-apple-darwin14.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:927cb67d045c598a9159ae16bc5fb63a20b3e23ad95eeb44702c938e6272f92f",
"size": "368554"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "x86_64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:4547bfe668090944d50af8dbf09abb5b51eb4a892b4784818f06a2274a630878",
"size": "52429"
},
{
"host": "x86_64-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-w64-mingw32.mkspiffs-7fefeac.zip",
"archiveFileName": "x86_64-w64-mingw32.mkspiffs-7fefeac.zip",
"checksum": "SHA-256:0dedc3ee977af99ffd160bb304e8bfb68a8545f2d1f2e4a3b534f2ae1a49d2c9",
"size": "350035"
}
]
}
]
}
]
}