Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,16 @@ set(ENV{HOST_OTHER} n)

include(nuttx_sethost)

option(NXTMPDIR "Create the nxtmpdir folder for third-party packages." OFF)

include(nuttx_3rdparty)

if(NXTMPDIR)
nuttx_make_nxtmpdir()
else()
nuttx_remove_nxtmpdir()
endif()

include(nuttx_parse_function_args)
include(nuttx_add_subdirectory)
include(nuttx_create_symlink)
Expand Down
2 changes: 0 additions & 2 deletions arch/risc-v/src/common/espressif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ if(NOT IS_DIRECTORY "${ESP_HAL_3RDPARTY_REPO}")
# NXTMPDIR contains a cached version of the esp-hal-3rdparty repository, which
# is located on nuttx/../nxtmpdir/esp-hal-3rdparty if it exists.
if(NXTMPDIR)
include(${NUTTX_DIR}/cmake/nuttx_3rdparty.cmake)
nuttx_make_nxtmpdir()
set(ESP_HAL_NXTMPDIR_CACHE "${NXTMPDIR_PATH}/${ESP_HAL_3RDPARTY_REPO_NAME}")
get_filename_component(ESP_HAL_NXTMPDIR_CACHE "${ESP_HAL_NXTMPDIR_CACHE}"
REALPATH)
Expand Down
15 changes: 15 additions & 0 deletions cmake/nuttx_3rdparty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ function(nuttx_make_nxtmpdir)
endif()
endfunction()

# ~~~
# nuttx_remove_nxtmpdir
#
# Description:
# Remove the third-party cache directory under nuttx/../nxtmpdir
#
# ~~~

function(nuttx_remove_nxtmpdir)
set(_nxtmpdir "${NUTTX_DIR}/../nxtmpdir")
if(EXISTS "${_nxtmpdir}")
file(REMOVE_RECURSE "${_nxtmpdir}")
endif()
endfunction()

# ~~~
# nuttx_check_git_hash
#
Expand Down
10 changes: 10 additions & 0 deletions tools/ci/testlist/risc-v-02.dat
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
/risc-v/esp32c[0-5]*

# 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
15 changes: 13 additions & 2 deletions tools/testbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ MAKE=make
unset testfile
unset HOPTION
unset STORE
unset NXTMPDIR
unset JOPTION
PRINTLISTONLY=0
GITCLEAN=0
SAVEARTIFACTS=0
CHECKCLEAN=1
CODECHECKER=0
NINJACMAKE=0
STORECMAKE=0
RUN=0

case $(uname -s) in
Expand Down Expand Up @@ -150,6 +152,7 @@ while [ ! -z "$1" ]; do
;;
-S )
STORE+=" $1"
STORECMAKE=1
;;
--codechecker )
CODECHECKER=1
Expand Down Expand Up @@ -200,6 +203,14 @@ if [ ${NINJACMAKE} -eq 1 ]; then
cmakelist=`grep "^[C|c][M|m][A|a][K|k][E|e]" $testfile | cut -d',' -f2 || true`
fi

if [ ${STORECMAKE} -eq 1 ]; then
NXTMPDIR="ON"
echo "NXTMPDIR store is enabled"
else
NXTMPDIR="OFF"
echo "NXTMPDIR store is disabled"
fi

cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }

function exportandimport {
Expand Down Expand Up @@ -342,8 +353,8 @@ function configure_default {
}

function configure_cmake {
if ! cmake -B build -DBOARD_CONFIG=$config -GNinja 1>/dev/null; then
cmake -B build -DBOARD_CONFIG=$config -GNinja
if ! cmake -B build -DBOARD_CONFIG=$config -DNXTMPDIR="$NXTMPDIR" -GNinja 1>/dev/null; then
cmake -B build -DBOARD_CONFIG=$config -DNXTMPDIR="$NXTMPDIR" -GNinja
fail=1
fi

Expand Down
Loading