Skip to content

CI: CMake Added a folder nxtmpdir for storing third-party packages#18749

Draft
simbit18 wants to merge 3 commits intoapache:masterfrom
simbit18:simbit18-nxstore
Draft

CI: CMake Added a folder nxtmpdir for storing third-party packages#18749
simbit18 wants to merge 3 commits intoapache:masterfrom
simbit18:simbit18-nxstore

Conversation

@simbit18
Copy link
Copy Markdown
Contributor

Summary

testbuild.sh:

  • CMake Added -DNXTMPDIR

CMakeLists.txt:

  • Moved the creation of the nxtmpdir folder for third-party packages to the root CMakeLists.txt file.

ci/testlist/risc-v-02.dat:

  • Add Boards build by CMake
    CMake,esp32c3-xiao:nimble
    CMake,esp32c3-xiao:gpio
    CMake,esp32c3-xiao:wifi
    CMake,esp32c3-xiao:usbnsh
    CMake,esp32-c3-zero:wifi
    CMake,esp32-c3-zero:jumbo
    CMake,esp32-c3-zero:sta_softap
    CMake,esp32-c3-zero:usbnsh

Impact

Impact on user: NO

Impact on build: NO

Impact on hardware: NO

Impact on documentation: NO

Impact on security: NO

Impact on compatibility: NO

Testing

GitHub

====================================================================================
Cmake in present: esp32c3-xiao/nimble
Configuration/Tool: esp32c3-xiao/nimble
2026-04-16 14:51:32
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Select HOST_LINUX=y
   TOOLS_DIR path is "/github/workspace/sources/nuttx"
   HOST = Linux
Cloning into 'esp-hal-3rdparty'...
HEAD is now at 2209449c986 Add DFS support for esp32[-c3|-c6|-h2|-p4]
  Building NuttX...
Build Attempt 1 of 4
====================================================================================
Cmake in present: esp32c3-xiao/gpio
Configuration/Tool: esp32c3-xiao/gpio
2026-04-16 14:53:32
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Select HOST_LINUX=y
   TOOLS_DIR path is "/github/workspace/sources/nuttx"
   HOST = Linux
  Building NuttX...
Build Attempt 1 of 4
====================================================================================
Configuration/Tool: esp32c3-xiao/nsh
2026-04-16 14:54:25
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
  [1/1] Normalize esp32c3-xiao/nsh
Build Attempt 1 of 4
====================================================================================

https://github.com/simbit18/manual-nuttx-ci/actions/runs/24516760711/job/71663210962#logs

@github-actions github-actions bot added Area: Build system Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: S The size of the change in this PR is small labels Apr 16, 2026
@simbit18 simbit18 marked this pull request as draft April 16, 2026 16:36
@fdcavalcanti
Copy link
Copy Markdown
Contributor

Could you test locally using NXTMPDIR?

@simbit18
Copy link
Copy Markdown
Contributor Author

Hi @fdcavalcanti here it is:

esp32-c3-zero:nsh
D:\nuttxtesp\nuttx>cmake -B build -DBOARD_CONFIG=esp32-c3-zero:nsh -DNXTMPDIR=on -GNinja
-- nuttx_add_subdirectory: Skipping cxx-oot-build
-- Initializing NuttX
Loaded configuration 'D:/nuttxtesp/nuttx/build/.config.compressed'
Minimal configuration saved to 'D:/nuttxtesp/nuttx/build/defconfig.tmp'
--   ENV{PROCESSOR_ARCHITECTURE} = AMD64
  Select HOST_WINDOWS=y
  Select WINDOWS_NATIVE=y
--   CMake:  3.31.5
--   Ninja:  1.12.1
--   Board:  esp32-c3-zero
--   Config: nsh
--   Appdir: D:/nuttxtesp/apps
-- Building for: Ninja
-- The C compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/mingw/mingw64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- NuttX Host Tools
-- CMake C compiler: GNU
-- CMake system name: Windows
-- CMake host system processor: AMD64
   TOOLS_DIR path is "D:/nuttxtesp/nuttx"
   HOST = WINDOWS NATIVE
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: D:/nuttxtesp/nuttx/build/bin_host
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: D:/nx20250410/tools/riscv-none-elf-gcc/bin/riscv-none-elf-gcc.exe
-- Cloning Espressif HAL for 3rd Party Platforms
-- Populating esp_hal_3rdparty
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: D:/nuttxtesp/nuttx/build/_deps/esp_hal_3rdparty-subbuild
[1/9] Creating directories for 'esp_hal_3rdparty-populate'
[1/9] Performing download step (git clone) for 'esp_hal_3rdparty-populate'
Cloning into 'esp-hal-3rdparty'...
HEAD is now at 2209449c986 Add DFS support for esp32[-c3|-c6|-h2|-p4]
[2/9] Performing update step for 'esp_hal_3rdparty-populate'
-- Already at requested ref: 2209449c9864c6d83a0ee2295f5b5299a2c6fb39
[3/9] No patch step for 'esp_hal_3rdparty-populate'
[5/9] No configure step for 'esp_hal_3rdparty-populate'
[6/9] No build step for 'esp_hal_3rdparty-populate'
[7/9] No install step for 'esp_hal_3rdparty-populate'
[8/9] No test step for 'esp_hal_3rdparty-populate'
[9/9] Completed 'esp_hal_3rdparty-populate'
HEAD is now at 582ff4820 feat(drivers): ESP-HMAC opaque driver
-- Copying from D:/nuttxtesp/nxtmpdir/esp-hal-3rdparty to D:/nuttxtesp/nuttx/build/arch/risc-v/src/common/espressif/esp-hal-3rdparty
-- nuttx_add_subdirectory: Skipping cxx-oot-build
-- Configuring done (103.1s)
-- Generating done (2.1s)
-- Build files have been written to: D:/nuttxtesp/nuttx/build

D:\nuttxtesp\nuttx>cmake --build build
[1361/1361] Running utility command for nuttx_post_build
-- Generate NuttX image (esptool elf2image)
esptool v5.2.0
Creating ESP32-C3 image...
Image has only RAM segments visible. ROM segments are hidden and SHA256 digest is not appended.
Merged 1 ELF section.
Successfully created ESP32-C3 image.
-- Generated: nuttx.bin

I've got to sign off now – I've got more tests tomorrow!!! :)

- It is now possible to create folder for third-party packages in CMake as well. (Aligned with Make)

Signed-off-by: simbit18 <simbit18@gmail.com>
-  Boards build by CMake

    esp32c3-xiao

    esp32-c3-zero

Signed-off-by: simbit18 <simbit18@gmail.com>
- Moved the creation of the `nxtmpdir` folder for third-party packages to the root  `CMakeLists.txt` file.

Signed-off-by: simbit18 <simbit18@gmail.com>
@lupyuen
Copy link
Copy Markdown
Member

lupyuen commented Apr 20, 2026

  # NXTMPDIR contains a cached version of the esp-hal-3rdparty repository, which
  # is located on nuttx/../nxtmpdir/esp-hal-3rdparty if it exists.

@simbit18 Aha this is very interesting. Does it mean I need to delete nuttx/../nxtmpdir/esp-hal-3rdparty, while Retrying CI Builds, in case it contains Corrupted Downloads?

@simbit18
Copy link
Copy Markdown
Contributor Author

Hi @lupyuen, yes, that would probably be best, just to be on the safe side.

At the moment, the esp-hal-3rdparty repository is cloned just once and used for the Make build of all Espressif boards. So, of course, there is a chance that Git might not work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Area: Build system Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants