Skip to content

Commit

Permalink
Merge branch 'develop' into feature/update_agents
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanGit authored Nov 2, 2023
2 parents 9a612e8 + 75e9b52 commit 5bd80e5
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 31 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RTOS Framework change log
avoid warnings when configNUM_CORES is set to 1.
* UPDATED: Tested against fwk_io v3.3.0 updated from v3.0.1
* UPDATED: Tested against fwk_core v1.0.2 updated from v1.0.0
* ADDED: Runtime check for I2S RPC functions called for I2S Slave

3.0.4
-----
Expand Down
3 changes: 2 additions & 1 deletion modules/drivers/i2s/api/rtos_i2s.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* The public API for using the RTOS I2S driver.
* @{
*/

#include <stdbool.h>
#include <xcore/clock.h>
#include <xcore/port.h>
#include "i2s.h"
Expand Down Expand Up @@ -148,6 +148,7 @@ struct rtos_i2s_struct{
volatile size_t required_available_count;
} recv_buffer;
uint8_t isr_cmd;
bool is_slave;
};

#include "rtos_i2s_rpc.h"
Expand Down
3 changes: 3 additions & 0 deletions modules/drivers/i2s/src/rtos_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ static void rtos_i2s_init(
ctx->rpc_config = NULL;
ctx->rx = i2s_local_rx;
ctx->tx = i2s_local_tx;
ctx->is_slave = false;

triggerable_setup_interrupt_callback(ctx->c_i2s_isr.end_b, ctx, RTOS_INTERRUPT_CALLBACK(rtos_i2s_isr));

Expand Down Expand Up @@ -490,4 +491,6 @@ void rtos_i2s_slave_init(
bclk,
(rtos_osal_entry_function_t) i2s_slave_thread,
RTOS_THREAD_STACK_SIZE(i2s_slave_thread));

i2s_ctx->is_slave = true;
}
2 changes: 2 additions & 0 deletions modules/drivers/i2s/src/rtos_i2s_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ void rtos_i2s_rpc_host_init(
rtos_intertile_t *client_intertile_ctx[],
size_t remote_client_count)
{
xassert(i2s_ctx->is_slave == false);

i2s_ctx->rpc_config = rpc_config;
rpc_config->rpc_host_start = i2s_rpc_start;
rpc_config->remote_client_count = remote_client_count;
Expand Down
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 5bd80e5

Please sign in to comment.