diff --git a/boards/posix/nrf52_bsim/CMakeLists.txt b/boards/posix/nrf52_bsim/CMakeLists.txt index b2bc60c4b9a..8848bc4d951 100644 --- a/boards/posix/nrf52_bsim/CMakeLists.txt +++ b/boards/posix/nrf52_bsim/CMakeLists.txt @@ -13,57 +13,11 @@ if (NOT DEFINED ENV{BSIM_OUT_PATH}) https://babblesim.github.io/folder_structure_and_env.html") endif() -#Let's check that the HW models are the needed version or newer -#That is, that the needed tag is somewhere in the past of its branch -if(NOT DEFINED ENV{NO_NRF52_BSIM_VERSION_WARNING}) - if(GIT_FOUND) #boilerplate.cmake searches for git - file(STRINGS "hw_models_version" NRF52_HW_MODELS_TAG) #desired version - execute_process(COMMAND ${GIT_EXECUTABLE} merge-base --is-ancestor - ${NRF52_HW_MODELS_TAG} HEAD - WORKING_DIRECTORY $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/ - OUTPUT_VARIABLE NRF52_HW_MODELS_TAG_FOUND - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE stderr - RESULT_VARIABLE return_code - ) - if(return_code) - message(WARNING "The NRF52 HW models are out of date\ - (${NRF52_HW_MODELS_TAG} needed at least); Please update them or expect\ - problems!\nReported error while trying to find the tag: \"${stderr}\"") - - #let's print the latest actual tag for the available models: - execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags - WORKING_DIRECTORY $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/ - OUTPUT_VARIABLE NRF52_HW_MODELS_TAG_FOUND - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE stderr - RESULT_VARIABLE return_code - ) - message(STATUS "Found NRF52 models version ${NRF52_HW_MODELS_TAG_FOUND}") - - message(FATAL_ERROR "To disable this check set the environment variable\ - NO_NRF52_BSIM_VERSION_WARNING") - - elseif(CMAKE_VERBOSE_MAKEFILE) - message(STATUS "nrf52_bsim: git merge-base --is-ancestor\ - ${NRF52_HW_MODELS_TAG} HEAD, - stdout: ${NRF52_HW_MODELS_TAG_FOUND} - stderr: ${stderr}") - endif() - endif() -endif() - zephyr_library() zephyr_library_compile_definitions(NO_POSIX_CHEATS) zephyr_include_directories( fake - $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/src/ - $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/src/nrfx/hal/ - $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/src/nrfx/ - $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/src/HW_models/ ) #Due to the BLE controller assumption about enum size @@ -85,8 +39,6 @@ zephyr_library_include_directories( fake $ENV{BSIM_COMPONENTS_PATH}/libUtilv1/src/ $ENV{BSIM_COMPONENTS_PATH}/libPhyComv1/src/ - $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/src/HW_models/ - $ENV{BSIM_COMPONENTS_PATH}/ext_NRF52_hw_models/src/nrfx_hal/ $ENV{BSIM_COMPONENTS_PATH}/libRandv2/src/ ${ZEPHYR_BASE}/kernel/include ${ZEPHYR_BASE}/arch/posix/include @@ -101,7 +53,6 @@ zephyr_library_import(bsim_libUtilv1 ${libpath}/libUtilv1.32.a) zephyr_library_import(bsim_libPhyComv1 ${libpath}/libPhyComv1.32.a) zephyr_library_import(bsim_lib2G4PhyComv1 ${libpath}/lib2G4PhyComv1.32.a) zephyr_library_import(bsim_libRandv2 ${libpath}/libRandv2.32.a) -zephyr_library_import(bsim_libNRF52_hw ${libpath}/libNRF52_hw_models.32.a) # This is due to some tests using _Static_assert which is a 2011 feature, but # otherwise relying on compilers supporting it also when set to C99. diff --git a/boards/posix/nrf52_bsim/hw_models_version b/boards/posix/nrf52_bsim/hw_models_version deleted file mode 100644 index c0ec837a440..00000000000 --- a/boards/posix/nrf52_bsim/hw_models_version +++ /dev/null @@ -1 +0,0 @@ -v2.0 diff --git a/scripts/ci/run_ci.sh b/scripts/ci/run_ci.sh index 500ee68bb75..e045b63c30e 100755 --- a/scripts/ci/run_ci.sh +++ b/scripts/ci/run_ci.sh @@ -115,29 +115,6 @@ function on_complete() { fi } - -function build_btsim() { - nrf_hw_models_version=`cat boards/posix/nrf52_bsim/hw_models_version` - pushd . - cd ${BSIM_COMPONENTS_PATH} - if [ -d ext_NRF52_hw_models ]; then - cd ext_NRF52_hw_models - git describe --tags --abbrev=0 ${NRF52_HW_MODELS_TAG}\ - > /dev/null || - ( - echo "`pwd` seems to contain the nRF52 HW\ - models but they are out of date" - exit 1 - ) - else - git clone -b ${nrf_hw_models_version} \ - https://github.com/BabbleSim/ext_NRF52_hw_models.git - fi - cd ${BSIM_OUT_PATH} - make everything -j 8 -s - popd -} - function run_bsim_bt_tests() { WORK_DIR=${ZEPHYR_BASE}/bsim_bt_out tests/bluetooth/bsim_bt/compile.sh RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_test_results_file} \ @@ -250,10 +227,7 @@ if [ -n "$main_ci" ]; then $short_git_log if [ -n "${BSIM_OUT_PATH}" -a -d "${BSIM_OUT_PATH}" ]; then - echo "Build BT simulator tests" - # Build BT Simulator - build_btsim - + echo "Build and run BT simulator tests" # Run BLE tests in simulator on the 1st CI instance: if [ "$matrix" = "1" ]; then run_bsim_bt_tests diff --git a/west.yml b/west.yml index ad6399fc7e5..bcb8f6d401e 100644 --- a/west.yml +++ b/west.yml @@ -103,6 +103,9 @@ manifest: - name: mipi-sys-t path: modules/debug/mipi-sys-t revision: baf51863f19f009b92e762115ba5572a5b996b92 + - name: nrf_hw_models + path: modules/bsim_hw_models/nrf_hw_models + revision: fec69703cb1ca06fcdab6d5fde01274f0fc5c759 self: path: zephyr