From 6e9e22f700a4392ffc8174b330433fe5c545d041 Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 31 Oct 2023 16:34:58 +0000 Subject: [PATCH 1/7] Include xs1.h in rtos_swmem.c --- modules/drivers/swmem/src/rtos_swmem.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/drivers/swmem/src/rtos_swmem.c b/modules/drivers/swmem/src/rtos_swmem.c index 6448a83b9..959dd1c15 100644 --- a/modules/drivers/swmem/src/rtos_swmem.c +++ b/modules/drivers/swmem/src/rtos_swmem.c @@ -1,13 +1,14 @@ -// Copyright 2021 XMOS LIMITED. +// Copyright 2021-2023 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. +#include + #include #include #include #include "rtos_interrupt.h" #include "rtos_swmem.h" - static swmem_fill_t swmem_fill_res; static swmem_evict_t swmem_evict_res; @@ -179,4 +180,4 @@ void rtos_swmem_init(uint32_t init_flags) unsigned int rtos_swmem_offset_get() { return __swmem_address; -} \ No newline at end of file +} From a9ca97fc3076ccedc7328b2abd924283b8fe3642 Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 31 Oct 2023 20:42:19 +0000 Subject: [PATCH 2/7] Update info for Windows users --- tools/ci/build_rtos_tests.sh | 2 +- tools/fatfs_mkimage/README.rst | 27 +++++++++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/tools/ci/build_rtos_tests.sh b/tools/ci/build_rtos_tests.sh index 132869ac5..acafa5f49 100755 --- a/tools/ci/build_rtos_tests.sh +++ b/tools/ci/build_rtos_tests.sh @@ -41,6 +41,6 @@ for ((i = 0; i < ${#applications[@]}; i += 1)); do (cd ${path}; rm -rf build_${board}) (cd ${path}; mkdir -p build_${board}) - (cd ${path}/build_${board}; log_errors cmake ../ -G "$CI_CMAKE_GENERATOR" -DCMAKE_TOOLCHAIN_FILE=${toolchain_file} -DBOARD=${board} -DFRAMEWORK_RTOS_TESTS=ON; log_errors $CI_BUILD_TOOL ${make_target} $CI_BUILD_TOOL_ARGS) + (cd ${path}/build_${board}; log_errors cmake ../ -G "$CI_CMAKE_GENERATOR" --toolchain=${toolchain_file} -DBOARD=${board} -DFRAMEWORK_RTOS_TESTS=ON; log_errors $CI_BUILD_TOOL ${make_target} $CI_BUILD_TOOL_ARGS) (cd ${path}/build_${board}; cp ${make_target}.xe ${DIST_DIR}) done diff --git a/tools/fatfs_mkimage/README.rst b/tools/fatfs_mkimage/README.rst index d9091182f..78f753a1b 100644 --- a/tools/fatfs_mkimage/README.rst +++ b/tools/fatfs_mkimage/README.rst @@ -9,26 +9,37 @@ This is the FAT file system image creation tool. This tool creates a FAT filesys Building the Application ************************ -This application is typically built and installed from tools/install. +This application is typically built and installed from tools/install. -However, if you are modifying the application, it is possible to build the project using CMake. To build this application, run the following commands: +However, if you are modifying the application, it is possible to build the project using CMake. To build this application on Linux and MacOS, run the following commands: .. tab:: Linux and MacOS .. code-block:: console - + $ cmake -B build $ cd build $ make -j -Note: You may need to run the ``make -j`` command as ``sudo``. +.. note:: + + You may need to run the ``make -j`` command as ``sudo``. + +Windows users must run the x86 native tools command prompt from Visual Studio and we recommend the use of the Ninja build system. -Note: Windows users must run the x86 native tools command prompt from Visual Studio +To install *Ninja* follow install instructions at https://ninja-build.org/ or on Windows +install with ``winget`` by running the following commands in *PowerShell*: + +.. code-block:: PowerShell + # Install + winget install Ninja-build.ninja + # Reload user Path + $env:Path=[System.Environment]::GetEnvironmentVariable("Path","User") .. tab:: Windows .. code-block:: x86 native tools command prompt - - $ cmake -G "NMake Makefiles" -B build + + $ cmake -G Ninja -B build $ cd build - $ nmake + $ ninja From 239fb98a4917206d4b6ad9f460ef3ffa757d16bd Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 31 Oct 2023 20:46:54 +0000 Subject: [PATCH 3/7] Fix syntax --- tools/fatfs_mkimage/README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/fatfs_mkimage/README.rst b/tools/fatfs_mkimage/README.rst index 16e7d337a..286325e51 100644 --- a/tools/fatfs_mkimage/README.rst +++ b/tools/fatfs_mkimage/README.rst @@ -31,6 +31,7 @@ To install *Ninja* follow install instructions at https://ninja-build.org/ or on install with ``winget`` by running the following commands in *PowerShell*: .. code-block:: PowerShell + # Install winget install Ninja-build.ninja # Reload user Path From 2f451c57bdb05e3c7349679d0e1b9c16b4c4c003 Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 31 Oct 2023 20:47:48 +0000 Subject: [PATCH 4/7] Fix syntax --- tools/fatfs_mkimage/README.rst | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/fatfs_mkimage/README.rst b/tools/fatfs_mkimage/README.rst index 286325e51..af13ac63f 100644 --- a/tools/fatfs_mkimage/README.rst +++ b/tools/fatfs_mkimage/README.rst @@ -13,13 +13,12 @@ This application is typically built and installed from tools/install. However, if you are modifying the application, it is possible to build the project using CMake. To build this application on Linux and MacOS, run the following commands: -.. tab:: Linux and MacOS - .. code-block:: console +.. code-block:: console - $ cmake -B build - $ cd build - $ make -j + $ cmake -B build + $ cd build + $ make -j .. note:: @@ -37,10 +36,9 @@ install with ``winget`` by running the following commands in *PowerShell*: # Reload user Path $env:Path=[System.Environment]::GetEnvironmentVariable("Path","User") -.. tab:: doscon - .. code-block:: x86 native tools command prompt +.. code-block:: x86 native tools command prompt - $ cmake -G Ninja -B build - $ cd build - $ ninja + $ cmake -G Ninja -B build + $ cd build + $ ninja From f7bd783d46a0cb8006fe1816718549616ac88df4 Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 31 Oct 2023 20:49:36 +0000 Subject: [PATCH 5/7] Fix syntax --- tools/fatfs_mkimage/README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/fatfs_mkimage/README.rst b/tools/fatfs_mkimage/README.rst index af13ac63f..ca7f79b69 100644 --- a/tools/fatfs_mkimage/README.rst +++ b/tools/fatfs_mkimage/README.rst @@ -36,8 +36,9 @@ install with ``winget`` by running the following commands in *PowerShell*: # Reload user Path $env:Path=[System.Environment]::GetEnvironmentVariable("Path","User") +To build this application on Windows, run the following commands: -.. code-block:: x86 native tools command prompt +.. code-block:: console $ cmake -G Ninja -B build $ cd build From 5993932923a8dd7c8f840978575683c5f8c9483a Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 31 Oct 2023 20:53:49 +0000 Subject: [PATCH 6/7] Remove $ --- tools/fatfs_mkimage/README.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/fatfs_mkimage/README.rst b/tools/fatfs_mkimage/README.rst index ca7f79b69..51dbd9b89 100644 --- a/tools/fatfs_mkimage/README.rst +++ b/tools/fatfs_mkimage/README.rst @@ -16,9 +16,9 @@ However, if you are modifying the application, it is possible to build the proje .. code-block:: console - $ cmake -B build - $ cd build - $ make -j + cmake -B build + cd build + make -j .. note:: @@ -40,6 +40,6 @@ To build this application on Windows, run the following commands: .. code-block:: console - $ cmake -G Ninja -B build - $ cd build - $ ninja + cmake -G Ninja -B build + cd build + ninja From 581ccc1f24cb665aaf1acc4115c26e361de9274d Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Wed, 1 Nov 2023 12:27:37 +0000 Subject: [PATCH 7/7] Update readme files --- test/rtos_drivers/clock_control/README.rst | 4 ++-- test/rtos_drivers/hil/README.rst | 4 ++-- test/rtos_drivers/hil_add/README.rst | 4 ++-- test/rtos_drivers/usb/README.rst | 4 +++- test/rtos_drivers/wifi/README.rst | 15 ++++++++++++--- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/test/rtos_drivers/clock_control/README.rst b/test/rtos_drivers/clock_control/README.rst index 27deccf79..fe5bf77c4 100644 --- a/test/rtos_drivers/clock_control/README.rst +++ b/test/rtos_drivers/clock_control/README.rst @@ -21,13 +21,13 @@ These tests should be run whenever the code or submodules in ``modules\rtos`` or Building and Running Tests ************************** -To build the test application firmware, run the following command from the top of the repository: +To build the test application firmware, run the following command from the top of the repository: .. code-block:: console bash tools/ci/build_rtos_tests.sh -The `build_test.sh` script will copy the test applications to the `dist` folder. +The ``build_rtos_tests.sh`` script will copy the test applications to the ``dist`` folder. Run the test with the following command from the top of the repository: diff --git a/test/rtos_drivers/hil/README.rst b/test/rtos_drivers/hil/README.rst index 8feffad08..3a4feb1ea 100644 --- a/test/rtos_drivers/hil/README.rst +++ b/test/rtos_drivers/hil/README.rst @@ -57,13 +57,13 @@ Building and Running Tests The Python environment is required to run this test. See the Requirements section of test/README.rst -To build the test application firmware, run the following command from the top of the repository: +To build the test application firmware, run the following command from the top of the repository: .. code-block:: console bash tools/ci/build_rtos_tests.sh -The `build_test.sh` script will copy the test applications to the `dist` folder. +The ``build_rtos_tests.sh``` script will copy the test applications to the ``dist`` folder. Run the test with the following command from the top of the repository: diff --git a/test/rtos_drivers/hil_add/README.rst b/test/rtos_drivers/hil_add/README.rst index 34f8926ac..7b4561bf9 100644 --- a/test/rtos_drivers/hil_add/README.rst +++ b/test/rtos_drivers/hil_add/README.rst @@ -36,13 +36,13 @@ Building and Running Tests The Python environment is required to run this test. See the Requirements section of test/README.rst -To build the test application firmware, run the following command from the top of the repository: +To build the test application firmware, run the following command from the top of the repository: .. code-block:: console bash tools/ci/build_rtos_tests.sh -The `build_test.sh` script will copy the test applications to the `dist` folder. +The ``build_rtos_tests.sh`` script will copy the test applications to the ``dist`` folder. Run the test with the following command from the top of the repository: diff --git a/test/rtos_drivers/usb/README.rst b/test/rtos_drivers/usb/README.rst index 3c493807a..edf532cc3 100644 --- a/test/rtos_drivers/usb/README.rst +++ b/test/rtos_drivers/usb/README.rst @@ -50,7 +50,9 @@ run the following command from the root of this repository: .. code-block:: console - $ ./tools/ci/build_rtos_tests.sh + bash tools/ci/build_rtos_tests.sh + +The ``build_rtos_tests.sh``` script will copy the test applications to the ``dist`` folder. ************* Running Tests diff --git a/test/rtos_drivers/wifi/README.rst b/test/rtos_drivers/wifi/README.rst index 52746bc81..3354b5bcd 100644 --- a/test/rtos_drivers/wifi/README.rst +++ b/test/rtos_drivers/wifi/README.rst @@ -29,19 +29,28 @@ Building and Running Tests The Python environment is required to run this test. See the Requirements section of test/README.rst -To build the test application firmware, run the following command from the top of the repository: +To build the test host applications, run the following command from the top of the repository: + +.. code-block:: console + + bash tools/ci/build_host_apps.sh + +The ``build_host_apps.sh`` script will copy the test applications to the ``dist_host`` folder. + + +To build the test application firmware, run the following command from the top of the repository: .. code-block:: console bash tools/ci/build_rtos_tests.sh -The `build_test.sh` script will copy the test applications to the `dist` folder. +The ``build_rtos_tests.sh`` script will copy the test applications to the ``dist`` folder. Run the test with the following command from the top of the repository: .. code-block:: console - bash test/rtos_drivers/hil_add/check_wifi.sh + bash test/rtos_drivers/wifi/check_wifi.sh The output file can be verified via python: