Skip to content

Commit

Permalink
Merge pull request #213 from lucianomartin/feature/include_xs1
Browse files Browse the repository at this point in the history
Include xs1.h in rtos_swmem.c and update documentation
  • Loading branch information
xluciano authored Nov 1, 2023
2 parents 524d1fc + 581ccc1 commit 75e9b52
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 30 deletions.
7 changes: 4 additions & 3 deletions modules/drivers/swmem/src/rtos_swmem.c
Original file line number Diff line number Diff line change
@@ -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 <xs1.h>

#include <xcore/swmem_fill.h>
#include <xcore/swmem_evict.h>
#include <xcore/triggerable.h>

#include "rtos_interrupt.h"
#include "rtos_swmem.h"

static swmem_fill_t swmem_fill_res;
static swmem_evict_t swmem_evict_res;

Expand Down Expand Up @@ -179,4 +180,4 @@ void rtos_swmem_init(uint32_t init_flags)
unsigned int rtos_swmem_offset_get()
{
return __swmem_address;
}
}
4 changes: 2 additions & 2 deletions test/rtos_drivers/clock_control/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions test/rtos_drivers/hil/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions test/rtos_drivers/hil_add/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 3 additions & 1 deletion test/rtos_drivers/usb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 12 additions & 3 deletions test/rtos_drivers/wifi/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/build_rtos_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
43 changes: 27 additions & 16 deletions tools/fatfs_mkimage/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
.. code-block:: console
Note: You may need to run the ``make -j`` command as ``sudo``.
cmake -B build
cd build
make -j
Note: Windows users must run the x86 native tools command prompt from Visual Studio
.. note::

.. tab:: Windows
You may need to run the ``make -j`` command as ``sudo``.

.. code-block:: doscon
$ cmake -G "NMake Makefiles" -B build
$ cd build
$ nmake
Windows users must run the x86 native tools command prompt from Visual Studio and we recommend the use of the Ninja build system.

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")
To build this application on Windows, run the following commands:

.. code-block:: console
cmake -G Ninja -B build
cd build
ninja

0 comments on commit 75e9b52

Please sign in to comment.