This is an automated email from the ASF dual-hosted git repository.

lupyuen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 944ba20a69253c80db988f2d8cb695687a5980bf
Author: simbit18 <[email protected]>
AuthorDate: Fri Apr 3 18:25:35 2026 +0200

    tools/ci:  Added esptool for Windows Native
    
    - Added esptool for Windows Native
    
    - Added build for esp32-c3-zero
    
    Signed-off-by: simbit18 <[email protected]>
---
 tools/ci/platforms/windows.ps1 | 24 +++++++++++++++++++++---
 tools/ci/testlist/windows.dat  |  3 +++
 tools/testbuild.ps1            |  1 +
 3 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/tools/ci/platforms/windows.ps1 b/tools/ci/platforms/windows.ps1
index 744553a9b51..7317549c24a 100644
--- a/tools/ci/platforms/windows.ps1
+++ b/tools/ci/platforms/windows.ps1
@@ -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
diff --git a/tools/ci/testlist/windows.dat b/tools/ci/testlist/windows.dat
index 8e75d39ca48..ec54d4f82bb 100644
--- a/tools/ci/testlist/windows.dat
+++ b/tools/ci/testlist/windows.dat
@@ -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
diff --git a/tools/testbuild.ps1 b/tools/testbuild.ps1
index f55c6d31689..22aa270068a 100644
--- a/tools/testbuild.ps1
+++ b/tools/testbuild.ps1
@@ -423,6 +423,7 @@ function dotest {
   if ($NINJACMAKE -eq 1) {
     foreach ($l in $cmakelist) {
       if ("Cmake," + $config -replace '\\', ':' -eq "$l") {
+        Write-Host "Cmake in present: $config" -ForegroundColor Yellow
         $cmake = 1
       }
     }

Reply via email to