mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
tools/ci: Added esptool for Windows Native
- Added esptool for Windows Native - Added build for esp32-c3-zero Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
@@ -139,7 +139,6 @@ function arm_gcc_toolchain() {
|
||||
|
||||
function arm64_gcc_toolchain() {
|
||||
Write-Host "Check ARM64 GCC toolchain toolchain ..." -ForegroundColor Green
|
||||
|
||||
try {
|
||||
if (run_command("aarch64-none-elf-gcc") -ne 0) {
|
||||
add_path "$NUTTXTOOLS\gcc-aarch64-none-elf\bin"
|
||||
@@ -167,7 +166,7 @@ function cmake_tool {
|
||||
if (run_command("cmake") -ne 0) {
|
||||
add_path "$NUTTXTOOLS\cmake\bin"
|
||||
if ($null -eq (Get-Command cmake -ErrorAction SilentlyContinue)) {
|
||||
Write-Host "Download: Ninja package" -ForegroundColor Green
|
||||
Write-Host "Download: Cmake package" -ForegroundColor Green
|
||||
# Download the file
|
||||
$basefile = "cmake-3.31.6-windows-x86_64"
|
||||
Set-Location "$NUTTXTOOLS"
|
||||
@@ -181,6 +180,25 @@ function cmake_tool {
|
||||
cmake --version
|
||||
}
|
||||
|
||||
function esp_tool {
|
||||
Write-Host "Check esptool ..." -ForegroundColor Green
|
||||
if (run_command("esptool") -ne 0) {
|
||||
add_path "$NUTTXTOOLS\esptool"
|
||||
if ($null -eq (Get-Command esptool -ErrorAction SilentlyContinue)) {
|
||||
Write-Host "Download: esptool package" -ForegroundColor Green
|
||||
# Download the file
|
||||
$basefile = "esptool-v5.2.0-windows-amd64"
|
||||
Set-Location "$NUTTXTOOLS"
|
||||
# Download tool esptool
|
||||
Invoke-WebRequest -Uri "https://github.com/espressif/esptool/releases/download/v5.2.0/$basefile.zip" -OutFile "$NUTTXTOOLS\$basefile.zip" -ErrorAction Stop
|
||||
Expand-Archive "$NUTTXTOOLS\$basefile.zip"
|
||||
Move-Item -Path "$basefile\esptool-windows-amd64" -Destination "esptool"
|
||||
Remove-Item "$basefile*" -Force
|
||||
}
|
||||
}
|
||||
esptool version
|
||||
}
|
||||
|
||||
function kconfig_frontends() {
|
||||
Write-Host "Check kconfig-frontends ..." -ForegroundColor Green
|
||||
add_path "$NUTTXTOOLS\kconfig-frontends\bin"
|
||||
@@ -337,7 +355,7 @@ function install_build_tools {
|
||||
if (-not (Test-Path -Path "$NUTTXTOOLS\env.ps1")) {
|
||||
add_envpath "$NUTTXTOOLS\env.ps1"
|
||||
}
|
||||
$install = "arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain riscv_gcc_toolchain pico_sdk pico_tool cmake_tool kconfig_frontends ninja_tool"
|
||||
$install = "arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain riscv_gcc_toolchain pico_sdk pico_tool cmake_tool esp_tool kconfig_frontends ninja_tool"
|
||||
|
||||
$splitArray = $install.Split(" ")
|
||||
$oldpath = Get-Location
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
/risc-v/qemu-rv/rv-virt/configs/nsh
|
||||
|
||||
/risc-v/esp32c3/esp32-c3-zero/configs/nsh
|
||||
|
||||
# The simulator currently builds only with Visual Studio 2022
|
||||
|
||||
/sim/sim/sim/configs/windows
|
||||
@@ -26,4 +28,5 @@ CMake,nucleo-l152re:nsh
|
||||
CMake,nucleo-f411re:nsh
|
||||
CMake,raspberrypi-pico:nsh
|
||||
CMake,rv-virt:nsh
|
||||
CMake,esp32-c3-zero:nsh
|
||||
CMake,sim:windows
|
||||
|
||||
Reference in New Issue
Block a user