From 27de2fcee6c26c17b5f86513aba3abdcdc052a6f Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Mon, 11 Sep 2023 11:10:37 +0100 Subject: [PATCH 01/27] Use SOF timestamps for rate calculation --- modules/sw_services/usb/portable/dcd_xcore.c | 4 ++-- .../usb/src/individual_tests/usb/local/usb_sof_test.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/sw_services/usb/portable/dcd_xcore.c b/modules/sw_services/usb/portable/dcd_xcore.c index 88c6b5db2..510f9ea44 100644 --- a/modules/sw_services/usb/portable/dcd_xcore.c +++ b/modules/sw_services/usb/portable/dcd_xcore.c @@ -42,7 +42,7 @@ #define CFG_TUD_XCORE_IO_CORE_MASK (~(1 << 0)) #endif -TU_ATTR_WEAK bool tud_xcore_sof_cb(uint8_t rhport); +TU_ATTR_WEAK bool tud_xcore_sof_cb(uint8_t rhport, uint32_t current_timestamp); TU_ATTR_WEAK bool tud_xcore_data_cb(uint32_t cur_time, uint32_t ep_num, uint32_t ep_dir, size_t xfer_len); #include "rtos_usb.h" @@ -210,7 +210,7 @@ static void dcd_xcore_int_handler(rtos_usb_t *ctx, break; case rtos_usb_sof_packet: if (tud_xcore_sof_cb) { - if (tud_xcore_sof_cb(0)) { + if (tud_xcore_sof_cb(0, cur_time)) { dcd_event_bus_signal(0, DCD_EVENT_SOF, true); } } diff --git a/test/rtos_drivers/usb/src/individual_tests/usb/local/usb_sof_test.c b/test/rtos_drivers/usb/src/individual_tests/usb/local/usb_sof_test.c index 04427abb1..2fa99e843 100644 --- a/test/rtos_drivers/usb/src/individual_tests/usb/local/usb_sof_test.c +++ b/test/rtos_drivers/usb/src/individual_tests/usb/local/usb_sof_test.c @@ -38,8 +38,9 @@ static void timeout_cb(TimerHandle_t xTimer) sof_timeout = true; } -bool tud_xcore_sof_cb(uint8_t rhport) +bool tud_xcore_sof_cb(uint8_t rhport, uint32_t cur_time) { + (void)cur_time; if (!received_sof_event) { received_sof_event = true; LOCAL_PRINTF("tud_xcore_sof_cb"); @@ -108,4 +109,4 @@ void register_sof_test(usb_test_ctx_t *test_ctx) test_ctx->main_test[this_test_num] = sof_test; test_ctx->test_cnt++; -} \ No newline at end of file +} From 8fc36e40271bad7e686728c4c7383f2e3c7821e5 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Mon, 18 Sep 2023 15:14:23 +0100 Subject: [PATCH 02/27] Update copyright --- modules/sw_services/usb/portable/dcd_xcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sw_services/usb/portable/dcd_xcore.c b/modules/sw_services/usb/portable/dcd_xcore.c index 510f9ea44..ffeb10d84 100644 --- a/modules/sw_services/usb/portable/dcd_xcore.c +++ b/modules/sw_services/usb/portable/dcd_xcore.c @@ -1,4 +1,4 @@ -// Copyright 2021-2022 XMOS LIMITED. +// Copyright 2021-2023 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. #define DEBUG_UNIT TUSB_DCD From 6e32624263888b40fb97d04ebc99206476681333 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Tue, 19 Sep 2023 13:26:15 +0100 Subject: [PATCH 03/27] Changed variable name --- modules/sw_services/usb/portable/dcd_xcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sw_services/usb/portable/dcd_xcore.c b/modules/sw_services/usb/portable/dcd_xcore.c index ffeb10d84..ab46bbac4 100644 --- a/modules/sw_services/usb/portable/dcd_xcore.c +++ b/modules/sw_services/usb/portable/dcd_xcore.c @@ -42,7 +42,7 @@ #define CFG_TUD_XCORE_IO_CORE_MASK (~(1 << 0)) #endif -TU_ATTR_WEAK bool tud_xcore_sof_cb(uint8_t rhport, uint32_t current_timestamp); +TU_ATTR_WEAK bool tud_xcore_sof_cb(uint8_t rhport, uint32_t cur_time); TU_ATTR_WEAK bool tud_xcore_data_cb(uint32_t cur_time, uint32_t ep_num, uint32_t ep_dir, size_t xfer_len); #include "rtos_usb.h" From 2b9fa5b6c6747a6149c00ddceaa5ab6f5dcc2727 Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Fri, 22 Sep 2023 15:58:42 +0100 Subject: [PATCH 04/27] fixes for xmosdoc v4 --- doc/build_system_guide/introduction.rst | 1 - doc/build_system_guide/targets.rst | 1 - doc/exclude_patterns.inc | 5 ++++- doc/programming_guide/common_issues.rst | 1 - doc/programming_guide/faq.rst | 1 - doc/programming_guide/platform.rst | 2 +- doc/programming_guide/reference/api.rst | 1 - .../reference/rtos_drivers/i2c/i2c.rst | 1 - .../reference/rtos_drivers/i2c/i2c_master.rst | 1 - .../reference/rtos_drivers/i2c/i2c_slave.rst | 1 - .../reference/rtos_drivers/i2s/i2s.rst | 1 - .../reference/rtos_drivers/i2s/i2s_master.rst | 1 - .../reference/rtos_drivers/i2s/i2s_slave.rst | 1 - .../reference/rtos_drivers/uart/uart.rst | 1 - .../reference/rtos_drivers/uart/uart_rx.rst | 1 - .../reference/rtos_drivers/uart/uart_tx.rst | 1 - .../device_control/device_control_host_api.rst | 1 - .../device_control/device_control_protocol.rst | 1 - .../device_control/device_control_shared.rst | 1 - .../device_control/device_control_xcore.rst | 1 - .../tutorials/application_design.rst | 1 - .../tutorials/application_dfu_usage.rst | 1 - .../tutorials/application_programming.rst | 1 - doc/programming_guide/tutorials/bsp_config.rst | 1 - doc/programming_guide/tutorials/tutorials.rst | 1 + doc/shared/legal.rst | 1 - doc/src_html/.gitkeep | 1 - doc/substitutions.rst | 2 -- settings.json | 5 ----- settings.yml | 17 +++++++++++++++++ tools/fatfs_mkimage/README.rst | 2 +- 31 files changed, 24 insertions(+), 34 deletions(-) delete mode 100644 doc/src_html/.gitkeep delete mode 100644 doc/substitutions.rst delete mode 100644 settings.json create mode 100644 settings.yml diff --git a/doc/build_system_guide/introduction.rst b/doc/build_system_guide/introduction.rst index eeeeaa921..29c9c7433 100644 --- a/doc/build_system_guide/introduction.rst +++ b/doc/build_system_guide/introduction.rst @@ -1,4 +1,3 @@ -.. include:: ../substitutions.rst .. _build_system_guide: diff --git a/doc/build_system_guide/targets.rst b/doc/build_system_guide/targets.rst index acbba1c9d..0b42db0bd 100644 --- a/doc/build_system_guide/targets.rst +++ b/doc/build_system_guide/targets.rst @@ -1,4 +1,3 @@ -.. include:: ../substitutions.rst .. _build_system_targets: diff --git a/doc/exclude_patterns.inc b/doc/exclude_patterns.inc index 3c17de6ce..27cc18955 100644 --- a/doc/exclude_patterns.inc +++ b/doc/exclude_patterns.inc @@ -1,10 +1,13 @@ # The following patterns are to be excluded from the documentation build -documents/README.rst tools projects test xmos_cmake_toolchain +modules/drivers modules/FreeRTOS modules/sw_services build build_* +CHANGELOG.rst +LICENSE.rst +**README* \ No newline at end of file diff --git a/doc/programming_guide/common_issues.rst b/doc/programming_guide/common_issues.rst index 1b8ed1df8..2d2a1b6bb 100644 --- a/doc/programming_guide/common_issues.rst +++ b/doc/programming_guide/common_issues.rst @@ -1,4 +1,3 @@ -.. include:: ../substitutions.rst ############# Common Issues diff --git a/doc/programming_guide/faq.rst b/doc/programming_guide/faq.rst index cc54426ee..13875f13b 100644 --- a/doc/programming_guide/faq.rst +++ b/doc/programming_guide/faq.rst @@ -1,4 +1,3 @@ -.. include:: ../substitutions.rst #### FAQs diff --git a/doc/programming_guide/platform.rst b/doc/programming_guide/platform.rst index a28ba5bba..9a42d8128 100644 --- a/doc/programming_guide/platform.rst +++ b/doc/programming_guide/platform.rst @@ -27,4 +27,4 @@ The `Programming Guide `_. As well as providing a powerful toolchain for application development, the toolkit assists with application deployment and upgrade. +The xcore processors are accompanied by the `XTC Tools `__. As well as providing a powerful toolchain for application development, the toolkit assists with application deployment and upgrade. diff --git a/doc/programming_guide/reference/api.rst b/doc/programming_guide/reference/api.rst index f14fd6789..8b60ac6ae 100644 --- a/doc/programming_guide/reference/api.rst +++ b/doc/programming_guide/reference/api.rst @@ -1,4 +1,3 @@ -.. include:: ../../substitutions.rst ############# API Reference diff --git a/doc/programming_guide/reference/rtos_drivers/i2c/i2c.rst b/doc/programming_guide/reference/rtos_drivers/i2c/i2c.rst index f04a3766a..2e576a838 100644 --- a/doc/programming_guide/reference/rtos_drivers/i2c/i2c.rst +++ b/doc/programming_guide/reference/rtos_drivers/i2c/i2c.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ################# |I2C| RTOS Driver diff --git a/doc/programming_guide/reference/rtos_drivers/i2c/i2c_master.rst b/doc/programming_guide/reference/rtos_drivers/i2c/i2c_master.rst index d0de76a40..f1b2dede3 100644 --- a/doc/programming_guide/reference/rtos_drivers/i2c/i2c_master.rst +++ b/doc/programming_guide/reference/rtos_drivers/i2c/i2c_master.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ######################## |I2C| Master RTOS Driver diff --git a/doc/programming_guide/reference/rtos_drivers/i2c/i2c_slave.rst b/doc/programming_guide/reference/rtos_drivers/i2c/i2c_slave.rst index 15a135002..22988b636 100644 --- a/doc/programming_guide/reference/rtos_drivers/i2c/i2c_slave.rst +++ b/doc/programming_guide/reference/rtos_drivers/i2c/i2c_slave.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ####################### |I2C| Slave RTOS Driver diff --git a/doc/programming_guide/reference/rtos_drivers/i2s/i2s.rst b/doc/programming_guide/reference/rtos_drivers/i2s/i2s.rst index b804b0a1c..bc43ed619 100644 --- a/doc/programming_guide/reference/rtos_drivers/i2s/i2s.rst +++ b/doc/programming_guide/reference/rtos_drivers/i2s/i2s.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ################# |I2S| RTOS Driver diff --git a/doc/programming_guide/reference/rtos_drivers/i2s/i2s_master.rst b/doc/programming_guide/reference/rtos_drivers/i2s/i2s_master.rst index 2d3e354be..9039db15f 100644 --- a/doc/programming_guide/reference/rtos_drivers/i2s/i2s_master.rst +++ b/doc/programming_guide/reference/rtos_drivers/i2s/i2s_master.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ******************************* |I2S| Master Initialization API diff --git a/doc/programming_guide/reference/rtos_drivers/i2s/i2s_slave.rst b/doc/programming_guide/reference/rtos_drivers/i2s/i2s_slave.rst index de0ce3dc6..a3523595d 100644 --- a/doc/programming_guide/reference/rtos_drivers/i2s/i2s_slave.rst +++ b/doc/programming_guide/reference/rtos_drivers/i2s/i2s_slave.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ****************************** |I2S| Slave Initialization API diff --git a/doc/programming_guide/reference/rtos_drivers/uart/uart.rst b/doc/programming_guide/reference/rtos_drivers/uart/uart.rst index 0460d260b..22e5c0b59 100644 --- a/doc/programming_guide/reference/rtos_drivers/uart/uart.rst +++ b/doc/programming_guide/reference/rtos_drivers/uart/uart.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ################ UART RTOS Driver diff --git a/doc/programming_guide/reference/rtos_drivers/uart/uart_rx.rst b/doc/programming_guide/reference/rtos_drivers/uart/uart_rx.rst index bb2e447da..5370ba88e 100644 --- a/doc/programming_guide/reference/rtos_drivers/uart/uart_rx.rst +++ b/doc/programming_guide/reference/rtos_drivers/uart/uart_rx.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ################### UART Rx RTOS Driver diff --git a/doc/programming_guide/reference/rtos_drivers/uart/uart_tx.rst b/doc/programming_guide/reference/rtos_drivers/uart/uart_tx.rst index 686c6bf87..e5dc8f4f7 100644 --- a/doc/programming_guide/reference/rtos_drivers/uart/uart_tx.rst +++ b/doc/programming_guide/reference/rtos_drivers/uart/uart_tx.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ################### UART Tx RTOS Driver diff --git a/doc/programming_guide/reference/rtos_services/device_control/device_control_host_api.rst b/doc/programming_guide/reference/rtos_services/device_control/device_control_host_api.rst index 382f8f237..35afff91d 100644 --- a/doc/programming_guide/reference/rtos_services/device_control/device_control_host_api.rst +++ b/doc/programming_guide/reference/rtos_services/device_control/device_control_host_api.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ####################### Device Control Host API diff --git a/doc/programming_guide/reference/rtos_services/device_control/device_control_protocol.rst b/doc/programming_guide/reference/rtos_services/device_control/device_control_protocol.rst index 7e31c2f31..8ced2943a 100644 --- a/doc/programming_guide/reference/rtos_services/device_control/device_control_protocol.rst +++ b/doc/programming_guide/reference/rtos_services/device_control/device_control_protocol.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ########################## Command Transport Protocol diff --git a/doc/programming_guide/reference/rtos_services/device_control/device_control_shared.rst b/doc/programming_guide/reference/rtos_services/device_control/device_control_shared.rst index 8a070f63a..e4e237d0d 100644 --- a/doc/programming_guide/reference/rtos_services/device_control/device_control_shared.rst +++ b/doc/programming_guide/reference/rtos_services/device_control/device_control_shared.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ######################### Device Control Shared API diff --git a/doc/programming_guide/reference/rtos_services/device_control/device_control_xcore.rst b/doc/programming_guide/reference/rtos_services/device_control/device_control_xcore.rst index f21306d6f..8014e5608 100644 --- a/doc/programming_guide/reference/rtos_services/device_control/device_control_xcore.rst +++ b/doc/programming_guide/reference/rtos_services/device_control/device_control_xcore.rst @@ -1,4 +1,3 @@ -.. include:: ../../../../substitutions.rst ######################## Device Control XCORE API diff --git a/doc/programming_guide/tutorials/application_design.rst b/doc/programming_guide/tutorials/application_design.rst index 145cefc62..d0ca87049 100644 --- a/doc/programming_guide/tutorials/application_design.rst +++ b/doc/programming_guide/tutorials/application_design.rst @@ -1,4 +1,3 @@ -.. include:: ../../substitutions.rst ####################### RTOS Application Design diff --git a/doc/programming_guide/tutorials/application_dfu_usage.rst b/doc/programming_guide/tutorials/application_dfu_usage.rst index 06a13cc60..2919acade 100644 --- a/doc/programming_guide/tutorials/application_dfu_usage.rst +++ b/doc/programming_guide/tutorials/application_dfu_usage.rst @@ -1,4 +1,3 @@ -.. include:: ../../substitutions.rst #################### RTOS Application DFU diff --git a/doc/programming_guide/tutorials/application_programming.rst b/doc/programming_guide/tutorials/application_programming.rst index 05df07944..b4f71defd 100644 --- a/doc/programming_guide/tutorials/application_programming.rst +++ b/doc/programming_guide/tutorials/application_programming.rst @@ -1,4 +1,3 @@ -.. include:: ../../substitutions.rst ################################ FreeRTOS Application Programming diff --git a/doc/programming_guide/tutorials/bsp_config.rst b/doc/programming_guide/tutorials/bsp_config.rst index 7e0834364..92467094a 100644 --- a/doc/programming_guide/tutorials/bsp_config.rst +++ b/doc/programming_guide/tutorials/bsp_config.rst @@ -1,4 +1,3 @@ -.. include:: ../../substitutions.rst ############################ Board Support Configurations diff --git a/doc/programming_guide/tutorials/tutorials.rst b/doc/programming_guide/tutorials/tutorials.rst index d95bd6ce9..b57216660 100644 --- a/doc/programming_guide/tutorials/tutorials.rst +++ b/doc/programming_guide/tutorials/tutorials.rst @@ -6,5 +6,6 @@ Tutorials :maxdepth: 2 application_programming + application_design bsp_config application_dfu_usage diff --git a/doc/shared/legal.rst b/doc/shared/legal.rst index 5e374ae55..a2ceba281 100644 --- a/doc/shared/legal.rst +++ b/doc/shared/legal.rst @@ -1,6 +1,5 @@ .. _fwk_rtos_copyright: -.. include:: ../_templates/disclaimer.rst Licenses ======== diff --git a/doc/src_html/.gitkeep b/doc/src_html/.gitkeep deleted file mode 100644 index bfd5b701d..000000000 --- a/doc/src_html/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -# This directory needs to exist for the doc builder \ No newline at end of file diff --git a/doc/substitutions.rst b/doc/substitutions.rst deleted file mode 100644 index a06ed94e8..000000000 --- a/doc/substitutions.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. |I2C| replace:: I\ :sup:`2`\ C -.. |I2S| replace:: I\ :sup:`2`\ S diff --git a/settings.json b/settings.json deleted file mode 100644 index 3d41ac22e..000000000 --- a/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "XCORE RTOS Framework", - "project": "fwk_rtos", - "version": "3.0.4" -} diff --git a/settings.yml b/settings.yml new file mode 100644 index 000000000..3a8746b72 --- /dev/null +++ b/settings.yml @@ -0,0 +1,17 @@ +--- +project: fwk_rtos +title: XCORE RTOS Framework +version: 3.0.4 + +documentation: + exclude_patterns_path: doc/exclude_patterns.inc + doxygen_projects: + fwk_rtos: + doxyfile_path: doc/Doxyfile.inc + pdfs: + doc/programming_guide/index: + pdf_title: "{{title}} - Programming Guide" + pdf_filename: "{{project}}_programming_guide_v{{version}}" + doc/build_system_guide/index: + pdf_title: "{{title}} - Build System Guide" + pdf_filename: "{{project}}_build_system_guide_v{{version}}" diff --git a/tools/fatfs_mkimage/README.rst b/tools/fatfs_mkimage/README.rst index d9091182f..52c807e15 100644 --- a/tools/fatfs_mkimage/README.rst +++ b/tools/fatfs_mkimage/README.rst @@ -27,7 +27,7 @@ Note: Windows users must run the x86 native tools command prompt from Visual Stu .. tab:: Windows - .. code-block:: x86 native tools command prompt + .. code-block:: doscon $ cmake -G "NMake Makefiles" -B build $ cd build From 7b23dcf0e6ff718e07bf062fdb1f446c517b50b6 Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Fri, 22 Sep 2023 16:46:34 +0100 Subject: [PATCH 05/27] move docs build to jenkins --- .github/workflows/docs.yml | 44 ------- Jenkinsfile | 234 +++++++++++++++++++++---------------- 2 files changed, 133 insertions(+), 145 deletions(-) delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index f88d848a9..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,44 +0,0 @@ -# YAML schema for GitHub Actions: -# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions -# -# Helpful YAML parser to clarify YAML syntax: -# https://yaml-online-parser.appspot.com/ -# -# This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support documentation. -# -# This file contains the workflows that are run prior to merging a pull request. - -name: Documentation - -on: - push: - branches: - - 'develop' - pull_request: - branches: - - 'develop' - - # Allow manually triggering of the workflow. - workflow_dispatch: {} - -env: - DOC_BUILDER_IMAGE: 'ghcr.io/xmos/doc_builder:v3.0.0' - -jobs: - build_documentation: - name: Build and package documentation - runs-on: ubuntu-latest - steps: - - name: Checkout SDK - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Pull documentation builder docker image - run: | - docker pull ${DOC_BUILDER_IMAGE} - - - name: Build documentation - run: | - docker run --rm -t -u "$(id -u):$(id -g)" -v ${{ github.workspace }}:/build -e PDF=1 -e REPO:/build -e EXCLUDE_PATTERNS=/build/doc/exclude_patterns.inc -e DOXYGEN_INCLUDE=/build/doc/Doxyfile.inc -e DOXYGEN_INPUT=ignore ${DOC_BUILDER_IMAGE} diff --git a/Jenkinsfile b/Jenkinsfile index 2a96c2f88..61fabc081 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,9 +3,7 @@ getApproval() pipeline { - agent { - label 'xcore.ai-explorer-us' - } + agent none options { disableConcurrentBuilds() skipDefaultCheckout() @@ -32,117 +30,151 @@ pipeline { LOCAL_WIFI_PASS = credentials('hampton-office-network-wifi-password') } stages { - stage('Checkout') { - steps { - checkout scm - sh 'git submodule update --init --recursive --depth 1 --jobs \$(nproc)' - } - } - stage('Build tests and host apps') { - steps { - script { - uid = sh(returnStdout: true, script: 'id -u').trim() - gid = sh(returnStdout: true, script: 'id -g').trim() - } - // pull docker - sh "docker pull ghcr.io/xmos/xcore_voice_tester:develop" - withTools(params.TOOLS_VERSION) { - sh "bash tools/ci/build_rtos_tests.sh" - sh "bash tools/ci/build_host_apps.sh" - } - // List built files for log - sh "ls -la dist/" - sh "ls -la dist_host/" - } - } - stage('Create virtual environment') { - steps { - // Create venv - sh "pyenv install -s $PYTHON_VERSION" - sh "~/.pyenv/versions/$PYTHON_VERSION/bin/python -m venv $VENV_DIRNAME" - // Install dependencies - withVenv() { - sh "pip install git+https://github0.xmos.com/xmos-int/xtagctl.git" - sh "pip install -r test/requirements.txt" - } - } - } - stage('Cleanup xtagctl') { - steps { - // Cleanup any xtagctl cruft from previous failed runs - withTools(params.TOOLS_VERSION) { - withVenv { - sh "xtagctl reset_all $RTOS_TEST_RIG_TARGET" + stage('Build and Docs') { + parallel { + stage('Build Docs') { + agent { label "docker" } + environment { XMOSDOC_VERSION = "pr-67" } + steps { + checkout scm + sh 'git submodule update --init --recursive --depth 1' + sh "docker pull ghcr.io/xmos/doc_builder:$XMOSDOC_VERSION" + sh """docker run -u "\$(id -u):\$(id -g)" \ + --rm \ + -v ${WORKSPACE}:/build \ + ghcr.io/xmos/doc_builder:$XMOSDOC_VERSION -v""" + archiveArtifacts artifacts: "doc/_build/**", allowEmptyArchive: true } - } - sh "rm -f ~/.xtag/status.lock ~/.xtag/acquired" - } - } - stage('Run RTOS Drivers WiFi test') { - steps { - withTools(params.TOOLS_VERSION) { - withVenv { - script { - withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> - sh "test/rtos_drivers/wifi/check_wifi.sh " + adapterIDs[0] - } - sh "pytest test/rtos_drivers/wifi" + post { + cleanup { + xcoreCleanSandbox() } } } - } - } - stage('Run RTOS Drivers HIL test') { - steps { - withTools(params.TOOLS_VERSION) { - withVenv { - script { - withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> - sh "test/rtos_drivers/hil/check_drivers_hil.sh " + adapterIDs[0] + + stage('Build and Test') { + when { + expression { !env.GH_LABEL_DOC_ONLY.toBoolean() } + } + agent { + label 'xcore.ai-explorer-us' + } + stages { + stage('Checkout') { + steps { + checkout scm + sh 'git submodule update --init --recursive --depth 1 --jobs \$(nproc)' } - sh "pytest test/rtos_drivers/hil" } - } - } - } - } - stage('Run RTOS Drivers HIL_Add test') { - steps { - withTools(params.TOOLS_VERSION) { - withVenv { - script { - withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> - sh "test/rtos_drivers/hil_add/check_drivers_hil_add.sh " + adapterIDs[0] + stage('Build tests and host apps') { + steps { + script { + uid = sh(returnStdout: true, script: 'id -u').trim() + gid = sh(returnStdout: true, script: 'id -g').trim() + } + // pull docker + sh "docker pull ghcr.io/xmos/xcore_voice_tester:develop" + withTools(params.TOOLS_VERSION) { + sh "bash tools/ci/build_rtos_tests.sh" + sh "bash tools/ci/build_host_apps.sh" + } + // List built files for log + sh "ls -la dist/" + sh "ls -la dist_host/" } - sh "pytest test/rtos_drivers/hil_add" } - } - } - } - } - stage('Run RTOS Drivers USB test') { - steps { - withTools(params.TOOLS_VERSION) { - withVenv { - script { - uid = sh(returnStdout: true, script: 'id -u').trim() - gid = sh(returnStdout: true, script: 'id -g').trim() - withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> - sh "docker run --rm -u $uid:$gid --privileged -v /dev:/dev -w /fwk_rtos -v $WORKSPACE:/fwk_rtos ghcr.io/xmos/xcore_voice_tester:develop bash -l test/rtos_drivers/usb/check_usb.sh " + adapterIDs[0] + stage('Create virtual environment') { + steps { + // Create venv + sh "pyenv install -s $PYTHON_VERSION" + sh "~/.pyenv/versions/$PYTHON_VERSION/bin/python -m venv $VENV_DIRNAME" + // Install dependencies + withVenv() { + sh "pip install git+https://github0.xmos.com/xmos-int/xtagctl.git" + sh "pip install -r test/requirements.txt" + } + } + } + stage('Cleanup xtagctl') { + steps { + // Cleanup any xtagctl cruft from previous failed runs + withTools(params.TOOLS_VERSION) { + withVenv { + sh "xtagctl reset_all $RTOS_TEST_RIG_TARGET" + } + } + sh "rm -f ~/.xtag/status.lock ~/.xtag/acquired" + } + } + stage('Run RTOS Drivers WiFi test') { + steps { + withTools(params.TOOLS_VERSION) { + withVenv { + script { + withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> + sh "test/rtos_drivers/wifi/check_wifi.sh " + adapterIDs[0] + } + sh "pytest test/rtos_drivers/wifi" + } + } + } } - sh "pytest test/rtos_drivers/usb" + } + stage('Run RTOS Drivers HIL test') { + steps { + withTools(params.TOOLS_VERSION) { + withVenv { + script { + withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> + sh "test/rtos_drivers/hil/check_drivers_hil.sh " + adapterIDs[0] + } + sh "pytest test/rtos_drivers/hil" + } + } + } + } + } + stage('Run RTOS Drivers HIL_Add test') { + steps { + withTools(params.TOOLS_VERSION) { + withVenv { + script { + withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> + sh "test/rtos_drivers/hil_add/check_drivers_hil_add.sh " + adapterIDs[0] + } + sh "pytest test/rtos_drivers/hil_add" + } + } + } + } + } + stage('Run RTOS Drivers USB test') { + steps { + withTools(params.TOOLS_VERSION) { + withVenv { + script { + uid = sh(returnStdout: true, script: 'id -u').trim() + gid = sh(returnStdout: true, script: 'id -g').trim() + withXTAG(["$RTOS_TEST_RIG_TARGET"]) { adapterIDs -> + sh "docker run --rm -u $uid:$gid --privileged -v /dev:/dev -w /fwk_rtos -v $WORKSPACE:/fwk_rtos ghcr.io/xmos/xcore_voice_tester:develop bash -l test/rtos_drivers/usb/check_usb.sh " + adapterIDs[0] + } + sh "pytest test/rtos_drivers/usb" + } + } + } + } + } + } + post { + cleanup { + // cleanWs removes all output and artifacts of the Jenkins pipeline + // Comment out this post section to leave the workspace which can be useful for running items on the Jenkins agent. + // However, beware that this pipeline will not run if the workspace is not manually cleaned. + xcoreCleanSandbox() } } } } } } - post { - cleanup { - // cleanWs removes all output and artifacts of the Jenkins pipeline - // Comment out this post section to leave the workspace which can be useful for running items on the Jenkins agent. - // However, beware that this pipeline will not run if the workspace is not manually cleaned. - cleanWs() - } - } } From db522c69e047d3bb3218dd8e10e00928943a302d Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Fri, 22 Sep 2023 16:53:02 +0100 Subject: [PATCH 06/27] update xjsl for PR labels --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 61fabc081..15ef06281 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -@Library('xmos_jenkins_shared_library@v0.20.0') _ +@Library('xmos_jenkins_shared_library@v0.27.0') _ getApproval() From 83332aa3be51f54b08f74292ebbbfd5809de86d9 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Thu, 28 Sep 2023 11:52:36 +0100 Subject: [PATCH 07/27] check if test fails when a nullptr is sent --- .../src/individual_tests/i2c/rpc/master_write_multiple_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c index 5cc5b54e6..78167b40f 100644 --- a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c +++ b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c @@ -54,7 +54,7 @@ static int main_test(i2c_test_ctx_t *ctx) I2C_SLAVE_ADDR, (unsigned char*)&test_vector[i], 1, - &sent, + NULL, 0); if ((ret != I2C_ACK) || (sent != 1)) From e3cab138f5e4db874d3c6363aafd727c62386a4b Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Thu, 28 Sep 2023 13:28:39 +0100 Subject: [PATCH 08/27] Fix for num_bytes_sent=NULL in i2c_master_remote_write --- modules/drivers/i2c/src/rtos_i2c_master_rpc.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/drivers/i2c/src/rtos_i2c_master_rpc.c b/modules/drivers/i2c/src/rtos_i2c_master_rpc.c index 3e7844ee0..29107ba4a 100644 --- a/modules/drivers/i2c/src/rtos_i2c_master_rpc.c +++ b/modules/drivers/i2c/src/rtos_i2c_master_rpc.c @@ -38,9 +38,20 @@ static i2c_res_t i2c_master_remote_write( RPC_PARAM_LIST_END }; - rpc_client_call_generic( - host_address->intertile_ctx, host_address->port, fcode_write, rpc_param_desc, - &host_ctx_ptr, &device_addr, buf, &n, num_bytes_sent, &send_stop_bit, &ret); + if(num_bytes_sent != NULL) + { + rpc_client_call_generic( + host_address->intertile_ctx, host_address->port, fcode_write, rpc_param_desc, + &host_ctx_ptr, &device_addr, buf, &n, num_bytes_sent, &send_stop_bit, &ret); + } + else + { + size_t tmp; + rpc_client_call_generic( + host_address->intertile_ctx, host_address->port, fcode_write, rpc_param_desc, + &host_ctx_ptr, &device_addr, buf, &n, &tmp, &send_stop_bit, &ret); + + } return ret; } From 7fefdee9e8f38b6b11e60d6d7753303560e6abeb Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Thu, 28 Sep 2023 13:45:32 +0100 Subject: [PATCH 09/27] Add test for NULL --- .../i2c/rpc/master_write_multiple_test.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c index 78167b40f..f2b26c3c7 100644 --- a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c +++ b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c @@ -54,7 +54,7 @@ static int main_test(i2c_test_ctx_t *ctx) I2C_SLAVE_ADDR, (unsigned char*)&test_vector[i], 1, - NULL, + &sent, 0); if ((ret != I2C_ACK) || (sent != 1)) @@ -64,6 +64,20 @@ static int main_test(i2c_test_ctx_t *ctx) } local_printf("MASTER sent %d", sent); + ret = rtos_i2c_master_write(ctx->i2c_master_ctx, + I2C_SLAVE_ADDR, + (unsigned char*)&test_vector[i], + 1, + NULL, + 0); + + if (ret != I2C_ACK) + { + local_printf("MASTER write failed to send 1"); + return -1; + } + local_printf("MASTER sent %d", sent); + ret = rtos_i2c_master_write(ctx->i2c_master_ctx, I2C_SLAVE_ADDR, (unsigned char*)&test_vector[i][1], From 3a3b9c36329f4bdfe630bcfedf297e70b40f8bf0 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Thu, 28 Sep 2023 14:25:26 +0100 Subject: [PATCH 10/27] fix test --- .../i2c/rpc/master_write_multiple_test.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c index f2b26c3c7..cb6bc1bc9 100644 --- a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c +++ b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c @@ -25,11 +25,11 @@ static const char* test_name = "rpc_master_write_multiple_test"; #if ON_TILE(I2C_MASTER_TILE) || ON_TILE(I2C_SLAVE_TILE) #define I2C_MASTER_WRITE_MULTIPLE_TEST_ITER 2 -#define I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE 4 +#define I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE 5 static uint8_t test_vector[I2C_MASTER_WRITE_MULTIPLE_TEST_ITER][I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE] = { - {0x00, 0xFF, 0xAA, 0x55}, - {0xDE, 0xAD, 0xBE, 0xEF}, + {0x00, 0x23, 0xFF, 0xAA, 0x55}, + {0xDE, 0xCB, 0xAD, 0xBE, 0xEF}, }; #endif @@ -64,9 +64,10 @@ static int main_test(i2c_test_ctx_t *ctx) } local_printf("MASTER sent %d", sent); + // Write with num_bytes_sent ptr = NULL ret = rtos_i2c_master_write(ctx->i2c_master_ctx, I2C_SLAVE_ADDR, - (unsigned char*)&test_vector[i], + (unsigned char*)&test_vector[i][1], 1, NULL, 0); @@ -80,14 +81,14 @@ static int main_test(i2c_test_ctx_t *ctx) ret = rtos_i2c_master_write(ctx->i2c_master_ctx, I2C_SLAVE_ADDR, - (unsigned char*)&test_vector[i][1], - I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-1, + (unsigned char*)&test_vector[i][2], + I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-2, &sent, 0); - if ((ret != I2C_ACK) || (sent != I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-1)) + if ((ret != I2C_ACK) || (sent != I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-2)) { - local_printf("MASTER write failed to send %d", I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-1); + local_printf("MASTER write failed to send %d", I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-2); return -1; } local_printf("MASTER sent %d", sent); @@ -100,7 +101,7 @@ static int main_test(i2c_test_ctx_t *ctx) #if ON_TILE(I2C_SLAVE_TILE) { - while(test_slave_iters < (I2C_MASTER_WRITE_MULTIPLE_TEST_ITER << 1)) // each iter has 2 slave steps + while(test_slave_iters < (I2C_MASTER_WRITE_MULTIPLE_TEST_ITER * 3)) // each iter has 3 slave steps { vTaskDelay(pdMS_TO_TICKS(1)); } @@ -124,8 +125,25 @@ static void slave_rx(rtos_i2c_slave_t *ctx, void *app_data, uint8_t *data, size_ local_printf("SLAVE read iteration %d", test_slave_iters); i2c_test_ctx_t *test_ctx = (i2c_test_ctx_t*)ctx->app_data; - size_t expected_len = ((test_slave_iters%2) == 0) ? 1 : (I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-1); - uint8_t *ptr = ((test_slave_iters%2) == 0) ? &test_vector[test_slave_iters>>1][0] : &test_vector[test_slave_iters>>1][1]; + size_t expected_len; + uint8_t *ptr; + int index = test_slave_iters % 3; + if(index==0) + { + expected_len = 1; + ptr = &test_vector[test_slave_iters/3][0]; + } + else if(index == 1) + { + expected_len = 1; + ptr = &test_vector[test_slave_iters/3][1]; + } + else + { + expected_len = I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE-2; + ptr = &test_vector[test_slave_iters/3][2]; + } + if (len != expected_len) { local_printf("SLAVE failed got len %d expected %d", len, expected_len); From 662947e25be06cd356216a3e930313487963b8ee Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Thu, 28 Sep 2023 14:44:58 +0100 Subject: [PATCH 11/27] added comments to the test --- .../src/individual_tests/i2c/rpc/master_write_multiple_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c index cb6bc1bc9..5f28e38c7 100644 --- a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c +++ b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c @@ -50,6 +50,7 @@ static int main_test(i2c_test_ctx_t *ctx) size_t sent = 0; local_printf("MASTER write multiple iteration %d", i); + // Do a 1 byte transfer ret = rtos_i2c_master_write(ctx->i2c_master_ctx, I2C_SLAVE_ADDR, (unsigned char*)&test_vector[i], @@ -64,7 +65,7 @@ static int main_test(i2c_test_ctx_t *ctx) } local_printf("MASTER sent %d", sent); - // Write with num_bytes_sent ptr = NULL + // Do another 1 byte transfer but with num_bytes_sent ptr = NULL ret = rtos_i2c_master_write(ctx->i2c_master_ctx, I2C_SLAVE_ADDR, (unsigned char*)&test_vector[i][1], @@ -79,6 +80,7 @@ static int main_test(i2c_test_ctx_t *ctx) } local_printf("MASTER sent %d", sent); + // Transfer the remaining I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE - 2 bytes ret = rtos_i2c_master_write(ctx->i2c_master_ctx, I2C_SLAVE_ADDR, (unsigned char*)&test_vector[i][2], From 9a35ef0820764171a46ac9c4ca086f79c141f9f0 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Thu, 28 Sep 2023 14:56:19 +0100 Subject: [PATCH 12/27] Hardcoded sent to 1 --- .../src/individual_tests/i2c/rpc/master_write_multiple_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c index 5f28e38c7..1a2aa2553 100644 --- a/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c +++ b/test/rtos_drivers/hil/src/individual_tests/i2c/rpc/master_write_multiple_test.c @@ -78,7 +78,7 @@ static int main_test(i2c_test_ctx_t *ctx) local_printf("MASTER write failed to send 1"); return -1; } - local_printf("MASTER sent %d", sent); + local_printf("MASTER sent 1"); // Transfer the remaining I2C_MASTER_WRITE_MULTIPLE_TEST_SIZE - 2 bytes ret = rtos_i2c_master_write(ctx->i2c_master_ctx, From 3373be140f9723ab70e42f97aff3a1ca5f1f0804 Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Tue, 3 Oct 2023 16:57:40 +0100 Subject: [PATCH 13/27] doc_Builder -> xmosdoc --- Jenkinsfile | 4 ++-- doc/README.rst | 49 +++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 15ef06281..85e57336b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,11 +38,11 @@ pipeline { steps { checkout scm sh 'git submodule update --init --recursive --depth 1' - sh "docker pull ghcr.io/xmos/doc_builder:$XMOSDOC_VERSION" + sh "docker pull ghcr.io/xmos/xmosdoc:$XMOSDOC_VERSION" sh """docker run -u "\$(id -u):\$(id -g)" \ --rm \ -v ${WORKSPACE}:/build \ - ghcr.io/xmos/doc_builder:$XMOSDOC_VERSION -v""" + ghcr.io/xmos/xmosdoc:$XMOSDOC_VERSION -v""" archiveArtifacts artifacts: "doc/_build/**", allowEmptyArchive: true } post { diff --git a/doc/README.rst b/doc/README.rst index 5a431d398..5c672dcbd 100644 --- a/doc/README.rst +++ b/doc/README.rst @@ -2,6 +2,8 @@ Documentation Source #################### +This folder contains source files for the **Voice Framework** documentation. The sources do not render well in GitHub or an RST viewer. In addition, some information is not visible at all and some links will not be functional. + ********************** Building Documentation ********************** @@ -10,13 +12,7 @@ Building Documentation Prerequisites ============= -Install `Docker `_. - -Pull the docker container: - -.. code-block:: console - - $ docker pull ghcr.io/xmos/doc_builder:latest +Use the `xmosdoc tool `_ either via docker or install it into a pip environment. ======== Building @@ -26,4 +22,41 @@ To build the documentation, run the following command in the root of the reposit .. code-block:: console - $ docker run --rm -t -u "$(id -u):$(id -g)" -v $(pwd):/build -e PDF=1 -e REPO:/build -e DOXYGEN_INCLUDE=/build/doc/Doxyfile.inc -e EXCLUDE_PATTERNS=/build/doc/exclude_patterns.inc -e DOXYGEN_INPUT=ignore ghcr.io/xmos/doc_builder:latest + # via pip package + xmosdoc clean html latex + # via docker + $ docker run --rm -t -u "$(id -u):$(id -g)" -v $(pwd):/build ghcr.io/xmos/xmosdoc clean html latex + +HTML document output is saved in the ``doc/_build/html`` folder. Open ``index.html`` to preview the saved documentation. + +Please refer to the ``xmosdoc`` documentation for a complete guide on how to use the tool. + +********************** +Adding a New Component +********************** + +Follow the following steps to add a new component. + +- Add an entry for the new component's top-level document to the appropriate TOC in the documents tree. +- If the new component uses `Doxygen`, append the appropriate path(s) to the INPUT variable in `Doxyfile.inc`. +- If the new component includes `.rst` files that should **not** be part of the documentation build, append the appropriate pattern(s) to `exclude_patterns.inc`. + +*** +FAQ +*** + +Q: Is it possible to build just a subset of the documentation? + +A: Yes, however it is not recommended at this time. + +Q: Is it possible to used the ``livehtml`` feature of Sphinx? + +A: Yes, run xmosdoc with the ``--auto`` option. + +Q: Where can I learn more about the XMOS ``xmosdoc`` tools? + +A: See the https://github.com/xmos/xmosdoc repository. See the ``xmosdoc`` repository README for details on additional build options. + +Q: How do I suggest enhancements to the XMOS ``xmosdoc`` tool? + +A: Create a new issue here: https://github.com/xmos/xmosdoc/issues From 26e5bd3580a0ced65961ad6e86b5e4da3fdb6b45 Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Tue, 3 Oct 2023 17:02:39 +0100 Subject: [PATCH 14/27] Update doc README.rst --- doc/README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/README.rst b/doc/README.rst index 5c672dcbd..8c9fe66a7 100644 --- a/doc/README.rst +++ b/doc/README.rst @@ -2,7 +2,8 @@ Documentation Source #################### -This folder contains source files for the **Voice Framework** documentation. The sources do not render well in GitHub or an RST viewer. In addition, some information is not visible at all and some links will not be functional. +This folder contains source files for the documentation. The sources do not render well in GitHub or an RST viewer. +In addition, some information is not visible at all and some links will not be functional. ********************** Building Documentation From abf837a20d668aa0d534bfe4a1ee5b758d591476 Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Tue, 10 Oct 2023 15:47:04 +0100 Subject: [PATCH 15/27] set xmosdoc version to v4 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85e57336b..30703aa00 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { parallel { stage('Build Docs') { agent { label "docker" } - environment { XMOSDOC_VERSION = "pr-67" } + environment { XMOSDOC_VERSION = "v4.0" } steps { checkout scm sh 'git submodule update --init --recursive --depth 1' From edd7dd64a2c1c6318677d04e14ffa14960a0c35c Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 24 Oct 2023 09:09:39 +0100 Subject: [PATCH 16/27] Add dummy definitions --- CHANGELOG.rst | 6 ++++++ modules/osal/FreeRTOS/rtos_osal_thread_port.c | 19 ++++++++++++++++++- settings.json | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2cef585d6..e741ac28f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ RTOS Framework change log ========================= +3.0.5 +----- + + * FIXED: Added dummy definitions of vTaskCoreAffinitySet() and vTaskCoreAffinitySet() functions to + avoid warnings when configNUM_CORES is set to 1. + 3.0.4 ----- diff --git a/modules/osal/FreeRTOS/rtos_osal_thread_port.c b/modules/osal/FreeRTOS/rtos_osal_thread_port.c index ac171c2c7..5ae527b77 100644 --- a/modules/osal/FreeRTOS/rtos_osal_thread_port.c +++ b/modules/osal/FreeRTOS/rtos_osal_thread_port.c @@ -1,4 +1,4 @@ -// Copyright 2021-2022 XMOS LIMITED. +// Copyright 2021-2023 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. /** @@ -7,6 +7,23 @@ #include "rtos_osal.h" +// The fuctions below are declared in the third-party file: +// ./modules/fwk_xvf/modules/rtos/modules/FreeRTOS/FreeRTOS-SMP-Kernel/include/task.h +#if ( configUSE_CORE_AFFINITY == 1 ) && ( configNUM_CORES == 1 ) + + void vTaskCoreAffinitySet( const TaskHandle_t xTask, + UBaseType_t uxCoreAffinityMask ) + { + (void) (xTask); + (void) (uxCoreAffinityMask); + } + UBaseType_t vTaskCoreAffinityGet( const TaskHandle_t xTask ) + { + (void) xTask; + return 0; + } +#endif /* configUSE_CORE_AFFINITY and configNUM_CORES */ + int rtos_osal_critical_enter(void) { int state; diff --git a/settings.json b/settings.json index 3d41ac22e..a257dbd16 100644 --- a/settings.json +++ b/settings.json @@ -1,5 +1,5 @@ { "title": "XCORE RTOS Framework", "project": "fwk_rtos", - "version": "3.0.4" + "version": "3.0.5" } From 83dab9f12690105690a02013fe567eed902591e2 Mon Sep 17 00:00:00 2001 From: lucianomartin Date: Tue, 24 Oct 2023 09:53:39 +0100 Subject: [PATCH 17/27] Fix typo --- modules/osal/FreeRTOS/rtos_osal_thread_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/osal/FreeRTOS/rtos_osal_thread_port.c b/modules/osal/FreeRTOS/rtos_osal_thread_port.c index 5ae527b77..d83f37975 100644 --- a/modules/osal/FreeRTOS/rtos_osal_thread_port.c +++ b/modules/osal/FreeRTOS/rtos_osal_thread_port.c @@ -7,7 +7,7 @@ #include "rtos_osal.h" -// The fuctions below are declared in the third-party file: +// The functions below are declared in the third-party file: // ./modules/fwk_xvf/modules/rtos/modules/FreeRTOS/FreeRTOS-SMP-Kernel/include/task.h #if ( configUSE_CORE_AFFINITY == 1 ) && ( configNUM_CORES == 1 ) From 635fdc3cf9ceda4a1cd37c695c70f05c6071ee00 Mon Sep 17 00:00:00 2001 From: Luciano Martin Date: Wed, 25 Oct 2023 15:41:15 +0100 Subject: [PATCH 18/27] Review comments --- README.md | 10 ++++++---- test/rtos_drivers/usb/serial_send_receive.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 192258023..2183a09ff 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Supported RTOS stacks and software services include: - TinyUSB - Generic processing pipeline - Inferencing -- Device control +- Device control - FatFS - HTTP - TLS @@ -55,15 +55,17 @@ Some dependent components are included as git submodules. These can be obtained ## Testing -Several tests for the RTOS framework modules exist in the [test folder](https://github.com/xmos/fwk_rtos/tree/develop/test). +Several tests for the RTOS framework modules exist in the [test folder](https://github.com/xmos/fwk_rtos/tree/develop/test). ## Documentation -Information on building the documentation can be found in the docs [README](https://github.com/xmos/fwk_rtos/blob/develop/doc/README.rst). +This folder contains source files for the documentation and is intended for XMOS users. Pre-built documentation is published on https://www.xmos.com. + +The sources do not render well in GitHub or an RST viewer. ## License This Software is subject to the terms of the [XMOS Public Licence: Version 1](https://github.com/xmos/fwk_rtos/blob/develop/LICENSE.rst) -Third party copyrighted code is specified in the fwk_rtos [Copyrights and Licenses](https://github.com/xmos/fwk_rtos/blob/develop/doc/copyright.rst). +Third party copyrighted code is specified in the fwk_rtos [Copyrights and Licenses](https://github.com/xmos/fwk_rtos/blob/develop/doc/copyright.rst). diff --git a/test/rtos_drivers/usb/serial_send_receive.py b/test/rtos_drivers/usb/serial_send_receive.py index e324b78ca..337ce61b2 100644 --- a/test/rtos_drivers/usb/serial_send_receive.py +++ b/test/rtos_drivers/usb/serial_send_receive.py @@ -30,7 +30,7 @@ def parse_arguments(): return args def main(if0, if1, of0, of1): - + all_ports = serial.tools.list_ports.comports() test_ports = [] required_ports = 2 From 540ad020f44aac877f192be1a9256b3f79981acc Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Wed, 25 Oct 2023 16:11:46 +0100 Subject: [PATCH 19/27] add disclaimer to legal.rst --- doc/shared/legal.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/shared/legal.rst b/doc/shared/legal.rst index a2ceba281..1033ab5fb 100644 --- a/doc/shared/legal.rst +++ b/doc/shared/legal.rst @@ -1,5 +1,14 @@ .. _fwk_rtos_copyright: +Copyright & Disclaimer +====================== + +|XMOS copyright| + +|XMOS disclaimer| + +|XMOS trademarks| + Licenses ======== From 0a7566866f70edadbb25102186c5750d70645973 Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Wed, 25 Oct 2023 16:19:04 +0100 Subject: [PATCH 20/27] only include dsiclaimer in html latex has it in the template --- doc/shared/legal.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/shared/legal.rst b/doc/shared/legal.rst index 1033ab5fb..45144a029 100644 --- a/doc/shared/legal.rst +++ b/doc/shared/legal.rst @@ -1,13 +1,15 @@ .. _fwk_rtos_copyright: -Copyright & Disclaimer -====================== - -|XMOS copyright| - -|XMOS disclaimer| - -|XMOS trademarks| +..only:: html + + Copyright & Disclaimer + ====================== + + |XMOS copyright| + + |XMOS disclaimer| + + |XMOS trademarks| Licenses From 279a1c92cb0ac507a6c62ab8cbcca36d472f2482 Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Wed, 25 Oct 2023 16:19:25 +0100 Subject: [PATCH 21/27] missed a space --- doc/shared/legal.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/shared/legal.rst b/doc/shared/legal.rst index 45144a029..b0b45b002 100644 --- a/doc/shared/legal.rst +++ b/doc/shared/legal.rst @@ -1,6 +1,6 @@ .. _fwk_rtos_copyright: -..only:: html +.. only:: html Copyright & Disclaimer ====================== From 68fc428b3d33144851ffa2d0c16e5f4fa3739a41 Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 26 Oct 2023 15:15:59 +0100 Subject: [PATCH 22/27] Bump fwk_core and fwk_io in CI run --- CHANGELOG.rst | 2 ++ tools/ci/fetch_ci_deps.cmake | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e741ac28f..153aa42d1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,8 @@ RTOS Framework change log * FIXED: Added dummy definitions of vTaskCoreAffinitySet() and vTaskCoreAffinitySet() functions to avoid warnings when configNUM_CORES is set to 1. + * UPDATED: To fwk_io v3.3.0 from v3.0.1 for CI run + * UPDATED: To fwk_core v1.0.2 from v1.0.0 for CI run 3.0.4 ----- diff --git a/tools/ci/fetch_ci_deps.cmake b/tools/ci/fetch_ci_deps.cmake index 9aa1ebd1b..4c2f0617d 100644 --- a/tools/ci/fetch_ci_deps.cmake +++ b/tools/ci/fetch_ci_deps.cmake @@ -8,7 +8,7 @@ FetchContent_Declare( fwk_io GIT_REPOSITORY https://github.com/xmos/fwk_io.git - GIT_TAG f35192c19824d60740003be5448c67f5df927014 + GIT_TAG dcf1a87ddd006c328906094ec12493e604bc9b2f GIT_SHALLOW FALSE GIT_SUBMODULES_RECURSE TRUE SOURCE_DIR ${CMAKE_BINARY_DIR}/dependencies/fwk_io @@ -25,7 +25,7 @@ FetchContent_Declare( fwk_core GIT_REPOSITORY https://github.com/xmos/fwk_core.git - GIT_TAG 9e4f6196386995e2d7786b376091404638055639 + GIT_TAG c4582cb3ce4da34c8757a6f8f7df8935496038eb GIT_SHALLOW FALSE GIT_SUBMODULES_RECURSE TRUE SOURCE_DIR ${CMAKE_BINARY_DIR}/dependencies/fwk_core From 8c367620631880b94d8eeba225f4862a94423ecb Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 26 Oct 2023 15:56:29 +0100 Subject: [PATCH 23/27] Use tagged releases --- CHANGELOG.rst | 1 + tools/ci/fetch_ci_deps.cmake | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 153aa42d1..ca25a1ffb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,7 @@ RTOS Framework change log avoid warnings when configNUM_CORES is set to 1. * UPDATED: To fwk_io v3.3.0 from v3.0.1 for CI run * UPDATED: To fwk_core v1.0.2 from v1.0.0 for CI run + * UPDATED: Use tagged release v1.0.1 of lib_qspi_fast_read instead of 85fe541 hash 3.0.4 ----- diff --git a/tools/ci/fetch_ci_deps.cmake b/tools/ci/fetch_ci_deps.cmake index 4c2f0617d..4d5972a95 100644 --- a/tools/ci/fetch_ci_deps.cmake +++ b/tools/ci/fetch_ci_deps.cmake @@ -8,7 +8,7 @@ FetchContent_Declare( fwk_io GIT_REPOSITORY https://github.com/xmos/fwk_io.git - GIT_TAG dcf1a87ddd006c328906094ec12493e604bc9b2f + GIT_TAG v3.3.0 GIT_SHALLOW FALSE GIT_SUBMODULES_RECURSE TRUE SOURCE_DIR ${CMAKE_BINARY_DIR}/dependencies/fwk_io @@ -25,7 +25,7 @@ FetchContent_Declare( fwk_core GIT_REPOSITORY https://github.com/xmos/fwk_core.git - GIT_TAG c4582cb3ce4da34c8757a6f8f7df8935496038eb + GIT_TAG v1.0.2 GIT_SHALLOW FALSE GIT_SUBMODULES_RECURSE TRUE SOURCE_DIR ${CMAKE_BINARY_DIR}/dependencies/fwk_core @@ -42,7 +42,7 @@ FetchContent_Declare( lib_qspi_fast_read GIT_REPOSITORY git@github.com:xmos/lib_qspi_fast_read.git - GIT_TAG 85fe54188b5f3244c744f6d2aeebd757d8f25358 + GIT_TAG v1.0.1 GIT_SHALLOW FALSE GIT_SUBMODULES_RECURSE TRUE SOURCE_DIR ${CMAKE_BINARY_DIR}/dependencies/lib_qspi_fast_read From d222040382680740403f24cabbb54e9d244bca29 Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 26 Oct 2023 17:02:24 +0100 Subject: [PATCH 24/27] Reword changelog about fetched modules --- CHANGELOG.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ca25a1ffb..8914c8950 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,9 +6,8 @@ RTOS Framework change log * FIXED: Added dummy definitions of vTaskCoreAffinitySet() and vTaskCoreAffinitySet() functions to avoid warnings when configNUM_CORES is set to 1. - * UPDATED: To fwk_io v3.3.0 from v3.0.1 for CI run - * UPDATED: To fwk_core v1.0.2 from v1.0.0 for CI run - * UPDATED: Use tagged release v1.0.1 of lib_qspi_fast_read instead of 85fe541 hash + * 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 3.0.4 ----- From d45e20b540bb54f2b7520b9e160d6e4df030e5ce Mon Sep 17 00:00:00 2001 From: Brennan Magee Date: Fri, 27 Oct 2023 17:19:38 +0100 Subject: [PATCH 25/27] fix tracealyzer url --- doc/programming_guide/reference/rtos_drivers/trace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/programming_guide/reference/rtos_drivers/trace.rst b/doc/programming_guide/reference/rtos_drivers/trace.rst index e46036a5c..5384b08a6 100644 --- a/doc/programming_guide/reference/rtos_drivers/trace.rst +++ b/doc/programming_guide/reference/rtos_drivers/trace.rst @@ -105,7 +105,7 @@ by the Tracealyzer graphical tool either as a post processing step or live. `Recording Settings`. For general usage of Tracealyzer please refer to the Percepio's documentation here: -`Manual `_ +`Manual `_ ********** ASCII Mode From 2c58523f170ffa19b216b94a81329ae1da8450f8 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Tue, 31 Oct 2023 12:12:26 +0000 Subject: [PATCH 26/27] Added a runtime check for RPC being set up for I2S Slave case --- modules/drivers/i2s/api/rtos_i2s.h | 3 ++- modules/drivers/i2s/src/rtos_i2s.c | 3 +++ modules/drivers/i2s/src/rtos_i2s_rpc.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/drivers/i2s/api/rtos_i2s.h b/modules/drivers/i2s/api/rtos_i2s.h index 18d2d31d3..9c25247e2 100644 --- a/modules/drivers/i2s/api/rtos_i2s.h +++ b/modules/drivers/i2s/api/rtos_i2s.h @@ -10,7 +10,7 @@ * The public API for using the RTOS I2S driver. * @{ */ - +#include #include #include #include "i2s.h" @@ -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" diff --git a/modules/drivers/i2s/src/rtos_i2s.c b/modules/drivers/i2s/src/rtos_i2s.c index 852e808e5..c09fccbc3 100644 --- a/modules/drivers/i2s/src/rtos_i2s.c +++ b/modules/drivers/i2s/src/rtos_i2s.c @@ -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)); @@ -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; } diff --git a/modules/drivers/i2s/src/rtos_i2s_rpc.c b/modules/drivers/i2s/src/rtos_i2s_rpc.c index d7176b7f0..48b115060 100644 --- a/modules/drivers/i2s/src/rtos_i2s_rpc.c +++ b/modules/drivers/i2s/src/rtos_i2s_rpc.c @@ -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; From dd7889288f3d69b609dee633717e304e3daa9e37 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Tue, 31 Oct 2023 12:32:42 +0000 Subject: [PATCH 27/27] Changelog update --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8914c8950..443b075e0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 -----