diff --git a/.circleci/config.yml b/.circleci/config.yml
index 28afafb00..c2f6c4356 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -19,16 +19,40 @@ jobs:
echo "MATRIX_JSON=$MATRIX_JSON"
BUILDSYSTEM_TOOLCHAIN=(
+ "cmake aarch64-gcc"
"cmake arm-clang"
- "make aarch64-gcc"
- "make arm-gcc"
- "make msp430-gcc"
- "make riscv-gcc"
- "make rx-gcc"
+ "cmake arm-gcc"
"cmake esp-idf"
+ "cmake msp430-gcc"
+ "cmake riscv-gcc"
)
- RESOURCE_LARGE='["nrf", "imxrt"]'
+ # only build IAR if not forked PR, since IAR token is not shared
+ if [ -z $CIRCLE_PR_USERNAME ]; then
+ BUILDSYSTEM_TOOLCHAIN+=("cmake arm-iar")
+ fi
+
+ RESOURCE_LARGE='["nrf", "imxrt", "stm32f4", "stm32h7"]'
+
+ gen_build_entry() {
+ local build_system="$1"
+ local toolchain="$2"
+ local family="$3"
+ local resource_class="$4"
+
+ if [[ "$toolchain" == "esp-idf" ]]; then
+ echo " - build-vm:" >> .circleci/config2.yml
+ else
+ echo " - build:" >> .circleci/config2.yml
+ fi
+
+ echo " matrix:" >> .circleci/config2.yml
+ echo " parameters:" >> .circleci/config2.yml
+ echo " build-system: ['$build_system']" >> .circleci/config2.yml
+ echo " toolchain: ['$toolchain']" >> .circleci/config2.yml
+ echo " family: $family" >> .circleci/config2.yml
+ echo " resource_class: ['$resource_class']" >> .circleci/config2.yml
+ }
for e in "${BUILDSYSTEM_TOOLCHAIN[@]}"; do
e_arr=($e)
@@ -42,27 +66,15 @@ jobs:
FAMILY_LARGE=$(jq -n --argjson family "$FAMILY" --argjson resource "$RESOURCE_LARGE" '$family | map(select(IN($resource[])))')
FAMILY=$(jq -n --argjson family "$FAMILY" --argjson resource "$RESOURCE_LARGE" '$family | map(select(IN($resource[]) | not))')
- if [[ $toolchain == esp-idf ]]; then
- echo " - build-vm:" >> .circleci/config2.yml
+ if [[ $toolchain == esp-idf || $toolchain == arm-iar ]]; then
+ gen_build_entry "$build_system" "$toolchain" "$FAMILY" "large"
else
- echo " - build:" >> .circleci/config2.yml
- fi
- echo " matrix:" >> .circleci/config2.yml
- echo " parameters:" >> .circleci/config2.yml
- echo " build-system: ['$build_system']" >> .circleci/config2.yml
- echo " toolchain: ['$toolchain']" >> .circleci/config2.yml
- echo " family: $FAMILY" >> .circleci/config2.yml
- #echo " resource_class: ['medium+']" >> .circleci/config2.yml
+ gen_build_entry "$build_system" "$toolchain" "$FAMILY" "medium+"
- # add large resources
- if [ "$(echo $FAMILY_LARGE | jq 'length')" -gt 0 ]; then
- echo " - build:" >> .circleci/config2.yml
- echo " matrix:" >> .circleci/config2.yml
- echo " parameters:" >> .circleci/config2.yml
- echo " build-system: ['$build_system']" >> .circleci/config2.yml
- echo " toolchain: ['$toolchain']" >> .circleci/config2.yml
- echo " family: $FAMILY_LARGE" >> .circleci/config2.yml
- echo " resource_class: ['large']" >> .circleci/config2.yml
+ # add large resources if available
+ if [ "$(echo $FAMILY_LARGE | jq 'length')" -gt 0 ]; then
+ gen_build_entry "$build_system" "$toolchain" "$FAMILY_LARGE" "large"
+ fi
fi
done
diff --git a/.circleci/config2.yml b/.circleci/config2.yml
index e811ef3ed..d86a3f662 100644
--- a/.circleci/config2.yml
+++ b/.circleci/config2.yml
@@ -10,16 +10,7 @@ commands:
- run:
name: Set toolchain url and key
command: |
- TOOLCHAIN_JSON='{
- "aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
- "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
- "arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-x64.tar.gz",
- "msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
- "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
- "rx-gcc": "https://llvm-gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run"
- }'
- toolchain_url=$(echo $TOOLCHAIN_JSON | jq -r '.["<< parameters.toolchain >>"]')
-
+ toolchain_url=$(jq -r '."<< parameters.toolchain >>"' .github/actions/setup_toolchain/toolchain.json)
# only cache if not a github link
if [[ $toolchain_url != "https://github.com"* ]]; then
echo "<< parameters.toolchain >>-$toolchain_url" > toolchain_key
@@ -38,18 +29,26 @@ commands:
# download if folder does not exist (not cached)
if [ ! -d ~/cache/<< parameters.toolchain >> ]; then
mkdir -p ~/cache/<< parameters.toolchain >>
- wget --progress=dot:giga $toolchain_url -O toolchain.tar.gz
if [[ << parameters.toolchain >> == rx-gcc ]]; then
- mv toolchain.tar.gz toolchain.run
+ wget --progress=dot:giga $toolchain_url -O toolchain.run
chmod +x toolchain.run
./toolchain.run -p ~/cache/<< parameters.toolchain >>/gnurx -y
+ elif [[ << parameters.toolchain >> == arm-iar ]]; then
+ wget --progress=dot:giga $toolchain_url -O ~/cache/<< parameters.toolchain >>/toolchain.deb
else
+ wget --progress=dot:giga $toolchain_url -O toolchain.tar.gz
tar -C ~/cache/<< parameters.toolchain >> -xaf toolchain.tar.gz
fi
fi
# Add toolchain to PATH
- echo "export PATH=$PATH:`echo ~/cache/<< parameters.toolchain >>/*/bin`" >> $BASH_ENV
+ if [[ << parameters.toolchain >> == arm-iar ]]; then
+ # Install IAR since we only cache deb file
+ sudo dpkg --ignore-depends=libusb-1.0-0 -i ~/cache/<< parameters.toolchain >>/toolchain.deb
+ echo "export PATH=$PATH:/opt/iar/cxarm/arm/bin" >> $BASH_ENV
+ else
+ echo "export PATH=$PATH:`echo ~/cache/<< parameters.toolchain >>/*/bin`" >> $BASH_ENV
+ fi
- save_cache:
name: Save Toolchain Cache
@@ -105,11 +104,14 @@ commands:
name: Build
command: |
if [ << parameters.toolchain >> == esp-idf ]; then
- docker run --rm -v $PWD:/project -w /project espressif/idf:v5.3.1 python tools/build.py << parameters.family >>
+ docker run --rm -v $PWD:/project -w /project espressif/idf:v5.3.2 python tools/build.py << parameters.family >>
else
# Toolchain option default is gcc
if [ << parameters.toolchain >> == arm-clang ]; then
TOOLCHAIN_OPTION="--toolchain clang"
+ elif [ << parameters.toolchain >> == arm-iar ]; then
+ TOOLCHAIN_OPTION="--toolchain iar"
+ iccarm --version
elif [ << parameters.toolchain >> == arm-gcc ]; then
TOOLCHAIN_OPTION="--toolchain gcc"
fi
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index d00ee78bd..35576a439 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -22,10 +22,17 @@ body:
validations:
required: true
+ - type: input
+ attributes:
+ label: Commit SHA
+ placeholder: e.g 3a042b37da28d0ba1e5593eb1068ca5645d77b56 or version bundled by esp-idf or pico-sdk
+ validations:
+ required: true
+
- type: input
attributes:
label: Board
- placeholder: e.g Feather nRF52840 Express
+ placeholder: e.g Adafruit Feather nRF52840 Express
validations:
required: true
diff --git a/.github/actions/setup_toolchain/action.yml b/.github/actions/setup_toolchain/action.yml
index 8406a812d..6fd5c9d4e 100644
--- a/.github/actions/setup_toolchain/action.yml
+++ b/.github/actions/setup_toolchain/action.yml
@@ -4,9 +4,6 @@ inputs:
toolchain:
description: 'Toolchain name'
required: true
- toolchain_version:
- description: 'Toolchain version'
- required: false
outputs:
build_option:
@@ -20,30 +17,21 @@ runs:
if: inputs.toolchain == 'arm-gcc'
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
- release: '13.2.Rel1'
+ release: '14.2.Rel1'
- name: Pull ESP-IDF docker
if: inputs.toolchain == 'esp-idf'
uses: ./.github/actions/setup_toolchain/espressif
with:
toolchain: ${{ inputs.toolchain }}
- toolchain_version: ${{ inputs.toolchain_version }}
- name: Get Toolchain URL
if: >-
inputs.toolchain != 'arm-gcc' &&
- inputs.toolchain != 'arm-iar' &&
inputs.toolchain != 'esp-idf'
id: set-toolchain-url
run: |
- TOOLCHAIN_JSON='{
- "aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
- "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
- "msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
- "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
- "rx-gcc": "http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run"
- }'
- TOOLCHAIN_URL=$(echo $TOOLCHAIN_JSON | jq -r '.["${{ inputs.toolchain }}"]')
+ TOOLCHAIN_URL=$(jq -r '."${{ inputs.toolchain }}"' .github/actions/setup_toolchain/toolchain.json)
echo "toolchain_url=$TOOLCHAIN_URL"
echo "toolchain_url=$TOOLCHAIN_URL" >> $GITHUB_OUTPUT
shell: bash
@@ -51,7 +39,6 @@ runs:
- name: Download Toolchain
if: >-
inputs.toolchain != 'arm-gcc' &&
- inputs.toolchain != 'arm-iar' &&
inputs.toolchain != 'esp-idf'
uses: ./.github/actions/setup_toolchain/download
with:
diff --git a/.github/actions/setup_toolchain/download/action.yml b/.github/actions/setup_toolchain/download/action.yml
index 813197208..ce9643010 100644
--- a/.github/actions/setup_toolchain/download/action.yml
+++ b/.github/actions/setup_toolchain/download/action.yml
@@ -23,17 +23,25 @@ runs:
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache/${{ inputs.toolchain }}
- wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
+
if [[ ${{ inputs.toolchain }} == rx-gcc ]]; then
- mv toolchain.tar.gz toolchain.run
+ wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.run
chmod +x toolchain.run
./toolchain.run -p ~/cache/${{ inputs.toolchain }}/gnurx -y
+ elif [[ ${{ inputs.toolchain }} == arm-iar ]]; then
+ wget --progress=dot:giga ${{ inputs.toolchain_url }} -O ~/cache/${{ inputs.toolchain }}/cxarm.deb
else
+ wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
fi
shell: bash
- - name: Set Toolchain Path
+ - name: Setup Toolchain
run: |
- echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
+ if [[ ${{ inputs.toolchain }} == arm-iar ]]; then
+ sudo apt-get install -y ~/cache/${{ inputs.toolchain }}/cxarm.deb
+ echo >> $GITHUB_PATH "/opt/iar/cxarm/arm/bin"
+ else
+ echo >> $GITHUB_PATH `echo ~/cache/${{ inputs.toolchain }}/*/bin`
+ fi
shell: bash
diff --git a/.github/actions/setup_toolchain/espressif/action.yml b/.github/actions/setup_toolchain/espressif/action.yml
index 1e3ce18f1..b50ffd41d 100644
--- a/.github/actions/setup_toolchain/espressif/action.yml
+++ b/.github/actions/setup_toolchain/espressif/action.yml
@@ -6,7 +6,8 @@ inputs:
required: true
toolchain_version:
description: 'Toolchain version'
- required: true
+ required: false
+ default: 'v5.3.2'
runs:
using: "composite"
@@ -39,3 +40,9 @@ runs:
du -sh $DOCKER_ESP_IDF
docker load --input $DOCKER_ESP_IDF
shell: bash
+
+ - name: Tag Local Image
+ run: |
+ docker tag espressif/idf:${{ inputs.toolchain_version }} espressif/idf:tinyusb
+ docker images
+ shell: bash
diff --git a/.github/actions/setup_toolchain/toolchain.json b/.github/actions/setup_toolchain/toolchain.json
new file mode 100644
index 000000000..f7123ef11
--- /dev/null
+++ b/.github/actions/setup_toolchain/toolchain.json
@@ -0,0 +1,9 @@
+{
+ "aarch64-gcc": "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz",
+ "arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.1/LLVM-ET-Arm-19.1.1-Linux-x86_64.tar.xz",
+ "arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v14.2.1-1.1/xpack-arm-none-eabi-gcc-14.2.1-1.1-linux-x64.tar.gz",
+ "msp430-gcc": "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2",
+ "riscv-gcc": "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz",
+ "rx-gcc": "https://github.com/hathach/rx_device/releases/download/0.0.1/gcc-8.3.0.202411-GNURX-ELF.run",
+ "arm-iar": "https://netstorage.iar.com/FileStore/STANDARD/001/003/583/cxarm-9.60.4.deb"
+}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 283b72061..5e11f8a29 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,8 +8,8 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- - 'tools/get_deps.py'
- 'tools/build.py'
+ - 'tools/get_deps.py'
- '.github/actions/**'
- '.github/workflows/build.yml'
- '.github/workflows/build_util.yml'
@@ -21,8 +21,9 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- - 'tools/get_deps.py'
+ - 'test/hil/**'
- 'tools/build.py'
+ - 'tools/get_deps.py'
- '.github/actions/**'
- '.github/workflows/build.yml'
- '.github/workflows/build_util.yml'
@@ -31,11 +32,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+env:
+ HIL_JSON: test/hil/tinyusb.json
+
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
json: ${{ steps.set-matrix-json.outputs.matrix }}
+ hil_json: ${{ steps.set-matrix-json.outputs.hil_matrix }}
steps:
- name: Checkout TinyUSB
uses: actions/checkout@v4
@@ -43,33 +48,41 @@ jobs:
- name: Generate matrix json
id: set-matrix-json
run: |
+ # build matrix
MATRIX_JSON=$(python .github/workflows/ci_set_matrix.py)
echo "matrix=$MATRIX_JSON"
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
+ # hil matrix
+ HIL_MATRIX_JSON=$(python test/hil/hil_ci_set_matrix.py ${{ env.HIL_JSON }})
+ echo "hil_matrix=$HIL_MATRIX_JSON"
+ echo "hil_matrix=$HIL_MATRIX_JSON" >> $GITHUB_OUTPUT
# ---------------------------------------
- # Build CMake
+ # Build CMake: only build on push with one-per-family.
+ # Full built is done by CircleCI in PR
# ---------------------------------------
cmake:
+ if: github.event_name == 'push'
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
toolchain:
- # - 'arm-clang' is built by circle-ci in PR
- 'aarch64-gcc'
+ #- 'arm-clang'
- 'arm-gcc'
+ - 'esp-idf'
- 'msp430-gcc'
- 'riscv-gcc'
with:
build-system: 'cmake'
toolchain: ${{ matrix.toolchain }}
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
- one-per-family: ${{ github.event_name == 'push' }}
+ one-per-family: true
# ---------------------------------------
- # Build Make (built by circle-ci in PR, only build on push here)
+ # Build Make: only build on push with one-per-family
# ---------------------------------------
make:
if: github.event_name == 'push'
@@ -79,19 +92,40 @@ jobs:
fail-fast: false
matrix:
toolchain:
- # 'arm-clang'
- - 'arm-gcc'
- 'aarch64-gcc'
+ #- 'arm-clang'
+ - 'arm-gcc'
- 'msp430-gcc'
- 'riscv-gcc'
- 'rx-gcc'
- - 'esp-idf' # build-system is ignored
with:
build-system: 'make'
toolchain: ${{ matrix.toolchain }}
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
one-per-family: true
+ # ---------------------------------------
+ # Build IAR
+ # Since IAR Token secret is not passed to forked PR, only build non-forked PR with make.
+ # cmake is built by circle-ci. Due to IAR limit capacity, only build oe per family
+ # ---------------------------------------
+ arm-iar:
+ if: false # disable for now since we got reach capacity limit too often
+ #if: github.event_name == 'push' && github.repository_owner == 'hathach'
+ needs: set-matrix
+ uses: ./.github/workflows/build_util.yml
+ secrets: inherit
+ strategy:
+ fail-fast: false
+ matrix:
+ build-system:
+ - 'make'
+ with:
+ build-system: ${{ matrix.build-system }}
+ toolchain: 'arm-iar'
+ build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['arm-iar']) }}
+ one-per-family: true
+
# ---------------------------------------
# Build Make on Windows/MacOS
# ---------------------------------------
@@ -110,16 +144,59 @@ jobs:
one-per-family: true
# ---------------------------------------
- # Build IAR on HFP self-hosted
+ # Zephyr
# ---------------------------------------
- arm-iar:
- if: github.repository_owner == 'hathach'
+ zephyr:
+ if: github.event_name == 'push'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v4
+
+ - name: Setup Zephyr project
+ uses: zephyrproject-rtos/action-zephyr-setup@v1
+ with:
+ app-path: examples
+ toolchains: arm-zephyr-eabi
+
+ - name: Build
+ run: |
+ west build -b pca10056 -d examples/device/cdc_msc/build examples/device/cdc_msc -- -DRTOS=zephyr
+ west build -b pca10056 -d examples/device/msc_dual_lun/build examples/device/msc_dual_lun -- -DRTOS=zephyr
+
+ # ---------------------------------------
+ # Hardware in the loop (HIL)
+ # Run on PR only (hil-tinyusb), hil-hfp only run on non-forked PR
+ # ---------------------------------------
+ hil-build:
+ if: |
+ github.repository_owner == 'hathach' &&
+ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch')
needs: set-matrix
- runs-on: [self-hosted, Linux, X64, hifiphile]
- env:
- BUILD_ARGS: ${{ join(fromJSON(needs.set-matrix.outputs.json)['arm-iar'], ' ') }}
- IAR_LMS_CLOUD_URL: https://license.cloud.iar.com
- IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
+ uses: ./.github/workflows/build_util.yml
+ strategy:
+ fail-fast: false
+ matrix:
+ toolchain:
+ - 'arm-gcc'
+ - 'esp-idf'
+ with:
+ build-system: 'cmake'
+ toolchain: ${{ matrix.toolchain }}
+ build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.hil_json)[matrix.toolchain]) }}
+ one-per-family: true
+ upload-artifacts: true
+
+ # ---------------------------------------
+ # Hardware in the loop (HIL)
+ # self-hosted on local VM, for attached hardware checkout HIL_JSON
+ # ---------------------------------------
+ hil-tinyusb:
+ if: |
+ github.repository_owner == 'hathach' &&
+ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch')
+ needs: hil-build
+ runs-on: [self-hosted, X64, hathach, hardware-in-the-loop]
steps:
- name: Clean workspace
run: |
@@ -127,19 +204,61 @@ jobs:
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
+ - name: Checkout TinyUSB
+ uses: actions/checkout@v4
+ with:
+ sparse-checkout: test/hil
+
+ - name: Download Artifacts
+ uses: actions/download-artifact@v4
+ with:
+ path: cmake-build
+ merge-multiple: true
+
+ - name: Test on actual hardware
+ run: |
+ ls cmake-build/
+ python3 test/hil/hil_test.py ${{ env.HIL_JSON }}
+
+ # ---------------------------------------
+ # Hardware in the loop (HIL)
+ # self-hosted by HFP, build with IAR toolchain, for attached hardware checkout test/hil/hfp.json
+ # Since IAR Token secret is not passed to forked PR, only build non-forked PR
+ # ---------------------------------------
+ hil-hfp:
+ if: |
+ github.repository_owner == 'hathach' &&
+ github.event.pull_request.head.repo.fork == false &&
+ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch')
+ runs-on: [self-hosted, Linux, X64, hifiphile]
+ env:
+ IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
+ steps:
+ - name: Clean workspace
+ run: |
+ echo "Cleaning up previous run"
+ rm -rf "${{ github.workspace }}"3
+ mkdir -p "${{ github.workspace }}"
+
- name: Toolchain version
- run: iccarm --version
+ run: |
+ iccarm --version
- name: Checkout TinyUSB
uses: actions/checkout@v4
+ - name: Get build boards
+ run: |
+ MATRIX_JSON=$(python test/hil/hil_ci_set_matrix.py test/hil/hfp.json)
+ BUILD_ARGS=$(echo $MATRIX_JSON | jq -r '.["arm-gcc"] | join(" ")')
+ echo "BUILD_ARGS=$BUILD_ARGS"
+ echo "BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV
+
- name: Get Dependencies
run: python3 tools/get_deps.py $BUILD_ARGS
- name: Build
- run: python3 tools/build.py --one-per-family --toolchain iar $BUILD_ARGS
+ run: python3 tools/build.py -j 4 --toolchain iar $BUILD_ARGS
- name: Test on actual hardware (hardware in the loop)
- if: github.event_name == 'pull_request'
- run: |
- python3 test/hil/hil_test.py hfp.json
+ run: python3 test/hil/hil_test.py hfp.json
diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml
index 706ded1c1..a2c96f3c0 100644
--- a/.github/workflows/build_util.yml
+++ b/.github/workflows/build_util.yml
@@ -41,7 +41,6 @@ jobs:
uses: ./.github/actions/setup_toolchain
with:
toolchain: ${{ inputs.toolchain }}
- toolchain_version: 'v5.3.1'
- name: Get Dependencies
uses: ./.github/actions/get_deps
@@ -59,9 +58,11 @@ jobs:
shell: bash
- name: Build
+ env:
+ IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
run: |
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
- docker run --rm -v $PWD:/project -w /project espressif/idf:v5.3.1 python tools/build.py ${{ matrix.arg }}
+ docker run --rm -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py ${{ matrix.arg }}
else
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
fi
diff --git a/.github/workflows/ci_set_matrix.py b/.github/workflows/ci_set_matrix.py
index 78fcac68a..ddb3ee1fb 100755
--- a/.github/workflows/ci_set_matrix.py
+++ b/.github/workflows/ci_set_matrix.py
@@ -24,7 +24,7 @@ family_list = {
"lpc11 lpc13 lpc15": ["arm-gcc", "arm-clang"],
"lpc17 lpc18 lpc40 lpc43": ["arm-gcc", "arm-clang"],
"lpc51 lpc54 lpc55": ["arm-gcc", "arm-clang"],
- "max32650 max32666 max32690 max78002": ["arm-gcc"],
+ "maxim": ["arm-gcc"],
"mcx": ["arm-gcc"],
"mm32": ["arm-gcc"],
"msp430": ["msp430-gcc"],
@@ -40,13 +40,15 @@ family_list = {
"stm32f4": ["arm-gcc", "arm-clang", "arm-iar"],
"stm32f7": ["arm-gcc", "arm-clang", "arm-iar"],
"stm32g0 stm32g4 stm32h5": ["arm-gcc", "arm-clang", "arm-iar"],
- "stm32h7": ["arm-gcc", "arm-clang", "arm-iar"],
+ "stm32h7 stm32h7rs": ["arm-gcc", "arm-clang", "arm-iar"],
"stm32l0 stm32l4": ["arm-gcc", "arm-clang", "arm-iar"],
+ "stm32n6": ["arm-gcc"],
"stm32u5 stm32wb": ["arm-gcc", "arm-clang", "arm-iar"],
"xmc4000": ["arm-gcc"],
- "-bespressif_kaluga_1": ["esp-idf"],
- "-bespressif_s3_devkitm": ["esp-idf"],
- "-bespressif_p4_function_ev": ["esp-idf"],
+ "-bespressif_s2_devkitc": ["esp-idf"],
+ # S3, P4 will be built by hil test
+ # "-bespressif_s3_devkitm": ["esp-idf"],
+ # "-bespressif_p4_function_ev": ["esp-idf"],
}
@@ -55,14 +57,6 @@ def set_matrix_json():
for toolchain in toolchain_list:
filtered_families = [family for family, supported_toolchain in family_list.items() if
toolchain in supported_toolchain]
-
- # always add board in hfp.json for arm-iar
- if toolchain == 'arm-iar':
- with open('test/hil/hfp.json') as f:
- hfp_data = json.load(f)
- hfp_boards = [f"-b{board['name']}" for board in hfp_data['boards']]
- filtered_families = filtered_families + hfp_boards
-
matrix[toolchain] = filtered_families
print(json.dumps(matrix))
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index be4c2dd87..dfcca6315 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -66,7 +66,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -93,7 +93,7 @@ jobs:
./.github/workflows/codeql-buildscript.sh
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
upload: false
@@ -124,12 +124,12 @@ jobs:
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
- name: Upload SARIF
- uses: github/codeql-action/upload-sarif@v2
+ uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.step1.outputs.sarif-output }}
category: "/language:${{matrix.language}}"
- - name: Archive CodeQL results
+ - name: Upload CodeQL results as an artifact
uses: actions/upload-artifact@v4
with:
name: codeql-results
diff --git a/.github/workflows/hil_test.yml b/.github/workflows/hil_test.yml
deleted file mode 100644
index c6e7f33b0..000000000
--- a/.github/workflows/hil_test.yml
+++ /dev/null
@@ -1,88 +0,0 @@
-name: Hardware Test
-
-on:
- workflow_dispatch:
- pull_request:
- branches: [ master ]
- paths:
- - 'src/**'
- - 'examples/**'
- - 'lib/**'
- - 'hw/**'
- - 'test/hil/**'
- - 'tools/get_deps.py'
- - '.github/actions/**'
- - '.github/workflows/hil_test.yml'
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-env:
- HIL_JSON: test/hil/tinyusb.json
-
-jobs:
- set-matrix:
- runs-on: ubuntu-latest
- outputs:
- json: ${{ steps.set-matrix-json.outputs.matrix }}
- steps:
- - name: Checkout TinyUSB
- uses: actions/checkout@v4
-
- - name: Generate matrix json
- id: set-matrix-json
- run: |
- MATRIX_JSON=$(python test/hil/hil_ci_set_matrix.py ${{ env.HIL_JSON }})
- echo "matrix=$MATRIX_JSON"
- echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
-
- # ---------------------------------------
- # Build arm-gcc
- # ---------------------------------------
- build:
- if: github.repository_owner == 'hathach'
- needs: set-matrix
- uses: ./.github/workflows/build_util.yml
- strategy:
- fail-fast: false
- matrix:
- toolchain:
- - 'arm-gcc'
- - 'esp-idf'
- with:
- build-system: 'cmake'
- toolchain: ${{ matrix.toolchain }}
- build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain]) }}
- one-per-family: true
- upload-artifacts: true
-
- # ---------------------------------------
- # Hardware in the loop (HIL)
- # self-hosted running on an VM. For attached hardware checkout HIL_JSON
- # ---------------------------------------
- hil-tinyusb:
- if: github.repository_owner == 'hathach'
- needs: build
- runs-on: [self-hosted, X64, hathach, hardware-in-the-loop]
- steps:
- - name: Clean workspace
- run: |
- echo "Cleaning up previous run"
- rm -rf "${{ github.workspace }}"
- mkdir -p "${{ github.workspace }}"
-
- - name: Checkout TinyUSB
- uses: actions/checkout@v4
- with:
- sparse-checkout: test/hil
-
- - name: Download Artifacts
- uses: actions/download-artifact@v4
- with:
- path: cmake-build
- merge-multiple: true
-
- - name: Test on actual hardware
- run: |
- ls cmake-build/
- python3 test/hil/hil_test.py ${{ env.HIL_JSON }}
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index 530484079..ed0efd66e 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -33,6 +33,8 @@ jobs:
- name: Build Fuzzer
run: |
+ sudo apt install libc++-dev libc++abi-dev
+ clang --version
export CC=clang
export CXX=clang++
fuzz_harness=$(ls -d test/fuzz/device/*/)
diff --git a/.gitignore b/.gitignore
index 309d7466a..5638a09db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,16 +1,28 @@
html
latex
+*.a
*.d
*.o
*.P
-*.map
*.axf
*.bin
+*.elf
+*.env
+*.ind
+*.log
+*.map
+*.obj
*.jlink
*.emSession
-*.elf
-*.ind
-.env
+*.ninja*
+*.eww
+*.ewp
+*.ewt
+*.ewd
+*.hex
+cmake_install.cmake
+CMakeCache.txt
+settings/
.settings/
.vscode/
.gdb_history
@@ -33,4 +45,10 @@ cmake-build-*
sdkconfig
.PVS-Studio
.vscode/
-build/
+build
+CMakeFiles
+Debug
+RelWithDebInfo
+Release
+BrowseInfo
+.cmake_build
diff --git a/.idea/cmake.xml b/.idea/cmake.xml
index 25a8513ca..dd219bc77 100644
--- a/.idea/cmake.xml
+++ b/.idea/cmake.xml
@@ -6,12 +6,14 @@
-
-
+
+
+
+
@@ -81,16 +83,19 @@
+
-
+
+
-
+
+
@@ -118,10 +123,13 @@
+
-
-
+
+
+
+
@@ -159,7 +167,6 @@
-
\ No newline at end of file
diff --git a/.idea/debugServers/esp32s2.xml b/.idea/debugServers/esp32s2.xml
new file mode 100644
index 000000000..6a4aff3da
--- /dev/null
+++ b/.idea/debugServers/esp32s2.xml
@@ -0,0 +1,14 @@
+
+
+
+ $USER_HOME$/.espressif/tools/xtensa-esp-elf-gdb/14.2_20240403/xtensa-esp-elf-gdb/bin/xtensa-esp32s2-elf-gdb
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/rp2040.xml b/.idea/debugServers/rp2040.xml
new file mode 100644
index 000000000..f451611f3
--- /dev/null
+++ b/.idea/debugServers/rp2040.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/rp2350.xml b/.idea/debugServers/rp2350.xml
new file mode 100644
index 000000000..52243a297
--- /dev/null
+++ b/.idea/debugServers/rp2350.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/rt1060.xml b/.idea/debugServers/rt1060.xml
new file mode 100644
index 000000000..cbd295b4e
--- /dev/null
+++ b/.idea/debugServers/rt1060.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/rt1064.xml b/.idea/debugServers/rt1064.xml
new file mode 100644
index 000000000..4fb2fdf6a
--- /dev/null
+++ b/.idea/debugServers/rt1064.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/sam21.xml b/.idea/debugServers/sam21.xml
new file mode 100644
index 000000000..3f6735bd1
--- /dev/null
+++ b/.idea/debugServers/sam21.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/sam51.xml b/.idea/debugServers/sam51.xml
new file mode 100644
index 000000000..99a92c174
--- /dev/null
+++ b/.idea/debugServers/sam51.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/stm32f769.xml b/.idea/debugServers/stm32f769.xml
new file mode 100644
index 000000000..22a452218
--- /dev/null
+++ b/.idea/debugServers/stm32f769.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/stm32h563.xml b/.idea/debugServers/stm32h563.xml
new file mode 100644
index 000000000..637839314
--- /dev/null
+++ b/.idea/debugServers/stm32h563.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/debugServers/stm32h743.xml b/.idea/debugServers/stm32h743.xml
new file mode 100644
index 000000000..b04e4a708
--- /dev/null
+++ b/.idea/debugServers/stm32h743.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/stlink.xml b/.idea/runConfigurations/stlink.xml
index 2d94e66d6..e84445add 100644
--- a/.idea/runConfigurations/stlink.xml
+++ b/.idea/runConfigurations/stlink.xml
@@ -1,6 +1,6 @@
-
-
+
+
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7f4..d44b5516f 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,5 +2,6 @@
+
\ No newline at end of file
diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst
index 085f8082a..451ac0783 100644
--- a/CONTRIBUTORS.rst
+++ b/CONTRIBUTORS.rst
@@ -31,6 +31,13 @@ Notable contributors
- Most features development
+`Heiko Kuester `__
+--------------------------------------------
+
+- Add CH34x and PL2303 support (CDC host)
+- Improve FTDI and CP210x support (CDC host)
+
+
`Hristo Gochkov `__
-------------------------------------------------
diff --git a/README.rst b/README.rst
index db36cad3b..b873bc42b 100644
--- a/README.rst
+++ b/README.rst
@@ -15,10 +15,7 @@ TinyUSB Project
.. figure:: docs/assets/logo.svg
:alt: TinyUSB
-TinyUSB is an open-source cross-platform USB Host/Device stack for
-embedded system, designed to be memory-safe with no dynamic allocation
-and thread-safe with all interrupt events are deferred then handled in
-the non-ISR task function. Check out the online `documentation `__ for more details.
+TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function. Check out the online `documentation `__ for more details.
.. figure:: docs/assets/stack.svg
:width: 500px
@@ -32,7 +29,7 @@ the non-ISR task function. Check out the online `documentation `_ for information about using TinyUSB and how it is implemented.
+Check out `Getting Started`_ guide for adding TinyUSB to your project or building the examples. If you are new to TinyUSB, we recommend starting with the ``cdc_msc`` example. There is a handful of `Supported Boards`_ that should work out of the box.
+
We use `GitHub Discussions `_ as our forum. It is a great place to ask questions and advice from the community or to discuss your TinyUSB-based projects.
For bugs and feature requests, please `raise an issue `_ and follow the templates there.
-Check out `Getting Started`_ guide for adding TinyUSB to your project or building the examples. If you are new to TinyUSB, we recommend starting with the `cdc_msc` example.
-
See `Porting`_ guide for adding support for new MCUs and boards.
Device Stack
@@ -69,7 +66,7 @@ Supports multiple device configurations by dynamically changing USB descriptors,
- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.
- `WebUSB `__ with vendor-specific class
-If you have a special requirement, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how the RPi team added their reset interface `raspberrypi/pico-sdk#197 `_
+If you have a special requirement, ``usbd_app_driver_get_cb()`` can be used to write your own class driver without modifying the stack. Here is how the RPi team added their reset interface `raspberrypi/pico-sdk#197 `_
Host Stack
==========
@@ -77,13 +74,13 @@ Host Stack
- Human Interface Device (HID): Keyboard, Mouse, Generic
- Mass Storage Class (MSC)
- Communication Device Class: CDC-ACM
-- Vendor serial over USB: FTDI, CP210x, CH34x
+- Vendor serial over USB: FTDI, CP210x, CH34x, PL2303
- Hub with multiple-level support
-Similar to the Device Stack, if you have a special requirement, `usbh_app_driver_get_cb()` can be used to write your own class driver without modifying the stack.
+Similar to the Device Stack, if you have a special requirement, ``usbh_app_driver_get_cb()`` can be used to write your own class driver without modifying the stack.
-TypeC PD Stack
-==============
+Power Delivery Stack
+====================
- Power Delivery 3.0 (PD3.0) with USB Type-C support (WIP)
- Super early stage, only for testing purpose
@@ -102,100 +99,139 @@ TinyUSB is completely thread-safe by pushing all Interrupt Service Request (ISR)
Supported CPUs
==============
-Following CPUs are supported, check out `Supported Devices`_ for comprehensive list of driver, features for each CPU.
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Manufacturer | Family | Device | Host | Highspeed | Driver | Note |
++==============+=============================+========+======+===========+========================+===================+
+| Allwinner | F1C100s/F1C200s | ✔ | | ✔ | sunxi | musb variant |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Analog | MAX3421E | | ✔ | ✖ | max3421 | via SPI |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | MAX32 650, 666, 690, | ✔ | | ✔ | musb | 1-dir ep |
+| | MAX78002 | | | | | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Brigetek | FT90x | ✔ | | ✔ | ft9xx | 1-dir ep |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Broadcom | BCM2711, BCM2837 | ✔ | | ✔ | dwc2 | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Dialog | DA1469x | ✔ | ✖ | ✖ | da146xx | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Espressif | S2, S3 | ✔ | ✔ | ✖ | dwc2 or esp32sx | |
+| ESP32 +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | P4 | ✔ | ✔ | ✔ | dwc2 | |
++--------------+----+------------------------+--------+------+-----------+------------------------+-------------------+
+| GigaDevice | GD32VF103 | ✔ | | ✖ | dwc2 | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Infineon | XMC4500 | ✔ | ✔ | ✖ | dwc2 | |
++--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
+| MicroChip | SAM | D11, D21, L21, L22 | ✔ | | ✖ | samd | |
+| | +-----------------------+--------+------+-----------+------------------------+-------------------+
+| | | D51, E5x | ✔ | | ✖ | samd | |
+| | +-----------------------+--------+------+-----------+------------------------+-------------------+
+| | | G55 | ✔ | | ✖ | samg | 1-dir ep |
+| | +-----------------------+--------+------+-----------+------------------------+-------------------+
+| | | E70,S70,V70,V71 | ✔ | | ✔ | samx7x | 1-dir ep |
+| +-----+-----------------------+--------+------+-----------+------------------------+-------------------+
+| | PIC | 24 | ✔ | | | pic | ci_fs variant |
+| | +-----------------------+--------+------+-----------+------------------------+-------------------+
+| | | 32 mm, mk, mx | ✔ | | | pic | ci_fs variant |
+| | +-----------------------+--------+------+-----------+------------------------+-------------------+
+| | | dsPIC33 | ✔ | | | pic | ci_fs variant |
+| | +-----------------------+--------+------+-----------+------------------------+-------------------+
+| | | 32mz | ✔ | | | pic32mz | musb variant |
++--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
+| Mind Montion | mm32 | ✔ | | ✖ | mm32f327x_otg | ci_fs variant |
++--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
+| NordicSemi | nRF 52833, 52840, 5340 | ✔ | ✖ | ✖ | nrf5x | only ep8 is ISO |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Nuvoton | NUC120 | ✔ | ✖ | ✖ | nuc120 | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | NUC121/NUC125 | ✔ | ✖ | ✖ | nuc121 | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | NUC126 | ✔ | ✖ | ✖ | nuc121 | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | NUC505 | ✔ | | ✔ | nuc505 | |
++--------------+---------+-------------------+--------+------+-----------+------------------------+-------------------+
+| NXP | iMXRT | RT 10xx, 11xx | ✔ | ✔ | ✔ | ci_hs | |
+| +---------+-------------------+--------+------+-----------+------------------------+-------------------+
+| | Kinetis | KL | ✔ | ⚠ | ✖ | ci_fs, khci | |
+| | +-------------------+--------+------+-----------+------------------------+-------------------+
+| | | K32L2 | ✔ | | ✖ | khci | ci_fs variant |
+| +---------+-------------------+--------+------+-----------+------------------------+-------------------+
+| | LPC | 11u, 13, 15 | ✔ | ✖ | ✖ | lpc_ip3511 | |
+| | +-------------------+--------+------+-----------+------------------------+-------------------+
+| | | 17, 40 | ✔ | ⚠ | ✖ | lpc17_40 | |
+| | +-------------------+--------+------+-----------+------------------------+-------------------+
+| | | 18, 43 | ✔ | ✔ | ✔ | ci_hs | |
+| | +-------------------+--------+------+-----------+------------------------+-------------------+
+| | | 51u | ✔ | ✖ | ✖ | lpc_ip3511 | |
+| | +-------------------+--------+------+-----------+------------------------+-------------------+
+| | | 54, 55 | ✔ | | ✔ | lpc_ip3511 | |
+| +---------+-------------------+--------+------+-----------+------------------------+-------------------+
+| | MCX | N9 | ✔ | | ✔ | ci_fs, ci_hs | |
+| | +-------------------+--------+------+-----------+------------------------+-------------------+
+| | | A15 | ✔ | | | ci_fs | |
++--------------+---------+-------------------+--------+------+-----------+------------------------+-------------------+
+| Raspberry Pi | RP2040, RP2350 | ✔ | ✔ | ✖ | rp2040, pio_usb | |
++--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
+| Renesas | RX | 63N, 65N, 72N | ✔ | ✔ | ✖ | rusb2 | |
+| +-----+-----------------------+--------+------+-----------+------------------------+-------------------+
+| | RA | 4M1, 4M3, 6M1 | ✔ | ✔ | ✖ | rusb2 | |
+| | +-----------------------+--------+------+-----------+------------------------+-------------------+
+| | | 6M5 | ✔ | ✔ | ✔ | rusb2 | |
++--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
+| Silabs | EFM32GG12 | ✔ | | ✖ | dwc2 | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| Sony | CXD56 | ✔ | ✖ | ✔ | cxd56 | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| ST STM32 | F0, F3, L0, L1, L5, WBx5 | ✔ | ✖ | ✖ | stm32_fsdev | |
+| +----+------------------------+--------+------+-----------+------------------------+-------------------+
+| | F1 | 102, 103 | ✔ | ✖ | ✖ | stm32_fsdev | |
+| | +------------------------+--------+------+-----------+------------------------+-------------------+
+| | | 105, 107 | ✔ | ✔ | ✖ | dwc2 | |
+| +----+------------------------+--------+------+-----------+------------------------+-------------------+
+| | F2, F4, F7, H7, H7RS | ✔ | ✔ | ✔ | dwc2 | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | C0, G0, H5 | ✔ | | ✖ | stm32_fsdev | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | G4 | ✔ | ✖ | ✖ | stm32_fsdev | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | L0, L1 | ✔ | ✖ | ✖ | stm32_fsdev | |
+| +----+------------------------+--------+------+-----------+------------------------+-------------------+
+| | L4 | 4x2, 4x3 | ✔ | ✖ | ✖ | stm32_fsdev | |
+| | +------------------------+--------+------+-----------+------------------------+-------------------+
+| | | 4x5, 4x6, 4+ | ✔ | ✔ | ✖ | dwc2 | |
+| +----+------------------------+--------+------+-----------+------------------------+-------------------+
+| | N6 | ✔ | ✔ | ✔ | dwc2 | |
+| +----+------------------------+--------+------+-----------+------------------------+-------------------+
+| | U5 | 535, 545 | ✔ | | ✖ | stm32_fsdev | |
+| | +------------------------+--------+------+-----------+------------------------+-------------------+
+| | | 575, 585 | ✔ | ✔ | ✖ | dwc2 | |
+| | +------------------------+--------+------+-----------+------------------------+-------------------+
+| | | 59x,5Ax,5Fx,5Gx | ✔ | ✔ | ✔ | dwc2 | |
++--------------+----+------------------------+--------+------+-----------+------------------------+-------------------+
+| TI | MSP430 | ✔ | ✖ | ✖ | msp430x5xx | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | MSP432E4, TM4C123 | ✔ | | ✖ | musb | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| ValentyUSB | eptri | ✔ | ✖ | ✖ | eptri | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
+| WCH | CH32F20x | ✔ | | ✔ | ch32_usbhs | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | CH32V20x | ✔ | | ✖ | stm32_fsdev/ch32_usbfs | |
+| +-----------------------------+--------+------+-----------+------------------------+-------------------+
+| | CH32V307 | ✔ | | ✔ | ch32_usbfs/hs | |
++--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-+--------------+------------------------------------------------------------+
-| Manufacturer | Family |
-+==============+============================================================+
-| Allwinner | F1C100s/F1C200s |
-+--------------+------------------------------------------------------------+
-| Analog | max32: 650, 666, 690. max78002 |
-| | |
-| | max3421e (spi host) |
-+--------------+------------------------------------------------------------+
-| Brigetek | FT90x |
-+--------------+------------------------------------------------------------+
-| Broadcom | BCM2711, BCM2837 |
-+--------------+------------------------------------------------------------+
-| Dialog | DA1469x |
-+--------------+------------------------------------------------------------+
-| Espressif | ESP32 S2, S3 |
-+--------------+------------------------------------------------------------+
-| GigaDevice | GD32VF103 |
-+--------------+------------------------------------------------------------+
-| Infineon | XMC4500 |
-+--------------+------------------------------------------------------------+
-| | SAM: D11, D21, D51, E5x, G55, L2x, E7x, S7x, V7x |
-| MicroChip | |
-| | PIC: 24, 32mm, 32mk, 32mx, 32mz, dsPIC33 |
-+--------------+------------------------------------------------------------+
-| Mind Montion | mm32 |
-+--------------+------------------------------------------------------------+
-| NordicSemi | nRF52833, nRF52840, nRF5340 |
-+--------------+------------------------------------------------------------+
-| Nuvoton | NUC 120, 121, 125, 126, 505 |
-+--------------+------------------------------------------------------------+
-| NXP | iMXRT: RT10xx, RT11xx |
-| | |
-| | Kinetis: KL, K32L2 |
-| | |
-| | LPC: 11u, 13, 15, 17, 18, 40, 43, 51u, 54, 55 |
-| | |
-| | MCX: A15, N9 |
-+--------------+------------------------------------------------------------+
-| Raspberry Pi | RP2040, RP2350 |
-+--------------+-----+------------------------------------------------------+
-| Renesas | RA: 4M1, 4M3, 6M1, 6M5 |
-| | |
-| | RX: 63N, 65N, 72N |
-+--------------+-----+------------------------------------------------------+
-| Silabs | EFM32GG12 |
-+--------------+------------------------------------------------------------+
-| Sony | CXD56 |
-+--------------+------------------------------------------------------------+
-| ST STM32 | C0, F0, F1, F2, F3, F4, F7, G0, G4, H5, H7, |
-| | |
-| | L0, L1, L4, L4+, L5, U5, WB |
-+--------------+------------------------------------------------------------+
-| TI | MSP430, MSP432E4, TM4C123 |
-+--------------+------------------------------------------------------------+
-| ValentyUSB | eptri |
-+--------------+------------------------------------------------------------+
-| WCH | CH32F: F20x |
-| | |
-| | CH32V: V20x, V307 |
-+--------------+------------------------------------------------------------+
+Table Legend
+------------
-License
-=======
+========= =========================
+✔ Supported
+⚠ Partial support
+✖ Not supported by hardware
+\[empty\] Unknown
+========= =========================
-All TinyUSB sources in the ``src`` folder are licensed under MIT
-license, the `Full license is here `__. However, each file can be
-individually licensed especially those in ``lib`` and ``hw/mcu`` folder.
-Please make sure you understand all the license term for files you use
-in your project.
-
-Docs
-====
-
-- Info
-
- - `Uses`_
- - `Changelog`_
- - `Contributors`_
-
-- `Reference`_
-
- - `Supported Devices`_
- - `Getting Started`_
- - `Dependencies`_
- - `Concurrency`_
-
-- `Contributing`_
-
- - `Code of Conduct`_
- - `Structure`_
- - `Porting`_
.. |Build Status| image:: https://github.com/hathach/tinyusb/actions/workflows/build.yml/badge.svg
:target: https://github.com/hathach/tinyusb/actions
@@ -209,15 +245,12 @@ Docs
:target: https://opensource.org/licenses/MIT
-.. _Uses: docs/info/uses.rst
.. _Changelog: docs/info/changelog.rst
.. _Contributors: CONTRIBUTORS.rst
-.. _Reference: docs/reference/index.rst
-.. _Supported Devices: docs/reference/supported.rst
.. _Getting Started: docs/reference/getting_started.rst
+.. _Supported Boards: docs/reference/boards.rst
.. _Dependencies: docs/reference/dependencies.rst
.. _Concurrency: docs/reference/concurrency.rst
.. _Contributing: docs/contributing/index.rst
.. _Code of Conduct: CODE_OF_CONDUCT.rst
-.. _Structure: docs/contributing/structure.rst
.. _Porting: docs/contributing/porting.rst
diff --git a/docs/conf.py b/docs/conf.py
index af44b7339..4249d41f7 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -5,13 +5,16 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
+import re
+from pathlib import Path
+
# -- Path setup --------------------------------------------------------------
# -- Project information -----------------------------------------------------
project = 'TinyUSB'
-copyright = '2021, Ha Thach'
+copyright = '2024, Ha Thach'
author = 'Ha Thach'
@@ -40,3 +43,16 @@ html_theme_options = {
}
todo_include_todos = True
+
+# pre-process path in README.rst
+def preprocess_readme():
+ """Modify figure paths in README.rst for Sphinx builds."""
+ src = Path(__file__).parent.parent / "README.rst"
+ tgt = Path(__file__).parent.parent / "README_processed.rst"
+ if src.exists():
+ content = src.read_text()
+ content = re.sub(r"docs/", r"", content)
+ content = re.sub(r".rst", r".html", content)
+ tgt.write_text(content)
+
+preprocess_readme()
diff --git a/docs/contributing/code_of_conduct.rst b/docs/contributing/code_of_conduct.rst
deleted file mode 120000
index b52bf14c5..000000000
--- a/docs/contributing/code_of_conduct.rst
+++ /dev/null
@@ -1 +0,0 @@
-../../CODE_OF_CONDUCT.rst
\ No newline at end of file
diff --git a/docs/contributing/code_of_conduct.rst b/docs/contributing/code_of_conduct.rst
new file mode 100644
index 000000000..fb1859c75
--- /dev/null
+++ b/docs/contributing/code_of_conduct.rst
@@ -0,0 +1 @@
+.. include:: ../../CODE_OF_CONDUCT.rst
\ No newline at end of file
diff --git a/docs/contributing/index.rst b/docs/contributing/index.rst
index 7ff79cb32..78933a3ca 100644
--- a/docs/contributing/index.rst
+++ b/docs/contributing/index.rst
@@ -19,5 +19,4 @@ Index
:maxdepth: 2
code_of_conduct
- structure
porting
diff --git a/docs/contributing/porting.rst b/docs/contributing/porting.rst
index f81d98782..c3076354c 100644
--- a/docs/contributing/porting.rst
+++ b/docs/contributing/porting.rst
@@ -9,7 +9,7 @@ data transactions on different endpoints. Porting is the process of adding low-l
the rest of the common stack. Once the low-level is implemented, it is very easy to add USB support
for the microcontroller to other projects, especially those already using TinyUSB such as CircuitPython.
-Below are instructions on how to get the cdc_msc device example running on a new microcontroller. Doing so includes adding the common code necessary for other uses while minimizing other extra code. Whenever you see a phrase or word in <> it should be replaced.
+Below are instructions on how to get the cdc_msc device example running on a new microcontroller. Doing so includes adding the common code necessary for other uses while minimizing other extra code. Whenever you see a phrase or word in ``<>`` it should be replaced.
Register defs
-------------
@@ -18,25 +18,27 @@ The first step to adding support is including the register definitions and start
microcontroller in TinyUSB. We write the TinyUSB implementation against these structs instead of higher level functions to keep the code small and to prevent function name collisions in linking of larger projects. For ARM microcontrollers this is the CMSIS definitions. They should be
placed in the ``hw/mcu//`` directory.
-Once this is done, create a directory in ``hw/bsp/`` for the specific board you are using to test the code. (Duplicating an existing board's directory is the best way to get started.) The board should be a readily available development board so that others can also test.
+Once this is done, create a directory in ``hw/bsp/`` for the specific board you are using to test the code (duplicating an existing board's directory is the best way to get started). The board should be a readily available development board so that others can also test.
Build
-----
Now that those directories are in place, we can start our iteration process to get the example building successfully. To build, run from the root of TinyUSB:
-``make -C examples/device/cdc_msc BOARD=``
+.. code-block:: bash
-Unless, you've read ahead, this will fail miserably. Now, lets get it to fail less by updating the files in the board directory. The code in the board's directory is responsible for setting up the microcontroller's clocks and pins so that USB works. TinyUSB itself only operates on the USB peripheral. The board directory also includes information what files are needed to build the example.
+ make -C examples/device/cdc_msc BOARD=
-One of the first things to change is the ``-DCFG_TUSB_MCU`` cflag in the ``board.mk`` file. This is used to tell TinyUSB what platform is being built. So, add an entry to ``src/tusb_option.h`` and update the CFLAG to match.
+Unless you've read ahead, this will fail miserably. Now, lets get it to fail less by updating the files in the board directory. The code in the board's directory is responsible for setting up the microcontroller's clocks and pins so that USB works. TinyUSB itself only operates on the USB peripheral. The board directory also includes information what files are needed to build the example.
-Update ``board.mk``\ 's VENDOR and CHIP_FAMILY values when creating the directory for the struct files. Duplicate one of the other sources from ``src/portable`` into ``src/portable//`` and delete all of the implementation internals. We'll cover what everything there does later. For now, get it compiling.
+One of the first things to change is the ``-DCFG_TUSB_MCU`` C flag in the ``board.mk`` file. This is used to tell TinyUSB what platform is being built. So, add an entry to ``src/tusb_option.h`` and update the ``CFLAGS`` to match.
+
+Update ``board.mk``'s VENDOR and CHIP_FAMILY values when creating the directory for the struct files. Duplicate one of the other sources from ``src/portable`` into ``src/portable//`` and delete all of the implementation internals. We'll cover what everything there does later. For now, get it compiling.
Implementation
--------------
-At this point you should get an error due to an implementation issue and hopefully the build is setup for the new MCU. You will still need to modify the ``board.mk`` to include specific CFLAGS, the linker script, linker flags, source files, include directories. All file paths are relative to the top of the TinyUSB repo.
+At this point you should get an error due to an implementation issue and hopefully the build is setup for the new MCU. You will still need to modify the ``board.mk`` to include specific ``CFLAGS``, the linker script, linker flags, source files, include directories. All file paths are relative to the top of the TinyUSB repo.
Board Support (BSP)
^^^^^^^^^^^^^^^^^^^
@@ -45,17 +47,17 @@ The board support code is only used for self-contained examples and testing. It
It is located in ``hw/bsp//board_.c``.
-board_init
-~~~~~~~~~~
+``board_init()``
+~~~~~~~~~~~~~~~~
-``board_init`` is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED pins.
+``board_init()`` is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED pins.
One useful clock debugging technique is to set up a PWM output at a known value such as 500hz based on the USB clock so that you can verify it is correct with a logic probe or oscilloscope.
Setup your USB in a crystal-less mode when available. That makes the code easier to port across boards.
-board_led_write
-~~~~~~~~~~~~~~~
+``board_led_write()``
+~~~~~~~~~~~~~~~~~~~~~
Feel free to skip this until you want to verify your demo code is running. To implement, set the pin corresponding to the led to output a value that lights the LED when ``state`` is true.
@@ -64,48 +66,48 @@ OS Abstraction Layer (OSAL)
The OS Abstraction Layer is responsible for providing basic data structures for TinyUSB that may allow for concurrency when used with an RTOS. Without an RTOS it simply handles concurrency issues between the main code and interrupts. The code is almost entirely agnostic of MCU and lives in ``src/osal``.
-In RTOS configurations, tud_task()/tuh_task() blocks behind a synchronization structure when the event queue is empty, so that the scheduler may give the CPU to a different task. To take advantage of the library's capability to yield the CPU when there are no actionable USB device events, ensure that the `CFG_TUSB_OS` symbol is defined, e.g `OPT_OS_FREERTOS` enables the FreeRTOS scheduler to schedule other threads than that which calls `tud_task()/tuh_task()`.
+In RTOS configurations, ``tud_task()``/``tuh_task()`` blocks behind a synchronization structure when the event queue is empty, so that the scheduler may give the CPU to a different task. To take advantage of the library's capability to yield the CPU when there are no actionable USB device events, ensure that the ``CFG_TUSB_OS`` symbol is defined, e.g ``OPT_OS_FREERTOS`` enables the FreeRTOS scheduler to schedule other threads than that which calls ``tud_task()``/``tuh_task()``.
Device API
^^^^^^^^^^
-After the USB device is setup, the USB device code works by processing events on the main thread (by calling ``tud_task``\ ). These events are queued by the USB interrupt handler. So, there are three parts to the device low-level API: device setup, endpoint setup and interrupt processing.
+After the USB device is setup, the USB device code works by processing events on the main thread (by calling ``tud_task()``). These events are queued by the USB interrupt handler. So, there are three parts to the device low-level API: device setup, endpoint setup and interrupt processing.
All of the code for the low-level device API is in ``src/portable///dcd_.c``.
Device Setup
~~~~~~~~~~~~
-dcd_init
-""""""""
+``dcd_init()``
+""""""""""""""
Initializes the USB peripheral for device mode and enables it.
This function should enable internal D+/D- pull-up for enumeration.
-dcd_int_enable / dcd_int_disable
-""""""""""""""""""""""""""""""""
+``dcd_int_enable()`` / ``dcd_int_disable()``
+""""""""""""""""""""""""""""""""""""""""""""
Enables or disables the USB device interrupt(s). May be used to prevent concurrency issues when mutating data structures shared between main code and the interrupt handler.
-dcd_int_handler
-"""""""""""""""
+``dcd_int_handler()``
+"""""""""""""""""""""
Processes all the hardware generated events e.g Bus reset, new data packet from host etc ... It will be called by application in the MCU USB interrupt handler.
-dcd_set_address
-"""""""""""""""
+``dcd_set_address()``
+"""""""""""""""""""""
Called when the device is given a new bus address.
If your peripheral automatically changes address during enumeration (like the nrf52) you may leave this empty and also no queue an event for the corresponding SETUP packet.
-dcd_remote_wakeup
-"""""""""""""""""
+``dcd_remote_wakeup()``
+"""""""""""""""""""""""
Called to remote wake up host when suspended (e.g hid keyboard)
-dcd_connect / dcd_disconnect
-""""""""""""""""""""""""""""
+``dcd_connect()`` / ``dcd_disconnect()``
+""""""""""""""""""""""""""""""""""""""""
Connect or disconnect the data-line pull-up resistor. Define only if MCU has an internal pull-up. (BSP may define for MCU without internal pull-up.)
@@ -114,8 +116,8 @@ Special events
You must let TinyUSB know when certain events occur so that it can continue its work. There are a few methods you can call to queue events for TinyUSB to process.
-dcd_event_bus_signal
-""""""""""""""""""""
+``dcd_event_bus_signal()``
+""""""""""""""""""""""""""
There are a number of events that your peripheral may communicate about the state of the bus. Here is an overview of what they are. Events in **BOLD** must be provided for TinyUSB to work.
@@ -125,51 +127,51 @@ There are a number of events that your peripheral may communicate about the stat
Calls to this look like:
-.. code-block::
+.. code-block:: c
dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true);
-The first ``0`` is the USB peripheral number. Statically saying 0 is common for single USB device MCUs.
+The first ``0`` is the USB peripheral number. Statically saying ``0`` is common for single USB device MCUs.
The ``true`` indicates the call is from an interrupt handler and will always be the case when porting in this way.
-dcd_setup_received
-""""""""""""""""""
+``dcd_setup_received()``
+""""""""""""""""""""""""
SETUP packets are a special type of transaction that can occur at any time on the control endpoint, numbered ``0``. Since they are unique, most peripherals have special handling for them. Their data is always 8 bytes in length as well.
Calls to this look like:
-.. code-block::
+.. code-block:: c
dcd_event_setup_received(0, setup, true);
-As before with ``dcd_event_bus_signal`` the first argument is the USB peripheral number and the third is true to signal its being called from an interrupt handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue.
+As before with ``dcd_event_bus_signal()`` the first argument is the USB peripheral number and the third is true to signal its being called from an interrupt handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue.
Endpoints
~~~~~~~~~
Endpoints are the core of the USB data transfer process. They come in a few forms such as control, isochronous, bulk, and interrupt. We won't cover the details here except with some caveats in open below. In general, data is transferred by setting up a buffer of a given length to be transferred on a given endpoint address and then waiting for an interrupt to signal that the transfer is finished. Further details below.
-Endpoints within USB have an address which encodes both the number and direction of an endpoint. TinyUSB provides ``tu_edpt_number`` and ``tu_edpt_dir`` to unpack this data from the address. Here is a snippet that does it.
+Endpoints within USB have an address which encodes both the number and direction of an endpoint. TinyUSB provides ``tu_edpt_number()`` and ``tu_edpt_dir()`` to unpack this data from the address. Here is a snippet that does it.
-.. code-block::
+.. code-block:: c
uint8_t epnum = tu_edpt_number(ep_addr);
uint8_t dir = tu_edpt_dir(ep_addr);
-dcd_edpt_open
-"""""""""""""
+``dcd_edpt_open()``
+"""""""""""""""""""
Opening an endpoint is done for all non-control endpoints once the host picks a configuration that the device should use. At this point, the endpoint should be enabled in the peripheral and configured to match the endpoint descriptor. Pay special attention to the direction of the endpoint you can get from the helper methods above. It will likely change what registers you are setting.
Also make sure to enable endpoint specific interrupts.
-dcd_edpt_close
-""""""""""""""
+``dcd_edpt_close()``
+""""""""""""""""""""
Close an endpoint. his function is used for implementing alternate settings.
@@ -177,10 +179,10 @@ After calling this, the device should not respond to any packets directed toward
Implementation is optional. Must be called from the USB task. Interrupts could be disabled or enabled during the call.
-dcd_edpt_xfer
-"""""""""""""
+``dcd_edpt_xfer()``
+"""""""""""""""""""
-``dcd_edpt_xfer`` is responsible for configuring the peripheral to send or receive data from the host. "xfer" is short for "transfer". **This is one of the core methods you must implement for TinyUSB to work (one other is the interrupt handler).** Data from the host is the OUT direction and data to the host is IN. It is used for all endpoints including the control endpoint 0. Make sure to handle the zero-length packet STATUS packet on endpoint 0 correctly. It may be a special transaction to the peripheral.
+``dcd_edpt_xfer()`` is responsible for configuring the peripheral to send or receive data from the host. "xfer" is short for "transfer". **This is one of the core methods you must implement for TinyUSB to work (one other is the interrupt handler).** Data from the host is the OUT direction and data to the host is IN. It is used for all endpoints including the control endpoint 0. Make sure to handle the zero-length packet STATUS packet on endpoint 0 correctly. It may be a special transaction to the peripheral.
Besides that, all other transactions are relatively straight-forward. The endpoint address provides the endpoint
number and direction which usually determines where to write the buffer info. The buffer and its length are usually
@@ -195,21 +197,21 @@ Others (like the nRF52) may need each USB packet queued individually. To make th
some state for yourself and queue up an intermediate USB packet from the interrupt handler.
Once the transaction is going, the interrupt handler will notify TinyUSB of transfer completion.
-During transmission, the IN data buffer is guaranteed to remain unchanged in memory until the ``dcd_xfer_complete`` function is called.
+During transmission, the IN data buffer is guaranteed to remain unchanged in memory until the ``dcd_xfer_complete()`` function is called.
-The dcd_edpt_xfer function must never add zero-length-packets (ZLP) on its own to a transfer. If a ZLP is required,
-then it must be explicitly sent by the stack calling dcd_edpt_xfer(), by calling dcd_edpt_xfer() a second time with len=0.
+The ``dcd_edpt_xfer()`` function must never add zero-length-packets (ZLP) on its own to a transfer. If a ZLP is required,
+then it must be explicitly sent by the stack calling ``dcd_edpt_xfer()``, by calling ``dcd_edpt_xfer()`` a second time with len=0.
For control transfers, this is automatically done in ``usbd_control.c``.
-At the moment, only a single buffer can be transmitted at once. There is no provision for double-buffering. new dcd_edpt_xfer() will not
-be called again on the same endpoint address until the driver calls dcd_xfer_complete() (except in cases of USB resets).
+At the moment, only a single buffer can be transmitted at once. There is no provision for double-buffering. new ``dcd_edpt_xfer()`` will not
+be called again on the same endpoint address until the driver calls ``dcd_xfer_complete()`` (except in cases of USB resets).
-dcd_xfer_complete
-"""""""""""""""""
+``dcd_xfer_complete()``
+"""""""""""""""""""""""
-Once a transfer completes you must call dcd_xfer_complete from the USB interrupt handler to let TinyUSB know that a transaction has completed. Here is a sample call:
+Once a transfer completes you must call ``dcd_xfer_complete()`` from the USB interrupt handler to let TinyUSB know that a transaction has completed. Here is a sample call:
-.. code-block::
+.. code-block:: c
dcd_event_xfer_complete(0, ep_addr, xfer->actual_len, XFER_RESULT_SUCCESS, true);
@@ -219,23 +221,23 @@ The arguments are:
* the USB peripheral number
* the endpoint address
-* the actual length of the transfer. (OUT transfers may be smaller than the buffer given in ``dcd_edpt_xfer``\ )
+* the actual length of the transfer. (OUT transfers may be smaller than the buffer given in ``dcd_edpt_xfer()``)
* the result of the transfer. Failure isn't handled yet.
* ``true`` to note the call is from an interrupt handler.
-dcd_edpt_stall / dcd_edpt_clear_stall
-"""""""""""""""""""""""""""""""""""""
+``dcd_edpt_stall()`` / ``dcd_edpt_clear_stall()``
+"""""""""""""""""""""""""""""""""""""""""""""""""
-Stalling is one way an endpoint can indicate failure such as when an unsupported command is transmitted. The pair of ``dcd_edpt_stall``\ , ``dcd_edpt_clear_stall`` help manage the stall state of all endpoints.
+Stalling is one way an endpoint can indicate failure such as when an unsupported command is transmitted. The pair of ``dcd_edpt_stall()``, ``dcd_edpt_clear_stall()`` help manage the stall state of all endpoints.
Woohoo!
-------
-At this point you should have everything working! ;-) Of course, you may not write perfect code. Here are some tips and tricks for debugging.
+At this point you should have everything working! 🙂 Of course, you may not write perfect code. Here are some tips and tricks for debugging.
Use `WireShark `_ or `a Beagle `_ to sniff the USB traffic. When things aren't working its likely very early in the USB enumeration process. Figuring out where can help clue in where the issue is. For example:
* If the host sends a SETUP packet and its not ACKed then your USB peripheral probably isn't started correctly.
-* If the peripheral is started correctly but it still didn't work, then verify your usb clock is correct. (You did output a PWM based on it right? ;-) )
-* If the SETUP packet is ACKed but nothing is sent back then you interrupt handler isn't queueing the setup packet correctly. (Also, if you are using your own code instead of an example ``tud_task`` may not be called.) If that's OK, the ``dcd_xfer_complete`` may not be setting up the next transaction correctly.
+* If the peripheral is started correctly but it still didn't work, then verify your usb clock is correct. (You did output a PWM based on it right? 🙂)
+* If the SETUP packet is ACKed but nothing is sent back then you interrupt handler isn't queueing the setup packet correctly. (Also, if you are using your own code instead of an example ``tud_task()`` may not be called.) If that's OK, the ``dcd_xfer_complete()`` may not be setting up the next transaction correctly.
diff --git a/docs/contributing/structure.rst b/docs/contributing/structure.rst
deleted file mode 100644
index e8c658850..000000000
--- a/docs/contributing/structure.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-*********
-Structure
-*********
-
-Tree
-====
-
-::
-
- .
- ├── docs
- ├── examples
- ├── hw
- │ ├── bsp
- │ └── mcu
- ├── lib
- ├── src
- ├── test
- └── tools
-
-docs
-----
-
-Documentation
-
-examples
---------
-
-Sample with Makefile build support
-
-hw/bsp
-------
-
-Supported boards source files
-
-hw/mcu
-------
-
-Low level mcu core & peripheral drivers
-
-lib
----
-
-Sources from 3rd party such as freeRTOS, fatfs ...
-
-src
----
-
-All sources files for TinyUSB stack itself.
-
-test
-----
-
-Unit tests for the stack
-
-tools
------
-
-Files used internally
diff --git a/docs/index.rst b/docs/index.rst
index 2a032c51e..c1c8e4d99 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,12 +1,6 @@
:hide-toc:
-*********
-TinyUSB
-*********
-
-TinyUSB is an open-source cross-platform USB Host/Device stack for embedded systems,
-designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events being deferred and then handled in the non-ISR task function.
-
+.. include:: ../README_processed.rst
.. toctree::
:caption: Index
diff --git a/docs/info/changelog.rst b/docs/info/changelog.rst
index d11e1134a..6024bb9e3 100644
--- a/docs/info/changelog.rst
+++ b/docs/info/changelog.rst
@@ -2,6 +2,59 @@
Changelog
*********
+0.18.0
+======
+
+General
+-------
+
+- New MCUs:
+
+ - Add esp32p4 OTG highspeed support
+ - Add stm32 u0, c0, h7rs
+
+- Better support dcache, make sure all usb-transferred buffer are cache line aligned and occupy full cache line
+- Build ARM IAR with CircleCI
+- Improve HIL with `dual/host_info_to_device_cdc`` optional for pico/pico2, enable dwc2 dma test
+
+API Changes
+-----------
+
+- Change signature of ``tusb_init(rhport, tusb_rhport_init_t*)``, ``tusb_init(void)`` is now deprecated but still available for backward compatibility
+- Add new ``tusb_int_handler(rhport, in_isr)``
+- Add time-related APIs: ``tusb_time_millis_api()`` and ``tusb_time_delay_ms_api()`` for non-RTOS, required for some ports/configuration
+- New configuration macros:
+
+ - ``CFG_TUD/TUH_MEM_DCACHE_ENABLE`` enable data cache sync for endpoint buffer
+ - ``CFG_TUD/TUH_MEM_DCACHE_LINE_SIZE`` set cache line size
+ - ``CFG_TUD/TUH_DWC2_SLAVE_ENABLE`` enable dwc2 slave mode
+ - ``CFG_TUD/TUH_DWC2_DMA_ENABLE`` enable dwc2 dma mode
+
+Controller Driver (DCD & HCD)
+-----------------------------
+
+- DWC2
+ - Add DMA support for both device and host controller
+ - Add host driver support including: full/high speed, control/bulk/interrupt (CBI) transfer, split CBI i.e FS/LS attached via highspeed hub, hub support
+
+- RP2: implement ``dcd_edpt_iso_alloc()`` and ``dcd_edpt_iso_activate()`` for isochronous endpoint
+- iMXRT1170 support M4 core
+
+Device Stack
+------------
+
+- Vendor Fix class reset
+- NCM fix recursions in ``tud_network_recv_renew()``
+- Audio fix align issue of ``_audiod_fct.alt_setting``
+- UVC support format frame based
+- Change ``dcd_dcache_()`` return type from void to bool
+- HID add Usage Table for Physical Input Device Page (0x0F)
+
+Host Stack
+----------
+
+- Fix an duplicated attach issue which cause USBH Defer Attach until current enumeration complete message
+
0.17.0
======
@@ -36,20 +89,20 @@ Controller Driver (DCD & HCD)
- Add support for ch32 usbd e.g ch32v203
- Add support for STM32G4 and STM32U5 microcontrollers.
- Fix h5 (32-bit) errata 2.15.1: Buffer description table update completes after CTR interrupt triggers
- - ISO EP buffer allocation improvements, implement dcd_edpt_close_all()
+ - ISO EP buffer allocation improvements, implement ``dcd_edpt_close_all()``
- Fix ch32v203 race condition and stability issue with
- fix ch32v203 seems to unconditionally accept ZLP on EP0 OUT.
- fix v203 race condition between rx bufsize and RX_STAT which cause PMAOVR, occurs with WRITE10
- - correctly handle setup prepare at dcd_edpt0_status_complete(), which fixes the race condition with windows where we could miss setup packet (setup bit set, but count = 0)
+ - correctly handle setup prepare at ``dcd_edpt0_status_complete()``, which fixes the race condition with windows where we could miss setup packet (setup bit set, but count = 0)
- MAX3421E
- Add support for rp2040, esp32 (c3, c6, h2, etc..)
- - Add hcd_deinit() for max3421
+ - Add ``hcd_deinit()`` for max3421
- Retry NAK handling next frame to reduce CPU and SPI bus usage
- - add cpuctl and pinctl to tuh_configure() option for max3421
+ - add ``cpuctl`` and ``pinctl`` to ``tuh_configure()`` option for max3421
- Implement hcd abort transfer for Max3421
- Properly Handle NAK Response in MAX3421E driver: correctly switch and skip writing to 2 FIFOs when NAK received. Otherwise, the driver may hang in certain conditions.
@@ -61,7 +114,7 @@ Controller Driver (DCD & HCD)
- nRF
- - Fix dcd_edpt_open for iso endpoint
+ - Fix ``dcd_edpt_open()`` for iso endpoint
- Handle ISOOUT CRC errors
- Add compile support with old nordic sdk
- Fix a few race conditions
@@ -88,7 +141,7 @@ Controller Driver (DCD & HCD)
Device Stack
------------
-- Add tud_deinit() and class driver deinit() to deinitialize TinyUSB device stack.
+- Add ``tud_deinit()`` and ``class driver deinit()`` to deinitialize TinyUSB device stack.
- Add support for generic SOF callback.
- Add set address recovery time 2ms per USB spec.
@@ -104,7 +157,7 @@ Device Stack
- CDC
- - Add tud_cdc_configure_fifo() to make RX/TX buffer persistent (not clear when disconnected)
+ - Add ``tud_cdc_configure_fifo()`` to make RX/TX buffer persistent (not clear when disconnected)
- Add missing capability bit for CDC ACM serial break support
- Enhanced CDC class with better handling of large data transmissions.
- Add missing capability bit for CDC ACM serial break support
@@ -122,39 +175,39 @@ Device Stack
- Net
- Rewrite of NCM device driver to improve throughput
- - removed obsolete tud_network_link_state_cb()
+ - removed obsolete ``tud_network_link_state_cb()``
- USBTMC Added notification support
- Vendor
- Migrate to new endpoint stream API, support non-buffered TX/RX
- - Add ZLP for write() when needed
+ - Add ZLP for ``write()`` when needed
- Video
- Enhance UVC descriptors and example
- Video Added support for USB Video Class (UVC) with MJPEG.
- Fix multiple interfaces, add an example of 2ch video capture.
- - Fix race for tud_video_n_streaming check
+ - Fix race for ``tud_video_n_streaming()`` check
Host Stack
----------
-- Added tuh_deinit() to de-initialize TinyUSB host stack.
+- Added ``tuh_deinit()`` to de-initialize TinyUSB host stack.
- Added support for new USB mass storage class APIs.
- Improved error handling and retry mechanisms for unstable devices.
- CDC Serial
- Add support for ch34x
- - Allow to overwrite CFG_TUH_CDC_FTDI/CP210X/CH32X_VID_PID_LIST
+ - Allow to overwrite ``CFG_TUH_CDC_FTDI/CP210X/CH32X_VID_PID_LIST``
- Enhanced stability of CDC-ACM devices during enumeration.
- HID
- - Add tuh_hid_receive_abort()
- - Add tuh_hid_get_report()
+ - Add ``tuh_hid_receive_abort()``
+ - Add ``tuh_hid_get_report()``
- Hub
@@ -171,14 +224,14 @@ Host Stack
- Remove submodules and use python script to manage repo dependencies #1947
- Add CMake support for most families and boards, move build file from tools/ to examples/build_system
- Add ETM trace support with JTrace for nrf52840, nrf5340, mcb1857, stm32h743eval, ra6m5
-- [osal] Make it possible to override the osal_task_delay() in osal_none
+- [osal] Make it possible to override the ``osal_task_delay()`` in osal_none
- Add CDC+UAC2 composite device example
- Enhance Hardware-in-the-loop (HIL) testing with more boards: rp2040, stm32l412nucleo, stm32f746disco, lpcxpresso43s67
Controller Driver (DCD & HCD)
-----------------------------
-- Add new ISO endpoint API: dcd_edpt_iso_alloc() and dcd_edpt_iso_activate()
+- Add new ISO endpoint API: ``dcd_edpt_iso_alloc()`` and ``dcd_edpt_iso_activate()``
- Remove legacy driver st/synopsys
- EHCI
@@ -191,10 +244,10 @@ Controller Driver (DCD & HCD)
- Fix error on EHCI causes xfer error in non-queued qhd which cause memory fault
- Un-roll recursive hub removal with usbh queue
- Fix issue when removing queue head
- - Implement hcd_edpt_abort_xfer()
+ - Implement ``hcd_edpt_abort_xfer()``
- use standard USB complete interrupt instead of custom chipidea async/period interrupt to be more compatible with other ehci implementation
- refactor usb complete & error isr processing, merge, update. Fix EHCI QHD reuses QTD on wrong endpoint
- - Improve bus reset, fix send_setup() not carried out if halted previously
+ - Improve bus reset, fix ``send_setup()`` not carried out if halted previously
- Fix clear qhd halted bit if not caused by STALL protocol to allow for next transfer
- ChipIdea Highspeed
@@ -220,12 +273,12 @@ Controller Driver (DCD & HCD)
- rp2040
- [dcd] Make writes to SIE_CTRL aware of concurrent access
- - [hcd] add hcd_frame_number(), hcd_edpt_abort_xfer() for pio-usb host
+ - [hcd] add ``hcd_frame_number()``, ``hcd_edpt_abort_xfer()`` for pio-usb host
- stm32 fsdev:
- Add STM32L5 support
- - Implement dcd_edpt_iso_alloc() and dcd_edpt_iso_activate()
+ - Implement ``dcd_edpt_iso_alloc()`` and ``dcd_edpt_iso_activate()``
- OHCI
@@ -239,7 +292,7 @@ Controller Driver (DCD & HCD)
Device Stack
------------
-- Add optional hooks tud_event_hook_cb()
+- Add optional hooks ``tud_event_hook_cb()``
- Audio (UAC2)
- Fix feedback EP buffer alignment.
@@ -257,12 +310,12 @@ Device Stack
- MIDI
- - Fix stream_write() always writes system messages to cable 0
+ - Fix ``stream_write()`` always writes system messages to cable 0
- Fix incorrect NOTE_ON, NOTE_OFF definitions
- USBTMC: Fix tmc488 bit order
-- Vendor: fix read()/write() race condition
+- Vendor: fix ``read()``/``write()`` race condition
- Video (UVC)
@@ -273,26 +326,26 @@ Host Stack
- USBH
- - Add new APIs: tuh_interface_set(), tuh_task_event_ready(), tuh_edpt_abort_xfer(), tuh_rhport_reset_bus(), tuh_rhport_is_active()
+ - Add new APIs: ``tuh_interface_set()``, ``tuh_task_event_ready()``, ``tuh_edpt_abort_xfer()``, ``tuh_rhport_reset_bus()``, ``tuh_rhport_is_active()``
- Fix issue when device generate multiple attach/detach/attach when plugging in
- Prefer application callback over built-in driver on transfer complete event
- - Correct hcd_edpt_clear_stall() API signature
+ - Correct ``hcd_edpt_clear_stall()`` API signature
- Separate bus reset delay and contact debouncing delay in enumeration
- - Support usbh_app_driver_get_cb() for application drivers
+ - Support ``usbh_app_driver_get_cb()`` for application drivers
- Fix usbh enumeration removal race condition
- - Add optional hooks tuh_event_hook_cb()
+ - Add optional hooks ``tuh_event_hook_cb()``
- CDC
- - Breaking: change tuh_cdc_itf_get_info() to use tuh_itf_info_t instead of tuh_cdc_info_t
+ - Breaking: change ``tuh_cdc_itf_get_info()`` to use tuh_itf_info_t instead of tuh_cdc_info_t
- Fix cdc host enumeration issue when device does not support line request
- Add support for vendor usb2uart serial: ftdi, cp210x, ch9102f
- - Improve sync control API e.g tuh_cdc_set_control_line_state(), tuh_cdc_set_line_coding()
+ - Improve sync control API e.g ``tuh_cdc_set_control_line_state()``, ``tuh_cdc_set_line_coding()``
- HID
- - Add new APIs tuh_hid_send_report(), tuh_hid_itf_get_info(), tuh_hid_receive_ready(), tuh_hid_send_ready(), tuh_hid_set_default_protocol()
- - Change meaning of CFG_TUH_HID to total number of HID interfaces supported. Previously CFG_TUH_HID is max number of interfaces per device which is rather limited and consume more resources than needed.
+ - Add new APIs ``tuh_hid_send_report()``, ``tuh_hid_itf_get_info()``, ``tuh_hid_receive_ready()``, ``tuh_hid_send_ready()``, ``tuh_hid_set_default_protocol()``
+ - Change meaning of CFG_TUH_HID to total number of HID interfaces supported. Previously ``CFG_TUH_HID`` is max number of interfaces per device which is rather limited and consume more resources than needed.
- HUB
@@ -301,7 +354,7 @@ Host Stack
- MSC
- - Fix bug in tuh_msc_ready()
+ - Fix bug in ``tuh_msc_ready()``
- Fix host msc get maxlun not using aligned section memory
0.15.0
@@ -332,7 +385,7 @@ Controller Driver (DCD & HCD)
- [rp2040]
- [dcd] Implement workaround for Errata 15. This enable SOF when bulk-in endpoint is in use and reduce its bandwidth to only 80%
- - [hcd] Fix shared irq slots filling up when hcd_init() is called multiple times
+ - [hcd] Fix shared irq slots filling up when ``hcd_init()`` is called multiple times
- [hcd] Support host bulk endpoint using hw "interrupt" endpoint. Note speed limit is 64KB/s
- [samd][dcd] Add support for ISO endpoint
@@ -357,12 +410,12 @@ Device Stack
- [HID]
- Add FIDO descriptor template
- - change length in tud_hid_report_complete_cb() from uint8 to uint16
+ - change length in ``tud_hid_report_complete_cb()`` from ``uint8_t`` to ``uint16_t``
- [CDC]
- Fix autoflush for FIFO < MPS
- - Fix tx fifo memory overflown when DTR is not set and tud_cdc_write() is called repeatedly with large enough data
+ - Fix tx fifo memory overflown when DTR is not set and ``tud_cdc_write()`` is called repeatedly with large enough data
- [USBTMC] Fix packet size with highspeed
@@ -370,7 +423,7 @@ Host Stack
----------
- Retry a few times with transfers in enumeration since device can be unstable when starting up
-- [MSC] Rework host masstorage API. Add new **host/msc_file_explorer** example
+- [MSC] Rework host masstorage API. Add new ``host/msc_file_explorer`` example
- [CDC]
- Add support for host cdc
@@ -380,22 +433,22 @@ Host Stack
======
- Improve compiler support for CCRX and IAR
-- Add timeout to osal_queue_receive()
-- Add tud_task_ext(timeout, in_isr) as generic version of tud_task(). Same as tuh_task_ext(), tuh_task()
-- Enable more warnings -Wnull-dereference -Wuninitialized -Wunused -Wredundant-decls -Wconversion
+- Add timeout to ``osal_queue_receive()``
+- Add ``tud_task_ext(timeout, in_isr)`` as generic version of ``tud_task()``. Same as ``tuh_task_ext()``, ``tuh_task()``
+- Enable more warnings ``-Wnull-dereference -Wuninitialized -Wunused -Wredundant-decls -Wconversion``
- Add new examples
- - host/bare_api to demonstrate generic (app-level) enumeration and endpoint transfer
- - dual/host_hid_to_device_cdc to run both device and host stack concurrently, get HID report from host and print out to device CDC. This example only work with multiple-controller MCUs and rp2040 with the help of pio-usb as added controller.
+ - ``host/bare_api`` to demonstrate generic (app-level) enumeration and endpoint transfer
+ - ``dual/host_hid_to_device_cdc`` to run both device and host stack concurrently, get HID report from host and print out to device CDC. This example only work with multiple-controller MCUs and rp2040 with the help of pio-usb as added controller.
Controller Driver (DCD & HCD)
-----------------------------
- Enhance rhports management to better support dual roles
- - CFG_TUD_ENABLED/CFG_TUH_ENABLED, CFG_TUD_MAX_SPEED/CFG_TUH_MAX_SPEED can be used to replace CFG_TUSB_RHPORT0_MODE/CFG_TUSB_RHPORT1_MODE
- - tud_init(rphort), tuh_init(rhport) can be used to init stack on specified roothub port (controller) instead of tusb_init(void)
-- Add dcd/hcd port specific defines `TUP_` (stand for tinyusb port-specific)
+ - ``CFG_TUD_ENABLED``/``CFG_TUH_ENABLED``, ``CFG_TUD_MAX_SPEED``/``CFG_TUH_MAX_SPEED`` can be used to replace ``CFG_TUSB_RHPORT0_MODE``/``CFG_TUSB_RHPORT1_MODE``
+ - ``tud_init(rphort)``, ``tuh_init(rhport)`` can be used to init stack on specified roothub port (controller) instead of ``tusb_init(void)``
+- Add dcd/hcd port specific defines ``TUP_`` (stand for tinyusb port-specific)
- [dwc2]
- Update to support stm32 h72x, h73x with only 1 otg controller
@@ -416,10 +469,10 @@ Device Stack
- [Audio] Add support for feedback endpoint computation
- - New API tud_audio_feedback_params_cb(), tud_audio_feedback_interval_isr().
+ - New API ``tud_audio_feedback_params_cb()``, ``tud_audio_feedback_interval_isr()``.
- Supported computation method are: frequency with fixed/float or power of 2. Feedback with fifo count is not yet supported.
- - Fix nitfs (should be 3) in TUD_AUDIO_HEADSET_STEREO_DESCRIPTOR
- - Fix typo in audiod_rx_done_cb()
+ - Fix nitfs (should be 3) in ``TUD_AUDIO_HEADSET_STEREO_DESCRIPTOR``
+ - Fix typo in ``audiod_rx_done_cb()``
- [DFU] Fix coexistence with other interfaces BTH, RNDIS
- [MSC] Fix inquiry response additional length field
@@ -428,23 +481,23 @@ Device Stack
Host Stack
----------
-- Add new API tuh_configure(rhport, cfg_id, cfg_param) for dynamnic port specific behavior configuration
+- Add new API ``tuh_configure(rhport, cfg_id, cfg_param)`` for dynamnic port specific behavior configuration
- [HID] Open OUT endpoint if available
- [Hub] hub clear port and device interrupts
- [USBH] Major improvement
- - Rework usbh control transfer with complete callback. New API tuh_control_xfer() though still only carry 1 usbh (no queueing) at a time.
- - Add generic endpoint transfer with tuh_edpt_open(), tuh_edpt_xfer(). Require `CFG_TUH_API_EDPT_XFER=1`
+ - Rework usbh control transfer with complete callback. New API ``tuh_control_xfer()`` though still only carry 1 usbh (no queueing) at a time.
+ - Add generic endpoint transfer with ``tuh_edpt_open()``, ``tuh_edpt_xfer()``. Require ``CFG_TUH_API_EDPT_XFER=1``
- Support app-level enumeration with new APIs
- - tuh_descriptor_get(), tuh_descriptor_get_device(), tuh_descriptor_get_configuration(), tuh_descriptor_get_hid_report()
- - tuh_descriptor_get_string(), tuh_descriptor_get_manufacturer_string(), tuh_descriptor_get_product_string(), tuh_descriptor_get_serial_string()
- - Also add _sync() as sync/blocking version for above APIs
+ - ``tuh_descriptor_get()``, ``tuh_descriptor_get_device()``, ``tuh_descriptor_get_configuration()``, ``tuh_descriptor_get_hid_report()``
+ - ``tuh_descriptor_get_string()``, ``tuh_descriptor_get_manufacturer_string()``, ``tuh_descriptor_get_product_string()``, ``tuh_descriptor_get_serial_string()``
+ - Also add ``_sync()`` as sync/blocking version for above APIs
0.13.0
======
-- [tu_fifo] Fix locked mutex when full, and return type in peek_n()
+- [tu_fifo] Fix locked mutex when full, and return type in ``peek_n()``
Controller Driver (DCD & HCD)
-----------------------------
@@ -473,7 +526,7 @@ Device Stack
------------
- [Audio] Support disabling feedback format correction (16.16 <-> 10.14 format)
-- [MSC] Add tud_msc_request_sense_cb() callback, change most default sense error to medium not present (0x02, 0x3A, 0x00)
+- [MSC] Add ``tud_msc_request_sense_cb()`` callback, change most default sense error to medium not present (0x02, 0x3A, 0x00)
- [Video] Fix video_capture example fails enumeration when 8FPS
Host Stack
@@ -484,22 +537,22 @@ No notable changes
0.12.0
======
-- add CFG_TUSB_OS_INC_PATH for os include path
+- add ``CFG_TUSB_OS_INC_PATH`` for os include path
Device Controller Driver (DCD)
------------------------------
- Getting device stack to pass USB Compliance Verification test (chapter9, HID, MSC). Ports are tested:
nRF, SAMD 21/51, rp2040, stm32f4, Renesas RX, iMXRT, ESP32-S2/3, Kinetic KL25/32, DA146xx
-- Added dcd_edpt_close_all() for switching configuration
-- [Transdimension] Support dcd_edpt_xfer_fifo() with auto wrap over if fifo buffer is 4K aligned and size is multiple of 4K.
+- Added ``dcd_edpt_close_all()`` for switching configuration
+- [Transdimension] Support ``dcd_edpt_xfer_fifo()`` with auto wrap over if fifo buffer is 4K aligned and size is multiple of 4K.
- [DA146xx] Improve vbus, reset, suspend, resume detection, and remote wakeup.
Device Stack
------------
-- Add new network driver Network Control Model (CDC-NCM), update net_lwip_webserver to work with NCM (need re-configure example)
-- Add new USB Video Class UVC 1.5 driver and video_capture example ((work in progress)
+- Add new network driver Network Control Model (CDC-NCM), update ``net_lwip_webserver`` to work with NCM (need re-configure example)
+- Add new USB Video Class UVC 1.5 driver and video_capture example (work in progress)
- Fix potential buffer overflow for HID, bluetooth drivers
Host Controller Driver (HCD)
@@ -536,13 +589,13 @@ Synopsys
^^^^^^^^
- Fix Synopsys set address bug which could cause re-enumeration failed
-- Fix dcd_synopsys driver integer overflow in HS mode (issue #968)
+- Fix ``dcd_synopsys`` driver integer overflow in HS mode (issue #968)
nRF5x
^^^^^
- Add nRF5x suspend, resume and remote wakeup
-- Fix nRF5x race condition with TASKS_EP0RCVOUT
+- Fix nRF5x race condition with ``TASKS_EP0RCVOUT``
RP2040
^^^^^^
@@ -557,8 +610,8 @@ USBD
^^^^
- Better support big endian mcu
-- Add tuh_inited() and tud_inited(), will separate tusb_init/inited() to tud/tuh init/inited
-- Add dcd_attr.h for defining common controller attribute such as max endpoints
+- Add ``tuh_inited()`` and ``tud_inited()``, will separate ``tusb_init/inited()`` to ``tud/tuh_init/inited()``
+- Add ``dcd_attr.h`` for defining common controller attribute such as max endpoints
Bluetooth
^^^^^^^^^
@@ -568,8 +621,8 @@ Bluetooth
DFU
^^^
-- Enhance DFU implementation to support multiple alternate interface and better support bwPollTimeout
-- Rename CFG_TUD_DFU_MODE to simply CFG_TUD_DFU
+- Enhance DFU implementation to support multiple alternate interface and better support ``bwPollTimeout``
+- Rename ``CFG_TUD_DFU_MODE`` to simply ``CFG_TUD_DFU``
HID
^^^
@@ -594,7 +647,7 @@ Vendor
^^^^^^
- Fix vendor fifo deadlock in certain case
-- Add tud_vendor_n_read_flush
+- Add ``tud_vendor_n_read_flush()``
Host Controller Driver (HCD)
----------------------------
@@ -611,7 +664,7 @@ Host Stack
- Major update and rework most of host stack, still needs more improvement
- Lots of improvement and update in parsing configuration and control
- Rework and major update to HID driver. Will default to enable boot interface if available
-- Separate CFG_TUH_DEVICE_MAX and CFG_TUH_HUB for better management and reduce SRAM usage
+- Separate ``CFG_TUH_DEVICE_MAX`` and ``CFG_TUH_HUB`` for better management and reduce SRAM usage
0.10.1 (2021-06-03)
===================
@@ -623,9 +676,9 @@ Host Controller Driver (HCD)
- Fix rp2040 host driver: incorrect PID with low speed device with max packet size of 8 bytes
- Improve hub driver
-- Remove obsolete hcd_pipe_queue_xfer()/hcd_pipe_xfer()
-- Use hcd_frame_number() instead of micro frame
-- Fix OHCI endpoint address and xferred_bytes in xfer complete event
+- Remove obsolete ``hcd_pipe_queue_xfer()``/``hcd_pipe_xfer()``
+- Use ``hcd_frame_number()`` instead of micro frame
+- Fix OHCI endpoint address and ``xferred_bytes`` in xfer complete event
0.10.0 (2021-05-28)
===================
@@ -644,7 +697,7 @@ Device Controller Driver (DCD)
- Fix build with nRF5340
- Fix build with lpc15 and lpc54
- Fix build with lpc177x_8x
-- STM32 Synopsys: greatly improve Isochronous transfer with edpt_xfer_fifo API
+- STM32 Synopsys: greatly improve Isochronous transfer with ``edpt_xfer_fifo()`` API
- Support LPC55 port1 highspeed
- Add support for Espressif esp32s3
- nRF: fix race condition that could cause drop packet of Bulk OUT transfer
@@ -652,14 +705,14 @@ Device Controller Driver (DCD)
USB Device Driver (USBD)
------------------------
-- Add new (optional) endpoint ADPI usbd_edpt_xfer_fifo
+- Add new (optional) endpoint ADPI ``usbd_edpt_xfer_fifo()``
Device Class Driver
-------------------
CDC
-- [Breaking] tud_cdc_peek(), tud_vendor_peek() no longer support random offset and dropped position parameter.
+- [Breaking] ``tud_cdc_peek()``, ``tud_vendor_peek()`` no longer support random offset and dropped position parameter.
DFU
@@ -671,19 +724,19 @@ HID
- Add more hid keys constant from 0x6B to 0xA4
- [Breaking] rename API
- - HID_PROTOCOL_NONE/KEYBOARD/MOUST to HID_ITF_PROTOCOL_NONE/KEYBOARD/MOUSE
- - tud_hid_boot_mode() to tud_hid_get_protocol()
- - tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb()
+ - ``HID_PROTOCOL_NONE/KEYBOARD/MOUSE`` to ``HID_ITF_PROTOCOL_NONE/KEYBOARD/MOUSE``
+ - ``tud_hid_boot_mode()`` to ``tud_hid_get_protocol()``
+ - ``tud_hid_boot_mode_cb()`` to ``tud_hid_set_protocol_cb()``
MIDI
- Fix MIDI buffer overflow issue
- [Breaking] rename API
- - Rename tud_midi_read() to tud_midi_stream_read()
- - Rename tud_midi_write() to tud_midi_stream_write()
- - Rename tud_midi_receive() to tud_midi_packet_read()
- - Rename tud_midi_send() to tud_midi_packet_write()
+ - Rename ``tud_midi_read()`` to ``tud_midi_stream_read()``
+ - Rename ``tud_midi_write()`` to ``tud_midi_stream_write()``
+ - Rename ``tud_midi_receive()`` to ``tud_midi_packet_read()``
+ - Rename ``tud_midi_send()`` to ``tud_midi_packet_write()``
Host Controller Driver (HCD)
----------------------------
@@ -730,7 +783,7 @@ NXP Transdimention
USB Device Driver (USBD)
^^^^^^^^^^^^^^^^^^^^^^^^
-- Fix issue with status zlp (tud_control_status) is returned by class driver with SET/CLEAR_FEATURE for endpoint.
+- Fix issue with status zlp (``tud_control_status()``) is returned by class driver with SET/CLEAR_FEATURE for endpoint.
- Correct endpoint size check for fullspeed bulk, can be 8, 16, 32, 64
- Ack SET_INTERFACE even if it is not implemented by class driver.
@@ -739,34 +792,34 @@ Device Class Driver
DFU Runtime
-- rename dfu_rt to dfu_runtime for easy reading
+- rename ``dfu_rt()`` to ``dfu_runtime()`` for easy reading
CDC
-- Add tud_cdc_send_break_cb() to support break request
-- Improve CDC receive, minor behavior changes: when tud_cdc_rx_wanted_cb() is invoked wanted_char may not be the last byte in the fifo
+- Add ``tud_cdc_send_break_cb()`` to support break request
+- Improve CDC receive, minor behavior changes: when ``tud_cdc_rx_wanted_cb()`` is invoked wanted_char may not be the last byte in the fifo
HID
- [Breaking] Add itf argument to hid API to support multiple instances, follow API has signature changes
- - tud_hid_descriptor_report_cb()
- - tud_hid_get_report_cb()
- - tud_hid_set_report_cb()
- - tud_hid_boot_mode_cb()
- - tud_hid_set_idle_cb()
+ - ``tud_hid_descriptor_report_cb()``
+ - ``tud_hid_get_report_cb()``
+ - ``tud_hid_set_report_cb()``
+ - ``tud_hid_boot_mode_cb()``
+ - ``tud_hid_set_idle_cb()``
-- Add report complete callback tud_hid_report_complete_cb() API
+- Add report complete callback ``tud_hid_report_complete_cb()`` API
- Add DPad/Hat support for HID Gamepad
- - `TUD_HID_REPORT_DESC_GAMEPAD()` now support 16 buttons, 2 joysticks, 1 hat/dpad
- - Add hid_gamepad_report_t along with `GAMEPAD_BUTTON_` and `GAMEPAD_HAT_` enum
- - Add Gamepad to hid_composite / hid_composite_freertos example
+ - ``TUD_HID_REPORT_DESC_GAMEPAD()`` now support 16 buttons, 2 joysticks, 1 hat/dpad
+ - Add ``hid_gamepad_report_t`` along with ``GAMEPAD_BUTTON_`` and ``GAMEPAD_HAT_`` enum
+ - Add Gamepad to ``hid_composite`` / ``hid_composite_freertos`` example
MIDI
- Fix dropping MIDI sysex message when fifo is full
-- Fix typo in tud_midi_write24(), make example less ambiguous for cable and channel
+- Fix typo in ``tud_midi_write24()``, make example less ambiguous for cable and channel
- Fix incorrect endpoint descriptor length, MIDI v1 use Audio v1 which has 9-byte endpoint descriptor (instead of 7)
Host Stack
@@ -775,14 +828,14 @@ Host Stack
Host Controller Driver (HCD)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- Add rhport to hcd_init()
+- Add rhport to ``hcd_init()``
- Improve EHCI/OHCI driver abstraction
- Move echi/ohci files to portable/
- - Rename hcd_lpc18_43 to hcd_transdimension
- - Sub hcd API with hcd_ehci_init(), hcd_ehci_register_addr()
+ - Rename ``hcd_lpc18_43`` to ``hcd_transdimension``
+ - Sub hcd API with ``hcd_ehci_init()``, ``hcd_ehci_register_addr()``
-- Update NXP transdimention hcd_init() to reset controller to host mode
+- Update NXP transdimension ``hcd_init()`` to reset controller to host mode
- Ported hcd to rt10xx
@@ -796,20 +849,20 @@ Host Class Driver
MSC
-- Rename tuh_msc_scsi_inquiry() to tuh_msc_inquiry()
-- Rename tuh_msc_mounted_cb/tuh_msc_unmounted_cb to tuh_msc_mount_cb/tuh_msc_unmount_cb to match device stack naming
-- Change tuh_msc_is_busy() to tuh_msc_ready()
-- Add read10 and write10 function: tuh_msc_read10(), tuh_msc_write10()
+- Rename ``tuh_msc_scsi_inquiry()`` to ``tuh_msc_inquiry()``
+- Rename ``tuh_msc_mounted_cb()``/``tuh_msc_unmounted_cb()`` to ``tuh_msc_mount_cb()``/``tuh_msc_unmount_cb()`` to match device stack naming
+- Change ``tuh_msc_is_busy()`` to ``tuh_msc_ready()``
+- Add read10 and write10 function: ``tuh_msc_read10()``, ``tuh_msc_write10()``
- Read_Capacity is invoked as part of enumeration process
-- Add tuh_msc_get_block_count(), tuh_msc_get_block_size()
-- Add CFG_TUH_MSC_MAXLUN (default to 4) to hold lun capacities
+- Add ``tuh_msc_get_block_count()``, ``tuh_msc_get_block_size()``
+- Add ``CFG_TUH_MSC_MAXLUN`` (default to 4) to hold lun capacities
Others
------
- Add basic support for rt-thread OS
- Change zero bitfield length to more explicit padding
-- Build example now fetch required submodules on the fly while running `make` without prio submodule init for mcu drivers
+- Build example now fetch required submodules on the fly while running ``make`` without prior submodule init for mcu drivers
- Update pico-sdk to v1.1.0
**New Boards**
@@ -827,7 +880,7 @@ Device Controller Driver
- Added new device support for Raspberry Pi RP2040
- Added new device support for NXP Kinetis KL25ZXX
-- Use dcd_event_bus_reset() with link speed to replace bus_signal
+- Use ``dcd_event_bus_reset()`` with link speed to replace bus_signal
- ESP32-S2:
- Add bus suspend and wakeup support
@@ -849,8 +902,8 @@ USB Device
**USBD**
- Rework usbd control transfer to have additional stage parameter for setup, data, status
-- Fix tusb_init() return true instead of TUSB_ERROR_NONE
-- Added new API tud_connected() that return true after device got out of bus reset and received the very first setup packet
+- Fix ``tusb_init()`` return true instead of ``TUSB_ERROR_NONE``
+- Added new API ``tud_connected()`` that return true after device got out of bus reset and received the very first setup packet
**Class Driver**
@@ -858,22 +911,22 @@ USB Device
- Allow to transmit data, even if the host does not support control line states i.e set DTR
- HID
- - change default CFG_TUD_HID_EP_BUFSIZE from 16 to 64
+ - change default ``CFG_TUD_HID_EP_BUFSIZE`` from 16 to 64
- MIDI
- Fix midi sysex sending bug
- MSC
- Invoke only scsi complete callback after status transaction is complete.
- - Fix scsi_mode_sense6_t padding, which cause IAR compiler internal error.
+ - Fix ``scsi_mode_sense6_t`` padding, which cause IAR compiler internal error.
- USBTMC
- Change interrupt endpoint example size to 8 instead of 2 for better compatibility with mcu
**Example**
-- Support make from windows cmd.exe
-- Add HID Consumer Control (media keys) to hid_composite & hid_composite_freertos examples
+- Support make from windows ``cmd.exe``
+- Add HID Consumer Control (media keys) to ``hid_composite`` & ``hid_composite_freertos`` examples
USB Host
@@ -914,28 +967,28 @@ Device Controller Driver
- Support multiple usb ports with rhport=1 is highspeed on selected MCUs e.g H743, F23. It is possible to have OTG_HS to run on Fullspeed PHY (e.g lacking external PHY)
- Add ISO transfer, fix odd/even frame
- Fix FIFO flush during stall
- - Implement dcd_edpt_close() API
+ - Implement ``dcd_edpt_close()`` API
- Support F105, F107
- Enhance STM32 fsdev
- Improve dcd fifo allocation
- Fix ISTR race condition
- Support remap USB IRQ on supported MCUs
- - Implement dcd_edpt_close() API
+ - Implement ``dcd_edpt_close()`` API
- Enhance NUC 505: enhance set configure behavior
- Enhance SAMD
- Fix race condition with setup packet
- - Add SAMD11 option `OPT_MCU_SAMD11`
- - Add SAME5x option `OPT_MCU_SAME5X`
+ - Add SAMD11 option ``OPT_MCU_SAMD11``
+ - Add SAME5x option ``OPT_MCU_SAME5X``
- Fix SAMG control data toggle and stall race condition
- Enhance nRF
- - Fix hanged when tud_task() is called within critical section (disabled interrupt)
+ - Fix hanged when ``tud_task()`` is called within critical section (disabled interrupt)
- Fix disconnect bus event not submitted
- - Implement ISO transfer and dcd_edpt_close()
+ - Implement ISO transfer and ``dcd_edpt_close()``
USB Device
@@ -944,26 +997,26 @@ USB Device
**USBD**
- Add new class driver for **Bluetooth HCI** class driver with example can be found in [mynewt-tinyusb-example](https://github.com/hathach/mynewt-tinyusb-example) since it needs mynewt OS to run with.
-- Fix USBD endpoint usage racing condition with `usbd_edpt_claim()/usbd_edpt_release()`
-- Added `tud_task_event_ready()` and `osal_queue_empty()`. This API is needed to check before enter low power mode with WFI/WFE
-- Rename USB IRQ Handler to `dcd_int_handler()`. Application must define IRQ handler in which it calls this API.
-- Add `dcd_connect()` and `dcd_disconnect()` to enable/disable internal pullup on D+/D- on supported MCUs.
-- Add `usbd_edpt_open()`
-- Remove `dcd_set_config()`
-- Add *OPT_OS_CUMSTOM* as hook for application to overwrite and/or add their own OS implementation
+- Fix USBD endpoint usage racing condition with ``usbd_edpt_claim()``/``usbd_edpt_release()``
+- Added ``tud_task_event_ready()`` and ``osal_queue_empty()``. This API is needed to check before enter low power mode with WFI/WFE
+- Rename USB IRQ Handler to ``dcd_int_handler()``. Application must define IRQ handler in which it calls this API.
+- Add ``dcd_connect()`` and ``dcd_disconnect()`` to enable/disable internal pullup on D+/D- on supported MCUs.
+- Add ``usbd_edpt_open()``
+- Remove ``dcd_set_config()``
+- Add ``OPT_OS_CUMSTOM`` as hook for application to overwrite and/or add their own OS implementation
- Support SET_INTERFACE, GET_INTERFACE request
-- Add Logging for debug with optional uart/rtt/swo printf retarget or `CFG_TUSB_DEBUG_PRINTF` hook
+- Add Logging for debug with optional uart/rtt/swo printf retarget or ``CFG_TUSB_DEBUG_PRINTF`` hook
- Add IAR compiler support
-- Support multiple configuration descriptors. `TUD_CONFIG_DESCRIPTOR()` template has extra config_num as 1st argument
-- Improve USB Highspeed support with actual link speed detection with `dcd_event_bus_reset()`
+- Support multiple configuration descriptors. ``TUD_CONFIG_DESCRIPTOR()`` template has extra config_num as 1st argument
+- Improve USB Highspeed support with actual link speed detection with ``dcd_event_bus_reset()``
- Enhance class driver management
- - `usbd_driver_open()` add max length argument, and return length of interface (0 for not supported). Return value is used for finding appropriate driver
- - Add application implemented class driver via `usbd_app_driver_get_cb()`
+ - ``usbd_driver_open()`` add max length argument, and return length of interface (0 for not supported). Return value is used for finding appropriate driver
+ - Add application implemented class driver via ``usbd_app_driver_get_cb()``
- IAD is handled to assign driver id
-- Added `tud_descriptor_device_qualifier_cb()` callback
-- Optimize `tu_fifo` bulk write/read transfer
+- Added ``tud_descriptor_device_qualifier_cb()`` callback
+- Optimize ``tu_fifo`` bulk write/read transfer
- Forward non-std control request to class driver
- Let application handle Microsoft OS 1.0 Descriptors (the 0xEE index string)
- Fix OSAL FreeRTOS yield from ISR
@@ -975,8 +1028,8 @@ USB Device
- CDC:
- Send zero length packet for end of data when needed
- - Add `tud_cdc_tx_complete_cb()` callback
- - Change tud_cdc_n_write_flush() return number of bytes forced to transfer, and flush when writing enough data to fifo
+ - Add ``tud_cdc_tx_complete_cb()`` callback
+ - Change ``tud_cdc_n_write_flush()`` return number of bytes forced to transfer, and flush when writing enough data to fifo
- MIDI:
- Add packet interface
@@ -986,10 +1039,10 @@ USB Device
- DFU Runtime: fix response to SET_INTERFACE and DFU_GETSTATUS request
- Rename some configure macro to make it clear that those are used directly for endpoint transfer
- - CFG_TUD_HID_BUFSIZE to CFG_TUD_HID_EP_BUFSIZE
- - CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE
- - CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE
- - CFG_TUD_MIDI_EPSIZE to CFG_TUD_MIDI_EP_BUFSIZE
+ - ``CFG_TUD_HID_BUFSIZE`` to ``CFG_TUD_HID_EP_BUFSIZE``
+ - ``CFG_TUD_CDC_EPSIZE`` to ``CFG_TUD_CDC_EP_BUFSIZE``
+ - ``CFG_TUD_MSC_BUFSIZE`` to ``CFG_TUD_MSC_EP_BUFSIZE``
+ - ``CFG_TUD_MIDI_EPSIZE`` to ``CFG_TUD_MIDI_EP_BUFSIZE``
- HID:
- Fix gamepad template descriptor
@@ -1008,15 +1061,15 @@ USB Host
Examples
--------
-- Add new hid_composite_freertos
-- Add new dynamic_configuration to demonstrate how to switch configuration descriptors
-- Add new hid_multiple_interface
+- Add new ``hid_composite_freertos``
+- Add new ``dynamic_configuration`` to demonstrate how to switch configuration descriptors
+- Add new ``hid_multiple_interface``
-- Enhance `net_lwip_webserver` example
+- Enhance ``net_lwip_webserver`` example
- Add multiple configuration: RNDIS for Windows, CDC-ECM for macOS (Linux will work with both)
- - Update lwip to STABLE-2_1_2_RELEASE for net_lwip_webserver
+ - Update lwip to STABLE-2_1_2_RELEASE for ``net_lwip_webserver``
-- Added new Audio example: audio_test uac2_headsest
+- Added new Audio example: ``audio_test`` ``uac2_headsest``
New Boards
----------
@@ -1057,37 +1110,37 @@ Added
- Added multiple instances support for CDC and MIDI
- Added a handful of unit test with Ceedling.
- Added LOG support for debugging with CFG_TUSB_DEBUG
-- Added `tud_descriptor_bos_cb()` for BOS descriptor (required for USB 2.1)
-- Added `dcd_edpt0_status_complete()` as optional API for DCD
+- Added ``tud_descriptor_bos_cb()`` for BOS descriptor (required for USB 2.1)
+- Added ``dcd_edpt0_status_complete()`` as optional API for DCD
**Examples**
Following examples are added:
-- board_test
-- cdc_dual_ports
-- dfu_rt
-- hid_composite
-- net_lwip_webserver
-- usbtmc
-- webusb_serial
+- ``board_test``
+- ``cdc_dual_ports``
+- ``dfu_rt``
+- ``hid_composite``
+- ``net_lwip_webserver``
+- ``usbtmc``
+- ``webusb_serial``
Changed
-------
-- Changed `tud_descriptor_string_cb()` to have additional Language ID argument
-- Merged hal_nrf5x.c into dcd_nrf5x.c
-- Merged dcd_samd21.c and dcd_samd51.c into dcd_samd.c
-- Generalized dcd_stm32f4.c to dcd_synopsys.c
-- Changed cdc_msc_hid to cdc_msc (drop hid) due to limited endpoints number of some MCUs
+- Changed ``tud_descriptor_string_cb()`` to have additional Language ID argument
+- Merged ``hal_nrf5x.c`` into ``dcd_nrf5x.c``
+- Merged ``dcd_samd21.c`` and ``dcd_samd51.c`` into ``dcd_samd.c``
+- Generalized ``dcd_stm32f4.c`` to ``dcd_synopsys.c``
+- Changed ``cdc_msc_hid`` to ``cdc_msc`` (drop hid) due to limited endpoints number of some MCUs
- Improved DCD SAMD stability, fix missing setup packet occasionally
-- Improved usbd/usbd_control with proper handling of zero-length packet (ZLP)
+- Improved ``usbd/usbd_control`` with proper handling of zero-length packet (ZLP)
- Improved STM32 DCD FSDev
- Improved STM32 DCD Synopsys
- Migrated CI from Travis to Github Action
- Updated nrfx submodule to 2.1.0
- Fixed mynewt osal queue definition
-- Fixed cdc_msc_freertos example build for all MCUs
+- Fixed ``cdc_msc_freertos`` example build for all MCUs
0.5.0 (2019-06)
diff --git a/docs/info/contributors.rst b/docs/info/contributors.rst
deleted file mode 120000
index b3748ccb5..000000000
--- a/docs/info/contributors.rst
+++ /dev/null
@@ -1 +0,0 @@
-../../CONTRIBUTORS.rst
\ No newline at end of file
diff --git a/docs/info/contributors.rst b/docs/info/contributors.rst
new file mode 100644
index 000000000..35e0b05f5
--- /dev/null
+++ b/docs/info/contributors.rst
@@ -0,0 +1 @@
+.. include:: ../../CONTRIBUTORS.rst
\ No newline at end of file
diff --git a/docs/info/index.rst b/docs/info/index.rst
index fa56512b6..a636f37dc 100644
--- a/docs/info/index.rst
+++ b/docs/info/index.rst
@@ -8,6 +8,5 @@ Index
.. toctree::
:maxdepth: 2
- uses
changelog
contributors
diff --git a/docs/info/uses.rst b/docs/info/uses.rst
deleted file mode 100644
index f67df49f8..000000000
--- a/docs/info/uses.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-****
-Uses
-****
-
-TinyUSB is currently used by these other projects:
-
-- `Adafruit nRF52 Arduino `__
-- `Adafruit nRF52 Bootloader `__
-- `Adafruit SAMD Arduino `__
-- `CircuitPython `__
-- `Espressif IDF `__
-- `MicroPython `__
-- `mynewt `__
-- `openinput `__
-- `Raspberry Pi Pico SDK `__
-- `TinyUF2 Bootloader `__
-- `TinyUSB Arduino Library `__
diff --git a/docs/reference/boards.rst b/docs/reference/boards.rst
new file mode 100644
index 000000000..41e765683
--- /dev/null
+++ b/docs/reference/boards.rst
@@ -0,0 +1,330 @@
+****************
+Supported Boards
+****************
+
+The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project.
+It is responsible for getting the MCU started and the USB peripheral clocked with minimal of on-board devices
+
+- One LED : for status
+- One Button : to get input from user
+- One UART : needed for logging with LOGGER=uart, maybe required for host/dual examples
+
+Following boards are supported
+
+Analog Devices
+--------------
+
+============= ================ ======== ================================================================================================================= ======
+Board Name Family URL Note
+============= ================ ======== ================================================================================================================= ======
+apard32690 APARD32690-SL maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/ad-apard32690-sl.html
+max32650evkit MAX32650 EVKIT maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32650-evkit.html
+max32650fthr MAX32650 Feather maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32650fthr.html
+max32651evkit MAX32651 EVKIT maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32651-evkit.html
+max32666evkit MAX32666 EVKIT maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32666evkit.html
+max32666fthr MAX32666 Feather maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32666fthr.html
+max32690evkit MAX32690 EVKIT maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max32690evkit.html
+max78002evkit MAX78002 EVKIT maxim https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-boards-kits/max78002evkit.html
+============= ================ ======== ================================================================================================================= ======
+
+Bridgetek
+---------
+
+========= ========= ======== ===================================== ======
+Board Name Family URL Note
+========= ========= ======== ===================================== ======
+mm900evxb MM900EVxB brtmm90x https://brtchip.com/product/mm900ev1b
+========= ========= ======== ===================================== ======
+
+Espressif
+---------
+
+========================= ============================== ========= ======================================================================================================== ======
+Board Name Family URL Note
+========================= ============================== ========= ======================================================================================================== ======
+adafruit_feather_esp32_v2 Adafruit Feather ESP32 v2 espressif https://www.adafruit.com/product/5400
+adafruit_feather_esp32c6 Adafruit Feather EPS32-C6 espressif https://www.adafruit.com/product/5933
+adafruit_feather_esp32s2 Adafruit Feather ESP32S2 espressif https://www.adafruit.com/product/5000
+adafruit_feather_esp32s3 Adafruit Feather ESP32S3 espressif https://www.adafruit.com/product/5323
+adafruit_magtag_29gray Adafruit MagTag 2.9" Grayscale espressif https://www.adafruit.com/product/4800
+adafruit_metro_esp32s2 Adafruit Metro ESP32-S2 espressif https://www.adafruit.com/product/4775
+espressif_addax_1 Espresif Addax-1 espressif n/a
+espressif_c3_devkitc Espresif C3 DevKitC espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c3/esp32-c3-devkitc-02/index.html
+espressif_c6_devkitc Espresif C6 DevKitC espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html
+espressif_kaluga_1 Espresif Kaluga 1 espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s2/esp32-s2-kaluga-1/index.html
+espressif_p4_function_ev Espresif P4 Function EV espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/index.html
+espressif_s2_devkitc Espresif S2 DevKitC espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s2/esp32-s2-devkitc-1/index.html
+espressif_s3_devkitc Espresif S3 DevKitC espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitc-1/index.html
+espressif_s3_devkitm Espresif S3 DevKitM espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitm-1/index.html
+espressif_saola_1 Espresif S2 Saola 1 espressif https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s2/esp32-s2-saola-1/index.html
+========================= ============================== ========= ======================================================================================================== ======
+
+GigaDevice
+----------
+
+================== ================== ========= ============================= ======
+Board Name Family URL Note
+================== ================== ========= ============================= ======
+sipeed_longan_nano Sipeed Longan Nano gd32vf103 https://longan.sipeed.com/en/
+================== ================== ========= ============================= ======
+
+Infineon
+--------
+
+============= ================= ======== ============================================================================= ======
+Board Name Family URL Note
+============= ================= ======== ============================================================================= ======
+xmc4500_relax XMC4500 relax kit xmc4000 https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc45_relax_v1/
+xmc4700_relax XMC4700 relax kit xmc4000 https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc47_relax_v1/
+============= ================= ======== ============================================================================= ======
+
+Microchip
+---------
+
+========================= =================================== ========== ================================================================================= ======
+Board Name Family URL Note
+========================= =================================== ========== ================================================================================= ======
+olimex_emz64 Olimex PIC32-EMZ64 pic32mz https://www.olimex.com/Products/PIC/Development/PIC32-EMZ64/open-source-hardware
+olimex_hmz144 Olimex PIC32-HMZ144 pic32mz https://www.olimex.com/Products/PIC/Development/PIC32-HMZ144/open-source-hardware
+cynthion_d11 Great Scott Gadgets Cynthion samd11 https://greatscottgadgets.com/cynthion/
+samd11_xplained SAMD11 Xplained Pro samd11 https://www.microchip.com/en-us/development-tool/ATSAMD11-XPRO
+atsamd21_xpro SAMD21 Xplained Pro samd21 https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO
+circuitplayground_express Adafruit Circuit Playground Express samd21 https://www.adafruit.com/product/3333
+curiosity_nano SAMD21 Curiosty Nano samd21 https://www.microchip.com/en-us/development-tool/dm320119
+cynthion_d21 Great Scott Gadgets Cynthion samd21 https://greatscottgadgets.com/cynthion/
+feather_m0_express Adafruit Feather M0 Express samd21 https://www.adafruit.com/product/3403
+itsybitsy_m0 Adafruit ItsyBitsy M0 samd21 https://www.adafruit.com/product/3727
+metro_m0_express Adafruit Metro M0 Express samd21 https://www.adafruit.com/product/3505
+qtpy Adafruit QT Py samd21 https://www.adafruit.com/product/4600
+seeeduino_xiao Seeeduino XIAO samd21 https://wiki.seeedstudio.com/Seeeduino-XIAO/
+sparkfun_samd21_mini_usb SparkFun SAMD21 Mini samd21 https://www.sparkfun.com/products/13664
+trinket_m0 Adafruit Trinket M0 samd21 https://www.adafruit.com/product/3500
+d5035_01 D5035-01 samd5x_e5x https://github.com/RudolphRiedel/USB_CAN-FD
+feather_m4_express Adafruit Feather M4 Express samd5x_e5x https://www.adafruit.com/product/3857
+itsybitsy_m4 Adafruit ItsyBitsy M4 samd5x_e5x https://www.adafruit.com/product/3800
+metro_m4_express Adafruit Metro M4 Express samd5x_e5x https://www.adafruit.com/product/3382
+pybadge Adafruit PyBadge samd5x_e5x https://www.adafruit.com/product/4200
+pyportal Adafruit PyPortal samd5x_e5x https://www.adafruit.com/product/4116
+same54_xplained SAME54 Xplained Pro samd5x_e5x https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAME54-XPRO
+samg55_xplained SAMG55 Xplained Pro samg https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMG55-XPRO
+atsaml21_xpro SAML21 Xplained Pro saml2x https://www.microchip.com/en-us/development-tool/atsaml21-xpro-b
+saml22_feather SAML22 Feather saml2x https://github.com/joeycastillo/Feather-Projects/tree/main/SAML22%20Feather
+sensorwatch_m0 SensorWatch saml2x https://github.com/joeycastillo/Sensor-Watch
+========================= =================================== ========== ================================================================================= ======
+
+MindMotion
+----------
+
+===================== ====================================== ======== =============================================================================================== ======
+Board Name Family URL Note
+===================== ====================================== ======== =============================================================================================== ======
+mm32f327x_mb39 MM32F3273G9P MB-039 mm32 https://www.mindmotion.com.cn/support/development_tools/evaluation_boards/evboard/mm32f3273g9p/
+mm32f327x_pitaya_lite DshanMCU Pitaya Lite with MM32F3273G8P mm32 https://gitee.com/weidongshan/DshanMCU-Pitaya-c
+===================== ====================================== ======== =============================================================================================== ======
+
+NXP
+---
+
+================== ========================================= ============= ========================================================================================================================================================================= ======
+Board Name Family URL Note
+================== ========================================= ============= ========================================================================================================================================================================= ======
+metro_m7_1011 Adafruit Metro M7 1011 imxrt https://www.adafruit.com/product/5600
+metro_m7_1011_sd Adafruit Metro M7 1011 SD imxrt https://www.adafruit.com/product/5600
+mimxrt1010_evk i.MX RT1010 Evaluation Kit imxrt https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/i-mx-rt1010-evaluation-kit:MIMXRT1010-EVK
+mimxrt1015_evk i.MX RT1015 Evaluation Kit imxrt https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1015-EVK
+mimxrt1020_evk i.MX RT1020 Evaluation Kit imxrt https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1020-EVK
+mimxrt1024_evk i.MX RT1024 Evaluation Kit imxrt https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/i-mx-rt1024-evaluation-kit:MIMXRT1024-EVK
+mimxrt1050_evkb i.MX RT1050 Evaluation Kit revB imxrt https://www.nxp.com/part/IMXRT1050-EVKB
+mimxrt1060_evk i.MX RT1060 Evaluation Kit revB imxrt https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1060-EVKB
+mimxrt1064_evk i.MX RT1064 Evaluation Kit imxrt https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1064-EVK
+mimxrt1170_evkb i.MX RT1070 Evaluation Kit imxrt https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/i-mx-rt1170-evaluation-kit:MIMXRT1170-EVKB
+teensy_40 Teensy 4.0 imxrt https://www.pjrc.com/store/teensy40.html
+teensy_41 Teensy 4.1 imxrt https://www.pjrc.com/store/teensy41.html
+frdm_k64f Freedom K64F kinetis_k https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/freedom-development-platform-for-kinetis-k64-k63-and-k24-mcus:FRDM-K64F
+teensy_35 Teensy 3.5 kinetis_k https://www.pjrc.com/store/teensy35.html
+frdm_k32l2a4s Freedom K32L2A4S kinetis_k32l2 https://www.nxp.com/design/design-center/development-boards-and-designs/FRDM-K32L2A4S
+frdm_k32l2b Freedom K32L2B3 kinetis_k32l2 https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/nxp-freedom-development-platform-for-k32-l2b-mcus:FRDM-K32L2B3
+kuiic Kuiic kinetis_k32l2 https://github.com/nxf58843/kuiic
+frdm_kl25z fomu kinetis_kl https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z
+lpcxpresso11u37 LPCXpresso11U37 lpc11 https://www.nxp.com/design/design-center/development-boards-and-designs/OM13074
+lpcxpresso11u68 LPCXpresso11U68 lpc11 https://www.nxp.com/design/design-center/development-boards-and-designs/OM13058
+lpcxpresso1347 LPCXpresso1347 lpc13 https://www.nxp.com/products/no-longer-manufactured/lpcxpresso-board-for-lpc1347:OM13045
+lpcxpresso1549 LPCXpresso1549 lpc15 https://www.nxp.com/design/design-center/development-boards-and-designs/OM13056
+lpcxpresso1769 LPCXpresso1769 lpc17 https://www.nxp.com/design/design-center/development-boards-and-designs/OM13000
+mbed1768 mbed 1768 lpc17 https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-arm-cortex-m3/arm-mbed-lpc1768-board:OM11043
+lpcxpresso18s37 LPCXpresso18s37 lpc18 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-boards/lpcxpresso18s37-development-board:OM13076
+mcb1800 Keil MCB1800 lpc18 https://www.keil.com/arm/mcb1800/
+ea4088_quickstart Embedded Artists LPC4088 QuickStart Board lpc40 https://www.embeddedartists.com/products/lpc4088-quickstart-board/
+ea4357 Embedded Artists LPC4357 Development Kit lpc43 https://www.embeddedartists.com/products/lpc4357-developers-kit/
+lpcxpresso43s67 LPCXpresso43S67 lpc43 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-boards/lpcxpresso43s67-development-board:OM13084
+lpcxpresso51u68 LPCXpresso51u68 lpc51 https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpcxpresso51u68-for-the-lpc51u68-mcus:OM40005
+lpcxpresso54114 LPCXpresso54114 lpc54 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-boards/lpcxpresso54114-board:OM13089
+lpcxpresso54608 LPCXpresso54608 lpc54 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-development-board-for-lpc5460x-mcus:OM13092
+lpcxpresso54628 LPCXpresso54628 lpc54 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-boards/lpcxpresso54628-development-board:OM13098
+double_m33_express Double M33 Express lpc55 https://www.crowdsupply.com/steiert-solutions/double-m33-express
+lpcxpresso55s28 LPCXpresso55s28 lpc55 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-boards/lpcxpresso55s28-development-board:LPC55S28-EVK
+lpcxpresso55s69 LPCXpresso55s69 lpc55 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-boards/lpcxpresso55s69-development-board:LPC55S69-EVK
+mcu_link MCU Link lpc55 https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcu-link-debug-probe:MCU-LINK
+frdm_mcxa153 Freedom MCXA153 mcx https://www.nxp.com/design/design-center/development-boards-and-designs/FRDM-MCXA153
+frdm_mcxa156 Freedom MCXA156 mcx https://www.nxp.com/design/design-center/development-boards-and-designs/FRDM-MCXA156
+frdm_mcxn947 Freedom MCXN947 mcx https://www.nxp.com/design/design-center/development-boards-and-designs/FRDM-MCXN947
+mcxn947brk MCXN947 Breakout mcx n/a
+================== ========================================= ============= ========================================================================================================================================================================= ======
+
+Nordic Semiconductor
+--------------------
+
+=========================== ===================================== ======== ============================================================================== ======
+Board Name Family URL Note
+=========================== ===================================== ======== ============================================================================== ======
+adafruit_clue Adafruit CLUE nrf https://www.adafruit.com/product/4500
+arduino_nano33_ble Arduino Nano 33 BLE nrf https://store.arduino.cc/arduino-nano-33-ble
+circuitplayground_bluefruit Adafruit Circuit Playground Bluefruit nrf https://www.adafruit.com/product/4333
+feather_nrf52840_express Adafruit Feather nRF52840 Express nrf https://www.adafruit.com/product/4062
+feather_nrf52840_sense Adafruit Feather nRF52840 Sense nrf https://www.adafruit.com/product/4516
+itsybitsy_nrf52840 Adafruit ItsyBitsy nRF52840 Express nrf https://www.adafruit.com/product/4481
+pca10056 Nordic nRF52840DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK
+pca10059 Nordic nRF52840 Dongle nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle
+pca10095 Nordic nRF5340 DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK
+pca10100 Nordic nRF52833 DK nrf https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK
+=========================== ===================================== ======== ============================================================================== ======
+
+Raspberry Pi
+------------
+
+================================ ============================================ ============== ========================================================== ======
+Board Name Family URL Note
+================================ ============================================ ============== ========================================================== ======
+raspberrypi_zero Raspberry Pi Zero broadcom_32bit https://www.raspberrypi.org/products/raspberry-pi-zero/
+raspberrypi_cm4 Raspberry CM4 broadcom_64bit https://www.raspberrypi.org/products/compute-module-4
+raspberrypi_zero2 Raspberry Zero2 broadcom_64bit https://www.raspberrypi.org/products/raspberry-pi-zero-2-w
+adafruit_feather_rp2040_usb_host Adafruit Feather RP2040 with USB Type A Host rp2040 https://www.adafruit.com/product/5723
+adafruit_fruit_jam Adafruit Fruit Jam - Mini RP2350 rp2040 https://www.adafruit.com/product/6200
+adafruit_metro_rp2350 Adafruit Metro RP2350 rp2040 https://www.adafruit.com/product/6003
+raspberry_pi_pico Pico rp2040 https://www.raspberrypi.com/products/raspberry-pi-pico/
+raspberry_pi_pico2 Pico2 rp2040 https://www.raspberrypi.com/products/raspberry-pi-pico-2/
+raspberry_pi_pico_w Pico rp2040 https://www.raspberrypi.com/products/raspberry-pi-pico/
+================================ ============================================ ============== ========================================================== ======
+
+Renesas
+-------
+
+============== =========================== ======== ================================================================================================================================================================ ======
+Board Name Family URL Note
+============== =========================== ======== ================================================================================================================================================================ ======
+da14695_dk_usb DA14695-00HQDEVKT-U da1469x https://www.renesas.com/en/products/wireless-connectivity/bluetooth-low-energy/da14695-00hqdevkt-u-smartbond-da14695-bluetooth-low-energy-52-usb-development-kit
+da1469x_dk_pro DA1469x Development Kit Pro da1469x https://lpccs-docs.renesas.com/um-b-090-da1469x_getting_started/DA1469x_The_hardware/DA1469x_The_hardware.html
+portenta_c33 Arduino Portenta C33 ra https://www.arduino.cc/pro/hardware-product-portenta-c33/
+ra2a1_ek RA2A1 EK ra https://www.renesas.com/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra2a1-evaluation-kit-ra2a1-mcu-group
+ra4m1_ek RA4M1 EK ra https://www.renesas.com/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra4m1-evaluation-kit-ra4m1-mcu-group
+ra4m3_ek RA4M3 EK ra https://www.renesas.com/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra4m3-evaluation-kit-ra4m3-mcu-group
+ra6m1_ek RA6M1 EK ra https://www.renesas.com/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra6m1-evaluation-kit-ra6m1-mcu-group
+ra6m5_ek RA6M5 EK ra https://www.renesas.com/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra6m5-evaluation-kit-ra6m5-mcu-group
+ra8m1_ek RA8M1 EK ra https://www.renesas.com/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra8m1-evaluation-kit-ra8m1-mcu-group
+uno_r4 Arduino UNO R4 ra https://store-usa.arduino.cc/pages/uno-r4
+============== =========================== ======== ================================================================================================================================================================ ======
+
+STMicroelectronics
+------------------
+
+=================== ================================= ========= ================================================================= ======
+Board Name Family URL Note
+=================== ================================= ========= ================================================================= ======
+stm32c071nucleo STM32C071 Nucleo stm32c0 https://www.st.com/en/evaluation-tools/nucleo-g071rb.html
+stm32f070rbnucleo STM32 F070 Nucleo stm32f0 https://www.st.com/en/evaluation-tools/nucleo-f070rb.html
+stm32f072disco STM32 F072 Discovery stm32f0 https://www.st.com/en/evaluation-tools/32f072bdiscovery.html
+stm32f072eval STM32 F072 Eval stm32f0 https://www.st.com/en/evaluation-tools/stm32072b-eval.html
+stm32f103_bluepill STM32 F103 Bluepill stm32f1 https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill
+stm32f103_mini_2 STM32 F103 Mini v2 stm32f1 https://stm32-base.org/boards/STM32F103RCT6-STM32-Mini-V2.0
+stm32f103ze_iar IAR STM32 F103ze starter kit stm32f1 n/a
+stm32f207nucleo STM32 F207 Nucleo stm32f2 https://www.st.com/en/evaluation-tools/nucleo-f207zg.html
+stm32f303disco STM32 F303 Discovery stm32f3 https://www.st.com/en/evaluation-tools/stm32f3discovery.html
+feather_stm32f405 Adafruit Feather STM32F405 stm32f4 https://www.adafruit.com/product/4382
+pyboardv11 Pyboard v1.1 stm32f4 https://www.adafruit.com/product/2390
+stm32f401blackpill STM32 F401 Blackpill stm32f4 https://stm32-base.org/boards/STM32F401CCU6-WeAct-Black-Pill-V1.2
+stm32f407blackvet STM32 F407 Blackvet stm32f4 https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0
+stm32f407disco STM32 F407 Discovery stm32f4 https://www.st.com/en/evaluation-tools/stm32f4discovery.html
+stm32f411blackpill STM32 F411 Blackpill stm32f4 https://stm32-base.org/boards/STM32F411CEU6-WeAct-Black-Pill-V2.0
+stm32f411disco STM32 F411 Discovery stm32f4 https://www.st.com/en/evaluation-tools/32f411ediscovery.html
+stm32f412disco STM32 F412 Discovery stm32f4 https://www.st.com/en/evaluation-tools/32f412gdiscovery.html
+stm32f412nucleo STM32 F412 Nucleo stm32f4 https://www.st.com/en/evaluation-tools/nucleo-f412zg.html
+stm32f439nucleo STM32 F439 Nucleo stm32f4 https://www.st.com/en/evaluation-tools/nucleo-f439zi.html
+stlinkv3mini Stlink-v3 mini stm32f7 https://www.st.com/en/development-tools/stlink-v3mini.html
+stm32f723disco STM32 F723 Discovery stm32f7 https://www.st.com/en/evaluation-tools/32f723ediscovery.html
+stm32f746disco STM32 F746 Discovery stm32f7 https://www.st.com/en/evaluation-tools/32f746gdiscovery.html
+stm32f746nucleo STM32 F746 Nucleo stm32f7 https://www.st.com/en/evaluation-tools/nucleo-f746zg.html
+stm32f767nucleo STM32 F767 Nucleo stm32f7 https://www.st.com/en/evaluation-tools/nucleo-f767zi.html
+stm32f769disco STM32 F769 Discovery stm32f7 https://www.st.com/en/evaluation-tools/32f769idiscovery.html
+stm32g0b1nucleo STM32 G0B1 Nucleo stm32g0 https://www.st.com/en/evaluation-tools/nucleo-g0b1re.html
+b_g474e_dpow1 STM32 B-G474E-DPOW1 Discovery kit stm32g4 https://www.st.com/en/evaluation-tools/b-g474e-dpow1.html
+stm32g474nucleo STM32 G474 Nucleo stm32g4 https://www.st.com/en/evaluation-tools/nucleo-g474re.html
+stm32g491nucleo STM32 G491 Nucleo stm32g4 https://www.st.com/en/evaluation-tools/nucleo-g491re.html
+stm32h503nucleo STM32 H503 Nucleo stm32h5 https://www.st.com/en/evaluation-tools/nucleo-h503rb.html
+stm32h563nucleo STM32 H563 Nucleo stm32h5 https://www.st.com/en/evaluation-tools/nucleo-h563zi.html
+stm32h573i_dk STM32 H573i Discovery stm32h5 https://www.st.com/en/evaluation-tools/stm32h573i-dk.html
+daisyseed Daisy Seed stm32h7 https://electro-smith.com/products/daisy-seed
+stm32h723nucleo STM32 H723 Nucleo stm32h7 https://www.st.com/en/evaluation-tools/nucleo-h723zg.html
+stm32h743eval STM32 H743 Eval stm32h7 https://www.st.com/en/evaluation-tools/stm32h743i-eval.html
+stm32h743nucleo STM32 H743 Nucleo stm32h7 https://www.st.com/en/evaluation-tools/nucleo-h743zi.html
+stm32h745disco STM32 H745 Discovery stm32h7 https://www.st.com/en/evaluation-tools/stm32h745i-disco.html
+stm32h750_weact STM32 H750 WeAct stm32h7 https://www.adafruit.com/product/5032
+stm32h750bdk STM32 H750b Discovery Kit stm32h7 https://www.st.com/en/evaluation-tools/stm32h750b-dk.html
+waveshare_openh743i Waveshare Open H743i stm32h7 https://www.waveshare.com/openh743i-c-standard.htm
+stm32h7s3nucleo STM32 H7S3L8 Nucleo stm32h7rs https://www.st.com/en/evaluation-tools/nucleo-h7s3l8.html
+stm32l052dap52 STM32 L052 DAP stm32l0 n/a
+stm32l0538disco STM32 L0538 Discovery stm32l0 https://www.st.com/en/evaluation-tools/32l0538discovery.html
+stm32l412nucleo STM32 L412 Nucleo stm32l4 https://www.st.com/en/evaluation-tools/nucleo-l412kb.html
+stm32l476disco STM32 L476 Disco stm32l4 https://www.st.com/en/evaluation-tools/32l476gdiscovery.html
+stm32l4p5nucleo STM32 L4P5 Nucleo stm32l4 https://www.st.com/en/evaluation-tools/nucleo-l4p5zg.html
+stm32l4r5nucleo STM32 L4R5 Nucleo stm32l4 https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html
+stm32n657nucleo STM32 N657X0-Q Nucleo stm32n6 https://www.st.com/en/evaluation-tools/nucleo-n657x0-q.html
+b_u585i_iot2a STM32 B-U585i IOT2A Discovery kit stm32u5 https://www.st.com/en/evaluation-tools/b-u585i-iot02a.html
+stm32u545nucleo STM32 U545 Nucleo stm32u5 https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html
+stm32u575eval STM32 U575 Eval stm32u5 https://www.st.com/en/evaluation-tools/stm32u575i-ev.html
+stm32u575nucleo STM32 U575 Nucleo stm32u5 https://www.st.com/en/evaluation-tools/nucleo-u575zi-q.html
+stm32u5a5nucleo STM32 U5a5 Nucleo stm32u5 https://www.st.com/en/evaluation-tools/nucleo-u5a5zj-q.html
+stm32wb55nucleo STM32 P-NUCLEO-WB55 stm32wb https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html
+=================== ================================= ========= ================================================================= ======
+
+Sunxi
+-----
+
+======= ================= ======== ========================================= ======
+Board Name Family URL Note
+======= ================= ======== ========================================= ======
+f1c100s Lctech Pi F1C200s f1c100s https://linux-sunxi.org/Lctech_Pi_F1C200s
+======= ================= ======== ========================================= ======
+
+Texas Instruments
+-----------------
+
+================= ===================== ======== ========================================= ======
+Board Name Family URL Note
+================= ===================== ======== ========================================= ======
+msp_exp430f5529lp MSP430F5529 LaunchPad msp430 https://www.ti.com/tool/MSP-EXP430F5529LP
+msp_exp432e401y MSP432E401Y LaunchPad msp432e4 https://www.ti.com/tool/MSP-EXP432E401Y
+ek_tm4c123gxl TM4C123G LaunchPad tm4c https://www.ti.com/tool/EK-TM4C123GXL
+================= ===================== ======== ========================================= ======
+
+Tomu
+----
+
+======= ====== ======== ========================= ======
+Board Name Family URL Note
+======= ====== ======== ========================= ======
+fomu fomu fomu https://tomu.im/fomu.html
+======= ====== ======== ========================= ======
+
+WCH
+---
+
+================ ================ ======== ===================================================================== ======
+Board Name Family URL Note
+================ ================ ======== ===================================================================== ======
+ch32f205r-r0 CH32F205r-r0 ch32f20x https://github.com/openwch/ch32f20x
+ch32v103r_r1_1v0 CH32V103R-R1-1v1 ch32v10x https://github.com/openwch/ch32v103/tree/main/SCHPCB/CH32V103R-R1-1v1
+ch32v203c_r0_1v0 CH32V203C-R0-1v0 ch32v20x https://github.com/openwch/ch32v20x/tree/main/SCHPCB/CH32V203C-R0
+ch32v203g_r0_1v0 CH32V203G-R0-1v0 ch32v20x https://github.com/openwch/ch32v20x/tree/main/SCHPCB/CH32V203C-R0
+nanoch32v203 nanoCH32V203 ch32v20x https://github.com/wuxx/nanoCH32V203
+ch32v307v_r1_1v0 CH32V307V-R1-1v0 ch32v307 https://github.com/openwch/ch32v307/tree/main/SCHPCB/CH32V307V-R1-1v0
+================ ================ ======== ===================================================================== ======
diff --git a/docs/reference/dependencies.rst b/docs/reference/dependencies.rst
index 65ee31f22..5104c6456 100644
--- a/docs/reference/dependencies.rst
+++ b/docs/reference/dependencies.rst
@@ -4,66 +4,74 @@ Dependencies
MCU low-level peripheral driver and external libraries for building TinyUSB examples
-======================================== ============================================================== ======================================== ==========================================================================================================================================================================================================================================================================================================================
-Local Path Repo Commit Required by
-======================================== ============================================================== ======================================== ==========================================================================================================================================================================================================================================================================================================================
-hw/mcu/allwinner https://github.com/hathach/allwinner_driver.git 8e5e89e8e132c0fd90e72d5422e5d3d68232b756 fc100s
-hw/mcu/analog/max32 https://github.com/analogdevicesinc/msdk.git b20b398d3e5e2007594e54a74ba3d2a2e50ddd75 max32650 max32666 max32690 max78002
-hw/mcu/bridgetek/ft9xx/ft90x-sdk https://github.com/BRTSG-FOSS/ft90x-sdk.git 91060164afe239fcb394122e8bf9eb24d3194eb1 brtmm90x
-hw/mcu/broadcom https://github.com/adafruit/broadcom-peripherals.git 08370086080759ed54ac1136d62d2ad24c6fa267 broadcom_32bit broadcom_64bit
-hw/mcu/gd/nuclei-sdk https://github.com/Nuclei-Software/nuclei-sdk.git 7eb7bfa9ea4fbeacfafe1d5f77d5a0e6ed3922e7 gd32vf103
-hw/mcu/infineon/mtb-xmclib-cat3 https://github.com/Infineon/mtb-xmclib-cat3.git daf5500d03cba23e68c2f241c30af79cd9d63880 xmc4000
-hw/mcu/microchip https://github.com/hathach/microchip_driver.git 9e8b37e307d8404033bb881623a113931e1edf27 sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg
-hw/mcu/mindmotion/mm32sdk https://github.com/hathach/mm32sdk.git b93e856211060ae825216c6a1d6aa347ec758843 mm32
-hw/mcu/nordic/nrfx https://github.com/NordicSemiconductor/nrfx.git 7c47cc0a56ce44658e6da2458e86cd8783ccc4a2 nrf
-hw/mcu/nuvoton https://github.com/majbthrd/nuc_driver.git 2204191ec76283371419fbcec207da02e1bc22fa nuc
-hw/mcu/nxp/lpcopen https://github.com/hathach/nxp_lpcopen.git b41cf930e65c734d8ec6de04f1d57d46787c76ae lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43
-hw/mcu/nxp/mcux-sdk https://github.com/hathach/mcux-sdk.git 144f1eb7ea8c06512e12f12b27383601c0272410 kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt
-hw/mcu/raspberry_pi/Pico-PIO-USB https://github.com/sekigon-gonnoc/Pico-PIO-USB.git fe9133fc513b82cc3dc62c67cb51f2339cf29ef7 rp2040
-hw/mcu/renesas/fsp https://github.com/renesas/fsp.git d52e5a6a59b7c638da860c2bb309b6e78e752ff8 ra
-hw/mcu/renesas/rx https://github.com/kkitayam/rx_device.git 706b4e0cf485605c32351e2f90f5698267996023 rx
-hw/mcu/silabs/cmsis-dfp-efm32gg12b https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b.git f1c31b7887669cb230b3ea63f9b56769078960bc efm32
-hw/mcu/sony/cxd56/spresense-exported-sdk https://github.com/sonydevworld/spresense-exported-sdk.git 2ec2a1538362696118dc3fdf56f33dacaf8f4067 spresense
-hw/mcu/st/cmsis_device_f0 https://github.com/STMicroelectronics/cmsis_device_f0.git 2fc25ee22264bc27034358be0bd400b893ef837e stm32f0
-hw/mcu/st/cmsis_device_f1 https://github.com/STMicroelectronics/cmsis_device_f1.git 6601104a6397299b7304fd5bcd9a491f56cb23a6 stm32f1
-hw/mcu/st/cmsis_device_f2 https://github.com/STMicroelectronics/cmsis_device_f2.git 182fcb3681ce116816feb41b7764f1b019ce796f stm32f2
-hw/mcu/st/cmsis_device_f3 https://github.com/STMicroelectronics/cmsis_device_f3.git 5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b stm32f3
-hw/mcu/st/cmsis_device_f4 https://github.com/STMicroelectronics/cmsis_device_f4.git 2615e866fa48fe1ff1af9e31c348813f2b19e7ec stm32f4
-hw/mcu/st/cmsis_device_f7 https://github.com/STMicroelectronics/cmsis_device_f7.git 25b0463439303b7a38f0d27b161f7d2f3c096e79 stm32f7
-hw/mcu/st/cmsis_device_g0 https://github.com/STMicroelectronics/cmsis_device_g0.git 3a23e1224417f3f2d00300ecd620495e363f2094 stm32g0
-hw/mcu/st/cmsis_device_g4 https://github.com/STMicroelectronics/cmsis_device_g4.git ce822adb1dc552b3aedd13621edbc7fdae124878 stm32g4
-hw/mcu/st/cmsis_device_h5 https://github.com/STMicroelectronics/cmsis_device_h5.git cd2d1d579743de57b88ccaf61a968b9c05848ffc stm32h5
-hw/mcu/st/cmsis_device_h7 https://github.com/STMicroelectronics/cmsis_device_h7.git 60dc2c913203dc8629dc233d4384dcc41c91e77f stm32h7
-hw/mcu/st/cmsis_device_l0 https://github.com/STMicroelectronics/cmsis_device_l0.git 69cd5999fd40ae6e546d4905b21635c6ca1bcb92 stm32l0
-hw/mcu/st/cmsis_device_l1 https://github.com/STMicroelectronics/cmsis_device_l1.git 7f16ec0a1c4c063f84160b4cc6bf88ad554a823e stm32l1
-hw/mcu/st/cmsis_device_l4 https://github.com/STMicroelectronics/cmsis_device_l4.git 6ca7312fa6a5a460b5a5a63d66da527fdd8359a6 stm32l4
-hw/mcu/st/cmsis_device_l5 https://github.com/STMicroelectronics/cmsis_device_l5.git d922865fc0326a102c26211c44b8e42f52c1e53d stm32l5
-hw/mcu/st/cmsis_device_u5 https://github.com/STMicroelectronics/cmsis_device_u5.git 5ad9797c54ec3e55eff770fc9b3cd4a1aefc1309 stm32u5
-hw/mcu/st/cmsis_device_wb https://github.com/STMicroelectronics/cmsis_device_wb.git 9c5d1920dd9fabbe2548e10561d63db829bb744f stm32wb
-hw/mcu/st/stm32f0xx_hal_driver https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git 0e95cd88657030f640a11e690a8a5186c7712ea5 stm32f0
-hw/mcu/st/stm32f1xx_hal_driver https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git 1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29 stm32f1
-hw/mcu/st/stm32f2xx_hal_driver https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git c75ace9b908a9aca631193ebf2466963b8ea33d0 stm32f2
-hw/mcu/st/stm32f3xx_hal_driver https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git 1761b6207318ede021706e75aae78f452d72b6fa stm32f3
-hw/mcu/st/stm32f4xx_hal_driver https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git 04e99fbdabd00ab8f370f377c66b0a4570365b58 stm32f4
-hw/mcu/st/stm32f7xx_hal_driver https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git f7ffdf6bf72110e58b42c632b0a051df5997e4ee stm32f7
-hw/mcu/st/stm32g0xx_hal_driver https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git e911b12c7f67084d7f6b76157a4c0d4e2ec3779c stm32g0
-hw/mcu/st/stm32g4xx_hal_driver https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git 8b4518417706d42eef5c14e56a650005abf478a8 stm32g4
-hw/mcu/st/stm32h5xx_hal_driver https://github.com/STMicroelectronics/stm32h5xx_hal_driver.git 2cf77de584196d619cec1b4586c3b9e2820a254e stm32h5
-hw/mcu/st/stm32h7xx_hal_driver https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git d8461b980b59b1625207d8c4f2ce0a9c2a7a3b04 stm32h7
-hw/mcu/st/stm32l0xx_hal_driver https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b stm32l0
-hw/mcu/st/stm32l1xx_hal_driver https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git 44efc446fa69ed8344e7fd966e68ed11043b35d9 stm32l1
-hw/mcu/st/stm32l4xx_hal_driver https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git aee3d5bf283ae5df87532b781bdd01b7caf256fc stm32l4
-hw/mcu/st/stm32l5xx_hal_driver https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git 675c32a75df37f39d50d61f51cb0dcf53f07e1cb stm32l5
-hw/mcu/st/stm32u5xx_hal_driver https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git 4d93097a67928e9377e655ddd14622adc31b9770 stm32u5
-hw/mcu/st/stm32wbxx_hal_driver https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git 2c5f06638be516c1b772f768456ba637f077bac8 stm32wb
-hw/mcu/ti https://github.com/hathach/ti_driver.git 143ed6cc20a7615d042b03b21e070197d473e6e5 msp430 msp432e4 tm4c
-hw/mcu/wch/ch32f20x https://github.com/openwch/ch32f20x.git 77c4095087e5ed2c548ec9058e655d0b8757663b ch32f20x
-hw/mcu/wch/ch32v103 https://github.com/openwch/ch32v103.git 7578cae0b21f86dd053a1f781b2fc6ab99d0ec17 ch32v10x
-hw/mcu/wch/ch32v20x https://github.com/openwch/ch32v20x.git c4c38f507e258a4e69b059ccc2dc27dde33cea1b ch32v20x
-hw/mcu/wch/ch32v307 https://github.com/openwch/ch32v307.git 184f21b852cb95eed58e86e901837bc9fff68775 ch32v307
-lib/CMSIS_5 https://github.com/ARM-software/CMSIS_5.git 20285262657d1b482d132d20d755c8c330d55c1f imxrt kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx mm32 msp432e4 nrf ra saml2xlpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32g0 stm32g4 stm32h5stm32h7 stm32l0 stm32l1 stm32l4 stm32l5 stm32u5 stm32wbsam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samgtm4c
-lib/FreeRTOS-Kernel https://github.com/FreeRTOS/FreeRTOS-Kernel.git cc0e0707c0c748713485b870bb980852b210877f all
-lib/lwip https://github.com/lwip-tcpip/lwip.git 159e31b689577dbf69cf0683bbaffbd71fa5ee10 all
-lib/sct_neopixel https://github.com/gsteiert/sct_neopixel.git e73e04ca63495672d955f9268e003cffe168fcd8 lpc55
-tools/uf2 https://github.com/microsoft/uf2.git c594542b2faa01cc33a2b97c9fbebc38549df80a all
-======================================== ============================================================== ======================================== ==========================================================================================================================================================================================================================================================================================================================
+======================================== ================================================================ ======================================== ======================================================================================================================================================================================================================================================================================================================================================
+Local Path Repo Commit Required by
+======================================== ================================================================ ======================================== ======================================================================================================================================================================================================================================================================================================================================================
+hw/mcu/allwinner https://github.com/hathach/allwinner_driver.git 8e5e89e8e132c0fd90e72d5422e5d3d68232b756 fc100s
+hw/mcu/analog/msdk https://github.com/analogdevicesinc/msdk.git b20b398d3e5e2007594e54a74ba3d2a2e50ddd75 maxim
+hw/mcu/bridgetek/ft9xx/ft90x-sdk https://github.com/BRTSG-FOSS/ft90x-sdk.git 91060164afe239fcb394122e8bf9eb24d3194eb1 brtmm90x
+hw/mcu/broadcom https://github.com/adafruit/broadcom-peripherals.git 08370086080759ed54ac1136d62d2ad24c6fa267 broadcom_32bit broadcom_64bit
+hw/mcu/gd/nuclei-sdk https://github.com/Nuclei-Software/nuclei-sdk.git 7eb7bfa9ea4fbeacfafe1d5f77d5a0e6ed3922e7 gd32vf103
+hw/mcu/infineon/mtb-xmclib-cat3 https://github.com/Infineon/mtb-xmclib-cat3.git daf5500d03cba23e68c2f241c30af79cd9d63880 xmc4000
+hw/mcu/microchip https://github.com/hathach/microchip_driver.git 9e8b37e307d8404033bb881623a113931e1edf27 sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg
+hw/mcu/mindmotion/mm32sdk https://github.com/hathach/mm32sdk.git b93e856211060ae825216c6a1d6aa347ec758843 mm32
+hw/mcu/nordic/nrfx https://github.com/NordicSemiconductor/nrfx.git 7c47cc0a56ce44658e6da2458e86cd8783ccc4a2 nrf
+hw/mcu/nuvoton https://github.com/majbthrd/nuc_driver.git 2204191ec76283371419fbcec207da02e1bc22fa nuc
+hw/mcu/nxp/lpcopen https://github.com/hathach/nxp_lpcopen.git b41cf930e65c734d8ec6de04f1d57d46787c76ae lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43
+hw/mcu/nxp/mcux-sdk https://github.com/nxp-mcuxpresso/mcux-sdk a1bdae309a14ec95a4f64a96d3315a4f89c397c6 kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt
+hw/mcu/raspberry_pi/Pico-PIO-USB https://github.com/sekigon-gonnoc/Pico-PIO-USB.git 3c1eec341a5232640e4c00628b889b641af34b28 rp2040
+hw/mcu/renesas/fsp https://github.com/renesas/fsp.git edcc97d684b6f716728a60d7a6fea049d9870bd6 ra
+hw/mcu/renesas/rx https://github.com/kkitayam/rx_device.git 706b4e0cf485605c32351e2f90f5698267996023 rx
+hw/mcu/silabs/cmsis-dfp-efm32gg12b https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b.git f1c31b7887669cb230b3ea63f9b56769078960bc efm32
+hw/mcu/sony/cxd56/spresense-exported-sdk https://github.com/sonydevworld/spresense-exported-sdk.git 2ec2a1538362696118dc3fdf56f33dacaf8f4067 spresense
+hw/mcu/st/cmsis_device_c0 https://github.com/STMicroelectronics/cmsis_device_c0.git fb56b1b70c73b74eacda2a4bcc36886444364ab3 stm32c0
+hw/mcu/st/cmsis_device_f0 https://github.com/STMicroelectronics/cmsis_device_f0.git 2fc25ee22264bc27034358be0bd400b893ef837e stm32f0
+hw/mcu/st/cmsis_device_f1 https://github.com/STMicroelectronics/cmsis_device_f1.git 6601104a6397299b7304fd5bcd9a491f56cb23a6 stm32f1
+hw/mcu/st/cmsis_device_f2 https://github.com/STMicroelectronics/cmsis_device_f2.git 182fcb3681ce116816feb41b7764f1b019ce796f stm32f2
+hw/mcu/st/cmsis_device_f3 https://github.com/STMicroelectronics/cmsis_device_f3.git 5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b stm32f3
+hw/mcu/st/cmsis_device_f4 https://github.com/STMicroelectronics/cmsis_device_f4.git 2615e866fa48fe1ff1af9e31c348813f2b19e7ec stm32f4
+hw/mcu/st/cmsis_device_f7 https://github.com/STMicroelectronics/cmsis_device_f7.git 25b0463439303b7a38f0d27b161f7d2f3c096e79 stm32f7
+hw/mcu/st/cmsis_device_g0 https://github.com/STMicroelectronics/cmsis_device_g0.git 3a23e1224417f3f2d00300ecd620495e363f2094 stm32g0
+hw/mcu/st/cmsis_device_g4 https://github.com/STMicroelectronics/cmsis_device_g4.git ce822adb1dc552b3aedd13621edbc7fdae124878 stm32g4
+hw/mcu/st/cmsis_device_h5 https://github.com/STMicroelectronics/cmsis_device_h5.git cd2d1d579743de57b88ccaf61a968b9c05848ffc stm32h5
+hw/mcu/st/cmsis_device_h7 https://github.com/STMicroelectronics/cmsis_device_h7.git 60dc2c913203dc8629dc233d4384dcc41c91e77f stm32h7
+hw/mcu/st/cmsis_device_h7rs https://github.com/STMicroelectronics/cmsis_device_h7rs.git 832649d1fd09bd901e9f68e979522e5c209ebf20 stm32h7rs
+hw/mcu/st/cmsis_device_l0 https://github.com/STMicroelectronics/cmsis_device_l0.git 69cd5999fd40ae6e546d4905b21635c6ca1bcb92 stm32l0
+hw/mcu/st/cmsis_device_l1 https://github.com/STMicroelectronics/cmsis_device_l1.git 7f16ec0a1c4c063f84160b4cc6bf88ad554a823e stm32l1
+hw/mcu/st/cmsis_device_l4 https://github.com/STMicroelectronics/cmsis_device_l4.git 6ca7312fa6a5a460b5a5a63d66da527fdd8359a6 stm32l4
+hw/mcu/st/cmsis_device_l5 https://github.com/STMicroelectronics/cmsis_device_l5.git d922865fc0326a102c26211c44b8e42f52c1e53d stm32l5
+hw/mcu/st/cmsis_device_n6 https://github.com/STMicroelectronics/cmsis-device-n6.git f818b00f775444e8d19ef6cad822534c345e054f stm32n6
+hw/mcu/st/cmsis_device_u5 https://github.com/STMicroelectronics/cmsis_device_u5.git 5ad9797c54ec3e55eff770fc9b3cd4a1aefc1309 stm32u5
+hw/mcu/st/cmsis_device_wb https://github.com/STMicroelectronics/cmsis_device_wb.git d6a7fa2e7de084f5e5e47f2ab88b022fe9b50e5a stm32wb
+hw/mcu/st/stm32-mfxstm32l152 https://github.com/STMicroelectronics/stm32-mfxstm32l152.git 7f4389efee9c6a655b55e5df3fceef5586b35f9b stm32h7
+hw/mcu/st/stm32c0xx_hal_driver https://github.com/STMicroelectronics/stm32c0xx_hal_driver.git 41253e2f1d7ae4a4d0c379cf63f5bcf71fcf8eb3 stm32c0
+hw/mcu/st/stm32f0xx_hal_driver https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git 0e95cd88657030f640a11e690a8a5186c7712ea5 stm32f0
+hw/mcu/st/stm32f1xx_hal_driver https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git 1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29 stm32f1
+hw/mcu/st/stm32f2xx_hal_driver https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git c75ace9b908a9aca631193ebf2466963b8ea33d0 stm32f2
+hw/mcu/st/stm32f3xx_hal_driver https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git 1761b6207318ede021706e75aae78f452d72b6fa stm32f3
+hw/mcu/st/stm32f4xx_hal_driver https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git 04e99fbdabd00ab8f370f377c66b0a4570365b58 stm32f4
+hw/mcu/st/stm32f7xx_hal_driver https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git f7ffdf6bf72110e58b42c632b0a051df5997e4ee stm32f7
+hw/mcu/st/stm32g0xx_hal_driver https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git e911b12c7f67084d7f6b76157a4c0d4e2ec3779c stm32g0
+hw/mcu/st/stm32g4xx_hal_driver https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git 8b4518417706d42eef5c14e56a650005abf478a8 stm32g4
+hw/mcu/st/stm32h5xx_hal_driver https://github.com/STMicroelectronics/stm32h5xx_hal_driver.git 2cf77de584196d619cec1b4586c3b9e2820a254e stm32h5
+hw/mcu/st/stm32h7rsxx_hal_driver https://github.com/STMicroelectronics/stm32h7rsxx-hal-driver.git 7ca2e07ca21bc66b53654e845b4c85c884343b60 stm32h7rs
+hw/mcu/st/stm32h7xx_hal_driver https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git d8461b980b59b1625207d8c4f2ce0a9c2a7a3b04 stm32h7
+hw/mcu/st/stm32l0xx_hal_driver https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b stm32l0
+hw/mcu/st/stm32l1xx_hal_driver https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git 44efc446fa69ed8344e7fd966e68ed11043b35d9 stm32l1
+hw/mcu/st/stm32l4xx_hal_driver https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git aee3d5bf283ae5df87532b781bdd01b7caf256fc stm32l4
+hw/mcu/st/stm32l5xx_hal_driver https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git 675c32a75df37f39d50d61f51cb0dcf53f07e1cb stm32l5
+hw/mcu/st/stm32n6xx_hal_driver https://github.com/STMicroelectronics/stm32n6xx-hal-driver.git 49f9989d10cf6817d4b07ac01848956b46bd0fd6 stm32n6
+hw/mcu/st/stm32u5xx_hal_driver https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git 4d93097a67928e9377e655ddd14622adc31b9770 stm32u5
+hw/mcu/st/stm32wbxx_hal_driver https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git 2c5f06638be516c1b772f768456ba637f077bac8 stm32wb
+hw/mcu/ti https://github.com/hathach/ti_driver.git 143ed6cc20a7615d042b03b21e070197d473e6e5 msp430 msp432e4 tm4c
+hw/mcu/wch/ch32f20x https://github.com/openwch/ch32f20x.git 77c4095087e5ed2c548ec9058e655d0b8757663b ch32f20x
+hw/mcu/wch/ch32v103 https://github.com/openwch/ch32v103.git 7578cae0b21f86dd053a1f781b2fc6ab99d0ec17 ch32v10x
+hw/mcu/wch/ch32v20x https://github.com/openwch/ch32v20x.git c4c38f507e258a4e69b059ccc2dc27dde33cea1b ch32v20x
+hw/mcu/wch/ch32v307 https://github.com/openwch/ch32v307.git 184f21b852cb95eed58e86e901837bc9fff68775 ch32v307
+lib/CMSIS_5 https://github.com/ARM-software/CMSIS_5.git 2b7495b8535bdcb306dac29b9ded4cfb679d7e5c imxrt kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx mm32 msp432e4 nrf saml2x lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43 stm32c0 stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32g0 stm32g4 stm32h5 stm32h7 stm32h7rs stm32l0 stm32l1 stm32l4 stm32l5 stm32n6 stm32u5 stm32wb sam3x samd11 samd21 samd51 samd5x_e5x same5x same7x saml2x samg tm4c
+lib/CMSIS_6 https://github.com/ARM-software/CMSIS_6.git b0bbb0423b278ca632cfe1474eb227961d835fd2 ra
+lib/FreeRTOS-Kernel https://github.com/FreeRTOS/FreeRTOS-Kernel.git cc0e0707c0c748713485b870bb980852b210877f all
+lib/lwip https://github.com/lwip-tcpip/lwip.git 159e31b689577dbf69cf0683bbaffbd71fa5ee10 all
+lib/sct_neopixel https://github.com/gsteiert/sct_neopixel.git e73e04ca63495672d955f9268e003cffe168fcd8 lpc55
+tools/uf2 https://github.com/microsoft/uf2.git c594542b2faa01cc33a2b97c9fbebc38549df80a all
+======================================== ================================================================ ======================================== ======================================================================================================================================================================================================================================================================================================================================================
diff --git a/docs/reference/getting_started.rst b/docs/reference/getting_started.rst
index ac4ab6392..bb9ff1cb4 100644
--- a/docs/reference/getting_started.rst
+++ b/docs/reference/getting_started.rst
@@ -5,23 +5,32 @@ Getting Started
Add TinyUSB to your project
---------------------------
-It is relatively simple to incorporate tinyusb to your project
+To incorporate tinyusb to your project
-* Copy or ``git submodule`` this repo into your project in a subfolder. Let's say it is *your_project/tinyusb*
-* Add all the .c in the ``tinyusb/src`` folder to your project
-* Add *your_project/tinyusb/src* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h.
-* Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all boards).
+* Copy or ``git submodule`` this repo into your project in a subfolder. Let's say it is ``your_project/tinyusb``
+* Add all the ``.c`` in the ``tinyusb/src`` folder to your project
+* Add ``your_project/tinyusb/src`` to your include path. Also make sure your current include path also contains the configuration file ``tusb_config.h``.
+* Make sure all required macros are all defined properly in ``tusb_config.h`` (configure file in demo application is sufficient, but you need to add a few more such as ``CFG_TUSB_MCU``, ``CFG_TUSB_OS`` since they are passed by make/cmake to maintain a unique configure for all boards).
* If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to implement all **tud descriptor** callbacks for the stack to work.
-* Add tusb_init(rhport, role) call to your reset initialization code.
+* Add ``tusb_init(rhport, role)`` call to your reset initialization code.
* Call ``tusb_int_handler(rhport, in_isr)`` in your USB IRQ Handler
* Implement all enabled classes's callbacks.
-* If you don't use any RTOSes at all, you need to continuously and/or periodically call tud_task()/tuh_task() function. All of the callbacks and functionality are handled and invoked within the call of that task runner.
+* If you don't use any RTOSes at all, you need to continuously and/or periodically call ``tud_task()``/``tuh_task()`` function. All of the callbacks and functionality are handled and invoked within the call of that task runner.
-.. code-block::
+.. code-block:: c
int main(void) {
- your_init_code();
- tusb_init(0, TUSB_ROLE_DEVICE); // initialize device stack on roothub port 0
+ tusb_rhport_init_t dev_init = {
+ .role = TUSB_ROLE_DEVICE,
+ .speed = TUSB_SPEED_AUTO
+ };
+ tusb_init(0, &dev_init); // initialize device stack on roothub port 0
+
+ tusb_rhport_init_t host_init = {
+ .role = TUSB_ROLE_HOST,
+ .speed = TUSB_SPEED_AUTO
+ };
+ tusb_init(1, &host_init); // initialize host stack on roothub port 1
while(1) { // the mainloop
your_application_code();
@@ -30,12 +39,20 @@ It is relatively simple to incorporate tinyusb to your project
}
}
+ void USB0_IRQHandler(void) {
+ tusb_int_handler(0, true);
+ }
+
+ void USB1_IRQHandler(void) {
+ tusb_int_handler(1, true);
+ }
+
Examples
--------
-For your convenience, TinyUSB contains a handful of examples for both host and device with/without RTOS to quickly test the functionality as well as demonstrate how API() should be used. Most examples will work on most of `the supported boards `_. Firstly we need to ``git clone`` if not already
+For your convenience, TinyUSB contains a handful of examples for both host and device with/without RTOS to quickly test the functionality as well as demonstrate how API should be used. Most examples will work on most of `the supported boards `_. Firstly we need to ``git clone`` if not already
-.. code-block::
+.. code-block:: bash
$ git clone https://github.com/hathach/tinyusb tinyusb
$ cd tinyusb
@@ -45,41 +62,53 @@ Some ports will also require a port-specific SDK (e.g. RP2040) or binary (e.g. S
Dependencies
^^^^^^^^^^^^
-The hardware code is located in ``hw/bsp`` folder, and is organized by family/boards. e.g raspberry_pi_pico is located in ``hw/bsp/rp2040/boards/raspberry_pi_pico`` where FAMILY=rp2040 and BOARD=raspberry_pi_pico. Before building, we firstly need to download dependencies such as: MCU low-level peripheral driver and external libraries e.g FreeRTOS (required by some examples). We can do that by either ways:
+The hardware code is located in ``hw/bsp`` folder, and is organized by family/boards. e.g raspberry_pi_pico is located in ``hw/bsp/rp2040/boards/raspberry_pi_pico`` where ``FAMILY=rp2040`` and ``BOARD=raspberry_pi_pico``. Before building, we firstly need to download dependencies such as: MCU low-level peripheral driver and external libraries e.g FreeRTOS (required by some examples). We can do that by either ways:
1. Run ``tools/get_deps.py {FAMILY}`` script to download all dependencies for a family as follow. Note: For TinyUSB developer to download all dependencies, use FAMILY=all.
-.. code-block::
+.. code-block:: bash
$ python tools/get_deps.py rp2040
2. Or run the ``get-deps`` target in one of the example folder as follow.
-.. code-block::
+.. code-block:: bash
$ cd examples/device/cdc_msc
- $ make BOARD=raspberry_pi_pico get-deps
+ $ make BOARD=feather_nrf52840_express get-deps
You only need to do this once per family. Check out `complete list of dependencies and their designated path here `_
-Build
-^^^^^
+Build Examples
+^^^^^^^^^^^^^^
-To build example, first change directory to an example folder.
+Examples support make and cmake build system for most MCUs, however some MCU families such as espressif or rp2040 only support cmake. First change directory to an example folder.
-.. code-block::
+.. code-block:: bash
$ cd examples/device/cdc_msc
-Then compile with ``make BOARD={board_name} all`` , for example
+Then compile with make or cmake
-.. code-block::
+.. code-block:: bash
- $ make BOARD=raspberry_pi_pico all
+ $ # make
+ $ make BOARD=feather_nrf52840_express all
+
+ $ # cmake
+ $ mkdir build && cd build
+ $ cmake -DBOARD=raspberry_pi_pico ..
+ $ make
+
+To list all available targets with cmake
+
+.. code-block:: bash
+
+ $ cmake --build . --target help
Note: some examples especially those that uses Vendor class (e.g webUSB) may requires udev permission on Linux (and/or macOS) to access usb device. It depends on your OS distro, typically copy ``99-tinyusb.rules`` and reload your udev is good to go
-.. code-block::
+.. code-block:: bash
$ cp examples/device/99-tinyusb.rules /etc/udev/rules.d/
$ sudo udevadm control --reload-rules && sudo udevadm trigger
@@ -87,27 +116,31 @@ Note: some examples especially those that uses Vendor class (e.g webUSB) may req
RootHub Port Selection
~~~~~~~~~~~~~~~~~~~~~~
-If a board has several ports, one port is chosen by default in the individual board.mk file. Use option ``PORT=x`` To choose another port. For example to select the HS port of a STM32F746Disco board, use:
+If a board has several ports, one port is chosen by default in the individual board.mk file. Use option ``RHPORT_DEVICE=x`` or ``RHPORT_HOST=x`` To choose another port. For example to select the HS port of a STM32F746Disco board, use:
-.. code-block::
+.. code-block:: bash
- $ make BOARD=stm32f746disco PORT=1 all
+ $ make BOARD=stm32f746disco RHPORT_DEVICE=1 all
+
+ $ cmake -DBOARD=stm32f746disco -DRHPORT_DEVICE=1 ..
Port Speed
~~~~~~~~~~
-A MCU can support multiple operational speed. By default, the example build system will use the fastest supported on the board. Use option ``SPEED=full/high`` e.g To force F723 operate at full instead of default high speed
+A MCU can support multiple operational speed. By default, the example build system will use the fastest supported on the board. Use option ``RHPORT_DEVICE_SPEED=OPT_MODE_FULL/HIGH_SPEED/`` or ``RHPORT_HOST_SPEED=OPT_MODE_FULL/HIGH_SPEED/`` e.g To force F723 operate at full instead of default high speed
-.. code-block::
+.. code-block:: bash
- $ make BOARD=stm32f746disco SPEED=full all
+ $ make BOARD=stm32f746disco RHPORT_DEVICE_SPEED=OPT_MODE_FULL_SPEED all
+
+ $ cmake -DBOARD=stm32f746disco -DRHPORT_DEVICE_SPEED=OPT_MODE_FULL_SPEED ..
Size Analysis
~~~~~~~~~~~~~
-First install `linkermap tool `_ then ``linkermap`` target can be used to analyze code size. You may want to compile with ``NO_LTO=1`` since -flto merges code across .o files and make it difficult to analyze.
+First install `linkermap tool `_ then ``linkermap`` target can be used to analyze code size. You may want to compile with ``NO_LTO=1`` since ``-flto`` merges code across ``.o`` files and make it difficult to analyze.
-.. code-block::
+.. code-block:: bash
$ make BOARD=feather_nrf52840_express NO_LTO=1 all linkermap
@@ -116,19 +149,23 @@ Debug
To compile for debugging add ``DEBUG=1``\ , for example
-.. code-block::
+.. code-block:: bash
$ make BOARD=feather_nrf52840_express DEBUG=1 all
+ $ cmake -DBOARD=feather_nrf52840_express -DCMAKE_BUILD_TYPE=Debug ..
+
Log
~~~
-Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional ``LOG=``. LOG=1 will only print out error message, LOG=2 print more information with on-going events. LOG=3 or higher is not used yet.
+Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional ``LOG=``. ``LOG=1`` will only print out error message, ``LOG=2`` print more information with on-going events. ``LOG=3`` or higher is not used yet.
-.. code-block::
+.. code-block:: bash
$ make BOARD=feather_nrf52840_express LOG=2 all
+ $ cmake -DBOARD=feather_nrf52840_express -DLOG=2 ..
+
Logger
~~~~~~
@@ -147,74 +184,80 @@ By default log message is printed via on-board UART which is slow and take lots
* Pros: should be compatible with more debugger that support SWO.
* Software viewer should be provided along with your debugger driver.
-.. code-block::
+.. code-block:: bash
$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=rtt all
$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=swo all
+ $ cmake -DBOARD=feather_nrf52840_express -DLOG=2 -DLOGGER=rtt ..
+ $ cmake -DBOARD=feather_nrf52840_express -DLOG=2 -DLOGGER=swo ..
+
Flash
^^^^^
``flash`` target will use the default on-board debugger (jlink/cmsisdap/stlink/dfu) to flash the binary, please install those support software in advance. Some board use bootloader/DFU via serial which is required to pass to make command
-.. code-block::
+.. code-block:: bash
$ make BOARD=feather_nrf52840_express flash
$ make SERIAL=/dev/ttyACM0 BOARD=feather_nrf52840_express flash
-Since jlink can be used with most of the boards, there is also ``flash-jlink`` target for your convenience.
+Since jlink/openocd can be used with most of the boards, there is also ``flash-jlink/openocd`` (make) and ``EXAMPLE-jlink/openocd`` target for your convenience. Note for stm32 board with stlink, you can use ``flash-stlink`` target as well.
-.. code-block::
+.. code-block:: bash
$ make BOARD=feather_nrf52840_express flash-jlink
+ $ make BOARD=feather_nrf52840_express flash-openocd
+
+ $ cmake --build . --target cdc_msc-jlink
+ $ cmake --build . --target cdc_msc-openocd
Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can be generated with ``uf2`` target
-.. code-block::
+.. code-block:: bash
$ make BOARD=feather_nrf52840_express all uf2
+ $ cmake --build . --target cdc_msc-uf2
+
IAR Support
------------
+^^^^^^^^^^^
Use project connection
-^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~
IAR Project Connection files are provided to import TinyUSB stack into your project.
-* A buldable project of your MCU need to be created in advance.
-
+* A buildable project of your MCU need to be created in advance.
* Take example of STM32F0:
- - You need `stm32l0xx.h`, `startup_stm32f0xx.s`, `system_stm32f0xx.c`.
+ - You need ``stm32l0xx.h``, ``startup_stm32f0xx.s``, ``system_stm32f0xx.c``.
- - `STM32L0xx_HAL_Driver` is only needed to run examples, TinyUSB stack itself doesn't rely on MCU's SDKs.
+ - ``STM32L0xx_HAL_Driver`` is only needed to run examples, TinyUSB stack itself doesn't rely on MCU's SDKs.
-* Open ``Tools -> Configure Custom Argument Variables`` (Switch to `Global` tab if you want to do it for all your projects)
- Click `New Group ...`, name it to `TUSB`, Click `Add Variable ...`, name it to `TUSB_DIR`, change it's value to the path of your TinyUSB stack,
- for example `C:\\tinyusb`
+* Open ``Tools -> Configure Custom Argument Variables`` (Switch to ``Global`` tab if you want to do it for all your projects)
+ Click ``New Group ...``, name it to ``TUSB``, Click ``Add Variable ...``, name it to ``TUSB_DIR``, change it's value to the path of your TinyUSB stack,
+ for example ``C:\\tinyusb``
-Import stack only
-~~~~~~~~~~~~~~~~~
+**Import stack only**
-1. Open ``Project -> Add project Connection ...``, click `OK`, choose `tinyusb\\tools\\iar_template.ipcf`.
+Open ``Project -> Add project Connection ...``, click ``OK``, choose ``tinyusb\\tools\\iar_template.ipcf``.
-Run examples
-~~~~~~~~~~~~
+**Run examples**
-1. (Python3 is needed) Run ``iar_gen.py`` to generate .ipcf files of examples:
+1. Run ``iar_gen.py`` to generate .ipcf files of examples:
.. code-block::
- cd C:\tinyusb\tools
- python iar_gen.py
+ > cd C:\tinyusb\tools
+ > python iar_gen.py
-2. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\examples\\(.ipcf of example)`.
- For example `C:\\tinyusb\\examples\\device\\cdc_msc\\iar_cdc_msc.ipcf`
+2. Open ``Project -> Add project Connection ...``, click ``OK``, choose ``tinyusb\\examples\\(.ipcf of example)``.
+ For example ``C:\\tinyusb\\examples\\device\\cdc_msc\\iar_cdc_msc.ipcf``
-Native CMake support (9.50.1+)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Native CMake support
+~~~~~~~~~~~~~~~~~~~~
With 9.50.1 release, IAR added experimental native CMake support (strangely not mentioned in public release note). Now it's possible to import CMakeLists.txt then build and debug as a normal project.
@@ -222,5 +265,5 @@ Following these steps:
1. Add IAR compiler binary path to system ``PATH`` environment variable, such as ``C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm\bin``.
2. Create new project in IAR, in Tool chain dropdown menu, choose CMake for Arm then Import ``CMakeLists.txt`` from chosen example directory.
-3. Set up board option in ``Option - CMake/CMSIS-TOOLBOX - CMake``, for example :code:`-DBOARD=stm32f439nucleo -DTOOLCHAIN=iar`, **Uncheck 'Override tools in env'**.
+3. Set up board option in ``Option - CMake/CMSIS-TOOLBOX - CMake``, for example ``-DBOARD=stm32f439nucleo -DTOOLCHAIN=iar``, **Uncheck 'Override tools in env'**.
4. (For debug only) Choose correct CPU model in ``Option - General Options - Target``, to profit register and memory view.
diff --git a/docs/reference/index.rst b/docs/reference/index.rst
index 9ecdf619b..8ac3cf924 100644
--- a/docs/reference/index.rst
+++ b/docs/reference/index.rst
@@ -1,85 +1,10 @@
-*********
-Reference
-*********
-
-.. figure:: ../assets/stack.svg
- :width: 1600px
- :alt: TinyUSB
-
-::
-
- .
- ├── docs # Documentation
- ├── examples # Examples with make and cmake build system
- ├── hw
- │ ├── bsp # Supported boards source files
- │ └── mcu # Low level mcu core & peripheral drivers
- ├── lib # Sources from 3rd party such as freeRTOS, fatfs ...
- ├── src # All sources files for TinyUSB stack itself.
- ├── test # Tests: unit test, fuzzing, hardware test
- └── tools # Files used internally
-
-
-Device Stack
-============
-
-Supports multiple device configurations by dynamically changing USB descriptors, low power functions such like suspend, resume, and remote wakeup. The following device classes are supported:
-
-- Audio Class 2.0 (UAC2)
-- Bluetooth Host Controller Interface (BTH HCI)
-- Communication Device Class (CDC)
-- Device Firmware Update (DFU): DFU mode (WIP) and Runtime
-- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
-- Mass Storage Class (MSC): with multiple LUNs
-- Musical Instrument Digital Interface (MIDI)
-- Network with RNDIS, Ethernet Control Model (ECM), Network Control Model (NCM)
-- Test and Measurement Class (USBTMC)
-- Video class 1.5 (UVC): work in progress
-- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.
-- `WebUSB `__ with vendor-specific class
-
-If you have a special requirement, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how the RPi team added their reset interface `raspberrypi/pico-sdk#197 `_
-
-Host Stack
-==========
-
-- Human Interface Device (HID): Keyboard, Mouse, Generic
-- Mass Storage Class (MSC)
-- Communication Device Class: CDC-ACM
-- Vendor serial over USB: FTDI, CP210x
-- Hub with multiple-level support
-
-Similar to the Device Stack, if you have a special requirement, `usbh_app_driver_get_cb()` can be used to write your own class driver without modifying the stack.
-
-TypeC PD Stack
-==============
-
-- Power Delivery 3.0 (PD3.0) with USB Type-C support (WIP)
-- Super early stage, only for testing purpose
-- Only support STM32 G4
-
-OS Abstraction layer
-====================
-
-TinyUSB is completely thread-safe by pushing all Interrupt Service Request (ISR) events into a central queue, then processing them later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as Communication Device Class (CDC) FIFO. Therefore the stack needs to use some of the OS's basic APIs. Following OSes are already supported out of the box.
-
-- **No OS**
-- **FreeRTOS**
-- `RT-Thread `_: `repo `_
-- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its `own repo `_
-
-License
-=======
-
-All TinyUSB sources in the `src` folder are licensed under MIT license. However, each file can be individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project.
-
Index
=====
.. toctree::
:maxdepth: 2
- supported
getting_started
+ boards
dependencies
concurrency
diff --git a/docs/reference/supported.rst b/docs/reference/supported.rst
deleted file mode 100644
index cbd6c4786..000000000
--- a/docs/reference/supported.rst
+++ /dev/null
@@ -1,442 +0,0 @@
-*****************
-Supported Devices
-*****************
-
-Supported MCUs
-==============
-
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Manufacturer | Family | Device | Host | Highspeed | Driver | Note |
-+==============+=============================+========+======+===========+========================+===================+
-| Allwinner | F1C100s/F1C200s | ✔ | | ✔ | sunxi | musb variant |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Analog | MAX3421E | | ✔ | ✖ | max3421 | via SPI |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | MAX32 650, 666, 690, | ✔ | | ✔ | musb | 1-dir ep |
-| | MAX78002 | | | | | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Brigetek | FT90x | ✔ | | ✔ | ft9xx | 1-dir ep |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Broadcom | BCM2711, BCM2837 | ✔ | | ✔ | dwc2 | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Dialog | DA1469x | ✔ | ✖ | ✖ | da146xx | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Espressif | S2, S3 | ✔ | ✔ | ✖ | dwc2 or esp32sx | |
-| ESP32 +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | P4 | ✔ | ✔ | ✔ | dwc2 | |
-+--------------+----+------------------------+--------+------+-----------+------------------------+-------------------+
-| GigaDevice | GD32VF103 | ✔ | | ✖ | dwc2 | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Infineon | XMC4500 | ✔ | ✔ | ✖ | dwc2 | |
-+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
-| MicroChip | SAM | D11, D21, L21, L22 | ✔ | | ✖ | samd | |
-| | +-----------------------+--------+------+-----------+------------------------+-------------------+
-| | | D51, E5x | ✔ | | ✖ | samd | |
-| | +-----------------------+--------+------+-----------+------------------------+-------------------+
-| | | G55 | ✔ | | ✖ | samg | 1-dir ep |
-| | +-----------------------+--------+------+-----------+------------------------+-------------------+
-| | | E70,S70,V70,V71 | ✔ | | ✔ | samx7x | 1-dir ep |
-| +-----+-----------------------+--------+------+-----------+------------------------+-------------------+
-| | PIC | 24 | ✔ | | | pic | ci_fs variant |
-| | +-----------------------+--------+------+-----------+------------------------+-------------------+
-| | | 32 mm, mk, mx | ✔ | | | pic | ci_fs variant |
-| | +-----------------------+--------+------+-----------+------------------------+-------------------+
-| | | dsPIC33 | ✔ | | | pic | ci_fs variant |
-| | +-----------------------+--------+------+-----------+------------------------+-------------------+
-| | | 32mz | ✔ | | | pic32mz | musb variant |
-+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
-| Mind Montion | mm32 | ✔ | | ✖ | mm32f327x_otg | ci_fs variant |
-+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
-| NordicSemi | nRF 52833, 52840, 5340 | ✔ | ✖ | ✖ | nrf5x | only ep8 is ISO |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Nuvoton | NUC120 | ✔ | ✖ | ✖ | nuc120 | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | NUC121/NUC125 | ✔ | ✖ | ✖ | nuc121 | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | NUC126 | ✔ | ✖ | ✖ | nuc121 | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | NUC505 | ✔ | | ✔ | nuc505 | |
-+--------------+---------+-------------------+--------+------+-----------+------------------------+-------------------+
-| NXP | iMXRT | RT 10xx, 11xx | ✔ | ✔ | ✔ | ci_hs | |
-| +---------+-------------------+--------+------+-----------+------------------------+-------------------+
-| | Kinetis | KL | ✔ | ⚠ | ✖ | ci_fs, khci | |
-| | +-------------------+--------+------+-----------+------------------------+-------------------+
-| | | K32L2 | ✔ | | ✖ | khci | ci_fs variant |
-| +---------+-------------------+--------+------+-----------+------------------------+-------------------+
-| | LPC | 11u, 13, 15 | ✔ | ✖ | ✖ | lpc_ip3511 | |
-| | +-------------------+--------+------+-----------+------------------------+-------------------+
-| | | 17, 40 | ✔ | ⚠ | ✖ | lpc17_40 | |
-| | +-------------------+--------+------+-----------+------------------------+-------------------+
-| | | 18, 43 | ✔ | ✔ | ✔ | ci_hs | |
-| | +-------------------+--------+------+-----------+------------------------+-------------------+
-| | | 51u | ✔ | ✖ | ✖ | lpc_ip3511 | |
-| | +-------------------+--------+------+-----------+------------------------+-------------------+
-| | | 54, 55 | ✔ | | ✔ | lpc_ip3511 | |
-| +---------+-------------------+--------+------+-----------+------------------------+-------------------+
-| | MCX | N9, A15 | ✔ | | ✔ | ci_fs, ci_hs | |
-+--------------+---------+-------------------+--------+------+-----------+------------------------+-------------------+
-| Raspberry Pi | RP2040, RP2350 | ✔ | ✔ | ✖ | rp2040, pio_usb | |
-+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
-| Renesas | RX | 63N, 65N, 72N | ✔ | ✔ | ✖ | rusb2 | |
-| +-----+-----------------------+--------+------+-----------+------------------------+-------------------+
-| | RA | 4M1, 4M3, 6M1 | ✔ | ✔ | ✖ | rusb2 | |
-| | +-----------------------+--------+------+-----------+------------------------+-------------------+
-| | | 6M5 | ✔ | ✔ | ✔ | rusb2 | |
-+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+
-| Silabs | EFM32GG12 | ✔ | | ✖ | dwc2 | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| Sony | CXD56 | ✔ | ✖ | ✔ | cxd56 | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| ST STM32 | F0 | ✔ | ✖ | ✖ | stm32_fsdev | |
-| +----+------------------------+--------+------+-----------+------------------------+-------------------+
-| | F1 | 102, 103 | ✔ | ✖ | ✖ | stm32_fsdev | |
-| | +------------------------+--------+------+-----------+------------------------+-------------------+
-| | | 105, 107 | ✔ | ✔ | ✖ | dwc2 | |
-| +----+------------------------+--------+------+-----------+------------------------+-------------------+
-| | F2, F4, F7, H7 | ✔ | ✔ | ✔ | dwc2 | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | F3 | ✔ | ✖ | ✖ | stm32_fsdev | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | C0, G0, H5 | ✔ | | ✖ | stm32_fsdev | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | G4 | ✔ | ✖ | ✖ | stm32_fsdev | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | L0, L1 | ✔ | ✖ | ✖ | stm32_fsdev | |
-| +----+------------------------+--------+------+-----------+------------------------+-------------------+
-| | L4 | 4x2, 4x3 | ✔ | ✖ | ✖ | stm32_fsdev | |
-| | +------------------------+--------+------+-----------+------------------------+-------------------+
-| | | 4x5, 4x6 | ✔ | ✔ | ✖ | dwc2 | |
-| +----+------------------------+--------+------+-----------+------------------------+-------------------+
-| | L4+ | ✔ | ✔ | ✖ | dwc2 | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | L5 | ✔ | ✖ | ✖ | stm32_fsdev | |
-| +----+------------------------+--------+------+-----------+------------------------+-------------------+
-| | U5 | 535, 545 | ✔ | | ✖ | stm32_fsdev | |
-| | +------------------------+--------+------+-----------+------------------------+-------------------+
-| | | 575, 585 | ✔ | ✔ | ✖ | dwc2 | |
-| | +------------------------+--------+------+-----------+------------------------+-------------------+
-| | | 59x,5Ax,5Fx,5Gx | ✔ | ✔ | ✔ | dwc2 | |
-| +----+------------------------+--------+------+-----------+------------------------+-------------------+
-| | WBx5 | ✔ | ✖ | ✖ | stm32_fsdev | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| TI | MSP430 | ✔ | ✖ | ✖ | msp430x5xx | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | MSP432E4 | ✔ | | ✖ | musb | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | TM4C123 | ✔ | | ✖ | musb | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| ValentyUSB | eptri | ✔ | ✖ | ✖ | eptri | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-| WCH | CH32F20x | ✔ | | ✔ | ch32_usbhs | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | CH32V20x | ✔ | | ✖ | stm32_fsdev/ch32_usbfs | |
-| +-----------------------------+--------+------+-----------+------------------------+-------------------+
-| | CH32V307 | ✔ | | ✔ | ch32_usbfs/hs | |
-+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+
-
-
-Table Legend
-------------
-
-========= =========================
-✔ Supported
-⚠ Partial support
-✖ Not supported by hardware
-\[empty\] Unknown
-========= =========================
-
-Supported Boards
-================
-
-The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. It is responsible for getting the MCU started and the USB peripheral clocked with minimal of on-board devices
-
-- One LED : for status
-- One Button : to get input from user
-- One UART : optional for device, but required for host examples
-
-The following boards are supported (sorted alphabetically):
-
-Broadcom
---------
-
-- `Raspberry Pi CM4 `__
-
-Dialog DA146xx
---------------
-
-- `DA14695 Development Kit – USB `__
-- `DA1469x Development Kit – Pro `__
-
-Espressif ESP32-S2
-------------------
-
-- `Adafruit Feather ESP32-S2 `__
-- `Adafruit Magtag 2.9" E-Ink WiFi Display `__
-- `Adafruit Metro ESP32-S2 `__
-- `ESP32-S2-Kaluga-1 `__
-- `ESP32-S2-Saola-1 `__
-
-GigaDevice
-----------
-
-- `Sipeed Longan Nano `__
-
-Infineon
----------
-
-XMC4000
-^^^^^^^
-
-- `XMC4500 Relax (Lite) Kit `__
-
-MicroChip
----------
-
-SAMD11 & SAMD21
-^^^^^^^^^^^^^^^
-
-- `Adafruit Circuit Playground Express `__
-- `Adafruit Feather M0 Express `__
-- `Adafruit ItsyBitsy M0 Express `__
-- `Adafruit Metro M0 Express `__
-- `Great Scott Gadgets Cynthion `__
-- `Microchip SAMD11 Xplained Pro `__
-- `Microchip SAMD21 Xplained Pro `__
-- `Seeeduino Xiao `__
-
-SAMD51 & SAME54
-^^^^^^^^^^^^^^^
-
-- `Adafruit Feather M4 Express `__
-- `Adafruit ItsyBitsy M4 Express `__
-- `Adafruit PyBadge `__
-- `Adafruit PyPortal `__
-- `Adafruit Metro M4 Express `__
-- `D5035-01 `__
-- `Microchip SAME54 Xplained Pro `__
-
-SAME7x
-^^^^^^
-
-- `Microchip SAME70 Xplained `_
-- `QMTECH ATSAME70N19 `_
-
-SAMG
-^^^^
-
-- `Microchip SAMG55 Xplained Pro `__
-
-SAML2x
-^^^^^^
-
-- `SAML21 Xplaind Pro `__
-- `SAML22 Feather `__
-- `Sensor Watch `__
-
-Nordic nRF5x
-------------
-
-- `Adafruit Circuit Playground Bluefruit `__
-- `Adafruit CLUE `__
-- `Adafruit Feather nRF52840 Express `__
-- `Adafruit Feather nRF52840 Sense `__
-- `Adafruit ItsyBitsy nRF52840 Express `__
-- `Arduino Nano 33 BLE `__
-- `Arduino Nano 33 BLE Sense `__
-- `Maker Diary nRF52840 MDK Dongle `__
-- `Nordic nRF52840 Development Kit (aka pca10056) `__
-- `Nordic nRF52840 Dongle (aka pca10059) `__
-- `Nordic nRF52833 Development Kit (aka pca10100) `__
-- `Raytac MDBT50Q-RX Dongle `__
-
-Nuvoton
--------
-
-- NuTiny SDK NUC120
-- `NuTiny NUC121S `__
-- `NuTiny NUC125S `__
-- `NuTiny NUC126V `__
-- `NuTiny SDK NUC505Y `__
-
-NXP
----
-
-iMX RT
-^^^^^^
-
-- `MIMX RT1010 Evaluation Kit `__
-- `MIMX RT1015 Evaluation Kit `__
-- `MIMX RT1020 Evaluation Kit `__
-- `MIMX RT1050 Evaluation Kit `__
-- `MIMX RT1060 Evaluation Kit `__
-- `MIMX RT1064 Evaluation Kit `__
-- `Teensy 4.0 Development Board `__
-- `Teensy 4.1 Development Board `__
-
-Kinetis
-^^^^^^^
-
-- `Freedom FRDM-KL25Z `__
-- `Freedom FRDM-K32L2A4S `__
-- `Freedom FRDM-K32L2B3 `__
-- `KUIIC `__
-
-LPC 11-13-15
-^^^^^^^^^^^^
-
-- `LPCXpresso 11u37 `__
-- `LPCXpresso 11u68 `__
-- `LPCXpresso 1347 `__
-- `LPCXpresso 1549 `__
-
-LPC 17-40
-^^^^^^^^^
-
-- `ARM mbed LPC1768 `__
-- `Embedded Artists LPC4088 Quick Start board `__
-- `LPCXpresso 1769 `__
-
-LPC 18-43
-^^^^^^^^^
-
-- `Embedded Artists LPC4357 Developer Kit `__
-- `Keil MCB1800 Evaluation Board `__
-- `LPCXpresso18S37 Development Board `__
-
-LPC 51
-^^^^^^
-
-- `LPCXpresso 51U68 `__
-
-LPC 54
-^^^^^^
-
-- `LPCXpresso 54114 `__
-
-LPC55
-^^^^^
-
-- `Double M33 Express `__
-- `LPCXpresso 55s28 EVK `__
-- `LPCXpresso 55s69 EVK `__
-- `MCU-Link `__
-
-Renesas
--------
-
-RA
-^^
-
-- `Evaluation Kit for RA4M1 `__
-- `Evaluation Kit for RA4M3 `__
-
-RX
-^^
-
-- `GR-CITRUS `__
-- `Renesas RX65N Target Board `__
-
-Raspberry Pi RP2040
--------------------
-
-- `Adafruit Feather RP2040 `__
-- `Adafruit ItsyBitsy RP2040 `__
-- `Adafruit QT Py RP2040 `__
-- `Raspberry Pi Pico `__
-
-Silabs
-------
-
-- `EFM32GG12 Thunderboard Kit (SLTB009A) `__
-
-Sony
-----
-
-- `Sony Spresense CXD5602 `__
-
-ST STM32
---------
-
-F0
-^^
-- `STM32 F070rb Nucleo `__
-- `STM32 F072 Evaluation `__
-- `STM32 F072rb Discovery `__
-
-F1
-^^
-- `STM32 F103c8 Blue Pill `__
-- `STM32 F103rc Mini v2.0 `__
-
-F2
-^^
-- `STM32 F207zg Nucleo `__
-
-F3
-^^
-- `STM32 F303vc Discovery `__
-
-F4
-^^
-- `Adafruit Feather STM32F405 `__
-- `Micro Python PyBoard v1.1 `__
-- `STM32 F401cc Black Pill `__
-- `STM32 F407vg Discovery `__
-- `STM32 F411ce Black Pill `__
-- `STM32 F411ve Discovery `__
-- `STM32 F412zg Discovery `__
-- `STM32 F412zg Nucleo `__
-- `STM32 F439zi Nucleo `__
-
-F7
-^^
-
-- `STLink-V3 Mini `__
-- `STM32 F723e Discovery `__
-- `STM32 F746zg Nucleo `__
-- `STM32 F746g Discovery `__
-- `STM32 F767zi Nucleo `__
-- `STM32 F769i Discovery `__
-
-H7
-^^
-- `STM32 H743zi Nucleo `__
-- `STM32 H743i Evaluation `__
-- `STM32 H745i Discovery `__
-- `Waveshare OpenH743I-C `__
-
-G4
-^^
-- `STM32 G474RE Nucleo `__
-
-L0
-^^
-- `STM32 L035c8 Discovery `__
-
-L4
-^^
-- `STM32 L476vg Discovery `__
-- `STM32 L4P5zg Nucleo `__
-- `STM32 L4R5zi Nucleo `__
-
-WB
-^^
-- `STM32 WB55 Nucleo `__
-
-TI
---
-
-- `MSP430F5529 USB LaunchPad Evaluation Kit `__
-- `MSP-EXP432E401Y LaunchPad Evaluation Kit `__
-- `TM4C123GXL LaunchPad Evaluation Kit `__
-
-Tomu
-----
-
-- `Fomu `__
-
-WCH
----
-
-- `CH32V307V-R1-1v0 `__
-- `CH32F205R-R0-1v0 `__
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index c603d0c22..d34c6ed5d 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
#set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(${CMAKE_CURRENT_SOURCE_DIR}/../hw/bsp/family_support.cmake)
diff --git a/examples/CMakePresets.json b/examples/CMakePresets.json
new file mode 100644
index 000000000..2f904a269
--- /dev/null
+++ b/examples/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/build_system/cmake/cpu/cortex-m0.cmake b/examples/build_system/cmake/cpu/cortex-m0.cmake
index 62019d90d..f837c7eb8 100644
--- a/examples/build_system/cmake/cpu/cortex-m0.cmake
+++ b/examples/build_system/cmake/cpu/cortex-m0.cmake
@@ -1,7 +1,7 @@
if (TOOLCHAIN STREQUAL "gcc")
set(TOOLCHAIN_COMMON_FLAGS
-mthumb
- -mcpu=cortex-m0plus
+ -mcpu=cortex-m0
-mfloat-abi=soft
)
set(FREERTOS_PORT GCC_ARM_CM0 CACHE INTERNAL "")
diff --git a/examples/build_system/cmake/cpu/cortex-m55.cmake b/examples/build_system/cmake/cpu/cortex-m55.cmake
new file mode 100644
index 000000000..a7a57957c
--- /dev/null
+++ b/examples/build_system/cmake/cpu/cortex-m55.cmake
@@ -0,0 +1,26 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m55
+ -mfloat-abi=hard
+ -mfpu=fpv5-d16
+ -mcmse
+ )
+ set(FREERTOS_PORT GCC_ARM_CM55_NTZ_NONSECURE CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "clang")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --target=arm-none-eabi
+ -mcpu=cortex-m55
+ -mfpu=fpv5-d16
+ )
+ set(FREERTOS_PORT GCC_ARM_CM55_NTZ_NONSECURE CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m55
+ --fpu VFPv5_D16
+ )
+ set(FREERTOS_PORT IAR_ARM_CM55_NTZ_NONSECURE CACHE INTERNAL "")
+
+endif ()
diff --git a/examples/build_system/cmake/cpu/cortex-m85.cmake b/examples/build_system/cmake/cpu/cortex-m85.cmake
new file mode 100644
index 000000000..30314acbc
--- /dev/null
+++ b/examples/build_system/cmake/cpu/cortex-m85.cmake
@@ -0,0 +1,25 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ set(TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m85
+ -mfloat-abi=hard
+ -mfpu=fpv5-d16
+ )
+ set(FREERTOS_PORT GCC_ARM_CM85_NTZ_NONSECURE CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "clang")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --target=arm-none-eabi
+ -mcpu=cortex-m85
+ -mfpu=fpv5-d16
+ )
+ set(FREERTOS_PORT GCC_ARM_CM85_NTZ_NONSECURE CACHE INTERNAL "")
+
+elseif (TOOLCHAIN STREQUAL "iar")
+ set(TOOLCHAIN_COMMON_FLAGS
+ --cpu cortex-m85
+ --fpu VFPv5_D16
+ )
+ set(FREERTOS_PORT IAR_ARM_CM85_NTZ_NONSECURE CACHE INTERNAL "")
+
+endif ()
diff --git a/examples/build_system/cmake/toolchain/arm_gcc.cmake b/examples/build_system/cmake/toolchain/arm_gcc.cmake
index 0b0949dd8..6a660e259 100644
--- a/examples/build_system/cmake/toolchain/arm_gcc.cmake
+++ b/examples/build_system/cmake/toolchain/arm_gcc.cmake
@@ -1,3 +1,7 @@
+if (RTOS STREQUAL zephyr)
+ return()
+endif ()
+
if (NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER "arm-none-eabi-gcc")
endif ()
diff --git a/examples/build_system/cmake/toolchain/common.cmake b/examples/build_system/cmake/toolchain/common.cmake
index 688715914..4c181137b 100644
--- a/examples/build_system/cmake/toolchain/common.cmake
+++ b/examples/build_system/cmake/toolchain/common.cmake
@@ -4,6 +4,7 @@ include(CMakePrintHelpers)
# Common
# ----------------------------------------------------------------------------
set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_CPU})
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
# Look for includes and libraries only in the target system prefix.
@@ -13,8 +14,8 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# pass TOOLCHAIN_CPU to
-set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_SYSTEM_PROCESSOR)
-include(${CMAKE_CURRENT_LIST_DIR}/../cpu/${CMAKE_SYSTEM_PROCESSOR}.cmake)
+set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_SYSTEM_PROCESSOR CMAKE_SYSTEM_CPU)
+include(${CMAKE_CURRENT_LIST_DIR}/../cpu/${CMAKE_SYSTEM_CPU}.cmake)
# ----------------------------------------------------------------------------
# Compile flags
diff --git a/examples/build_system/make/cpu/cortex-m4.mk b/examples/build_system/make/cpu/cortex-m4.mk
index 4e16819d1..57d6e126d 100644
--- a/examples/build_system/make/cpu/cortex-m4.mk
+++ b/examples/build_system/make/cpu/cortex-m4.mk
@@ -12,8 +12,8 @@ else ifeq ($(TOOLCHAIN),clang)
-mfpu=fpv4-sp-d16 \
else ifeq ($(TOOLCHAIN),iar)
- CFLAGS += --cpu cortex-m4 --fpu VFPv4
- ASFLAGS += --cpu cortex-m4 --fpu VFPv4
+ CFLAGS += --cpu cortex-m4 --fpu VFPv4-SP
+ ASFLAGS += --cpu cortex-m4 --fpu VFPv4-SP
else
$(error "TOOLCHAIN is not supported")
diff --git a/examples/build_system/make/cpu/cortex-m55.mk b/examples/build_system/make/cpu/cortex-m55.mk
new file mode 100644
index 000000000..de627caed
--- /dev/null
+++ b/examples/build_system/make/cpu/cortex-m55.mk
@@ -0,0 +1,28 @@
+ifeq ($(TOOLCHAIN),gcc)
+ CFLAGS += \
+ -mthumb \
+ -mcpu=cortex-m55 \
+ -mfloat-abi=hard \
+ -mfpu=fpv5-d16 \
+ -mcmse
+
+else ifeq ($(TOOLCHAIN),clang)
+ CFLAGS += \
+ --target=arm-none-eabi \
+ -mcpu=cortex-m55 \
+ -mfpu=fpv5-d16 \
+
+else ifeq ($(TOOLCHAIN),iar)
+ CFLAGS += \
+ --cpu cortex-m55 \
+ --fpu VFPv5_D16 \
+
+ ASFLAGS += \
+ --cpu cortex-m55 \
+ --fpu VFPv5_D16 \
+
+else
+ $(error "TOOLCHAIN is not supported")
+endif
+
+FREERTOS_PORTABLE_SRC ?= $(FREERTOS_PORTABLE_PATH)/ARM_CM55_NTZ/non_secure
diff --git a/examples/build_system/make/cpu/cortex-m85.mk b/examples/build_system/make/cpu/cortex-m85.mk
new file mode 100644
index 000000000..75e8f3aaf
--- /dev/null
+++ b/examples/build_system/make/cpu/cortex-m85.mk
@@ -0,0 +1,27 @@
+ifeq ($(TOOLCHAIN),gcc)
+ CFLAGS += \
+ -mthumb \
+ -mcpu=cortex-m85 \
+ -mfloat-abi=hard \
+ -mfpu=fpv5-d16 \
+
+else ifeq ($(TOOLCHAIN),clang)
+ CFLAGS += \
+ --target=arm-none-eabi \
+ -mcpu=cortex-m85 \
+ -mfpu=fpv5-d16 \
+
+else ifeq ($(TOOLCHAIN),iar)
+ CFLAGS += \
+ --cpu cortex-m85 \
+ --fpu VFPv5_D16 \
+
+ ASFLAGS += \
+ --cpu cortex-m85 \
+ --fpu VFPv5_D16 \
+
+else
+ $(error "TOOLCHAIN is not supported")
+endif
+
+FREERTOS_PORTABLE_SRC ?= $(FREERTOS_PORTABLE_PATH)/ARM_CM85_NTZ/non_secure
diff --git a/examples/build_system/make/make.mk b/examples/build_system/make/make.mk
index 1500a51e0..f70748d34 100644
--- a/examples/build_system/make/make.mk
+++ b/examples/build_system/make/make.mk
@@ -2,11 +2,13 @@
# Common make definition for all examples
# ---------------------------------------
+# upper helper function
+to_upper = $(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$(subst -,_,$(1))))))))))))))))))))))))))))
+
#-------------------------------------------------------------
# Toolchain
# Can be changed via TOOLCHAIN=gcc|iar or CC=arm-none-eabi-gcc|iccarm|clang
#-------------------------------------------------------------
-
ifneq (,$(findstring clang,$(CC)))
TOOLCHAIN = clang
else ifneq (,$(findstring iccarm,$(CC)))
@@ -65,7 +67,9 @@ BUILD := _build/$(BOARD)
PROJECT := $(notdir $(CURDIR))
BIN := $(TOP)/_bin/$(BOARD)/$(notdir $(CURDIR))
-#-------------- Select the board to build for. ------------
+#-------------------------------------------------------------
+# Board / Family
+#-------------------------------------------------------------
# Board without family
ifneq ($(wildcard $(TOP)/hw/bsp/$(BOARD)/board.mk),)
@@ -93,7 +97,9 @@ else
SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c))
endif
-#-------------- Source files and compiler flags --------------
+#-------------------------------------------------------------
+# Source files and compiler flags
+#-------------------------------------------------------------
# tinyusb makefile
include $(TOP)/src/tinyusb.mk
SRC_C += $(TINYUSB_SRC_C)
@@ -106,7 +112,7 @@ INC += \
$(TOP)/$(FAMILY_PATH) \
$(TOP)/src \
-BOARD_UPPER = $(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$(subst -,_,$(BOARD))))))))))))))))))))))))))))
+BOARD_UPPER = $(call to_upper,$(BOARD))
CFLAGS += -DBOARD_$(BOARD_UPPER)
ifdef CFLAGS_CLI
@@ -117,27 +123,24 @@ endif
ifeq (${MAX3421_HOST},1)
SRC_C += src/portable/analog/max3421/hcd_max3421.c
CFLAGS += -DCFG_TUH_MAX3421=1
- CMAKE_DEFSYM += -DMAX3421_HOST=1
endif
# Log level is mapped to TUSB DEBUG option
ifneq ($(LOG),)
- CMAKE_DEFSYM += -DLOG=$(LOG)
CFLAGS += -DCFG_TUSB_DEBUG=$(LOG)
endif
# Logger: default is uart, can be set to rtt or swo
-ifneq ($(LOGGER),)
- CMAKE_DEFSYM += -DLOGGER=$(LOGGER)
-endif
-
ifeq ($(LOGGER),rtt)
- CFLAGS += -DLOGGER_RTT -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
- RTT_SRC = lib/SEGGER_RTT
- INC += $(TOP)/$(RTT_SRC)/RTT
- SRC_C += $(RTT_SRC)/RTT/SEGGER_RTT.c
-else ifeq ($(LOGGER),swo)
+ CFLAGS += -DLOGGER_RTT
+ #CFLAGS += -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
+ INC += $(TOP)/$(lib/SEGGER_RTT)/RTT
+ SRC_C += $(lib/SEGGER_RTT)/RTT/SEGGER_RTT.c
+endif
+ifeq ($(LOGGER),swo)
CFLAGS += -DLOGGER_SWO
+else
+ CFLAGS += -DLOGGER_UART
endif
# CPU specific flags
@@ -148,7 +151,37 @@ endif
# toolchain specific
include ${TOP}/examples/build_system/make/toolchain/arm_$(TOOLCHAIN).mk
-# Handy check parameter function
+#---------------------- FreeRTOS -----------------------
+FREERTOS_SRC = lib/FreeRTOS-Kernel
+FREERTOS_PORTABLE_PATH = $(FREERTOS_SRC)/portable/$(if $(findstring iar,$(TOOLCHAIN)),IAR,GCC)
+
+ifeq ($(RTOS),freertos)
+ SRC_C += \
+ $(FREERTOS_SRC)/list.c \
+ $(FREERTOS_SRC)/queue.c \
+ $(FREERTOS_SRC)/tasks.c \
+ $(FREERTOS_SRC)/timers.c \
+ $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.c))
+
+ SRC_S += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.s))
+ INC += \
+ $(TOP)/hw/bsp/$(FAMILY)/FreeRTOSConfig \
+ $(TOP)/$(FREERTOS_SRC)/include \
+ $(TOP)/$(FREERTOS_PORTABLE_SRC)
+
+ CFLAGS += -DCFG_TUSB_OS=OPT_OS_FREERTOS
+
+ # Suppress FreeRTOSConfig.h warnings
+ CFLAGS_GCC += -Wno-error=redundant-decls
+
+ # Suppress FreeRTOS source warnings
+ CFLAGS_GCC += -Wno-error=cast-qual
+
+ # FreeRTOS (lto + Os) linker issue
+ LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext
+endif
+
+#---------------- Helper ----------------
check_defined = \
$(strip $(foreach 1,$1, \
$(call __check_defined,$1,$(strip $(value 2)))))
diff --git a/examples/device/CMakeLists.txt b/examples/device/CMakeLists.txt
index 26a808a21..bb7dd0a0f 100644
--- a/examples/device/CMakeLists.txt
+++ b/examples/device/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/family_support.cmake)
diff --git a/examples/device/CMakePresets.json b/examples/device/CMakePresets.json
new file mode 100644
index 000000000..c22e8c0ec
--- /dev/null
+++ b/examples/device/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/audio_4_channel_mic/CMakeLists.txt b/examples/device/audio_4_channel_mic/CMakeLists.txt
index 0f5d36193..c8086ae46 100644
--- a/examples/device/audio_4_channel_mic/CMakeLists.txt
+++ b/examples/device/audio_4_channel_mic/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/audio_4_channel_mic/CMakePresets.json b/examples/device/audio_4_channel_mic/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/audio_4_channel_mic/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/audio_4_channel_mic/src/main.c b/examples/device/audio_4_channel_mic/src/main.c
index e8c40309e..f78e48f0c 100644
--- a/examples/device/audio_4_channel_mic/src/main.c
+++ b/examples/device/audio_4_channel_mic/src/main.c
@@ -69,13 +69,8 @@ uint8_t clkValid;
audio_control_range_2_n_t(1) volumeRng[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX+1]; // Volume range state
audio_control_range_4_n_t(1) sampleFreqRng; // Sample frequency range state
-#if CFG_TUD_AUDIO_ENABLE_ENCODING
-// Audio test data, each buffer contains 2 channels, buffer[0] for CH0-1, buffer[1] for CH1-2
-uint16_t i2s_dummy_buffer[CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO][CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX*CFG_TUD_AUDIO_FUNC_1_SAMPLE_RATE/1000/CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO];
-#else
// Audio test data, 4 channels muxed together, buffer[0] for CH0, buffer[1] for CH1, buffer[2] for CH2, buffer[3] for CH3
uint16_t i2s_dummy_buffer[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX*CFG_TUD_AUDIO_FUNC_1_SAMPLE_RATE/1000];
-#endif
void led_blinking_task(void);
void audio_task(void);
@@ -106,27 +101,6 @@ int main(void)
sampleFreqRng.subrange[0].bRes = 0;
// Generate dummy data
-#if CFG_TUD_AUDIO_ENABLE_ENCODING
- uint16_t * p_buff = i2s_dummy_buffer[0];
- uint16_t dataVal = 0;
- for (uint16_t cnt = 0; cnt < AUDIO_SAMPLE_RATE/1000; cnt++)
- {
- // CH0 saw wave
- *p_buff++ = dataVal;
- // CH1 inverted saw wave
- *p_buff++ = 3200 + AUDIO_SAMPLE_RATE/1000 - dataVal;
- dataVal+= 32;
- }
- p_buff = i2s_dummy_buffer[1];
- for (uint16_t cnt = 0; cnt < AUDIO_SAMPLE_RATE/1000; cnt++)
- {
- // CH3 square wave
- *p_buff++ = cnt < (AUDIO_SAMPLE_RATE/1000/2) ? 3400:5000;
- // CH4 sinus wave
- float t = 2*3.1415f * cnt / (AUDIO_SAMPLE_RATE/1000);
- *p_buff++ = (uint16_t)((int16_t)(sinf(t) * 750) + 6000);
- }
-#else
uint16_t * p_buff = i2s_dummy_buffer;
uint16_t dataVal = 0;
for (uint16_t cnt = 0; cnt < AUDIO_SAMPLE_RATE/1000; cnt++)
@@ -142,7 +116,6 @@ int main(void)
float t = 2*3.1415f * cnt / (AUDIO_SAMPLE_RATE/1000);
*p_buff++ = (uint16_t)((int16_t)(sinf(t) * 750) + 6000);
}
-#endif
while (1)
{
@@ -195,15 +168,7 @@ void audio_task(void)
uint32_t curr_ms = board_millis();
if ( start_ms == curr_ms ) return; // not enough time
start_ms = curr_ms;
-#if CFG_TUD_AUDIO_ENABLE_ENCODING
- // Write I2S buffer into FIFO
- for (uint8_t cnt=0; cnt < 2; cnt++)
- {
- tud_audio_write_support_ff(cnt, i2s_dummy_buffer[cnt], AUDIO_SAMPLE_RATE/1000 * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX);
- }
-#else
tud_audio_write(i2s_dummy_buffer, AUDIO_SAMPLE_RATE/1000 * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX);
-#endif
}
//--------------------------------------------------------------------+
diff --git a/examples/device/audio_4_channel_mic/src/tusb_config.h b/examples/device/audio_4_channel_mic/src/tusb_config.h
index 46484f847..446a7a32a 100644
--- a/examples/device/audio_4_channel_mic/src/tusb_config.h
+++ b/examples/device/audio_4_channel_mic/src/tusb_config.h
@@ -115,26 +115,11 @@ extern "C" {
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX 4 // This value is not required by the driver, it parses this information from the descriptor once the alternate interface is set by the host - we use it for the setup
#define CFG_TUD_AUDIO_EP_SZ_IN TUD_AUDIO_EP_SIZE(CFG_TUD_AUDIO_FUNC_1_SAMPLE_RATE, CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX, CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX)
-#define CFG_TUD_AUDIO_ENABLE_ENCODING 1
#define CFG_TUD_AUDIO_EP_IN_FLOW_CONTROL 1
-#if CFG_TUD_AUDIO_ENABLE_ENCODING
-
-#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX CFG_TUD_AUDIO_EP_SZ_IN
-#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SW_BUF_SZ CFG_TUD_AUDIO_EP_SZ_IN
-
-#define CFG_TUD_AUDIO_ENABLE_TYPE_I_ENCODING 1
-#define CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX 2 // One I2S stream contains two channels, each stream is saved within one support FIFO - this value is currently fixed, the driver does not support a changing value
-#define CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO (CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX / CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX)
-#define CFG_TUD_AUDIO_FUNC_1_TX_SUPP_SW_FIFO_SZ (TUD_OPT_HIGH_SPEED ? 32 : 4) * (CFG_TUD_AUDIO_EP_SZ_IN / CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO) // Example write FIFO every 1ms, so it should be 8 times larger for HS device
-
-#else
-
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX CFG_TUD_AUDIO_EP_SZ_IN
#define CFG_TUD_AUDIO_FUNC_1_EP_IN_SW_BUF_SZ (TUD_OPT_HIGH_SPEED ? 32 : 4) * CFG_TUD_AUDIO_EP_SZ_IN // Example write FIFO every 1ms, so it should be 8 times larger for HS device
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/examples/device/audio_4_channel_mic_freertos/CMakeLists.txt b/examples/device/audio_4_channel_mic_freertos/CMakeLists.txt
index 285d4490b..c50d4fef7 100644
--- a/examples/device/audio_4_channel_mic_freertos/CMakeLists.txt
+++ b/examples/device/audio_4_channel_mic_freertos/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/audio_4_channel_mic_freertos/CMakePresets.json b/examples/device/audio_4_channel_mic_freertos/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/audio_4_channel_mic_freertos/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/audio_4_channel_mic_freertos/Makefile b/examples/device/audio_4_channel_mic_freertos/Makefile
index 0202f631c..bd625b345 100644
--- a/examples/device/audio_4_channel_mic_freertos/Makefile
+++ b/examples/device/audio_4_channel_mic_freertos/Makefile
@@ -1,14 +1,9 @@
+RTOS = freertos
include ../../build_system/make/make.mk
-FREERTOS_SRC = lib/FreeRTOS-Kernel
-FREERTOS_PORTABLE_PATH = $(FREERTOS_SRC)/portable/$(if $(findstring iar,$(TOOLCHAIN)),IAR,GCC)
-
INC += \
src \
- src/FreeRTOSConfig \
$(TOP)/hw \
- $(TOP)/$(FREERTOS_SRC)/include \
- $(TOP)/$(FREERTOS_PORTABLE_SRC) \
# Example source
EXAMPLE_SOURCE = \
@@ -17,21 +12,4 @@ EXAMPLE_SOURCE = \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
-# FreeRTOS source, all files in port folder
-SRC_C += \
- $(FREERTOS_SRC)/list.c \
- $(FREERTOS_SRC)/queue.c \
- $(FREERTOS_SRC)/tasks.c \
- $(FREERTOS_SRC)/timers.c \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.c))
-
-SRC_S += \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.s))
-
-# Suppress FreeRTOS warnings
-CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
-
-# FreeRTOS (lto + Os) linker issue
-LDFLAGS += -Wl,--undefined=vTaskSwitchContext
-
include ../../build_system/make/rules.mk
diff --git a/examples/device/audio_4_channel_mic_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h b/examples/device/audio_4_channel_mic_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
deleted file mode 100644
index 902a54f08..000000000
--- a/examples/device/audio_4_channel_mic_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * FreeRTOS Kernel V10.0.0
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software. If you wish to use our Amazon
- * FreeRTOS name, please do so in a fair use way that does not cause confusion.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * http://www.FreeRTOS.org
- * http://aws.amazon.com/freertos
- *
- * 1 tab == 4 spaces!
- */
-
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-/*-----------------------------------------------------------
- * Application specific definitions.
- *
- * These definitions should be adjusted for your particular hardware and
- * application requirements.
- *
- * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
- * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
- *
- * See http://www.freertos.org/a00110.html.
- *----------------------------------------------------------*/
-
-// skip if included from IAR assembler
-#ifndef __IASMARM__
-
-// Include MCU header
-#include "bsp/board_mcu.h"
-
-#if TUSB_MCU_VENDOR_ESPRESSIF
- #error "ESP32-Sx should use IDF's FreeRTOSConfig.h"
-#endif
-
-// TODO fix later
-#if CFG_TUSB_MCU == OPT_MCU_MM32F327X
- extern u32 SystemCoreClock;
-#else
- // FIXME cause redundant-decls warnings
- extern uint32_t SystemCoreClock;
-#endif
-
-#endif
-
-/* Cortex M23/M33 port configuration. */
-#define configENABLE_MPU 0
-#define configENABLE_FPU 1
-#define configENABLE_TRUSTZONE 0
-#define configMINIMAL_SECURE_STACK_SIZE ( 1024 )
-#define configRUN_FREERTOS_SECURE_ONLY 1
-
-#define configUSE_PREEMPTION 1
-#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
-#define configCPU_CLOCK_HZ SystemCoreClock
-#define configTICK_RATE_HZ ( 1000 )
-#define configMAX_PRIORITIES ( 5 )
-#define configMINIMAL_STACK_SIZE ( 128 )
-#define configTOTAL_HEAP_SIZE ( configSUPPORT_DYNAMIC_ALLOCATION*4*1024 )
-#define configMAX_TASK_NAME_LEN 16
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 1
-#define configUSE_MUTEXES 1
-#define configUSE_RECURSIVE_MUTEXES 1
-#define configUSE_COUNTING_SEMAPHORES 1
-#define configQUEUE_REGISTRY_SIZE 4
-#define configUSE_QUEUE_SETS 0
-#define configUSE_TIME_SLICING 0
-#define configUSE_NEWLIB_REENTRANT 0
-#define configENABLE_BACKWARD_COMPATIBILITY 1
-#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
-
-#define configSUPPORT_STATIC_ALLOCATION 1
-#define configSUPPORT_DYNAMIC_ALLOCATION 0
-
-/* Hook function related definitions. */
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configUSE_MALLOC_FAILED_HOOK 0 // cause nested extern warning
-#define configCHECK_FOR_STACK_OVERFLOW 2
-#define configCHECK_HANDLER_INSTALLATION 0
-
-/* Run time and task stats gathering related definitions. */
-#define configGENERATE_RUN_TIME_STATS 0
-#define configUSE_TRACE_FACILITY 1 // legacy trace
-#define configUSE_STATS_FORMATTING_FUNCTIONS 0
-
-/* Co-routine definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 2
-
-/* Software timer related definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES-2)
-#define configTIMER_QUEUE_LENGTH 32
-#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
-
-/* Optional functions - most linkers will remove unused functions anyway. */
-#define INCLUDE_vTaskPrioritySet 0
-#define INCLUDE_uxTaskPriorityGet 0
-#define INCLUDE_vTaskDelete 0
-#define INCLUDE_vTaskSuspend 1 // required for queue, semaphore, mutex to be blocked indefinitely with portMAX_DELAY
-#define INCLUDE_xResumeFromISR 0
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 0
-#define INCLUDE_xTaskGetCurrentTaskHandle 0
-#define INCLUDE_uxTaskGetStackHighWaterMark 0
-#define INCLUDE_xTaskGetIdleTaskHandle 0
-#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
-#define INCLUDE_pcTaskGetTaskName 0
-#define INCLUDE_eTaskGetState 0
-#define INCLUDE_xEventGroupSetBitFromISR 0
-#define INCLUDE_xTimerPendFunctionCall 0
-
-#ifdef __RX__
-/* Renesas RX series */
-#define vSoftwareInterruptISR INT_Excep_ICU_SWINT
-#define vTickISR INT_Excep_CMT0_CMI0
-#define configPERIPHERAL_CLOCK_HZ (configCPU_CLOCK_HZ/2)
-#define configKERNEL_INTERRUPT_PRIORITY 1
-#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
-
-#else
-
-/* FreeRTOS hooks to NVIC vectors */
-#define xPortPendSVHandler PendSV_Handler
-#define xPortSysTickHandler SysTick_Handler
-#define vPortSVCHandler SVC_Handler
-
-//--------------------------------------------------------------------+
-// Interrupt nesting behavior configuration.
-//--------------------------------------------------------------------+
-#if defined(__NVIC_PRIO_BITS)
- // For Cortex-M specific: __NVIC_PRIO_BITS is defined in core_cmx.h
- #define configPRIO_BITS __NVIC_PRIO_BITS
-
-#elif defined(__ECLIC_INTCTLBITS)
- // RISC-V Bumblebee core from nuclei
- #define configPRIO_BITS __ECLIC_INTCTLBITS
-
-#elif defined(__IASMARM__)
- // FIXME: IAR Assembler cannot include mcu header directly to get __NVIC_PRIO_BITS.
- // Therefore we will hard coded it to minimum value of 2 to get pass ci build.
- // IAR user must update this to correct value of the target MCU
- #message "configPRIO_BITS is hard coded to 2 to pass IAR build only. User should update it per MCU"
- #define configPRIO_BITS 2
-
-#else
- #error "FreeRTOS configPRIO_BITS to be defined"
-#endif
-
-/* The lowest interrupt priority that can be used in a call to a "set priority" function. */
-#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY ((1< 0) {
+ board_putchar(ch);
+ #ifndef LOGGER_UART
+ board_uart_write(&ch, 1);
+ #endif
+ }
+
// Blink and print every interval ms
if (!(board_millis() - start_ms < interval_ms)) {
- board_uart_write(HELLO_STR, strlen(HELLO_STR));
-
start_ms = board_millis();
+ if (ch < 0) {
+ // skip if echoing
+ printf(HELLO_STR);
+
+ #ifndef LOGGER_UART
+ board_uart_write(HELLO_STR, strlen(HELLO_STR));
+ #endif
+ }
+
board_led_write(led_state);
led_state = 1 - led_state; // toggle
}
-
- // echo
- uint8_t ch;
- if (board_uart_read(&ch, 1) > 0) {
- board_uart_write(&ch, 1);
- }
}
}
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
void app_main(void) {
main();
}
diff --git a/examples/device/board_test/src/tusb_config.h b/examples/device/board_test/src/tusb_config.h
index 8ac3bc8de..81829d450 100644
--- a/examples/device/board_test/src/tusb_config.h
+++ b/examples/device/board_test/src/tusb_config.h
@@ -44,7 +44,7 @@
#endif
// Espressif IDF requires "freertos/" prefix in include path
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define CFG_TUSB_OS_INC_PATH freertos/
#endif
diff --git a/examples/device/cdc_dual_ports/CMakeLists.txt b/examples/device/cdc_dual_ports/CMakeLists.txt
index f61e1b640..6a7e68c3d 100644
--- a/examples/device/cdc_dual_ports/CMakeLists.txt
+++ b/examples/device/cdc_dual_ports/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/cdc_dual_ports/CMakePresets.json b/examples/device/cdc_dual_ports/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/cdc_dual_ports/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/cdc_msc/CMakeLists.txt b/examples/device/cdc_msc/CMakeLists.txt
index c2f9cb095..b07f92342 100644
--- a/examples/device/cdc_msc/CMakeLists.txt
+++ b/examples/device/cdc_msc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
#set_property(GLOBAL PROPERTY USE_FOLDERS ON)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
@@ -16,20 +16,25 @@ if(FAMILY STREQUAL "espressif")
return()
endif()
-add_executable(${PROJECT})
+if (RTOS STREQUAL zephyr)
+ set(EXE_NAME app)
+else()
+ set(EXE_NAME ${PROJECT})
+ add_executable(${EXE_NAME})
+endif()
# Example source
-target_sources(${PROJECT} PUBLIC
+target_sources(${EXE_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
${CMAKE_CURRENT_SOURCE_DIR}/src/msc_disk.c
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
)
# Example include
-target_include_directories(${PROJECT} PUBLIC
+target_include_directories(${EXE_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
-# Configure compilation flags and libraries for the example... see the corresponding function
-# in hw/bsp/FAMILY/family.cmake for details.
-family_configure_device_example(${PROJECT} noos)
+# Configure compilation flags and libraries for the example without RTOS.
+# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
+family_configure_device_example(${EXE_NAME} ${RTOS})
diff --git a/examples/device/cdc_msc/CMakePresets.json b/examples/device/cdc_msc/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/cdc_msc/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/cdc_msc/prj.conf b/examples/device/cdc_msc/prj.conf
new file mode 100644
index 000000000..2f5139d9d
--- /dev/null
+++ b/examples/device/cdc_msc/prj.conf
@@ -0,0 +1,6 @@
+CONFIG_GPIO=y
+CONFIG_FPU=y
+CONFIG_NO_OPTIMIZATIONS=y
+CONFIG_UART_INTERRUPT_DRIVEN=y
+CONFIG_NRFX_POWER=y
+CONFIG_NRFX_UARTE0=y
diff --git a/examples/device/cdc_msc/src/msc_disk.c b/examples/device/cdc_msc/src/msc_disk.c
index d2f8628f1..458681f58 100644
--- a/examples/device/cdc_msc/src/msc_disk.c
+++ b/examples/device/cdc_msc/src/msc_disk.c
@@ -40,17 +40,15 @@ static bool ejected = false;
If you find any bugs or get any questions, feel free to file an\r\n\
issue at github.com/hathach/tinyusb"
-enum
-{
- DISK_BLOCK_NUM = 16, // 8KB is the smallest size that windows allow to mount
+enum {
+ DISK_BLOCK_NUM = 16,// 8KB is the smallest size that windows allow to mount
DISK_BLOCK_SIZE = 512
};
#ifdef CFG_EXAMPLE_MSC_READONLY
const
#endif
-uint8_t msc_disk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
-{
+uint8_t msc_disk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] = {
//------------- Block0: Boot Sector -------------//
// byte_per_sector = DISK_BLOCK_SIZE; fat12_sector_num_16 = DISK_BLOCK_NUM;
// sector_per_cluster = 1; reserved_sectors = 1;
@@ -59,60 +57,59 @@ uint8_t msc_disk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
// drive_number = 0x80; media_type = 0xf8; extended_boot_signature = 0x29;
// filesystem_type = "FAT12 "; volume_serial_number = 0x1234; volume_label = "TinyUSB MSC";
// FAT magic code at offset 510-511
- {
- 0xEB, 0x3C, 0x90, 0x4D, 0x53, 0x44, 0x4F, 0x53, 0x35, 0x2E, 0x30, 0x00, 0x02, 0x01, 0x01, 0x00,
- 0x01, 0x10, 0x00, 0x10, 0x00, 0xF8, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x29, 0x34, 0x12, 0x00, 0x00, 'T' , 'i' , 'n' , 'y' , 'U' ,
- 'S' , 'B' , ' ' , 'M' , 'S' , 'C' , 0x46, 0x41, 0x54, 0x31, 0x32, 0x20, 0x20, 0x20, 0x00, 0x00,
+{
+ 0xEB, 0x3C, 0x90, 0x4D, 0x53, 0x44, 0x4F, 0x53, 0x35, 0x2E, 0x30, 0x00, 0x02, 0x01, 0x01, 0x00,
+ 0x01, 0x10, 0x00, 0x10, 0x00, 0xF8, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x29, 0x34, 0x12, 0x00, 0x00, 'T', 'i', 'n', 'y', 'U',
+ 'S', 'B', ' ', 'M', 'S', 'C', 0x46, 0x41, 0x54, 0x31, 0x32, 0x20, 0x20, 0x20, 0x00, 0x00,
- // Zero up to 2 last bytes of FAT magic code
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // Zero up to 2 last bytes of FAT magic code
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA
- },
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xAA},
//------------- Block1: FAT12 Table -------------//
- {
- 0xF8, 0xFF, 0xFF, 0xFF, 0x0F // // first 2 entries must be F8FF, third entry is cluster end of readme file
+{
+ 0xF8, 0xFF, 0xFF, 0xFF, 0x0F// // first 2 entries must be F8FF, third entry is cluster end of readme file
},
//------------- Block2: Root Directory -------------//
- {
- // first entry is volume label
- 'T' , 'i' , 'n' , 'y' , 'U' , 'S' , 'B' , ' ' , 'M' , 'S' , 'C' , 0x08, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6D, 0x65, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- // second entry is readme file
- 'R' , 'E' , 'A' , 'D' , 'M' , 'E' , ' ' , ' ' , 'T' , 'X' , 'T' , 0x20, 0x00, 0xC6, 0x52, 0x6D,
- 0x65, 0x43, 0x65, 0x43, 0x00, 0x00, 0x88, 0x6D, 0x65, 0x43, 0x02, 0x00,
- sizeof(README_CONTENTS)-1, 0x00, 0x00, 0x00 // readme's files size (4 Bytes)
+{
+ // first entry is volume label
+ 'T', 'i', 'n', 'y', 'U', 'S', 'B', ' ', 'M', 'S', 'C', 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x6D, 0x65, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ // second entry is readme file
+ 'R', 'E', 'A', 'D', 'M', 'E', ' ', ' ', 'T', 'X', 'T', 0x20, 0x00, 0xC6, 0x52, 0x6D,
+ 0x65, 0x43, 0x65, 0x43, 0x00, 0x00, 0x88, 0x6D, 0x65, 0x43, 0x02, 0x00,
+ sizeof(README_CONTENTS) - 1, 0x00, 0x00, 0x00// readme's files size (4 Bytes)
},
//------------- Block3: Readme Content -------------//
@@ -121,23 +118,21 @@ uint8_t msc_disk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] =
// Invoked when received SCSI_CMD_INQUIRY
// Application fill vendor id, product id and revision with string up to 8, 16, 4 characters respectively
-void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4])
-{
+void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], uint8_t product_rev[4]) {
(void) lun;
const char vid[] = "TinyUSB";
const char pid[] = "Mass Storage";
const char rev[] = "1.0";
- memcpy(vendor_id , vid, strlen(vid));
- memcpy(product_id , pid, strlen(pid));
+ memcpy(vendor_id, vid, strlen(vid));
+ memcpy(product_id, pid, strlen(pid));
memcpy(product_rev, rev, strlen(rev));
}
// Invoked when received Test Unit Ready command.
// return true allowing host to read/write this LUN e.g SD card inserted
-bool tud_msc_test_unit_ready_cb(uint8_t lun)
-{
+bool tud_msc_test_unit_ready_cb(uint8_t lun) {
(void) lun;
// RAM disk is ready until ejected
@@ -152,29 +147,24 @@ bool tud_msc_test_unit_ready_cb(uint8_t lun)
// Invoked when received SCSI_CMD_READ_CAPACITY_10 and SCSI_CMD_READ_FORMAT_CAPACITY to determine the disk size
// Application update block count and block size
-void tud_msc_capacity_cb(uint8_t lun, uint32_t* block_count, uint16_t* block_size)
-{
+void tud_msc_capacity_cb(uint8_t lun, uint32_t *block_count, uint16_t *block_size) {
(void) lun;
*block_count = DISK_BLOCK_NUM;
- *block_size = DISK_BLOCK_SIZE;
+ *block_size = DISK_BLOCK_SIZE;
}
// Invoked when received Start Stop Unit command
// - Start = 0 : stopped power mode, if load_eject = 1 : unload disk storage
// - Start = 1 : active mode, if load_eject = 1 : load disk storage
-bool tud_msc_start_stop_cb(uint8_t lun, uint8_t power_condition, bool start, bool load_eject)
-{
+bool tud_msc_start_stop_cb(uint8_t lun, uint8_t power_condition, bool start, bool load_eject) {
(void) lun;
(void) power_condition;
- if ( load_eject )
- {
- if (start)
- {
+ if (load_eject) {
+ if (start) {
// load disk storage
- }else
- {
+ } else {
// unload disk storage
ejected = true;
}
@@ -185,45 +175,51 @@ bool tud_msc_start_stop_cb(uint8_t lun, uint8_t power_condition, bool start, boo
// Callback invoked when received READ10 command.
// Copy disk's data to buffer (up to bufsize) and return number of copied bytes.
-int32_t tud_msc_read10_cb(uint8_t lun, uint32_t lba, uint32_t offset, void* buffer, uint32_t bufsize)
-{
+int32_t tud_msc_read10_cb(uint8_t lun, uint32_t lba, uint32_t offset, void *buffer, uint32_t bufsize) {
(void) lun;
// out of ramdisk
- if ( lba >= DISK_BLOCK_NUM ) return -1;
+ if (lba >= DISK_BLOCK_NUM) {
+ return -1;
+ }
- uint8_t const* addr = msc_disk[lba] + offset;
+ // Check for overflow of offset + bufsize
+ if (lba * DISK_BLOCK_SIZE + offset + bufsize > DISK_BLOCK_NUM * DISK_BLOCK_SIZE) {
+ return -1;
+ }
+
+ uint8_t const *addr = msc_disk[lba] + offset;
memcpy(buffer, addr, bufsize);
return (int32_t) bufsize;
}
-bool tud_msc_is_writable_cb (uint8_t lun)
-{
+bool tud_msc_is_writable_cb(uint8_t lun) {
(void) lun;
-#ifdef CFG_EXAMPLE_MSC_READONLY
+ #ifdef CFG_EXAMPLE_MSC_READONLY
return false;
-#else
+ #else
return true;
-#endif
+ #endif
}
// Callback invoked when received WRITE10 command.
// Process data in buffer to disk's storage and return number of written bytes
-int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t* buffer, uint32_t bufsize)
-{
+int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t *buffer, uint32_t bufsize) {
(void) lun;
// out of ramdisk
- if ( lba >= DISK_BLOCK_NUM ) return -1;
+ if (lba >= DISK_BLOCK_NUM) return -1;
-#ifndef CFG_EXAMPLE_MSC_READONLY
- uint8_t* addr = msc_disk[lba] + offset;
+ #ifndef CFG_EXAMPLE_MSC_READONLY
+ uint8_t *addr = msc_disk[lba] + offset;
memcpy(addr, buffer, bufsize);
-#else
- (void) lba; (void) offset; (void) buffer;
-#endif
+ #else
+ (void) lba;
+ (void) offset;
+ (void) buffer;
+ #endif
return (int32_t) bufsize;
}
@@ -231,42 +227,18 @@ int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t*
// Callback invoked when received an SCSI command not in built-in list below
// - READ_CAPACITY10, READ_FORMAT_CAPACITY, INQUIRY, MODE_SENSE6, REQUEST_SENSE
// - READ10 and WRITE10 has their own callbacks
-int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, uint16_t bufsize)
-{
- // read10 & write10 has their own callback and MUST not be handled here
+int32_t tud_msc_scsi_cb(uint8_t lun, uint8_t const scsi_cmd[16], void *buffer, uint16_t bufsize) {
+ (void) buffer;
+ (void) bufsize;
- void const* response = NULL;
- int32_t resplen = 0;
-
- // most scsi handled is input
- bool in_xfer = true;
-
- switch (scsi_cmd[0])
- {
+ switch (scsi_cmd[0]) {
default:
// Set Sense = Invalid Command Operation
tud_msc_set_sense(lun, SCSI_SENSE_ILLEGAL_REQUEST, 0x20, 0x00);
// negative means error -> tinyusb could stall and/or response with failed status
- resplen = -1;
- break;
+ return -1;
}
-
- // return resplen must not larger than bufsize
- if ( resplen > bufsize ) resplen = bufsize;
-
- if ( response && (resplen > 0) )
- {
- if(in_xfer)
- {
- memcpy(buffer, response, (size_t) resplen);
- }else
- {
- // SCSI output
- }
- }
-
- return (int32_t) resplen;
}
#endif
diff --git a/examples/device/cdc_msc_freertos/CMakeLists.txt b/examples/device/cdc_msc_freertos/CMakeLists.txt
index 32a9e2930..f7636a07a 100644
--- a/examples/device/cdc_msc_freertos/CMakeLists.txt
+++ b/examples/device/cdc_msc_freertos/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/cdc_msc_freertos/CMakePresets.json b/examples/device/cdc_msc_freertos/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/cdc_msc_freertos/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/cdc_msc_freertos/Makefile b/examples/device/cdc_msc_freertos/Makefile
index c90922b0c..10cff57a0 100644
--- a/examples/device/cdc_msc_freertos/Makefile
+++ b/examples/device/cdc_msc_freertos/Makefile
@@ -1,14 +1,9 @@
+RTOS = freertos
include ../../build_system/make/make.mk
-FREERTOS_SRC = lib/FreeRTOS-Kernel
-FREERTOS_PORTABLE_PATH = $(FREERTOS_SRC)/portable/$(if $(findstring iar,$(TOOLCHAIN)),IAR,GCC)
-
INC += \
src \
- src/FreeRTOSConfig \
$(TOP)/hw \
- $(TOP)/$(FREERTOS_SRC)/include \
- $(TOP)/$(FREERTOS_PORTABLE_SRC) \
# Example source
EXAMPLE_SOURCE = \
@@ -18,28 +13,4 @@ EXAMPLE_SOURCE = \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
-# FreeRTOS source, all files in port folder
-SRC_C += \
- $(FREERTOS_SRC)/list.c \
- $(FREERTOS_SRC)/queue.c \
- $(FREERTOS_SRC)/tasks.c \
- $(FREERTOS_SRC)/timers.c \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.c))
-
-SRC_S += \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.s))
-
-# include heap manage if configSUPPORT_DYNAMIC_ALLOCATION = 1
-# SRC_C += $(FREERTOS_SRC)/portable/MemMang/heap_1.c
-# CFLAGS += -Wno-error=sign-compare
-
-# Suppress FreeRTOSConfig.h warnings
-CFLAGS_GCC += -Wno-error=redundant-decls
-
-# Suppress FreeRTOS source warnings
-CFLAGS_GCC += -Wno-error=cast-qual
-
-# FreeRTOS (lto + Os) linker issue
-LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext
-
include ../../build_system/make/rules.mk
diff --git a/examples/device/cdc_msc_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h b/examples/device/cdc_msc_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
deleted file mode 100644
index 902a54f08..000000000
--- a/examples/device/cdc_msc_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * FreeRTOS Kernel V10.0.0
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software. If you wish to use our Amazon
- * FreeRTOS name, please do so in a fair use way that does not cause confusion.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * http://www.FreeRTOS.org
- * http://aws.amazon.com/freertos
- *
- * 1 tab == 4 spaces!
- */
-
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-/*-----------------------------------------------------------
- * Application specific definitions.
- *
- * These definitions should be adjusted for your particular hardware and
- * application requirements.
- *
- * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
- * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
- *
- * See http://www.freertos.org/a00110.html.
- *----------------------------------------------------------*/
-
-// skip if included from IAR assembler
-#ifndef __IASMARM__
-
-// Include MCU header
-#include "bsp/board_mcu.h"
-
-#if TUSB_MCU_VENDOR_ESPRESSIF
- #error "ESP32-Sx should use IDF's FreeRTOSConfig.h"
-#endif
-
-// TODO fix later
-#if CFG_TUSB_MCU == OPT_MCU_MM32F327X
- extern u32 SystemCoreClock;
-#else
- // FIXME cause redundant-decls warnings
- extern uint32_t SystemCoreClock;
-#endif
-
-#endif
-
-/* Cortex M23/M33 port configuration. */
-#define configENABLE_MPU 0
-#define configENABLE_FPU 1
-#define configENABLE_TRUSTZONE 0
-#define configMINIMAL_SECURE_STACK_SIZE ( 1024 )
-#define configRUN_FREERTOS_SECURE_ONLY 1
-
-#define configUSE_PREEMPTION 1
-#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
-#define configCPU_CLOCK_HZ SystemCoreClock
-#define configTICK_RATE_HZ ( 1000 )
-#define configMAX_PRIORITIES ( 5 )
-#define configMINIMAL_STACK_SIZE ( 128 )
-#define configTOTAL_HEAP_SIZE ( configSUPPORT_DYNAMIC_ALLOCATION*4*1024 )
-#define configMAX_TASK_NAME_LEN 16
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 1
-#define configUSE_MUTEXES 1
-#define configUSE_RECURSIVE_MUTEXES 1
-#define configUSE_COUNTING_SEMAPHORES 1
-#define configQUEUE_REGISTRY_SIZE 4
-#define configUSE_QUEUE_SETS 0
-#define configUSE_TIME_SLICING 0
-#define configUSE_NEWLIB_REENTRANT 0
-#define configENABLE_BACKWARD_COMPATIBILITY 1
-#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
-
-#define configSUPPORT_STATIC_ALLOCATION 1
-#define configSUPPORT_DYNAMIC_ALLOCATION 0
-
-/* Hook function related definitions. */
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configUSE_MALLOC_FAILED_HOOK 0 // cause nested extern warning
-#define configCHECK_FOR_STACK_OVERFLOW 2
-#define configCHECK_HANDLER_INSTALLATION 0
-
-/* Run time and task stats gathering related definitions. */
-#define configGENERATE_RUN_TIME_STATS 0
-#define configUSE_TRACE_FACILITY 1 // legacy trace
-#define configUSE_STATS_FORMATTING_FUNCTIONS 0
-
-/* Co-routine definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 2
-
-/* Software timer related definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES-2)
-#define configTIMER_QUEUE_LENGTH 32
-#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
-
-/* Optional functions - most linkers will remove unused functions anyway. */
-#define INCLUDE_vTaskPrioritySet 0
-#define INCLUDE_uxTaskPriorityGet 0
-#define INCLUDE_vTaskDelete 0
-#define INCLUDE_vTaskSuspend 1 // required for queue, semaphore, mutex to be blocked indefinitely with portMAX_DELAY
-#define INCLUDE_xResumeFromISR 0
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 0
-#define INCLUDE_xTaskGetCurrentTaskHandle 0
-#define INCLUDE_uxTaskGetStackHighWaterMark 0
-#define INCLUDE_xTaskGetIdleTaskHandle 0
-#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
-#define INCLUDE_pcTaskGetTaskName 0
-#define INCLUDE_eTaskGetState 0
-#define INCLUDE_xEventGroupSetBitFromISR 0
-#define INCLUDE_xTimerPendFunctionCall 0
-
-#ifdef __RX__
-/* Renesas RX series */
-#define vSoftwareInterruptISR INT_Excep_ICU_SWINT
-#define vTickISR INT_Excep_CMT0_CMI0
-#define configPERIPHERAL_CLOCK_HZ (configCPU_CLOCK_HZ/2)
-#define configKERNEL_INTERRUPT_PRIORITY 1
-#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
-
-#else
-
-/* FreeRTOS hooks to NVIC vectors */
-#define xPortPendSVHandler PendSV_Handler
-#define xPortSysTickHandler SysTick_Handler
-#define vPortSVCHandler SVC_Handler
-
-//--------------------------------------------------------------------+
-// Interrupt nesting behavior configuration.
-//--------------------------------------------------------------------+
-#if defined(__NVIC_PRIO_BITS)
- // For Cortex-M specific: __NVIC_PRIO_BITS is defined in core_cmx.h
- #define configPRIO_BITS __NVIC_PRIO_BITS
-
-#elif defined(__ECLIC_INTCTLBITS)
- // RISC-V Bumblebee core from nuclei
- #define configPRIO_BITS __ECLIC_INTCTLBITS
-
-#elif defined(__IASMARM__)
- // FIXME: IAR Assembler cannot include mcu header directly to get __NVIC_PRIO_BITS.
- // Therefore we will hard coded it to minimum value of 2 to get pass ci build.
- // IAR user must update this to correct value of the target MCU
- #message "configPRIO_BITS is hard coded to 2 to pass IAR build only. User should update it per MCU"
- #define configPRIO_BITS 2
-
-#else
- #error "FreeRTOS configPRIO_BITS to be defined"
-#endif
-
-/* The lowest interrupt priority that can be used in a call to a "set priority" function. */
-#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY ((1<= DISK_BLOCK_NUM ) return -1;
+ if (lba >= DISK_BLOCK_NUM) {
+ return TUD_MSC_RET_ERROR;
+ }
- uint8_t const* addr = msc_disk[lba] + offset;
+ // Check for overflow of offset + bufsize
+ if (lba * DISK_BLOCK_SIZE + offset + bufsize > DISK_BLOCK_NUM * DISK_BLOCK_SIZE) {
+ return TUD_MSC_RET_ERROR;
+ }
+
+ #if CFG_EXAMPLE_MSC_ASYNC_IO
+ io_ops_t io_ops = {.is_read = true, .lun = lun, .lba = lba, .offset = offset, .buffer = buffer, .bufsize = bufsize};
+
+ // Send IO operation to IO task
+ TU_ASSERT(xQueueSend(io_queue, &io_ops, 0) == pdPASS);
+
+ return TUD_MSC_RET_ASYNC;
+ #else
+ uint8_t const *addr = msc_disk[lba] + offset;
memcpy(buffer, addr, bufsize);
-
- return (int32_t) bufsize;
+ return bufsize;
+ #endif
}
-bool tud_msc_is_writable_cb (uint8_t lun)
-{
+bool tud_msc_is_writable_cb (uint8_t lun) {
(void) lun;
-#ifdef CFG_EXAMPLE_MSC_READONLY
+ #ifdef CFG_EXAMPLE_MSC_READONLY
return false;
-#else
+ #else
return true;
-#endif
+ #endif
}
// Callback invoked when received WRITE10 command.
// Process data in buffer to disk's storage and return number of written bytes
-int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t* buffer, uint32_t bufsize)
-{
- (void) lun;
-
+int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t* buffer, uint32_t bufsize) {
// out of ramdisk
- if ( lba >= DISK_BLOCK_NUM ) return -1;
+ if (lba >= DISK_BLOCK_NUM) {
+ return TUD_MSC_RET_ERROR;
+ }
-#ifndef CFG_EXAMPLE_MSC_READONLY
- uint8_t* addr = msc_disk[lba] + offset;
+ // Check for overflow of offset + bufsize
+ if (lba * DISK_BLOCK_SIZE + offset + bufsize > DISK_BLOCK_NUM * DISK_BLOCK_SIZE) {
+ return TUD_MSC_RET_ERROR;
+ }
+
+ #ifdef CFG_EXAMPLE_MSC_READONLY
+ (void) lun;
+ (void) buffer;
+ return bufsize;
+ #endif
+
+ #if CFG_EXAMPLE_MSC_ASYNC_IO
+ io_ops_t io_ops = {.is_read = false, .lun = lun, .lba = lba, .offset = offset, .buffer = buffer, .bufsize = bufsize};
+
+ // Send IO operation to IO task
+ TU_ASSERT(xQueueSend(io_queue, &io_ops, 0) == pdPASS);
+
+ return TUD_MSC_RET_ASYNC;
+ #else
+ uint8_t *addr = msc_disk[lba] + offset;
memcpy(addr, buffer, bufsize);
-#else
- (void) lba; (void) offset; (void) buffer;
-#endif
+ tusb_time_delay_ms_api(CFG_EXAMPLE_MSC_IO_DELAY_MS);
- return (int32_t) bufsize;
+ return bufsize;
+ #endif
}
// Callback invoked when received an SCSI command not in built-in list below
// - READ_CAPACITY10, READ_FORMAT_CAPACITY, INQUIRY, MODE_SENSE6, REQUEST_SENSE
// - READ10 and WRITE10 has their own callbacks
-int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, uint16_t bufsize)
-{
+int32_t tud_msc_scsi_cb (uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, uint16_t bufsize) {
// read10 & write10 has their own callback and MUST not be handled here
- void const* response = NULL;
+ void const *response = NULL;
int32_t resplen = 0;
// most scsi handled is input
bool in_xfer = true;
- switch (scsi_cmd[0])
- {
+ switch (scsi_cmd[0]) {
default:
// Set Sense = Invalid Command Operation
tud_msc_set_sense(lun, SCSI_SENSE_ILLEGAL_REQUEST, 0x20, 0x00);
// negative means error -> tinyusb could stall and/or response with failed status
resplen = -1;
- break;
+ break;
}
// return resplen must not larger than bufsize
- if ( resplen > bufsize ) resplen = bufsize;
+ if (resplen > bufsize) { resplen = bufsize; }
- if ( response && (resplen > 0) )
- {
- if(in_xfer)
- {
+ if (response && (resplen > 0)) {
+ if (in_xfer) {
memcpy(buffer, response, (size_t) resplen);
- }else
- {
+ } else {
// SCSI output
}
}
diff --git a/examples/device/cdc_msc_freertos/src/tusb_config.h b/examples/device/cdc_msc_freertos/src/tusb_config.h
index c3f2f7fb5..71a0e985a 100644
--- a/examples/device/cdc_msc_freertos/src/tusb_config.h
+++ b/examples/device/cdc_msc_freertos/src/tusb_config.h
@@ -59,7 +59,7 @@
#endif
// Espressif IDF requires "freertos/" prefix in include path
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define CFG_TUSB_OS_INC_PATH freertos/
#endif
diff --git a/examples/device/cdc_uac2/CMakeLists.txt b/examples/device/cdc_uac2/CMakeLists.txt
index 64e4374e9..c8c797637 100644
--- a/examples/device/cdc_uac2/CMakeLists.txt
+++ b/examples/device/cdc_uac2/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/cdc_uac2/CMakePresets.json b/examples/device/cdc_uac2/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/cdc_uac2/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/dfu/CMakeLists.txt b/examples/device/dfu/CMakeLists.txt
index a01eb3456..3da8ee3df 100644
--- a/examples/device/dfu/CMakeLists.txt
+++ b/examples/device/dfu/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/dfu/CMakePresets.json b/examples/device/dfu/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/dfu/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/dfu_runtime/CMakeLists.txt b/examples/device/dfu_runtime/CMakeLists.txt
index a01eb3456..3da8ee3df 100644
--- a/examples/device/dfu_runtime/CMakeLists.txt
+++ b/examples/device/dfu_runtime/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/dfu_runtime/CMakePresets.json b/examples/device/dfu_runtime/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/dfu_runtime/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/dynamic_configuration/CMakeLists.txt b/examples/device/dynamic_configuration/CMakeLists.txt
index 2b20d2234..8a62d6ba2 100644
--- a/examples/device/dynamic_configuration/CMakeLists.txt
+++ b/examples/device/dynamic_configuration/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/dynamic_configuration/CMakePresets.json b/examples/device/dynamic_configuration/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/dynamic_configuration/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/hid_boot_interface/CMakeLists.txt b/examples/device/hid_boot_interface/CMakeLists.txt
index a01eb3456..3da8ee3df 100644
--- a/examples/device/hid_boot_interface/CMakeLists.txt
+++ b/examples/device/hid_boot_interface/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/hid_boot_interface/CMakePresets.json b/examples/device/hid_boot_interface/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/hid_boot_interface/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/hid_composite/CMakeLists.txt b/examples/device/hid_composite/CMakeLists.txt
index a01eb3456..3da8ee3df 100644
--- a/examples/device/hid_composite/CMakeLists.txt
+++ b/examples/device/hid_composite/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/hid_composite/CMakePresets.json b/examples/device/hid_composite/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/hid_composite/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/hid_composite/src/main.c b/examples/device/hid_composite/src/main.c
index 5302af3b8..a58107b6f 100644
--- a/examples/device/hid_composite/src/main.c
+++ b/examples/device/hid_composite/src/main.c
@@ -197,11 +197,43 @@ static void send_hid_report(uint8_t report_id, uint32_t btn)
}
}
break;
-
default: break;
}
}
+/* use this to send stylus touch signal through USB. */
+static void send_stylus_touch(uint16_t x, uint16_t y, bool state)
+{
+ // skip if hid is not ready yet
+ if ( !tud_hid_ready() ) return;
+
+ static bool has_stylus_pen = false;
+
+ hid_stylus_report_t report =
+ {
+ .attr = 0,
+ .x = 0,
+ .y = 0
+ };
+
+ report.x = x;
+ report.y = y;
+
+ if (state)
+ {
+ report.attr = STYLUS_ATTR_TIP_SWITCH | STYLUS_ATTR_IN_RANGE;
+ tud_hid_report(REPORT_ID_STYLUS_PEN, &report, sizeof(report));
+
+ has_stylus_pen = true;
+ }else
+ {
+ report.attr = 0;
+ if (has_stylus_pen) tud_hid_report(REPORT_ID_STYLUS_PEN, &report, sizeof(report));
+ has_stylus_pen = false;
+ }
+
+}
+
// Every 10ms, we will sent 1 report for each HID profile (keyboard, mouse etc ..)
// tud_hid_report_complete_cb() is used to send the next report after previous one is complete
void hid_task(void)
@@ -209,6 +241,14 @@ void hid_task(void)
// Poll every 10ms
const uint32_t interval_ms = 10;
static uint32_t start_ms = 0;
+ static uint32_t touch_ms = 0;
+ static bool touch_state = false;
+
+ if (board_millis() - touch_ms < 100) {
+ touch_ms = board_millis();
+ send_stylus_touch(0, 0, touch_state = !touch_state);
+ return;
+ }
if ( board_millis() - start_ms < interval_ms) return; // not enough time
start_ms += interval_ms;
diff --git a/examples/device/hid_composite/src/usb_descriptors.c b/examples/device/hid_composite/src/usb_descriptors.c
index e174db46d..15c6e1f73 100644
--- a/examples/device/hid_composite/src/usb_descriptors.c
+++ b/examples/device/hid_composite/src/usb_descriptors.c
@@ -79,6 +79,7 @@ uint8_t const desc_hid_report[] =
{
TUD_HID_REPORT_DESC_KEYBOARD( HID_REPORT_ID(REPORT_ID_KEYBOARD )),
TUD_HID_REPORT_DESC_MOUSE ( HID_REPORT_ID(REPORT_ID_MOUSE )),
+ TUD_HID_REPORT_DESC_STYLUS_PEN( HID_REPORT_ID(REPORT_ID_STYLUS_PEN )),
TUD_HID_REPORT_DESC_CONSUMER( HID_REPORT_ID(REPORT_ID_CONSUMER_CONTROL )),
TUD_HID_REPORT_DESC_GAMEPAD ( HID_REPORT_ID(REPORT_ID_GAMEPAD ))
};
diff --git a/examples/device/hid_composite/src/usb_descriptors.h b/examples/device/hid_composite/src/usb_descriptors.h
index e733d31dd..18d31172b 100644
--- a/examples/device/hid_composite/src/usb_descriptors.h
+++ b/examples/device/hid_composite/src/usb_descriptors.h
@@ -29,6 +29,7 @@ enum
{
REPORT_ID_KEYBOARD = 1,
REPORT_ID_MOUSE,
+ REPORT_ID_STYLUS_PEN,
REPORT_ID_CONSUMER_CONTROL,
REPORT_ID_GAMEPAD,
REPORT_ID_COUNT
diff --git a/examples/device/hid_composite_freertos/CMakeLists.txt b/examples/device/hid_composite_freertos/CMakeLists.txt
index 33f3b915f..6ce9e72fe 100644
--- a/examples/device/hid_composite_freertos/CMakeLists.txt
+++ b/examples/device/hid_composite_freertos/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/hid_composite_freertos/CMakePresets.json b/examples/device/hid_composite_freertos/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/hid_composite_freertos/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/hid_composite_freertos/Makefile b/examples/device/hid_composite_freertos/Makefile
index 38d842b3a..bd625b345 100644
--- a/examples/device/hid_composite_freertos/Makefile
+++ b/examples/device/hid_composite_freertos/Makefile
@@ -1,16 +1,9 @@
-DEPS_SUBMODULES += lib/FreeRTOS-Kernel
-
+RTOS = freertos
include ../../build_system/make/make.mk
-FREERTOS_SRC = lib/FreeRTOS-Kernel
-FREERTOS_PORTABLE_PATH= $(FREERTOS_SRC)/portable/$(if $(findstring iar,$(TOOLCHAIN)),IAR,GCC)
-
INC += \
src \
- src/FreeRTOSConfig \
$(TOP)/hw \
- $(TOP)/$(FREERTOS_SRC)/include \
- $(TOP)/$(FREERTOS_PORTABLE_SRC)
# Example source
EXAMPLE_SOURCE = \
@@ -19,28 +12,4 @@ EXAMPLE_SOURCE = \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
-# FreeRTOS source, all files in port folder
-SRC_C += \
- $(FREERTOS_SRC)/list.c \
- $(FREERTOS_SRC)/queue.c \
- $(FREERTOS_SRC)/tasks.c \
- $(FREERTOS_SRC)/timers.c \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.c))
-
-SRC_S += \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.s))
-
-# include heap manage if configSUPPORT_DYNAMIC_ALLOCATION = 1
-# SRC_C += $(FREERTOS_SRC)/portable/MemMang/heap_1.c
-# CFLAGS += -Wno-error=sign-compare
-
-# Suppress FreeRTOSConfig.h warnings
-CFLAGS_GCC += -Wno-error=redundant-decls
-
-# Suppress FreeRTOS source warnings
-CFLAGS_GCC += -Wno-error=cast-qual
-
-# FreeRTOS (lto + Os) linker issue
-LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext
-
include ../../build_system/make/rules.mk
diff --git a/examples/device/hid_composite_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h b/examples/device/hid_composite_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
deleted file mode 100644
index 902a54f08..000000000
--- a/examples/device/hid_composite_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * FreeRTOS Kernel V10.0.0
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software. If you wish to use our Amazon
- * FreeRTOS name, please do so in a fair use way that does not cause confusion.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * http://www.FreeRTOS.org
- * http://aws.amazon.com/freertos
- *
- * 1 tab == 4 spaces!
- */
-
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-/*-----------------------------------------------------------
- * Application specific definitions.
- *
- * These definitions should be adjusted for your particular hardware and
- * application requirements.
- *
- * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
- * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
- *
- * See http://www.freertos.org/a00110.html.
- *----------------------------------------------------------*/
-
-// skip if included from IAR assembler
-#ifndef __IASMARM__
-
-// Include MCU header
-#include "bsp/board_mcu.h"
-
-#if TUSB_MCU_VENDOR_ESPRESSIF
- #error "ESP32-Sx should use IDF's FreeRTOSConfig.h"
-#endif
-
-// TODO fix later
-#if CFG_TUSB_MCU == OPT_MCU_MM32F327X
- extern u32 SystemCoreClock;
-#else
- // FIXME cause redundant-decls warnings
- extern uint32_t SystemCoreClock;
-#endif
-
-#endif
-
-/* Cortex M23/M33 port configuration. */
-#define configENABLE_MPU 0
-#define configENABLE_FPU 1
-#define configENABLE_TRUSTZONE 0
-#define configMINIMAL_SECURE_STACK_SIZE ( 1024 )
-#define configRUN_FREERTOS_SECURE_ONLY 1
-
-#define configUSE_PREEMPTION 1
-#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
-#define configCPU_CLOCK_HZ SystemCoreClock
-#define configTICK_RATE_HZ ( 1000 )
-#define configMAX_PRIORITIES ( 5 )
-#define configMINIMAL_STACK_SIZE ( 128 )
-#define configTOTAL_HEAP_SIZE ( configSUPPORT_DYNAMIC_ALLOCATION*4*1024 )
-#define configMAX_TASK_NAME_LEN 16
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 1
-#define configUSE_MUTEXES 1
-#define configUSE_RECURSIVE_MUTEXES 1
-#define configUSE_COUNTING_SEMAPHORES 1
-#define configQUEUE_REGISTRY_SIZE 4
-#define configUSE_QUEUE_SETS 0
-#define configUSE_TIME_SLICING 0
-#define configUSE_NEWLIB_REENTRANT 0
-#define configENABLE_BACKWARD_COMPATIBILITY 1
-#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
-
-#define configSUPPORT_STATIC_ALLOCATION 1
-#define configSUPPORT_DYNAMIC_ALLOCATION 0
-
-/* Hook function related definitions. */
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configUSE_MALLOC_FAILED_HOOK 0 // cause nested extern warning
-#define configCHECK_FOR_STACK_OVERFLOW 2
-#define configCHECK_HANDLER_INSTALLATION 0
-
-/* Run time and task stats gathering related definitions. */
-#define configGENERATE_RUN_TIME_STATS 0
-#define configUSE_TRACE_FACILITY 1 // legacy trace
-#define configUSE_STATS_FORMATTING_FUNCTIONS 0
-
-/* Co-routine definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 2
-
-/* Software timer related definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES-2)
-#define configTIMER_QUEUE_LENGTH 32
-#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
-
-/* Optional functions - most linkers will remove unused functions anyway. */
-#define INCLUDE_vTaskPrioritySet 0
-#define INCLUDE_uxTaskPriorityGet 0
-#define INCLUDE_vTaskDelete 0
-#define INCLUDE_vTaskSuspend 1 // required for queue, semaphore, mutex to be blocked indefinitely with portMAX_DELAY
-#define INCLUDE_xResumeFromISR 0
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 0
-#define INCLUDE_xTaskGetCurrentTaskHandle 0
-#define INCLUDE_uxTaskGetStackHighWaterMark 0
-#define INCLUDE_xTaskGetIdleTaskHandle 0
-#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
-#define INCLUDE_pcTaskGetTaskName 0
-#define INCLUDE_eTaskGetState 0
-#define INCLUDE_xEventGroupSetBitFromISR 0
-#define INCLUDE_xTimerPendFunctionCall 0
-
-#ifdef __RX__
-/* Renesas RX series */
-#define vSoftwareInterruptISR INT_Excep_ICU_SWINT
-#define vTickISR INT_Excep_CMT0_CMI0
-#define configPERIPHERAL_CLOCK_HZ (configCPU_CLOCK_HZ/2)
-#define configKERNEL_INTERRUPT_PRIORITY 1
-#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
-
-#else
-
-/* FreeRTOS hooks to NVIC vectors */
-#define xPortPendSVHandler PendSV_Handler
-#define xPortSysTickHandler SysTick_Handler
-#define vPortSVCHandler SVC_Handler
-
-//--------------------------------------------------------------------+
-// Interrupt nesting behavior configuration.
-//--------------------------------------------------------------------+
-#if defined(__NVIC_PRIO_BITS)
- // For Cortex-M specific: __NVIC_PRIO_BITS is defined in core_cmx.h
- #define configPRIO_BITS __NVIC_PRIO_BITS
-
-#elif defined(__ECLIC_INTCTLBITS)
- // RISC-V Bumblebee core from nuclei
- #define configPRIO_BITS __ECLIC_INTCTLBITS
-
-#elif defined(__IASMARM__)
- // FIXME: IAR Assembler cannot include mcu header directly to get __NVIC_PRIO_BITS.
- // Therefore we will hard coded it to minimum value of 2 to get pass ci build.
- // IAR user must update this to correct value of the target MCU
- #message "configPRIO_BITS is hard coded to 2 to pass IAR build only. User should update it per MCU"
- #define configPRIO_BITS 2
-
-#else
- #error "FreeRTOS configPRIO_BITS to be defined"
-#endif
-
-/* The lowest interrupt priority that can be used in a call to a "set priority" function. */
-#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY ((1<= DISK_BLOCK_NUM) return -1;
+ if (lba >= DISK_BLOCK_NUM) {
+ return -1;
+ }
-#if defined(CFG_EXAMPLE_MSC_READONLY) || defined(CFG_EXAMPLE_MSC_DUAL_READONLY)
+ #if defined(CFG_EXAMPLE_MSC_READONLY) || defined(CFG_EXAMPLE_MSC_DUAL_READONLY)
(void) lun;
(void) lba;
(void) offset;
@@ -302,11 +303,8 @@ int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t*
// - READ_CAPACITY10, READ_FORMAT_CAPACITY, INQUIRY, MODE_SENSE6, REQUEST_SENSE
// - READ10 and WRITE10 has their own callbacks (MUST not be handled here)
int32_t tud_msc_scsi_cb(uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, uint16_t bufsize) {
- void const* response = NULL;
- int32_t resplen = 0;
-
- // most scsi handled is input
- bool in_xfer = true;
+ (void) buffer;
+ (void) bufsize;
switch (scsi_cmd[0]) {
default:
@@ -316,19 +314,6 @@ int32_t tud_msc_scsi_cb(uint8_t lun, uint8_t const scsi_cmd[16], void* buffer, u
// negative means error -> tinyusb could stall and/or response with failed status
return -1;
}
-
- // return resplen must not larger than bufsize
- if (resplen > bufsize) resplen = bufsize;
-
- if (response && (resplen > 0)) {
- if (in_xfer) {
- memcpy(buffer, response, (size_t) resplen);
- } else {
- // SCSI output
- }
- }
-
- return resplen;
}
#endif
diff --git a/examples/device/net_lwip_webserver/CMakeLists.txt b/examples/device/net_lwip_webserver/CMakeLists.txt
index 13923b583..87b92f4dc 100644
--- a/examples/device/net_lwip_webserver/CMakeLists.txt
+++ b/examples/device/net_lwip_webserver/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_LIST_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/net_lwip_webserver/CMakePresets.json b/examples/device/net_lwip_webserver/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/net_lwip_webserver/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/net_lwip_webserver/Makefile b/examples/device/net_lwip_webserver/Makefile
index 141532466..4ad110dec 100644
--- a/examples/device/net_lwip_webserver/Makefile
+++ b/examples/device/net_lwip_webserver/Makefile
@@ -1,5 +1,3 @@
-DEPS_SUBMODULES += lib/lwip
-
include ../../build_system/make/make.mk
# suppress warning caused by lwip
diff --git a/examples/device/net_lwip_webserver/skip.txt b/examples/device/net_lwip_webserver/skip.txt
index 5ebe71612..20a264387 100644
--- a/examples/device/net_lwip_webserver/skip.txt
+++ b/examples/device/net_lwip_webserver/skip.txt
@@ -10,6 +10,8 @@ mcu:SAMD11
mcu:STM32L0
mcu:STM32F0
mcu:KINETIS_KL
+mcu:STM32H7RS
+mcu:STM32N6
family:broadcom_64bit
family:broadcom_32bit
family:espressif
diff --git a/examples/device/net_lwip_webserver/src/lwipopts.h b/examples/device/net_lwip_webserver/src/lwipopts.h
index 41e8f0d67..04949cef9 100644
--- a/examples/device/net_lwip_webserver/src/lwipopts.h
+++ b/examples/device/net_lwip_webserver/src/lwipopts.h
@@ -58,6 +58,7 @@
#define LWIP_HTTPD_SSI_INCLUDE_TAG 0
#define LWIP_SINGLE_NETIF 1
+#define LWIP_NETIF_LINK_CALLBACK 1
#define PBUF_POOL_SIZE 4
diff --git a/examples/device/net_lwip_webserver/src/main.c b/examples/device/net_lwip_webserver/src/main.c
index 36f402332..4bdddf6c5 100644
--- a/examples/device/net_lwip_webserver/src/main.c
+++ b/examples/device/net_lwip_webserver/src/main.c
@@ -31,6 +31,12 @@ this appears as either a RNDIS or CDC-ECM USB virtual network adapter; the OS pi
RNDIS should be valid on Linux and Windows hosts, and CDC-ECM should be valid on Linux and macOS hosts
The MCU appears to the host as IP address 192.168.7.1, and provides a DHCP server, DNS server, and web server.
+
+Link State Control:
+- Press the user button to toggle the network link state (UP/DOWN)
+- This simulates "ethernet cable unplugged/plugged" events
+- The host OS will see the network interface as disconnected/connected accordingly
+- Use this to test network error handling and recovery in host applications
*/
/*
Some smartphones *may* work with this implementation as well, but likely have limited (broken) drivers,
@@ -63,9 +69,6 @@ try changing the first byte of tud_network_mac_address[] below from 0x02 to 0x00
/* lwip context */
static struct netif netif_data;
-/* shared between tud_network_recv_cb() and service_traffic() */
-static struct pbuf *received_frame;
-
/* this is used by this code, ./class/net/net_driver.c, and usb_descriptors.c */
/* ideally speaking, this should be generated from the hardware's unique ID (if available) */
/* it is suggested that the first byte is 0x02 to indicate a link-local address */
@@ -137,6 +140,12 @@ static err_t netif_init_cb(struct netif *netif) {
return ERR_OK;
}
+/* notifies the USB host about the link state change. */
+static void usbnet_netif_link_callback(struct netif *netif) {
+ bool link_up = netif_is_link_up(netif);
+ tud_network_link_state(BOARD_TUD_RHPORT, link_up);
+}
+
static void init_lwip(void) {
struct netif *netif = &netif_data;
@@ -147,11 +156,19 @@ static void init_lwip(void) {
memcpy(netif->hwaddr, tud_network_mac_address, sizeof(tud_network_mac_address));
netif->hwaddr[5] ^= 0x01;
- netif = netif_add(netif, &ipaddr, &netmask, &gateway, NULL, netif_init_cb, ip_input);
+ netif = netif_add(netif, &ipaddr, &netmask, &gateway, NULL, netif_init_cb, ethernet_input);
#if LWIP_IPV6
netif_create_ip6_linklocal_address(netif, 1);
#endif
netif_set_default(netif);
+
+#if LWIP_NETIF_LINK_CALLBACK
+ // Set the link callback to notify USB host about link state changes
+ netif_set_link_callback(netif, usbnet_netif_link_callback);
+ netif_set_link_up(netif);
+#else
+ tud_network_link_state(BOARD_TUD_RHPORT, true);
+#endif
}
/* handle any DNS requests from dns-server */
@@ -164,20 +181,29 @@ bool dns_query_proc(const char *name, ip4_addr_t *addr) {
}
bool tud_network_recv_cb(const uint8_t *src, uint16_t size) {
- /* this shouldn't happen, but if we get another packet before
- parsing the previous, we must signal our inability to accept it */
- if (received_frame) return false;
+ struct netif *netif = &netif_data;
if (size) {
struct pbuf *p = pbuf_alloc(PBUF_RAW, size, PBUF_POOL);
- if (p) {
- /* pbuf_alloc() has already initialized struct; all we need to do is copy the data */
- memcpy(p->payload, src, size);
-
- /* store away the pointer for service_traffic() to later handle */
- received_frame = p;
+ if (p == NULL) {
+ printf("ERROR: Failed to allocate pbuf of size %d\n", size);
+ return false;
}
+
+ /* Copy buf to pbuf */
+ pbuf_take(p, src, size);
+
+ // Surrender ownership of our pbuf unless there was an error
+ // Only call pbuf_free if not Ok else it will panic with "pbuf_free: p->ref > 0"
+ // or steal it from whatever took ownership of it with undefined consequences.
+ // See: https://savannah.nongnu.org/patch/index.php?10121
+ if (netif->input(p, netif) != ERR_OK) {
+ printf("ERROR: netif input failed\n");
+ pbuf_free(p);
+ }
+ // Signal tinyusb that the current frame has been processed.
+ tud_network_recv_renew();
}
return true;
@@ -191,29 +217,26 @@ uint16_t tud_network_xmit_cb(uint8_t *dst, void *ref, uint16_t arg) {
return pbuf_copy_partial(p, dst, p->tot_len, 0);
}
-static void service_traffic(void) {
- /* handle any packet received by tud_network_recv_cb() */
- if (received_frame) {
- // Surrender ownership of our pbuf unless there was an error
- // Only call pbuf_free if not Ok else it will panic with "pbuf_free: p->ref > 0"
- // or steal it from whatever took ownership of it with undefined consequences.
- // See: https://savannah.nongnu.org/patch/index.php?10121
- if (ethernet_input(received_frame, &netif_data)!=ERR_OK) {
- pbuf_free(received_frame);
+static void handle_link_state_switch(void) {
+ /* Check for button press to toggle link state */
+ static bool last_link_state = true;
+ static bool last_button_state = false;
+ bool current_button_state = board_button_read();
+
+ if (current_button_state && !last_button_state) {
+ /* Button pressed - toggle link state */
+ last_link_state = !last_link_state;
+ if (last_link_state) {
+ printf("Link state: UP\n");
+ netif_set_link_up(&netif_data);
+ } else {
+ printf("Link state: DOWN\n");
+ netif_set_link_down(&netif_data);
}
- received_frame = NULL;
- tud_network_recv_renew();
+ /* LWIP callback will notify USB host about the change */
}
+ last_button_state = current_button_state;
- sys_check_timeouts();
-}
-
-void tud_network_init_cb(void) {
- /* if the network is re-initializing and we have a leftover packet, we must do a cleanup */
- if (received_frame) {
- pbuf_free(received_frame);
- received_frame = NULL;
- }
}
int main(void) {
@@ -243,15 +266,23 @@ int main(void) {
lwiperf_start_tcp_server_default(NULL, NULL);
#endif
+#if CFG_TUD_NCM
+ printf("USB NCM network interface initialized\n");
+#elif CFG_TUD_ECM_RNDIS
+ printf("USB RNDIS/ECM network interface initialized\n");
+#endif
+
while (1) {
tud_task();
- service_traffic();
+ sys_check_timeouts(); // service lwip
+ handle_link_state_switch();
}
return 0;
}
/* lwip has provision for using a mutex, when applicable */
+/* This implementation is for single-threaded use only */
sys_prot_t sys_arch_protect(void) {
return 0;
}
diff --git a/examples/device/net_lwip_webserver/src/tusb_config.h b/examples/device/net_lwip_webserver/src/tusb_config.h
index 22082fc81..c774f59ff 100644
--- a/examples/device/net_lwip_webserver/src/tusb_config.h
+++ b/examples/device/net_lwip_webserver/src/tusb_config.h
@@ -85,6 +85,7 @@ extern "C" {
#endif
// Use different configurations to test all net devices (also due to resource limitations)
+#ifndef USE_ECM
#if TU_CHECK_MCU(OPT_MCU_LPC15XX, OPT_MCU_LPC40XX, OPT_MCU_LPC51UXX, OPT_MCU_LPC54)
#define USE_ECM 1
#elif TU_CHECK_MCU(OPT_MCU_SAMD21, OPT_MCU_SAML21, OPT_MCU_SAML22)
@@ -97,6 +98,7 @@ extern "C" {
#define USE_ECM 0
#define INCLUDE_IPERF
#endif
+#endif
//--------------------------------------------------------------------
// NCM CLASS CONFIGURATION, SEE "ncm.h" FOR PERFORMANCE TUNING
diff --git a/examples/device/uac2_headset/CMakeLists.txt b/examples/device/uac2_headset/CMakeLists.txt
index e92a57148..ced98a909 100644
--- a/examples/device/uac2_headset/CMakeLists.txt
+++ b/examples/device/uac2_headset/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/uac2_headset/CMakePresets.json b/examples/device/uac2_headset/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/uac2_headset/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/uac2_speaker_fb/CMakeLists.txt b/examples/device/uac2_speaker_fb/CMakeLists.txt
index f40ca8716..0ed3db646 100644
--- a/examples/device/uac2_speaker_fb/CMakeLists.txt
+++ b/examples/device/uac2_speaker_fb/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/uac2_speaker_fb/CMakePresets.json b/examples/device/uac2_speaker_fb/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/uac2_speaker_fb/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/usbtmc/CMakeLists.txt b/examples/device/usbtmc/CMakeLists.txt
index a63ca2d81..d2deb72d5 100644
--- a/examples/device/usbtmc/CMakeLists.txt
+++ b/examples/device/usbtmc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/usbtmc/CMakePresets.json b/examples/device/usbtmc/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/usbtmc/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/video_capture/CMakeLists.txt b/examples/device/video_capture/CMakeLists.txt
index 80dc39ca5..90788fa60 100644
--- a/examples/device/video_capture/CMakeLists.txt
+++ b/examples/device/video_capture/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/video_capture/CMakePresets.json b/examples/device/video_capture/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/video_capture/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/video_capture/src/main.c b/examples/device/video_capture/src/main.c
index 8bb924c61..0406279fd 100644
--- a/examples/device/video_capture/src/main.c
+++ b/examples/device/video_capture/src/main.c
@@ -185,7 +185,7 @@ static void fill_color_bar(uint8_t* buffer, unsigned start_position) {
#endif
-void video_send_frame(void) {
+static void video_send_frame(void) {
static unsigned start_ms = 0;
static unsigned already_sent = 0;
@@ -292,7 +292,7 @@ void led_blinking_task(void* param) {
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
#define VIDEO_STACK_SIZE (configMINIMAL_STACK_SIZE*4)
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define USBD_STACK_SIZE 4096
int main(void);
void app_main(void) {
@@ -351,8 +351,8 @@ void freertos_init_task(void) {
xTaskCreate(video_task, "video", VIDEO_STACK_SZIE, NULL, configMAX_PRIORITIES - 2, NULL);
#endif
- // skip starting scheduler (and return) for ESP32-S2 or ESP32-S3
- #if !TUSB_MCU_VENDOR_ESPRESSIF
+ // only start scheduler for non-espressif mcu
+ #ifndef ESP_PLATFORM
vTaskStartScheduler();
#endif
}
diff --git a/examples/device/video_capture/src/tusb_config.h b/examples/device/video_capture/src/tusb_config.h
index 6dbd6f2a5..4ba86ca65 100644
--- a/examples/device/video_capture/src/tusb_config.h
+++ b/examples/device/video_capture/src/tusb_config.h
@@ -58,7 +58,7 @@
#endif
// Espressif IDF requires "freertos/" prefix in include path
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define CFG_TUSB_OS_INC_PATH freertos/
#endif
diff --git a/examples/device/video_capture_2ch/CMakeLists.txt b/examples/device/video_capture_2ch/CMakeLists.txt
index 80dc39ca5..90788fa60 100644
--- a/examples/device/video_capture_2ch/CMakeLists.txt
+++ b/examples/device/video_capture_2ch/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/video_capture_2ch/CMakePresets.json b/examples/device/video_capture_2ch/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/video_capture_2ch/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/device/video_capture_2ch/src/main.c b/examples/device/video_capture_2ch/src/main.c
index 245e7abb8..dc616e3fa 100644
--- a/examples/device/video_capture_2ch/src/main.c
+++ b/examples/device/video_capture_2ch/src/main.c
@@ -300,7 +300,7 @@ void led_blinking_task(void* param) {
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
#define VIDEO_STACK_SIZE (configMINIMAL_STACK_SIZE*4)
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define USBD_STACK_SIZE 4096
int main(void);
void app_main(void) {
@@ -359,8 +359,8 @@ void freertos_init_task(void) {
xTaskCreate(video_task, "video", VIDEO_STACK_SZIE, NULL, configMAX_PRIORITIES - 2, NULL);
#endif
- // skip starting scheduler (and return) for ESP32-S2 or ESP32-S3
- #if !TUSB_MCU_VENDOR_ESPRESSIF
+ // only start scheduler for non-espressif mcu
+ #ifndef ESP_PLATFORM
vTaskStartScheduler();
#endif
}
diff --git a/examples/device/video_capture_2ch/src/tusb_config.h b/examples/device/video_capture_2ch/src/tusb_config.h
index 91775a327..e84e49879 100644
--- a/examples/device/video_capture_2ch/src/tusb_config.h
+++ b/examples/device/video_capture_2ch/src/tusb_config.h
@@ -58,7 +58,7 @@
#endif
// Espressif IDF requires "freertos/" prefix in include path
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define CFG_TUSB_OS_INC_PATH freertos/
#endif
diff --git a/examples/device/webusb_serial/CMakeLists.txt b/examples/device/webusb_serial/CMakeLists.txt
index e92a57148..ced98a909 100644
--- a/examples/device/webusb_serial/CMakeLists.txt
+++ b/examples/device/webusb_serial/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/device/webusb_serial/CMakePresets.json b/examples/device/webusb_serial/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/device/webusb_serial/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/dual/CMakeLists.txt b/examples/dual/CMakeLists.txt
index f11074e93..c5e3ffce4 100644
--- a/examples/dual/CMakeLists.txt
+++ b/examples/dual/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/family_support.cmake)
diff --git a/examples/dual/CMakePresets.json b/examples/dual/CMakePresets.json
new file mode 100644
index 000000000..c22e8c0ec
--- /dev/null
+++ b/examples/dual/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/dual/host_hid_to_device_cdc/CMakeLists.txt b/examples/dual/host_hid_to_device_cdc/CMakeLists.txt
index 54e36e3d3..6ae5b5766 100644
--- a/examples/dual/host_hid_to_device_cdc/CMakeLists.txt
+++ b/examples/dual/host_hid_to_device_cdc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/dual/host_hid_to_device_cdc/CMakePresets.json b/examples/dual/host_hid_to_device_cdc/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/dual/host_hid_to_device_cdc/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/dual/host_hid_to_device_cdc/src/main.c b/examples/dual/host_hid_to_device_cdc/src/main.c
index 633f7a6ac..6f30ca381 100644
--- a/examples/dual/host_hid_to_device_cdc/src/main.c
+++ b/examples/dual/host_hid_to_device_cdc/src/main.c
@@ -190,7 +190,9 @@ void tuh_hid_umount_cb(uint8_t dev_addr, uint8_t instance) {
// look up new key in previous keys
static inline bool find_key_in_report(hid_keyboard_report_t const* report, uint8_t keycode) {
for (uint8_t i = 0; i < 6; i++) {
- if (report->keycode[i] == keycode) return true;
+ if (report->keycode[i] == keycode) {
+ return true;
+ }
}
return false;
@@ -230,7 +232,9 @@ static void process_kbd_report(uint8_t dev_addr, hid_keyboard_report_t const* re
// TODO example skips key released
}
- if (flush) tud_cdc_write_flush();
+ if (flush) {
+ tud_cdc_write_flush();
+ }
prev_report = *report;
}
diff --git a/examples/dual/host_info_to_device_cdc/CMakeLists.txt b/examples/dual/host_info_to_device_cdc/CMakeLists.txt
index 54e36e3d3..6ae5b5766 100644
--- a/examples/dual/host_info_to_device_cdc/CMakeLists.txt
+++ b/examples/dual/host_info_to_device_cdc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/dual/host_info_to_device_cdc/CMakePresets.json b/examples/dual/host_info_to_device_cdc/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/dual/host_info_to_device_cdc/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/dual/host_info_to_device_cdc/src/main.c b/examples/dual/host_info_to_device_cdc/src/main.c
index 668808db2..a2a505952 100644
--- a/examples/dual/host_info_to_device_cdc/src/main.c
+++ b/examples/dual/host_info_to_device_cdc/src/main.c
@@ -70,11 +70,30 @@ enum {
static uint32_t blink_interval_ms = BLINK_NOT_MOUNTED;
static bool is_print[CFG_TUH_DEVICE_MAX+1] = { 0 };
+static tusb_desc_device_t descriptor_device[CFG_TUH_DEVICE_MAX+1];
static void print_utf16(uint16_t *temp_buf, size_t buf_len);
+static void print_device_info(uint8_t daddr, const tusb_desc_device_t* desc_device);
+
void led_blinking_task(void);
void cdc_task(void);
+#define cdc_printf(...) \
+ do { \
+ char _tempbuf[256]; \
+ char* _bufptr = _tempbuf; \
+ uint32_t count = (uint32_t) sprintf(_tempbuf, __VA_ARGS__); \
+ while (count > 0) { \
+ uint32_t wr_count = tud_cdc_write(_bufptr, count); \
+ count -= wr_count; \
+ _bufptr += wr_count; \
+ if (count > 0){ \
+ tud_task(); \
+ tud_cdc_write_flush(); \
+ } \
+ } \
+ } while(0)
+
/*------------- MAIN -------------*/
int main(void) {
board_init();
@@ -135,84 +154,20 @@ void tud_resume_cb(void) {
blink_interval_ms = tud_mounted() ? BLINK_MOUNTED : BLINK_NOT_MOUNTED;
}
-#if 1
-#define cdc_printf(...) \
- do { \
- char _tempbuf[256]; \
- int count = sprintf(_tempbuf, __VA_ARGS__); \
- tud_cdc_write(_tempbuf, (uint32_t) count); \
- tud_cdc_write_flush(); \
- tud_task(); \
- } while(0)
-#endif
-
-//#define cdc_printf printf
-
-void print_device_info(uint8_t daddr) {
- tusb_desc_device_t desc_device;
- uint8_t xfer_result = tuh_descriptor_get_device_sync(daddr, &desc_device, 18);
- if (XFER_RESULT_SUCCESS != xfer_result) {
- tud_cdc_write_str("Failed to get device descriptor\r\n");
+void cdc_task(void) {
+ if (!tud_cdc_connected()) {
+ // delay a bit otherwise we can outpace host's terminal. Linux will set LineState (DTR) then Line Coding.
+ // If we send data before Linux's terminal set Line Coding, it can be ignored --> missing data with hardware test loop
+ board_delay(20);
return;
}
- // Get String descriptor using Sync API
- uint16_t serial[64];
- uint16_t buf[128];
-
- cdc_printf("Device %u: ID %04x:%04x SN ", daddr, desc_device.idVendor, desc_device.idProduct);
- xfer_result = tuh_descriptor_get_serial_string_sync(daddr, LANGUAGE_ID, serial, sizeof(serial));
- if (XFER_RESULT_SUCCESS != xfer_result) {
- serial[0] = 'n';
- serial[1] = '/';
- serial[2] = 'a';
- serial[3] = 0;
- }
- print_utf16(serial, TU_ARRAY_SIZE(serial));
- tud_cdc_write_str("\r\n");
-
- cdc_printf("Device Descriptor:\r\n");
- cdc_printf(" bLength %u\r\n" , desc_device.bLength);
- cdc_printf(" bDescriptorType %u\r\n" , desc_device.bDescriptorType);
- cdc_printf(" bcdUSB %04x\r\n" , desc_device.bcdUSB);
- cdc_printf(" bDeviceClass %u\r\n" , desc_device.bDeviceClass);
- cdc_printf(" bDeviceSubClass %u\r\n" , desc_device.bDeviceSubClass);
- cdc_printf(" bDeviceProtocol %u\r\n" , desc_device.bDeviceProtocol);
- cdc_printf(" bMaxPacketSize0 %u\r\n" , desc_device.bMaxPacketSize0);
- cdc_printf(" idVendor 0x%04x\r\n" , desc_device.idVendor);
- cdc_printf(" idProduct 0x%04x\r\n" , desc_device.idProduct);
- cdc_printf(" bcdDevice %04x\r\n" , desc_device.bcdDevice);
-
- cdc_printf(" iManufacturer %u " , desc_device.iManufacturer);
- xfer_result = tuh_descriptor_get_manufacturer_string_sync(daddr, LANGUAGE_ID, buf, sizeof(buf));
- if (XFER_RESULT_SUCCESS == xfer_result ) {
- print_utf16(buf, TU_ARRAY_SIZE(buf));
- }
- tud_cdc_write_str("\r\n");
-
- cdc_printf(" iProduct %u " , desc_device.iProduct);
- xfer_result = tuh_descriptor_get_product_string_sync(daddr, LANGUAGE_ID, buf, sizeof(buf));
- if (XFER_RESULT_SUCCESS == xfer_result) {
- print_utf16(buf, TU_ARRAY_SIZE(buf));
- }
- tud_cdc_write_str("\r\n");
-
- cdc_printf(" iSerialNumber %u " , desc_device.iSerialNumber);
- tud_cdc_write_str((char*)serial); // serial is already to UTF-8
- tud_cdc_write_str("\r\n");
-
- cdc_printf(" bNumConfigurations %u\r\n" , desc_device.bNumConfigurations);
-}
-
-void cdc_task(void) {
- if (tud_cdc_connected()) {
- for (uint8_t daddr = 1; daddr <= CFG_TUH_DEVICE_MAX; daddr++) {
- if (tuh_mounted(daddr)) {
- if (is_print[daddr]) {
- is_print[daddr] = false;
- print_device_info(daddr);
- tud_cdc_write_flush();
- }
+ for (uint8_t daddr = 1; daddr <= CFG_TUH_DEVICE_MAX; daddr++) {
+ if (tuh_mounted(daddr)) {
+ if (is_print[daddr]) {
+ is_print[daddr] = false;
+ print_device_info(daddr, &descriptor_device[daddr]);
+ tud_cdc_write_flush();
}
}
}
@@ -221,13 +176,70 @@ void cdc_task(void) {
//--------------------------------------------------------------------+
// Host Get device information
//--------------------------------------------------------------------+
+static void print_device_info(uint8_t daddr, const tusb_desc_device_t* desc_device) {
+ // Get String descriptor using Sync API
+ uint16_t serial[64];
+ uint16_t buf[128];
+ (void) buf;
+
+ cdc_printf("Device %u: ID %04x:%04x SN ", daddr, desc_device->idVendor, desc_device->idProduct);
+ uint8_t xfer_result = tuh_descriptor_get_serial_string_sync(daddr, LANGUAGE_ID, serial, sizeof(serial));
+ if (XFER_RESULT_SUCCESS != xfer_result) {
+ serial[0] = 'n';
+ serial[1] = '/';
+ serial[2] = 'a';
+ serial[3] = 0;
+ }
+ print_utf16(serial, TU_ARRAY_SIZE(serial));
+ cdc_printf("\r\n");
+
+ cdc_printf("Device Descriptor:\r\n");
+ cdc_printf(" bLength %u\r\n" , desc_device->bLength);
+ cdc_printf(" bDescriptorType %u\r\n" , desc_device->bDescriptorType);
+ cdc_printf(" bcdUSB %04x\r\n" , desc_device->bcdUSB);
+ cdc_printf(" bDeviceClass %u\r\n" , desc_device->bDeviceClass);
+ cdc_printf(" bDeviceSubClass %u\r\n" , desc_device->bDeviceSubClass);
+ cdc_printf(" bDeviceProtocol %u\r\n" , desc_device->bDeviceProtocol);
+ cdc_printf(" bMaxPacketSize0 %u\r\n" , desc_device->bMaxPacketSize0);
+ cdc_printf(" idVendor 0x%04x\r\n" , desc_device->idVendor);
+ cdc_printf(" idProduct 0x%04x\r\n" , desc_device->idProduct);
+ cdc_printf(" bcdDevice %04x\r\n" , desc_device->bcdDevice);
+
+ cdc_printf(" iManufacturer %u " , desc_device->iManufacturer);
+ xfer_result = tuh_descriptor_get_manufacturer_string_sync(daddr, LANGUAGE_ID, buf, sizeof(buf));
+ if (XFER_RESULT_SUCCESS == xfer_result) {
+ print_utf16(buf, TU_ARRAY_SIZE(buf));
+ }
+ cdc_printf("\r\n");
+
+ cdc_printf(" iProduct %u " , desc_device->iProduct);
+ xfer_result = tuh_descriptor_get_product_string_sync(daddr, LANGUAGE_ID, buf, sizeof(buf));
+ if (XFER_RESULT_SUCCESS == xfer_result) {
+ print_utf16(buf, TU_ARRAY_SIZE(buf));
+ }
+ cdc_printf("\r\n");
+
+ cdc_printf(" iSerialNumber %u " , desc_device->iSerialNumber);
+ cdc_printf((char*)serial); // serial is already to UTF-8
+ cdc_printf("\r\n");
+
+ cdc_printf(" bNumConfigurations %u\r\n" , desc_device->bNumConfigurations);
+}
+
+void tuh_enum_descriptor_device_cb(uint8_t daddr, tusb_desc_device_t const* desc_device) {
+ (void) daddr;
+ descriptor_device[daddr] = *desc_device; // save device descriptor
+}
+
void tuh_mount_cb(uint8_t daddr) {
- printf("mounted device %u\r\n", daddr);
+ cdc_printf("mounted device %u\r\n", daddr);
+ tud_cdc_write_flush();
is_print[daddr] = true;
}
void tuh_umount_cb(uint8_t daddr) {
- printf("unmounted device %u\r\n", daddr);
+ cdc_printf("unmounted device %u\r\n", daddr);
+ tud_cdc_write_flush();
is_print[daddr] = false;
}
@@ -239,7 +251,9 @@ void led_blinking_task(void) {
static bool led_state = false;
// Blink every interval ms
- if (board_millis() - start_ms < blink_interval_ms) return; // not enough time
+ if (board_millis() - start_ms < blink_interval_ms) {
+ return;// not enough time
+ }
start_ms += blink_interval_ms;
board_led_write(led_state);
@@ -290,13 +304,13 @@ static int _count_utf8_bytes(const uint16_t *buf, size_t len) {
}
static void print_utf16(uint16_t *temp_buf, size_t buf_len) {
- if ((temp_buf[0] & 0xff) == 0) return; // empty
+ if ((temp_buf[0] & 0xff) == 0) {
+ return;// empty
+ }
size_t utf16_len = ((temp_buf[0] & 0xff) - 2) / sizeof(uint16_t);
size_t utf8_len = (size_t) _count_utf8_bytes(temp_buf + 1, utf16_len);
_convert_utf16le_to_utf8(temp_buf + 1, utf16_len, (uint8_t *) temp_buf, sizeof(uint16_t) * buf_len);
((uint8_t*) temp_buf)[utf8_len] = '\0';
- tud_cdc_write(temp_buf, utf8_len);
- tud_cdc_write_flush();
- tud_task();
+ cdc_printf((char*) temp_buf);
}
diff --git a/examples/host/CMakeLists.txt b/examples/host/CMakeLists.txt
index 793f6ab08..2783dd84e 100644
--- a/examples/host/CMakeLists.txt
+++ b/examples/host/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/family_support.cmake)
@@ -11,4 +11,5 @@ family_add_subdirectory(cdc_msc_hid)
family_add_subdirectory(cdc_msc_hid_freertos)
family_add_subdirectory(device_info)
family_add_subdirectory(hid_controller)
+family_add_subdirectory(midi_rx)
family_add_subdirectory(msc_file_explorer)
diff --git a/examples/host/CMakePresets.json b/examples/host/CMakePresets.json
new file mode 100644
index 000000000..c22e8c0ec
--- /dev/null
+++ b/examples/host/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/host/bare_api/CMakeLists.txt b/examples/host/bare_api/CMakeLists.txt
index 76182d6fa..0efe84b60 100644
--- a/examples/host/bare_api/CMakeLists.txt
+++ b/examples/host/bare_api/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/host/bare_api/CMakePresets.json b/examples/host/bare_api/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/host/bare_api/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/host/bare_api/only.txt b/examples/host/bare_api/only.txt
index 95f9f1d82..dcdaf41c7 100644
--- a/examples/host/bare_api/only.txt
+++ b/examples/host/bare_api/only.txt
@@ -15,3 +15,5 @@ mcu:MAX3421
mcu:STM32F4
mcu:STM32F7
mcu:STM32H7
+mcu:STM32H7RS
+mcu:STM32N6
diff --git a/examples/host/bare_api/src/main.c b/examples/host/bare_api/src/main.c
index f582f4f5a..0c76ff0c9 100644
--- a/examples/host/bare_api/src/main.c
+++ b/examples/host/bare_api/src/main.c
@@ -55,16 +55,15 @@ uint8_t* get_hid_buf(uint8_t daddr);
void free_hid_buf(uint8_t daddr);
/*------------- MAIN -------------*/
-int main(void)
-{
+int main(void) {
board_init();
printf("TinyUSB Bare API Example\r\n");
// init host stack on configured roothub port
tusb_rhport_init_t host_init = {
- .role = TUSB_ROLE_HOST,
- .speed = TUSB_SPEED_AUTO
+ .role = TUSB_ROLE_HOST,
+ .speed = TUSB_SPEED_AUTO
};
tusb_init(BOARD_TUH_RHPORT, &host_init);
@@ -72,8 +71,7 @@ int main(void)
board_init_after_tusb();
}
- while (1)
- {
+ while (1) {
// tinyusb host task
tuh_task();
led_blinking_task();
@@ -85,8 +83,7 @@ int main(void)
/*------------- TinyUSB Callbacks -------------*/
// Invoked when device is mounted (configured)
-void tuh_mount_cb (uint8_t daddr)
-{
+void tuh_mount_cb(uint8_t daddr) {
printf("Device attached, address = %d\r\n", daddr);
// Get Device Descriptor
@@ -95,8 +92,7 @@ void tuh_mount_cb (uint8_t daddr)
}
/// Invoked when device is unmounted (bus reset/unplugged)
-void tuh_umount_cb(uint8_t daddr)
-{
+void tuh_umount_cb(uint8_t daddr) {
printf("Device removed, address = %d\r\n", daddr);
free_hid_buf(daddr);
}
@@ -104,11 +100,8 @@ void tuh_umount_cb(uint8_t daddr)
//--------------------------------------------------------------------+
// Device Descriptor
//--------------------------------------------------------------------+
-
-void print_device_descriptor(tuh_xfer_t* xfer)
-{
- if ( XFER_RESULT_SUCCESS != xfer->result )
- {
+void print_device_descriptor(tuh_xfer_t *xfer) {
+ if (XFER_RESULT_SUCCESS != xfer->result) {
printf("Failed to get device descriptor\r\n");
return;
}
@@ -131,33 +124,29 @@ void print_device_descriptor(tuh_xfer_t* xfer)
// Get String descriptor using Sync API
uint16_t temp_buf[128];
- printf(" iManufacturer %u " , desc_device.iManufacturer);
- if (XFER_RESULT_SUCCESS == tuh_descriptor_get_manufacturer_string_sync(daddr, LANGUAGE_ID, temp_buf, sizeof(temp_buf)) )
- {
+ printf(" iManufacturer %u ", desc_device.iManufacturer);
+ if (XFER_RESULT_SUCCESS == tuh_descriptor_get_manufacturer_string_sync(daddr, LANGUAGE_ID, temp_buf, sizeof(temp_buf))) {
print_utf16(temp_buf, TU_ARRAY_SIZE(temp_buf));
}
printf("\r\n");
- printf(" iProduct %u " , desc_device.iProduct);
- if (XFER_RESULT_SUCCESS == tuh_descriptor_get_product_string_sync(daddr, LANGUAGE_ID, temp_buf, sizeof(temp_buf)))
- {
+ printf(" iProduct %u ", desc_device.iProduct);
+ if (XFER_RESULT_SUCCESS == tuh_descriptor_get_product_string_sync(daddr, LANGUAGE_ID, temp_buf, sizeof(temp_buf))) {
print_utf16(temp_buf, TU_ARRAY_SIZE(temp_buf));
}
printf("\r\n");
- printf(" iSerialNumber %u " , desc_device.iSerialNumber);
- if (XFER_RESULT_SUCCESS == tuh_descriptor_get_serial_string_sync(daddr, LANGUAGE_ID, temp_buf, sizeof(temp_buf)))
- {
+ printf(" iSerialNumber %u ", desc_device.iSerialNumber);
+ if (XFER_RESULT_SUCCESS == tuh_descriptor_get_serial_string_sync(daddr, LANGUAGE_ID, temp_buf, sizeof(temp_buf))) {
print_utf16(temp_buf, TU_ARRAY_SIZE(temp_buf));
}
printf("\r\n");
- printf(" bNumConfigurations %u\r\n" , desc_device.bNumConfigurations);
+ printf(" bNumConfigurations %u\r\n", desc_device.bNumConfigurations);
// Get configuration descriptor with sync API
- if (XFER_RESULT_SUCCESS == tuh_descriptor_get_configuration_sync(daddr, 0, temp_buf, sizeof(temp_buf)))
- {
- parse_config_descriptor(daddr, (tusb_desc_configuration_t*) temp_buf);
+ if (XFER_RESULT_SUCCESS == tuh_descriptor_get_configuration_sync(daddr, 0, temp_buf, sizeof(temp_buf))) {
+ parse_config_descriptor(daddr, (tusb_desc_configuration_t *) temp_buf);
}
}
@@ -171,37 +160,33 @@ uint16_t count_interface_total_len(tusb_desc_interface_t const* desc_itf, uint8_
void open_hid_interface(uint8_t daddr, tusb_desc_interface_t const *desc_itf, uint16_t max_len);
// simple configuration parser to open and listen to HID Endpoint IN
-void parse_config_descriptor(uint8_t dev_addr, tusb_desc_configuration_t const* desc_cfg)
-{
- uint8_t const* desc_end = ((uint8_t const*) desc_cfg) + tu_le16toh(desc_cfg->wTotalLength);
- uint8_t const* p_desc = tu_desc_next(desc_cfg);
+void parse_config_descriptor(uint8_t dev_addr, tusb_desc_configuration_t const *desc_cfg) {
+ uint8_t const *desc_end = ((uint8_t const *) desc_cfg) + tu_le16toh(desc_cfg->wTotalLength);
+ uint8_t const *p_desc = tu_desc_next(desc_cfg);
// parse each interfaces
- while( p_desc < desc_end )
- {
+ while (p_desc < desc_end) {
uint8_t assoc_itf_count = 1;
// Class will always starts with Interface Association (if any) and then Interface descriptor
- if ( TUSB_DESC_INTERFACE_ASSOCIATION == tu_desc_type(p_desc) )
- {
- tusb_desc_interface_assoc_t const * desc_iad = (tusb_desc_interface_assoc_t const *) p_desc;
+ if (TUSB_DESC_INTERFACE_ASSOCIATION == tu_desc_type(p_desc)) {
+ tusb_desc_interface_assoc_t const *desc_iad = (tusb_desc_interface_assoc_t const *) p_desc;
assoc_itf_count = desc_iad->bInterfaceCount;
- p_desc = tu_desc_next(p_desc); // next to Interface
+ p_desc = tu_desc_next(p_desc);// next to Interface
}
// must be interface from now
- if( TUSB_DESC_INTERFACE != tu_desc_type(p_desc) ) return;
- tusb_desc_interface_t const* desc_itf = (tusb_desc_interface_t const*) p_desc;
+ if (TUSB_DESC_INTERFACE != tu_desc_type(p_desc)) { return; }
+ tusb_desc_interface_t const *desc_itf = (tusb_desc_interface_t const *) p_desc;
- uint16_t const drv_len = count_interface_total_len(desc_itf, assoc_itf_count, (uint16_t) (desc_end-p_desc));
+ uint16_t const drv_len = count_interface_total_len(desc_itf, assoc_itf_count, (uint16_t) (desc_end - p_desc));
// probably corrupted descriptor
- if(drv_len < sizeof(tusb_desc_interface_t)) return;
+ if (drv_len < sizeof(tusb_desc_interface_t)) { return; }
// only open and listen to HID endpoint IN
- if (desc_itf->bInterfaceClass == TUSB_CLASS_HID)
- {
+ if (desc_itf->bInterfaceClass == TUSB_CLASS_HID) {
open_hid_interface(dev_addr, desc_itf, drv_len);
}
@@ -210,25 +195,21 @@ void parse_config_descriptor(uint8_t dev_addr, tusb_desc_configuration_t const*
}
}
-uint16_t count_interface_total_len(tusb_desc_interface_t const* desc_itf, uint8_t itf_count, uint16_t max_len)
-{
- uint8_t const* p_desc = (uint8_t const*) desc_itf;
+uint16_t count_interface_total_len(tusb_desc_interface_t const *desc_itf, uint8_t itf_count, uint16_t max_len) {
+ uint8_t const *p_desc = (uint8_t const *) desc_itf;
uint16_t len = 0;
- while (itf_count--)
- {
+ while (itf_count--) {
// Next on interface desc
len += tu_desc_len(desc_itf);
p_desc = tu_desc_next(p_desc);
- while (len < max_len)
- {
+ while (len < max_len) {
// return on IAD regardless of itf count
- if ( tu_desc_type(p_desc) == TUSB_DESC_INTERFACE_ASSOCIATION ) return len;
+ if (tu_desc_type(p_desc) == TUSB_DESC_INTERFACE_ASSOCIATION) { return len; }
- if ( (tu_desc_type(p_desc) == TUSB_DESC_INTERFACE) &&
- ((tusb_desc_interface_t const*) p_desc)->bAlternateSetting == 0 )
- {
+ if ((tu_desc_type(p_desc) == TUSB_DESC_INTERFACE) &&
+ ((tusb_desc_interface_t const *) p_desc)->bAlternateSetting == 0) {
break;
}
@@ -246,46 +227,45 @@ uint16_t count_interface_total_len(tusb_desc_interface_t const* desc_itf, uint8_
void hid_report_received(tuh_xfer_t* xfer);
-void open_hid_interface(uint8_t daddr, tusb_desc_interface_t const *desc_itf, uint16_t max_len)
-{
+void open_hid_interface(uint8_t daddr, tusb_desc_interface_t const *desc_itf, uint16_t max_len) {
// len = interface + hid + n*endpoints
uint16_t const drv_len = (uint16_t) (sizeof(tusb_desc_interface_t) + sizeof(tusb_hid_descriptor_hid_t) +
desc_itf->bNumEndpoints * sizeof(tusb_desc_endpoint_t));
// corrupted descriptor
- if (max_len < drv_len) return;
+ if (max_len < drv_len) { return; }
uint8_t const *p_desc = (uint8_t const *) desc_itf;
// HID descriptor
p_desc = tu_desc_next(p_desc);
tusb_hid_descriptor_hid_t const *desc_hid = (tusb_hid_descriptor_hid_t const *) p_desc;
- if(HID_DESC_TYPE_HID != desc_hid->bDescriptorType) return;
+ if (HID_DESC_TYPE_HID != desc_hid->bDescriptorType) { return; }
// Endpoint descriptor
p_desc = tu_desc_next(p_desc);
- tusb_desc_endpoint_t const * desc_ep = (tusb_desc_endpoint_t const *) p_desc;
+ tusb_desc_endpoint_t const *desc_ep = (tusb_desc_endpoint_t const *) p_desc;
- for(int i = 0; i < desc_itf->bNumEndpoints; i++)
- {
- if (TUSB_DESC_ENDPOINT != desc_ep->bDescriptorType) return;
+ for (int i = 0; i < desc_itf->bNumEndpoints; i++) {
+ if (TUSB_DESC_ENDPOINT != desc_ep->bDescriptorType) { return; }
- if(tu_edpt_dir(desc_ep->bEndpointAddress) == TUSB_DIR_IN)
- {
- // skip if failed to open endpoint
- if ( ! tuh_edpt_open(daddr, desc_ep) ) return;
+ if (tu_edpt_dir(desc_ep->bEndpointAddress) == TUSB_DIR_IN) {
+ if (!tuh_edpt_open(daddr, desc_ep)) {
+ return; // skip if failed to open endpoint
+ }
- uint8_t* buf = get_hid_buf(daddr);
- if (!buf) return; // out of memory
+ uint8_t *buf = get_hid_buf(daddr);
+ if (!buf) {
+ return;// out of memory
+ }
- tuh_xfer_t xfer =
- {
- .daddr = daddr,
- .ep_addr = desc_ep->bEndpointAddress,
- .buflen = 64,
- .buffer = buf,
- .complete_cb = hid_report_received,
- .user_data = (uintptr_t) buf, // since buffer is not available in callback, use user data to store the buffer
+ tuh_xfer_t xfer = {
+ .daddr = daddr,
+ .ep_addr = desc_ep->bEndpointAddress,
+ .buflen = 64,
+ .buffer = buf,
+ .complete_cb = hid_report_received,
+ .user_data = (uintptr_t) buf,// since buffer is not available in callback, use user data to store the buffer
};
// submit transfer for this EP
@@ -299,18 +279,17 @@ void open_hid_interface(uint8_t daddr, tusb_desc_interface_t const *desc_itf, ui
}
}
-void hid_report_received(tuh_xfer_t* xfer)
-{
+void hid_report_received(tuh_xfer_t *xfer) {
// Note: not all field in xfer is available for use (i.e filled by tinyusb stack) in callback to save sram
// For instance, xfer->buffer is NULL. We have used user_data to store buffer when submitted callback
- uint8_t* buf = (uint8_t*) xfer->user_data;
+ uint8_t *buf = (uint8_t *) xfer->user_data;
- if (xfer->result == XFER_RESULT_SUCCESS)
- {
+ if (xfer->result == XFER_RESULT_SUCCESS) {
printf("[dev %u: ep %02x] HID Report:", xfer->daddr, xfer->ep_addr);
- for(uint32_t i=0; iactual_len; i++)
- {
- if (i%16 == 0) printf("\r\n ");
+ for (uint32_t i = 0; i < xfer->actual_len; i++) {
+ if (i % 16 == 0) {
+ printf("\r\n ");
+ }
printf("%02X ", buf[i]);
}
printf("\r\n");
@@ -329,12 +308,9 @@ void hid_report_received(tuh_xfer_t* xfer)
//--------------------------------------------------------------------+
// get an buffer from pool
-uint8_t* get_hid_buf(uint8_t daddr)
-{
- for(size_t i=0; i> 6 & 0x1F));
- *utf8++ = (uint8_t)(0x80 | (chr >> 0 & 0x3F));
- } else {
- // TODO: Verify surrogate.
- *utf8++ = (uint8_t)(0xE0 | (chr >> 12 & 0x0F));
- *utf8++ = (uint8_t)(0x80 | (chr >> 6 & 0x3F));
- *utf8++ = (uint8_t)(0x80 | (chr >> 0 & 0x3F));
- }
- // TODO: Handle UTF-16 code points that take two entries.
+ for (size_t i = 0; i < utf16_len; i++) {
+ uint16_t chr = utf16[i];
+ if (chr < 0x80) {
+ *utf8++ = chr & 0xffu;
+ } else if (chr < 0x800) {
+ *utf8++ = (uint8_t) (0xC0 | (chr >> 6 & 0x1F));
+ *utf8++ = (uint8_t) (0x80 | (chr >> 0 & 0x3F));
+ } else {
+ // TODO: Verify surrogate.
+ *utf8++ = (uint8_t) (0xE0 | (chr >> 12 & 0x0F));
+ *utf8++ = (uint8_t) (0x80 | (chr >> 6 & 0x3F));
+ *utf8++ = (uint8_t) (0x80 | (chr >> 0 & 0x3F));
}
+ // TODO: Handle UTF-16 code points that take two entries.
+ }
}
// Count how many bytes a utf-16-le encoded string will take in utf-8.
static int _count_utf8_bytes(const uint16_t *buf, size_t len) {
- size_t total_bytes = 0;
- for (size_t i = 0; i < len; i++) {
- uint16_t chr = buf[i];
- if (chr < 0x80) {
- total_bytes += 1;
- } else if (chr < 0x800) {
- total_bytes += 2;
- } else {
- total_bytes += 3;
- }
- // TODO: Handle UTF-16 code points that take two entries.
+ size_t total_bytes = 0;
+ for (size_t i = 0; i < len; i++) {
+ uint16_t chr = buf[i];
+ if (chr < 0x80) {
+ total_bytes += 1;
+ } else if (chr < 0x800) {
+ total_bytes += 2;
+ } else {
+ total_bytes += 3;
}
- return (int) total_bytes;
+ // TODO: Handle UTF-16 code points that take two entries.
+ }
+ return (int) total_bytes;
}
static void print_utf16(uint16_t *temp_buf, size_t buf_len) {
- if ((temp_buf[0] & 0xff) == 0) return; // empty
- size_t utf16_len = ((temp_buf[0] & 0xff) - 2) / sizeof(uint16_t);
- size_t utf8_len = (size_t) _count_utf8_bytes(temp_buf + 1, utf16_len);
- _convert_utf16le_to_utf8(temp_buf + 1, utf16_len, (uint8_t *) temp_buf, sizeof(uint16_t) * buf_len);
- ((uint8_t*) temp_buf)[utf8_len] = '\0';
+ if ((temp_buf[0] & 0xff) == 0) return;// empty
+ size_t utf16_len = ((temp_buf[0] & 0xff) - 2) / sizeof(uint16_t);
+ size_t utf8_len = (size_t) _count_utf8_bytes(temp_buf + 1, utf16_len);
+ _convert_utf16le_to_utf8(temp_buf + 1, utf16_len, (uint8_t *) temp_buf, sizeof(uint16_t) * buf_len);
+ ((uint8_t *) temp_buf)[utf8_len] = '\0';
- printf("%s", (char*)temp_buf);
+ printf("%s", (char *) temp_buf);
}
diff --git a/examples/host/bare_api/src/tusb_config.h b/examples/host/bare_api/src/tusb_config.h
index fab233be0..a03675c5f 100644
--- a/examples/host/bare_api/src/tusb_config.h
+++ b/examples/host/bare_api/src/tusb_config.h
@@ -69,9 +69,10 @@
// Enable Host stack
#define CFG_TUH_ENABLED 1
+// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
- // #define CFG_TUH_MAX3421 1 // use max3421 as host controller
// host roothub port is 1 if using either pio-usb or max3421
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)
diff --git a/examples/host/cdc_msc_hid/CMakeLists.txt b/examples/host/cdc_msc_hid/CMakeLists.txt
index a7c372a34..e8928cda5 100644
--- a/examples/host/cdc_msc_hid/CMakeLists.txt
+++ b/examples/host/cdc_msc_hid/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/host/cdc_msc_hid/CMakePresets.json b/examples/host/cdc_msc_hid/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/host/cdc_msc_hid/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/host/cdc_msc_hid/only.txt b/examples/host/cdc_msc_hid/only.txt
index 95f9f1d82..dcdaf41c7 100644
--- a/examples/host/cdc_msc_hid/only.txt
+++ b/examples/host/cdc_msc_hid/only.txt
@@ -15,3 +15,5 @@ mcu:MAX3421
mcu:STM32F4
mcu:STM32F7
mcu:STM32H7
+mcu:STM32H7RS
+mcu:STM32N6
diff --git a/examples/host/cdc_msc_hid/src/cdc_app.c b/examples/host/cdc_msc_hid/src/cdc_app.c
index 4a13f8b27..97f1a96d6 100644
--- a/examples/host/cdc_msc_hid/src/cdc_app.c
+++ b/examples/host/cdc_msc_hid/src/cdc_app.c
@@ -27,12 +27,11 @@
#include "tusb.h"
#include "bsp/board_api.h"
-size_t get_console_inputs(uint8_t* buf, size_t bufsize) {
+static size_t get_console_inputs(uint8_t* buf, size_t bufsize) {
size_t count = 0;
while (count < bufsize) {
int ch = board_getchar();
- if (ch <= 0) break;
-
+ if (ch <= 0) { break; }
buf[count] = (uint8_t) ch;
count++;
}
@@ -69,10 +68,15 @@ void tuh_cdc_rx_cb(uint8_t idx) {
uint32_t const bufsize = sizeof(buf) - 1;
// forward cdc interfaces -> console
- uint32_t count = tuh_cdc_read(idx, buf, bufsize);
- buf[count] = 0;
+ const uint32_t count = tuh_cdc_read(idx, buf, bufsize);
+ if (count) {
+ buf[count] = 0;
+ printf("%s", (char*) buf);
- printf("%s", (char*) buf);
+ #ifndef __ICCARM__ // TODO IAR doesn't support stream control ?
+ fflush(stdout);// flush right away, else nanolib will wait for newline
+ #endif
+ }
}
// Invoked when a device with CDC interface is mounted
@@ -88,7 +92,7 @@ void tuh_cdc_mount_cb(uint8_t idx) {
// If CFG_TUH_CDC_LINE_CODING_ON_ENUM is defined, line coding will be set by tinyusb stack
// while eneumerating new cdc device
cdc_line_coding_t line_coding = {0};
- if (tuh_cdc_get_local_line_coding(idx, &line_coding)) {
+ if (tuh_cdc_get_line_coding_local(idx, &line_coding)) {
printf(" Baudrate: %" PRIu32 ", Stop Bits : %u\r\n", line_coding.bit_rate, line_coding.stop_bits);
printf(" Parity : %u, Data Width: %u\r\n", line_coding.parity, line_coding.data_bits);
}
diff --git a/examples/host/cdc_msc_hid/src/hid_app.c b/examples/host/cdc_msc_hid/src/hid_app.c
index 3f98ec89f..6f01d6f45 100644
--- a/examples/host/cdc_msc_hid/src/hid_app.c
+++ b/examples/host/cdc_msc_hid/src/hid_app.c
@@ -29,28 +29,21 @@
//--------------------------------------------------------------------+
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
//--------------------------------------------------------------------+
+#define MAX_REPORT 4
-// If your host terminal support ansi escape code such as TeraTerm
-// it can be use to simulate mouse cursor movement within terminal
-#define USE_ANSI_ESCAPE 0
-
-#define MAX_REPORT 4
-
-static uint8_t const keycode2ascii[128][2] = { HID_KEYCODE_TO_ASCII };
+static uint8_t const keycode2ascii[128][2] = {HID_KEYCODE_TO_ASCII};
// Each HID instance can has multiple reports
-static struct
-{
+static struct {
uint8_t report_count;
tuh_hid_report_info_t report_info[MAX_REPORT];
-}hid_info[CFG_TUH_HID];
+} hid_info[CFG_TUH_HID];
static void process_kbd_report(hid_keyboard_report_t const *report);
-static void process_mouse_report(hid_mouse_report_t const * report);
-static void process_generic_report(uint8_t dev_addr, uint8_t instance, uint8_t const* report, uint16_t len);
+static void process_mouse_report(hid_mouse_report_t const *report);
+static void process_generic_report(uint8_t dev_addr, uint8_t instance, uint8_t const *report, uint16_t len);
-void hid_app_task(void)
-{
+void hid_app_task(void) {
// nothing to do
}
@@ -63,64 +56,57 @@ void hid_app_task(void)
// can be used to parse common/simple enough descriptor.
// Note: if report descriptor length > CFG_TUH_ENUMERATION_BUFSIZE, it will be skipped
// therefore report_desc = NULL, desc_len = 0
-void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_report, uint16_t desc_len)
-{
+void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const *desc_report, uint16_t desc_len) {
printf("HID device address = %d, instance = %d is mounted\r\n", dev_addr, instance);
// Interface protocol (hid_interface_protocol_enum_t)
- const char* protocol_str[] = { "None", "Keyboard", "Mouse" };
+ const char *protocol_str[] = {"None", "Keyboard", "Mouse"};
uint8_t const itf_protocol = tuh_hid_interface_protocol(dev_addr, instance);
printf("HID Interface Protocol = %s\r\n", protocol_str[itf_protocol]);
- // By default host stack will use activate boot protocol on supported interface.
+ // By default, host stack will use boot protocol on supported interface.
// Therefore for this simple example, we only need to parse generic report descriptor (with built-in parser)
- if ( itf_protocol == HID_ITF_PROTOCOL_NONE )
- {
+ if (itf_protocol == HID_ITF_PROTOCOL_NONE) {
hid_info[instance].report_count = tuh_hid_parse_report_descriptor(hid_info[instance].report_info, MAX_REPORT, desc_report, desc_len);
printf("HID has %u reports \r\n", hid_info[instance].report_count);
}
// request to receive report
// tuh_hid_report_received_cb() will be invoked when report is available
- if ( !tuh_hid_receive_report(dev_addr, instance) )
- {
+ if (!tuh_hid_receive_report(dev_addr, instance)) {
printf("Error: cannot request to receive report\r\n");
}
}
// Invoked when device with hid interface is un-mounted
-void tuh_hid_umount_cb(uint8_t dev_addr, uint8_t instance)
-{
+void tuh_hid_umount_cb(uint8_t dev_addr, uint8_t instance) {
printf("HID device address = %d, instance = %d is unmounted\r\n", dev_addr, instance);
}
// Invoked when received report from device via interrupt endpoint
-void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* report, uint16_t len)
-{
+void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance, uint8_t const *report, uint16_t len) {
uint8_t const itf_protocol = tuh_hid_interface_protocol(dev_addr, instance);
- switch (itf_protocol)
- {
+ switch (itf_protocol) {
case HID_ITF_PROTOCOL_KEYBOARD:
TU_LOG2("HID receive boot keyboard report\r\n");
- process_kbd_report( (hid_keyboard_report_t const*) report );
- break;
+ process_kbd_report((hid_keyboard_report_t const *) report);
+ break;
case HID_ITF_PROTOCOL_MOUSE:
TU_LOG2("HID receive boot mouse report\r\n");
- process_mouse_report( (hid_mouse_report_t const*) report );
- break;
+ process_mouse_report((hid_mouse_report_t const *) report);
+ break;
default:
// Generic report requires matching ReportID and contents with previous parsed report info
process_generic_report(dev_addr, instance, report, len);
- break;
+ break;
}
// continue to request to receive report
- if ( !tuh_hid_receive_report(dev_addr, instance) )
- {
+ if (!tuh_hid_receive_report(dev_addr, instance)) {
printf("Error: cannot request to receive report\r\n");
}
}
@@ -130,7 +116,7 @@ void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance, uint8_t cons
//--------------------------------------------------------------------+
// look up new key in previous keys
-static inline bool find_key_in_report(hid_keyboard_report_t const* report, uint8_t keycode) {
+static inline bool find_key_in_report(hid_keyboard_report_t const *report, uint8_t keycode) {
for (uint8_t i = 0; i < 6; i++) {
if (report->keycode[i] == keycode) {
return true;
@@ -139,28 +125,25 @@ static inline bool find_key_in_report(hid_keyboard_report_t const* report, uint8
return false;
}
-static void process_kbd_report(hid_keyboard_report_t const *report)
-{
- static hid_keyboard_report_t prev_report = { 0, 0, {0} }; // previous report to check key released
+static void process_kbd_report(hid_keyboard_report_t const *report) {
+ static hid_keyboard_report_t prev_report = {0, 0, {0}};// previous report to check key released
//------------- example code ignore control (non-printable) key affects -------------//
- for(uint8_t i=0; i<6; i++)
- {
- if ( report->keycode[i] )
- {
- if ( find_key_in_report(&prev_report, report->keycode[i]) )
- {
+ for (uint8_t i = 0; i < 6; i++) {
+ if (report->keycode[i]) {
+ if (find_key_in_report(&prev_report, report->keycode[i])) {
// exist in previous report means the current key is holding
- }else
- {
+ } else {
// not existed in previous report means the current key is pressed
bool const is_shift = report->modifier & (KEYBOARD_MODIFIER_LEFTSHIFT | KEYBOARD_MODIFIER_RIGHTSHIFT);
uint8_t ch = keycode2ascii[report->keycode[i]][is_shift ? 1 : 0];
putchar(ch);
- if ( ch == '\r' ) putchar('\n'); // added new line for enter key
+ if (ch == '\r') {
+ putchar('\n');
+ }
- #ifndef __ICCARM__ // TODO IAR doesn't support stream control ?
- fflush(stdout); // flush right away, else nanolib will wait for newline
+ #ifndef __ICCARM__ // TODO IAR doesn't support stream control ?
+ fflush(stdout);// flush right away, else nanolib will wait for newline
#endif
}
}
@@ -174,86 +157,47 @@ static void process_kbd_report(hid_keyboard_report_t const *report)
// Mouse
//--------------------------------------------------------------------+
-void cursor_movement(int8_t x, int8_t y, int8_t wheel)
-{
-#if USE_ANSI_ESCAPE
- // Move X using ansi escape
- if ( x < 0)
- {
- printf(ANSI_CURSOR_BACKWARD(%d), (-x)); // move left
- }else if ( x > 0)
- {
- printf(ANSI_CURSOR_FORWARD(%d), x); // move right
- }
-
- // Move Y using ansi escape
- if ( y < 0)
- {
- printf(ANSI_CURSOR_UP(%d), (-y)); // move up
- }else if ( y > 0)
- {
- printf(ANSI_CURSOR_DOWN(%d), y); // move down
- }
-
- // Scroll using ansi escape
- if (wheel < 0)
- {
- printf(ANSI_SCROLL_UP(%d), (-wheel)); // scroll up
- }else if (wheel > 0)
- {
- printf(ANSI_SCROLL_DOWN(%d), wheel); // scroll down
- }
-
- printf("\r\n");
-#else
+static void cursor_movement(int8_t x, int8_t y, int8_t wheel) {
printf("(%d %d %d)\r\n", x, y, wheel);
-#endif
}
-static void process_mouse_report(hid_mouse_report_t const * report)
-{
- static hid_mouse_report_t prev_report = { 0 };
+static void process_mouse_report(hid_mouse_report_t const *report) {
+ static hid_mouse_report_t prev_report = {0};
- //------------- button state -------------//
+ // button state
uint8_t button_changed_mask = report->buttons ^ prev_report.buttons;
- if ( button_changed_mask & report->buttons)
- {
+ if (button_changed_mask & report->buttons) {
printf(" %c%c%c ",
- report->buttons & MOUSE_BUTTON_LEFT ? 'L' : '-',
- report->buttons & MOUSE_BUTTON_MIDDLE ? 'M' : '-',
- report->buttons & MOUSE_BUTTON_RIGHT ? 'R' : '-');
+ report->buttons & MOUSE_BUTTON_LEFT ? 'L' : '-',
+ report->buttons & MOUSE_BUTTON_MIDDLE ? 'M' : '-',
+ report->buttons & MOUSE_BUTTON_RIGHT ? 'R' : '-');
}
- //------------- cursor movement -------------//
+ // cursor movement
cursor_movement(report->x, report->y, report->wheel);
}
//--------------------------------------------------------------------+
// Generic Report
//--------------------------------------------------------------------+
-static void process_generic_report(uint8_t dev_addr, uint8_t instance, uint8_t const* report, uint16_t len)
-{
+static void process_generic_report(uint8_t dev_addr, uint8_t instance, uint8_t const *report, uint16_t len) {
(void) dev_addr;
(void) len;
uint8_t const rpt_count = hid_info[instance].report_count;
- tuh_hid_report_info_t* rpt_info_arr = hid_info[instance].report_info;
- tuh_hid_report_info_t* rpt_info = NULL;
+ tuh_hid_report_info_t *rpt_info_arr = hid_info[instance].report_info;
+ tuh_hid_report_info_t *rpt_info = NULL;
- if ( rpt_count == 1 && rpt_info_arr[0].report_id == 0)
- {
+ if (rpt_count == 1 && rpt_info_arr[0].report_id == 0) {
// Simple report without report ID as 1st byte
rpt_info = &rpt_info_arr[0];
- }else
- {
+ } else {
// Composite report, 1st byte is report ID, data starts from 2nd byte
uint8_t const rpt_id = report[0];
// Find report id in the array
- for(uint8_t i=0; iusage_page == HID_USAGE_PAGE_DESKTOP )
- {
- switch (rpt_info->usage)
- {
+ if (rpt_info->usage_page == HID_USAGE_PAGE_DESKTOP) {
+ switch (rpt_info->usage) {
case HID_USAGE_DESKTOP_KEYBOARD:
- TU_LOG1("HID receive keyboard report\r\n");
+ TU_LOG2("HID receive keyboard report\r\n");
// Assume keyboard follow boot report layout
- process_kbd_report( (hid_keyboard_report_t const*) report );
- break;
+ process_kbd_report((hid_keyboard_report_t const *) report);
+ break;
case HID_USAGE_DESKTOP_MOUSE:
- TU_LOG1("HID receive mouse report\r\n");
+ TU_LOG2("HID receive mouse report\r\n");
// Assume mouse follow boot report layout
- process_mouse_report( (hid_mouse_report_t const*) report );
- break;
+ process_mouse_report((hid_mouse_report_t const *) report);
+ break;
- default: break;
+ default:
+ printf("report[%u] ", rpt_info->report_id);
+ for (uint8_t i = 0; i < len; i++) {
+ printf("%02X ", report[i]);
+ }
+ printf("\r\n");
+ break;
}
}
}
diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c
index 71257c0fe..7b02e238e 100644
--- a/examples/host/cdc_msc_hid/src/main.c
+++ b/examples/host/cdc_msc_hid/src/main.c
@@ -31,18 +31,12 @@
#include "tusb.h"
//--------------------------------------------------------------------+
-// MACRO CONSTANT TYPEDEF PROTYPES
+// MACRO CONSTANT TYPEDEF PROTOTYPES
//--------------------------------------------------------------------+
void led_blinking_task(void);
extern void cdc_app_task(void);
extern void hid_app_task(void);
-#if CFG_TUH_ENABLED && CFG_TUH_MAX3421
-// API to read/rite MAX3421's register. Implemented by TinyUSB
-extern uint8_t tuh_max3421_reg_read(uint8_t rhport, uint8_t reg, bool in_isr);
-extern bool tuh_max3421_reg_write(uint8_t rhport, uint8_t reg, uint8_t data, bool in_isr);
-#endif
-
/*------------- MAIN -------------*/
int main(void) {
board_init();
@@ -82,12 +76,12 @@ int main(void) {
void tuh_mount_cb(uint8_t dev_addr) {
// application set-up
- printf("A device with address %d is mounted\r\n", dev_addr);
+ printf("A device with address %u is mounted\r\n", dev_addr);
}
void tuh_umount_cb(uint8_t dev_addr) {
// application tear-down
- printf("A device with address %d is unmounted \r\n", dev_addr);
+ printf("A device with address %u is unmounted \r\n", dev_addr);
}
@@ -101,7 +95,9 @@ void led_blinking_task(void) {
static bool led_state = false;
// Blink every interval ms
- if (board_millis() - start_ms < interval_ms) return; // not enough time
+ if (board_millis() - start_ms < interval_ms) {
+ return;// not enough time
+ }
start_ms += interval_ms;
board_led_write(led_state);
diff --git a/examples/host/cdc_msc_hid/src/msc_app.c b/examples/host/cdc_msc_hid/src/msc_app.c
index 1d7e18e6e..0e9c99766 100644
--- a/examples/host/cdc_msc_hid/src/msc_app.c
+++ b/examples/host/cdc_msc_hid/src/msc_app.c
@@ -30,13 +30,11 @@
//--------------------------------------------------------------------+
static scsi_inquiry_resp_t inquiry_resp;
-bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data)
-{
+static bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data) {
msc_cbw_t const* cbw = cb_data->cbw;
msc_csw_t const* csw = cb_data->csw;
- if (csw->status != 0)
- {
+ if (csw->status != 0) {
printf("Inquiry failed\r\n");
return false;
}
@@ -55,16 +53,14 @@ bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_da
}
//------------- IMPLEMENTATION -------------//
-void tuh_msc_mount_cb(uint8_t dev_addr)
-{
+void tuh_msc_mount_cb(uint8_t dev_addr) {
printf("A MassStorage device is mounted\r\n");
uint8_t const lun = 0;
tuh_msc_inquiry(dev_addr, lun, &inquiry_resp, inquiry_complete_cb, 0);
}
-void tuh_msc_umount_cb(uint8_t dev_addr)
-{
+void tuh_msc_umount_cb(uint8_t dev_addr) {
(void) dev_addr;
printf("A MassStorage device is unmounted\r\n");
}
diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h
index a59a0ffb9..2f8cb5e03 100644
--- a/examples/host/cdc_msc_hid/src/tusb_config.h
+++ b/examples/host/cdc_msc_hid/src/tusb_config.h
@@ -69,9 +69,10 @@
// Enable Host stack
#define CFG_TUH_ENABLED 1
+// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
- // #define CFG_TUH_MAX3421 1 // use max3421 as host controller
// host roothub port is 1 if using either pio-usb or max3421
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)
@@ -102,10 +103,11 @@
#define CFG_TUH_ENUMERATION_BUFSIZE 256
#define CFG_TUH_HUB 1 // number of supported hubs
-#define CFG_TUH_CDC 1 // CDC ACM
+#define CFG_TUH_CDC 2 // number of supported CDC devices. also activates CDC ACM
#define CFG_TUH_CDC_FTDI 1 // FTDI Serial. FTDI is not part of CDC class, only to re-use CDC driver API
#define CFG_TUH_CDC_CP210X 1 // CP210x Serial. CP210X is not part of CDC class, only to re-use CDC driver API
#define CFG_TUH_CDC_CH34X 1 // CH340 or CH341 Serial. CH34X is not part of CDC class, only to re-use CDC driver API
+#define CFG_TUH_CDC_PL2303 1 // PL2303 Serial. PL2303 is not part of CDC class, only to re-use CDC driver API
#define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces
#define CFG_TUH_MSC 1
#define CFG_TUH_VENDOR 0
@@ -121,7 +123,7 @@
// Set Line Control state on enumeration/mounted:
// DTR ( bit 0), RTS (bit 1)
-#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM 0x03
+#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM (CDC_CONTROL_LINE_STATE_DTR | CDC_CONTROL_LINE_STATE_RTS)
// Set Line Coding on enumeration/mounted, value for cdc_line_coding_t
// bit rate = 115200, 1 stop bit, no parity, 8 bit data width
diff --git a/examples/host/cdc_msc_hid_freertos/CMakeLists.txt b/examples/host/cdc_msc_hid_freertos/CMakeLists.txt
index b4004f8d7..78b2784fe 100644
--- a/examples/host/cdc_msc_hid_freertos/CMakeLists.txt
+++ b/examples/host/cdc_msc_hid_freertos/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/host/cdc_msc_hid_freertos/CMakePresets.json b/examples/host/cdc_msc_hid_freertos/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/host/cdc_msc_hid_freertos/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/host/cdc_msc_hid_freertos/Makefile b/examples/host/cdc_msc_hid_freertos/Makefile
index 67fbb9af3..178341f81 100644
--- a/examples/host/cdc_msc_hid_freertos/Makefile
+++ b/examples/host/cdc_msc_hid_freertos/Makefile
@@ -1,14 +1,9 @@
+RTOS = freertos
include ../../build_system/make/make.mk
-FREERTOS_SRC = lib/FreeRTOS-Kernel
-FREERTOS_PORTABLE_PATH= $(FREERTOS_SRC)/portable/$(if $(findstring iar,$(TOOLCHAIN)),IAR,GCC)
-
INC += \
src \
- src/FreeRTOSConfig \
$(TOP)/hw \
- $(TOP)/$(FREERTOS_SRC)/include \
- $(TOP)/$(FREERTOS_PORTABLE_SRC) \
# Example source
EXAMPLE_SOURCE = \
@@ -19,15 +14,4 @@ EXAMPLE_SOURCE = \
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
-# FreeRTOS source, all files in port folder
-SRC_C += \
- $(FREERTOS_SRC)/list.c \
- $(FREERTOS_SRC)/queue.c \
- $(FREERTOS_SRC)/tasks.c \
- $(FREERTOS_SRC)/timers.c \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.c))
-
-SRC_S += \
- $(subst $(TOP)/,,$(wildcard $(TOP)/$(FREERTOS_PORTABLE_SRC)/*.s))
-
include ../../build_system/make/rules.mk
diff --git a/examples/host/cdc_msc_hid_freertos/only.txt b/examples/host/cdc_msc_hid_freertos/only.txt
index e3ae25260..d939d4e7b 100644
--- a/examples/host/cdc_msc_hid_freertos/only.txt
+++ b/examples/host/cdc_msc_hid_freertos/only.txt
@@ -13,3 +13,5 @@ mcu:MAX3421
mcu:STM32F4
mcu:STM32F7
mcu:STM32H7
+mcu:STM32H7RS
+mcu:STM32N6
diff --git a/examples/host/cdc_msc_hid_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h b/examples/host/cdc_msc_hid_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
deleted file mode 100644
index 6a886adec..000000000
--- a/examples/host/cdc_msc_hid_freertos/src/FreeRTOSConfig/FreeRTOSConfig.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * FreeRTOS Kernel V10.0.0
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- * the Software, and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software. If you wish to use our Amazon
- * FreeRTOS name, please do so in a fair use way that does not cause confusion.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * http://www.FreeRTOS.org
- * http://aws.amazon.com/freertos
- *
- * 1 tab == 4 spaces!
- */
-
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-/*-----------------------------------------------------------
- * Application specific definitions.
- *
- * These definitions should be adjusted for your particular hardware and
- * application requirements.
- *
- * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
- * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
- *
- * See http://www.freertos.org/a00110.html.
- *----------------------------------------------------------*/
-
-// skip if included from IAR assembler
-#ifndef __IASMARM__
-
-// Include MCU header
-#include "bsp/board_mcu.h"
-
-#if TUSB_MCU_VENDOR_ESPRESSIF
- #error "ESP32-Sx should use IDF's FreeRTOSConfig.h"
-#endif
-
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wredundant-decls"
-#endif
-
-// TODO fix later
-// FIXME cause redundant-decls warnings
-#if CFG_TUSB_MCU == OPT_MCU_MM32F327X
- extern u32 SystemCoreClock;
-#else
- extern uint32_t SystemCoreClock;
-#endif
-
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
-
-#endif
-
-/* Cortex M23/M33 port configuration. */
-#define configENABLE_MPU 0
-#define configENABLE_FPU 1
-#define configENABLE_TRUSTZONE 0
-#define configMINIMAL_SECURE_STACK_SIZE ( 1024 )
-
-#define configUSE_PREEMPTION 1
-#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
-#define configCPU_CLOCK_HZ SystemCoreClock
-#define configTICK_RATE_HZ ( 1000 )
-#define configMAX_PRIORITIES ( 5 )
-#define configMINIMAL_STACK_SIZE ( 128 )
-#define configTOTAL_HEAP_SIZE ( configSUPPORT_DYNAMIC_ALLOCATION*4*1024 )
-#define configMAX_TASK_NAME_LEN 16
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 1
-#define configUSE_MUTEXES 1
-#define configUSE_RECURSIVE_MUTEXES 1
-#define configUSE_COUNTING_SEMAPHORES 1
-#define configQUEUE_REGISTRY_SIZE 4
-#define configUSE_QUEUE_SETS 0
-#define configUSE_TIME_SLICING 0
-#define configUSE_NEWLIB_REENTRANT 0
-#define configENABLE_BACKWARD_COMPATIBILITY 1
-#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
-
-#define configSUPPORT_STATIC_ALLOCATION 1
-#define configSUPPORT_DYNAMIC_ALLOCATION 0
-
-/* Hook function related definitions. */
-#define configUSE_IDLE_HOOK 0
-#define configUSE_TICK_HOOK 0
-#define configUSE_MALLOC_FAILED_HOOK 0 // cause nested extern warning
-#define configCHECK_FOR_STACK_OVERFLOW 2
-#define configCHECK_HANDLER_INSTALLATION 0
-
-/* Run time and task stats gathering related definitions. */
-#define configGENERATE_RUN_TIME_STATS 0
-#define configUSE_TRACE_FACILITY 1 // legacy trace
-#define configUSE_STATS_FORMATTING_FUNCTIONS 0
-
-/* Co-routine definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 2
-
-/* Software timer related definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES-2)
-#define configTIMER_QUEUE_LENGTH 32
-#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
-
-/* Optional functions - most linkers will remove unused functions anyway. */
-#define INCLUDE_vTaskPrioritySet 0
-#define INCLUDE_uxTaskPriorityGet 0
-#define INCLUDE_vTaskDelete 0
-#define INCLUDE_vTaskSuspend 1 // required for queue, semaphore, mutex to be blocked indefinitely with portMAX_DELAY
-#define INCLUDE_xResumeFromISR 0
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 0
-#define INCLUDE_xTaskGetCurrentTaskHandle 0
-#define INCLUDE_uxTaskGetStackHighWaterMark 0
-#define INCLUDE_xTaskGetIdleTaskHandle 0
-#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
-#define INCLUDE_pcTaskGetTaskName 0
-#define INCLUDE_eTaskGetState 0
-#define INCLUDE_xEventGroupSetBitFromISR 0
-#define INCLUDE_xTimerPendFunctionCall 0
-
-#ifdef __RX__
-/* Renesas RX series */
-#define vSoftwareInterruptISR INT_Excep_ICU_SWINT
-#define vTickISR INT_Excep_CMT0_CMI0
-#define configPERIPHERAL_CLOCK_HZ (configCPU_CLOCK_HZ/2)
-#define configKERNEL_INTERRUPT_PRIORITY 1
-#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4
-
-#else
-
-/* FreeRTOS hooks to NVIC vectors */
-#define xPortPendSVHandler PendSV_Handler
-#define xPortSysTickHandler SysTick_Handler
-#define vPortSVCHandler SVC_Handler
-
-//--------------------------------------------------------------------+
-// Interrupt nesting behavior configuration.
-//--------------------------------------------------------------------+
-#if defined(__NVIC_PRIO_BITS)
- // For Cortex-M specific: __NVIC_PRIO_BITS is defined in core_cmx.h
- #define configPRIO_BITS __NVIC_PRIO_BITS
-
-#elif defined(__ECLIC_INTCTLBITS)
- // RISC-V Bumblebee core from nuclei
- #define configPRIO_BITS __ECLIC_INTCTLBITS
-
-#elif defined(__IASMARM__)
- // FIXME: IAR Assembler cannot include mcu header directly to get __NVIC_PRIO_BITS.
- // Therefore we will hard coded it to minimum value of 2 to get pass ci build.
- // IAR user must update this to correct value of the target MCU
- #message "configPRIO_BITS is hard coded to 2 to pass IAR build only. User should update it per MCU"
- #define configPRIO_BITS 2
-
-#else
- #error "FreeRTOS configPRIO_BITS to be defined"
-#endif
-
-/* The lowest interrupt priority that can be used in a call to a "set priority" function. */
-#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY ((1<cbw;
msc_csw_t const *csw = cb_data->csw;
diff --git a/examples/host/cdc_msc_hid_freertos/src/tusb_config.h b/examples/host/cdc_msc_hid_freertos/src/tusb_config.h
index 02de4197b..3cdb227e2 100644
--- a/examples/host/cdc_msc_hid_freertos/src/tusb_config.h
+++ b/examples/host/cdc_msc_hid_freertos/src/tusb_config.h
@@ -44,7 +44,7 @@
#endif
// Espressif IDF requires "freertos/" prefix in include path
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define CFG_TUSB_OS_INC_PATH freertos/
#endif
@@ -74,9 +74,10 @@
// Enable Host stack
#define CFG_TUH_ENABLED 1
+// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
- // #define CFG_TUH_MAX3421 1 // use max3421 as host controller
// host roothub port is 1 if using either pio-usb or max3421
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)
@@ -107,10 +108,11 @@
#define CFG_TUH_ENUMERATION_BUFSIZE 256
#define CFG_TUH_HUB 1 // number of supported hubs
-#define CFG_TUH_CDC 1 // CDC ACM
+#define CFG_TUH_CDC 1 // number of supported CDC devices. also activates CDC ACM
#define CFG_TUH_CDC_FTDI 1 // FTDI Serial. FTDI is not part of CDC class, only to re-use CDC driver API
#define CFG_TUH_CDC_CP210X 1 // CP210x Serial. CP210X is not part of CDC class, only to re-use CDC driver API
#define CFG_TUH_CDC_CH34X 1 // CH340 or CH341 Serial. CH34X is not part of CDC class, only to re-use CDC driver API
+#define CFG_TUH_CDC_PL2303 1 // PL2303 Serial. PL2303 is not part of CDC class, only to re-use CDC driver API
#define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces
#define CFG_TUH_MSC 1
#define CFG_TUH_VENDOR 0
@@ -126,7 +128,7 @@
// Set Line Control state on enumeration/mounted:
// DTR ( bit 0), RTS (bit 1)
-#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM 0x03
+#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM (CDC_CONTROL_LINE_STATE_DTR | CDC_CONTROL_LINE_STATE_RTS)
// Set Line Coding on enumeration/mounted, value for cdc_line_coding_t
// bit rate = 115200, 1 stop bit, no parity, 8 bit data width
diff --git a/examples/host/device_info/CMakeLists.txt b/examples/host/device_info/CMakeLists.txt
index 6a16155ec..33953233d 100644
--- a/examples/host/device_info/CMakeLists.txt
+++ b/examples/host/device_info/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/host/device_info/CMakePresets.json b/examples/host/device_info/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/host/device_info/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/host/device_info/only.txt b/examples/host/device_info/only.txt
index b6f87f423..b5a4b6739 100644
--- a/examples/host/device_info/only.txt
+++ b/examples/host/device_info/only.txt
@@ -18,3 +18,5 @@ mcu:RAXXX
mcu:STM32F4
mcu:STM32F7
mcu:STM32H7
+mcu:STM32H7RS
+mcu:STM32N6
diff --git a/examples/host/device_info/src/main.c b/examples/host/device_info/src/main.c
index 775968c16..7189972d6 100644
--- a/examples/host/device_info/src/main.c
+++ b/examples/host/device_info/src/main.c
@@ -81,7 +81,7 @@ void init_freertos_task(void);
//--------------------------------------------------------------------
// Main
//--------------------------------------------------------------------
-void init_tinyusb(void) {
+static void init_tinyusb(void) {
// init host stack on configured roothub port
tusb_rhport_init_t host_init = {
.role = TUSB_ROLE_HOST,
@@ -124,13 +124,18 @@ void tuh_mount_cb(uint8_t daddr) {
}
printf("Device %u: ID %04x:%04x SN ", daddr, desc.device.idVendor, desc.device.idProduct);
- xfer_result = tuh_descriptor_get_serial_string_sync(daddr, LANGUAGE_ID, desc.serial, sizeof(desc.serial));
+
+ xfer_result = XFER_RESULT_FAILED;
+ if (desc.device.iSerialNumber != 0) {
+ xfer_result = tuh_descriptor_get_serial_string_sync(daddr, LANGUAGE_ID, desc.serial, sizeof(desc.serial));
+ }
if (XFER_RESULT_SUCCESS != xfer_result) {
uint16_t* serial = (uint16_t*)(uintptr_t) desc.serial;
- serial[0] = 'n';
- serial[1] = '/';
- serial[2] = 'a';
- serial[3] = 0;
+ serial[0] = (uint16_t) ((TUSB_DESC_STRING << 8) | (2 * 3 + 2));
+ serial[1] = 'n';
+ serial[2] = '/';
+ serial[3] = 'a';
+ serial[4] = 0;
}
print_utf16((uint16_t*)(uintptr_t) desc.serial, sizeof(desc.serial)/2);
printf("\r\n");
@@ -150,16 +155,20 @@ void tuh_mount_cb(uint8_t daddr) {
// Get String descriptor using Sync API
printf(" iManufacturer %u ", desc.device.iManufacturer);
- xfer_result = tuh_descriptor_get_manufacturer_string_sync(daddr, LANGUAGE_ID, desc.buf, sizeof(desc.buf));
- if (XFER_RESULT_SUCCESS == xfer_result) {
- print_utf16((uint16_t*)(uintptr_t) desc.buf, sizeof(desc.buf)/2);
+ if (desc.device.iManufacturer != 0) {
+ xfer_result = tuh_descriptor_get_manufacturer_string_sync(daddr, LANGUAGE_ID, desc.buf, sizeof(desc.buf));
+ if (XFER_RESULT_SUCCESS == xfer_result) {
+ print_utf16((uint16_t*)(uintptr_t) desc.buf, sizeof(desc.buf)/2);
+ }
}
printf("\r\n");
printf(" iProduct %u ", desc.device.iProduct);
- xfer_result = tuh_descriptor_get_product_string_sync(daddr, LANGUAGE_ID, desc.buf, sizeof(desc.buf));
- if (XFER_RESULT_SUCCESS == xfer_result) {
- print_utf16((uint16_t*)(uintptr_t) desc.buf, sizeof(desc.buf)/2);
+ if (desc.device.iProduct != 0) {
+ xfer_result = tuh_descriptor_get_product_string_sync(daddr, LANGUAGE_ID, desc.buf, sizeof(desc.buf));
+ if (XFER_RESULT_SUCCESS == xfer_result) {
+ print_utf16((uint16_t*)(uintptr_t) desc.buf, sizeof(desc.buf)/2);
+ }
}
printf("\r\n");
@@ -259,7 +268,7 @@ void led_blinking_task(void* param) {
#define BLINKY_STACK_SIZE configMINIMAL_STACK_SIZE
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define USB_STACK_SIZE 4096
#else
// Increase stack size when debug log is enabled
@@ -276,7 +285,7 @@ StackType_t usb_stack[USB_STACK_SIZE];
StaticTask_t usb_taskdef;
#endif
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
void app_main(void) {
main();
}
@@ -299,8 +308,8 @@ void init_freertos_task(void) {
xTaskCreate(usb_host_task, "usbh", USB_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL);
#endif
- // skip starting scheduler (and return) for ESP32-S2 or ESP32-S3
-#if !TUSB_MCU_VENDOR_ESPRESSIF
+ // only start scheduler for non-espressif mcu
+#ifndef ESP_PLATFORM
vTaskStartScheduler();
#endif
}
diff --git a/examples/host/device_info/src/tusb_config.h b/examples/host/device_info/src/tusb_config.h
index 5190b5b1f..e4ca2528e 100644
--- a/examples/host/device_info/src/tusb_config.h
+++ b/examples/host/device_info/src/tusb_config.h
@@ -40,7 +40,7 @@
#endif
// Espressif IDF requires "freertos/" prefix in include path
-#if TUSB_MCU_VENDOR_ESPRESSIF
+#ifdef ESP_PLATFORM
#define CFG_TUSB_OS_INC_PATH freertos/
#endif
@@ -74,9 +74,10 @@
// Enable Host stack
#define CFG_TUH_ENABLED 1
+// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
- // #define CFG_TUH_MAX3421 1 // use max3421 as host controller
// host roothub port is 1 if using either pio-usb or max3421
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)
@@ -109,8 +110,7 @@
// only hub class is enabled
#define CFG_TUH_HUB 1
-// max device support (excluding hub device)
-// 1 hub typically has 4 ports
+// max device support (excluding hub device): 1 hub typically has 4 ports
#define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1)
#ifdef __cplusplus
diff --git a/examples/host/hid_controller/CMakeLists.txt b/examples/host/hid_controller/CMakeLists.txt
index c1b500dd8..fb5faf210 100644
--- a/examples/host/hid_controller/CMakeLists.txt
+++ b/examples/host/hid_controller/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/host/hid_controller/CMakePresets.json b/examples/host/hid_controller/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/host/hid_controller/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/host/hid_controller/only.txt b/examples/host/hid_controller/only.txt
index 95f9f1d82..dcdaf41c7 100644
--- a/examples/host/hid_controller/only.txt
+++ b/examples/host/hid_controller/only.txt
@@ -15,3 +15,5 @@ mcu:MAX3421
mcu:STM32F4
mcu:STM32F7
mcu:STM32H7
+mcu:STM32H7RS
+mcu:STM32N6
diff --git a/examples/host/hid_controller/src/hid_app.c b/examples/host/hid_controller/src/hid_app.c
index 6ffe0b6d4..1d6ca8b07 100644
--- a/examples/host/hid_controller/src/hid_app.c
+++ b/examples/host/hid_controller/src/hid_app.c
@@ -231,14 +231,12 @@ void tuh_hid_umount_cb(uint8_t dev_addr, uint8_t instance)
}
// check if different than 2
-bool diff_than_2(uint8_t x, uint8_t y)
-{
+static inline bool diff_than_2(uint8_t x, uint8_t y) {
return (x - y > 2) || (y - x > 2);
}
// check if 2 reports are different enough
-bool diff_report(sony_ds4_report_t const* rpt1, sony_ds4_report_t const* rpt2)
-{
+static bool diff_report(sony_ds4_report_t const* rpt1, sony_ds4_report_t const* rpt2) {
bool result;
// x, y, z, rz must different than 2 to be counted
@@ -251,7 +249,7 @@ bool diff_report(sony_ds4_report_t const* rpt1, sony_ds4_report_t const* rpt2)
return result;
}
-void process_sony_ds4(uint8_t const* report, uint16_t len)
+static void process_sony_ds4(uint8_t const* report, uint16_t len)
{
(void)len;
const char* dpad_str[] = { "N", "NE", "E", "SE", "S", "SW", "W", "NW", "none" };
@@ -310,16 +308,13 @@ void process_sony_ds4(uint8_t const* report, uint16_t len)
}
// Invoked when received report from device via interrupt endpoint
-void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* report, uint16_t len)
-{
- if ( is_sony_ds4(dev_addr) )
- {
+void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance, uint8_t const *report, uint16_t len) {
+ if (is_sony_ds4(dev_addr)) {
process_sony_ds4(report, len);
}
// continue to request to receive report
- if ( !tuh_hid_receive_report(dev_addr, instance) )
- {
+ if (!tuh_hid_receive_report(dev_addr, instance)) {
printf("Error: cannot request to receive report\r\n");
}
}
diff --git a/examples/host/hid_controller/src/tusb_config.h b/examples/host/hid_controller/src/tusb_config.h
index 3ac591d8f..351fe0178 100644
--- a/examples/host/hid_controller/src/tusb_config.h
+++ b/examples/host/hid_controller/src/tusb_config.h
@@ -69,9 +69,10 @@
// Enable Host stack
#define CFG_TUH_ENABLED 1
+// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
- // #define CFG_TUH_MAX3421 1 // use max3421 as host controller
// host roothub port is 1 if using either pio-usb or max3421
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)
diff --git a/examples/host/midi_rx/CMakeLists.txt b/examples/host/midi_rx/CMakeLists.txt
new file mode 100644
index 000000000..33953233d
--- /dev/null
+++ b/examples/host/midi_rx/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required(VERSION 3.20)
+
+include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
+
+# gets PROJECT name for the example
+family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
+
+project(${PROJECT} C CXX ASM)
+
+# Checks this example is valid for the family and initializes the project
+family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
+
+# Espressif has its own cmake build system
+if(FAMILY STREQUAL "espressif")
+ return()
+endif()
+
+add_executable(${PROJECT})
+
+# Example source
+target_sources(${PROJECT} PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
+ )
+
+# Example include
+target_include_directories(${PROJECT} PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+ )
+
+# Configure compilation flags and libraries for the example without RTOS.
+# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
+family_configure_host_example(${PROJECT} noos)
diff --git a/examples/host/midi_rx/Makefile b/examples/host/midi_rx/Makefile
new file mode 100644
index 000000000..0235e08c3
--- /dev/null
+++ b/examples/host/midi_rx/Makefile
@@ -0,0 +1,13 @@
+include ../../build_system/make/make.mk
+
+INC += \
+ src \
+ $(TOP)/hw \
+
+# Example source
+EXAMPLE_SOURCE += \
+ src/main.c
+
+SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
+
+include ../../build_system/make/rules.mk
diff --git a/examples/host/midi_rx/only.txt b/examples/host/midi_rx/only.txt
new file mode 100644
index 000000000..b5a4b6739
--- /dev/null
+++ b/examples/host/midi_rx/only.txt
@@ -0,0 +1,22 @@
+mcu:ESP32S2
+mcu:ESP32S3
+mcu:ESP32P4
+mcu:KINETIS_KL
+mcu:LPC175X_6X
+mcu:LPC177X_8X
+mcu:LPC18XX
+mcu:LPC40XX
+mcu:LPC43XX
+mcu:MAX3421
+mcu:MIMXRT1XXX
+mcu:MIMXRT10XX
+mcu:MIMXRT11XX
+mcu:MSP432E4
+mcu:RP2040
+mcu:RX65X
+mcu:RAXXX
+mcu:STM32F4
+mcu:STM32F7
+mcu:STM32H7
+mcu:STM32H7RS
+mcu:STM32N6
diff --git a/examples/host/midi_rx/src/main.c b/examples/host/midi_rx/src/main.c
new file mode 100644
index 000000000..78b1a11b9
--- /dev/null
+++ b/examples/host/midi_rx/src/main.c
@@ -0,0 +1,123 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+#include
+#include
+#include
+
+#include "bsp/board_api.h"
+#include "tusb.h"
+
+//--------------------------------------------------------------------+
+// STATIC GLOBALS DECLARATION
+//--------------------------------------------------------------------+
+
+//--------------------------------------------------------------------+
+// MACRO CONSTANT TYPEDEF PROTOTYPES
+//--------------------------------------------------------------------+
+void led_blinking_task(void);
+void midi_host_rx_task(void);
+
+/*------------- MAIN -------------*/
+int main(void) {
+ board_init();
+
+ printf("TinyUSB Host MIDI Example\r\n");
+
+ // init host stack on configured roothub port
+ tusb_rhport_init_t host_init = {
+ .role = TUSB_ROLE_HOST,
+ .speed = TUSB_SPEED_AUTO
+ };
+ tusb_init(BOARD_TUH_RHPORT, &host_init);
+
+ while (1) {
+ tuh_task();
+ led_blinking_task();
+ midi_host_rx_task();
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------+
+// Blinking Task
+//--------------------------------------------------------------------+
+void led_blinking_task(void) {
+ const uint32_t interval_ms = 1000;
+ static uint32_t start_ms = 0;
+
+ static bool led_state = false;
+
+ // Blink every interval ms
+ if (board_millis() - start_ms < interval_ms) return;// not enough time
+ start_ms += interval_ms;
+
+ board_led_write(led_state);
+ led_state = 1 - led_state;// toggle
+}
+
+//--------------------------------------------------------------------+
+// MIDI host receive task
+//--------------------------------------------------------------------+
+void midi_host_rx_task(void) {
+ // nothing to do, we just print out received data in callback
+}
+
+//--------------------------------------------------------------------+
+// TinyUSB Callbacks
+//--------------------------------------------------------------------+
+
+// Invoked when device with MIDI interface is mounted.
+void tuh_midi_mount_cb(uint8_t idx, const tuh_midi_mount_cb_t* mount_cb_data) {
+ printf("MIDI Interface Index = %u, Address = %u, Number of RX cables = %u, Number of TX cables = %u\r\n",
+ idx, mount_cb_data->daddr, mount_cb_data->rx_cable_count, mount_cb_data->tx_cable_count);
+}
+
+// Invoked when device with hid interface is un-mounted
+void tuh_midi_umount_cb(uint8_t idx) {
+ printf("MIDI Interface Index = %u is unmounted\r\n", idx);
+}
+
+void tuh_midi_rx_cb(uint8_t idx, uint32_t xferred_bytes) {
+ if (xferred_bytes == 0) {
+ return;
+ }
+
+ uint8_t buffer[48];
+ uint8_t cable_num = 0;
+ uint32_t bytes_read = tuh_midi_stream_read(idx, &cable_num, buffer, sizeof(buffer));
+
+ printf("Cable %u rx: ", cable_num);
+ for (uint32_t i = 0; i < bytes_read; i++) {
+ printf("%02X ", buffer[i]);
+ }
+ printf("\r\n");
+}
+
+void tuh_midi_tx_cb(uint8_t idx, uint32_t xferred_bytes) {
+ (void) idx;
+ (void) xferred_bytes;
+}
diff --git a/examples/host/midi_rx/src/tusb_config.h b/examples/host/midi_rx/src/tusb_config.h
new file mode 100644
index 000000000..76bdf87f3
--- /dev/null
+++ b/examples/host/midi_rx/src/tusb_config.h
@@ -0,0 +1,118 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+#ifndef TUSB_CONFIG_H_
+#define TUSB_CONFIG_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//--------------------------------------------------------------------
+// Common Configuration
+//--------------------------------------------------------------------
+
+// defined by compiler flags for flexibility
+#ifndef CFG_TUSB_MCU
+#error CFG_TUSB_MCU must be defined
+#endif
+
+// Espressif IDF requires "freertos/" prefix in include path
+#ifdef ESP_PLATFORM
+#define CFG_TUSB_OS_INC_PATH freertos/
+#endif
+
+#ifndef CFG_TUSB_OS
+#define CFG_TUSB_OS OPT_OS_NONE
+#endif
+
+#ifndef CFG_TUSB_DEBUG
+#define CFG_TUSB_DEBUG 0
+#endif
+
+/* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.
+ * Tinyusb use follows macros to declare transferring memory so that they can be put
+ * into those specific section.
+ * e.g
+ * - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
+ * - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
+ */
+#ifndef CFG_TUH_MEM_SECTION
+#define CFG_TUH_MEM_SECTION
+#endif
+
+#ifndef CFG_TUH_MEM_ALIGN
+#define CFG_TUH_MEM_ALIGN __attribute__ ((aligned(4)))
+#endif
+
+//--------------------------------------------------------------------
+// Host Configuration
+//--------------------------------------------------------------------
+
+// Enable Host stack
+#define CFG_TUH_ENABLED 1
+
+#if CFG_TUSB_MCU == OPT_MCU_RP2040
+ // #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
+ // #define CFG_TUH_MAX3421 1 // use max3421 as host controller
+
+ // host roothub port is 1 if using either pio-usb or max3421
+ #if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)
+ #define BOARD_TUH_RHPORT 1
+ #endif
+#endif
+
+// Default is max speed that hardware controller could support with on-chip PHY
+#define CFG_TUH_MAX_SPEED BOARD_TUH_MAX_SPEED
+
+//------------------------- Board Specific --------------------------
+
+// RHPort number used for host can be defined by board.mk, default to port 0
+#ifndef BOARD_TUH_RHPORT
+#define BOARD_TUH_RHPORT 0
+#endif
+
+// RHPort max operational speed can defined by board.mk
+#ifndef BOARD_TUH_MAX_SPEED
+#define BOARD_TUH_MAX_SPEED OPT_MODE_DEFAULT_SPEED
+#endif
+
+//--------------------------------------------------------------------
+// Driver Configuration
+//--------------------------------------------------------------------
+
+// Size of buffer to hold descriptors and other data used for enumeration
+#define CFG_TUH_ENUMERATION_BUFSIZE 256
+
+#define CFG_TUH_HUB 1
+// max device support (excluding hub device): 1 hub typically has 4 ports
+#define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1)
+#define CFG_TUH_MIDI CFG_TUH_DEVICE_MAX
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/examples/host/msc_file_explorer/CMakeLists.txt b/examples/host/msc_file_explorer/CMakeLists.txt
index 1a57c7466..5ac75c04a 100644
--- a/examples/host/msc_file_explorer/CMakeLists.txt
+++ b/examples/host/msc_file_explorer/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/host/msc_file_explorer/CMakePresets.json b/examples/host/msc_file_explorer/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/host/msc_file_explorer/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/host/msc_file_explorer/Makefile b/examples/host/msc_file_explorer/Makefile
index c7d6a7cae..f0872376f 100644
--- a/examples/host/msc_file_explorer/Makefile
+++ b/examples/host/msc_file_explorer/Makefile
@@ -22,6 +22,6 @@ SRC_C += \
$(FATFS_PATH)/ffunicode.c \
# suppress warning caused by fatfs
-CFLAGS += -Wno-error=cast-qual
+CFLAGS_GCC += -Wno-error=cast-qual
include ../../build_system/make/rules.mk
diff --git a/examples/host/msc_file_explorer/only.txt b/examples/host/msc_file_explorer/only.txt
index 95f9f1d82..dcdaf41c7 100644
--- a/examples/host/msc_file_explorer/only.txt
+++ b/examples/host/msc_file_explorer/only.txt
@@ -15,3 +15,5 @@ mcu:MAX3421
mcu:STM32F4
mcu:STM32F7
mcu:STM32H7
+mcu:STM32H7RS
+mcu:STM32N6
diff --git a/examples/host/msc_file_explorer/src/main.c b/examples/host/msc_file_explorer/src/main.c
index 9509035b4..8197c3c8d 100644
--- a/examples/host/msc_file_explorer/src/main.c
+++ b/examples/host/msc_file_explorer/src/main.c
@@ -62,15 +62,13 @@
#include "bsp/board_api.h"
#include "tusb.h"
+#include "msc_app.h"
+
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
//--------------------------------------------------------------------+
void led_blinking_task(void);
-// from msc_app.c
-extern bool msc_app_init(void);
-extern void msc_app_task(void);
-
/*------------- MAIN -------------*/
int main(void) {
board_init();
diff --git a/examples/host/msc_file_explorer/src/msc_app.c b/examples/host/msc_file_explorer/src/msc_app.c
index 035d74689..40a9ef57e 100644
--- a/examples/host/msc_file_explorer/src/msc_app.c
+++ b/examples/host/msc_file_explorer/src/msc_app.c
@@ -34,6 +34,8 @@
#define EMBEDDED_CLI_IMPL
#include "embedded_cli.h"
+#include "msc_app.h"
+
//--------------------------------------------------------------------+
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
@@ -67,7 +69,9 @@ bool cli_init(void);
bool msc_app_init(void)
{
- for(size_t i=0; i 0 )
@@ -99,8 +105,7 @@ void msc_app_task(void)
//
//--------------------------------------------------------------------+
-bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data)
-{
+static bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data) {
msc_cbw_t const* cbw = cb_data->cbw;
msc_csw_t const* csw = cb_data->csw;
@@ -294,18 +299,11 @@ void cli_cmd_mkdir(EmbeddedCli *cli, char *args, void *context);
void cli_cmd_mv(EmbeddedCli *cli, char *args, void *context);
void cli_cmd_rm(EmbeddedCli *cli, char *args, void *context);
-void cli_write_char(EmbeddedCli *cli, char c)
-{
+static void cli_write_char(EmbeddedCli *cli, char c) {
(void) cli;
putchar((int) c);
}
-void cli_cmd_unknown(EmbeddedCli *cli, CliCommand *command)
-{
- (void) cli;
- printf("%s: command not found\r\n", command->name);
-}
-
bool cli_init(void)
{
EmbeddedCliConfig *config = embeddedCliDefaultConfig();
diff --git a/examples/host/msc_file_explorer/src/msc_app.h b/examples/host/msc_file_explorer/src/msc_app.h
new file mode 100644
index 000000000..3ba03d0dc
--- /dev/null
+++ b/examples/host/msc_file_explorer/src/msc_app.h
@@ -0,0 +1,35 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2025 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+#ifndef MSC_APP_H
+#define MSC_APP_H
+
+#include
+
+bool msc_app_init(void);
+void msc_app_task(void);
+
+
+#endif
diff --git a/examples/host/msc_file_explorer/src/tusb_config.h b/examples/host/msc_file_explorer/src/tusb_config.h
index c798b4383..c1829c300 100644
--- a/examples/host/msc_file_explorer/src/tusb_config.h
+++ b/examples/host/msc_file_explorer/src/tusb_config.h
@@ -69,9 +69,10 @@
// Enable Host stack
#define CFG_TUH_ENABLED 1
+// #define CFG_TUH_MAX3421 1 // use max3421 as host controller
+
#if CFG_TUSB_MCU == OPT_MCU_RP2040
// #define CFG_TUH_RPI_PIO_USB 1 // use pio-usb as host controller
- // #define CFG_TUH_MAX3421 1 // use max3421 as host controller
// host roothub port is 1 if using either pio-usb or max3421
#if (defined(CFG_TUH_RPI_PIO_USB) && CFG_TUH_RPI_PIO_USB) || (defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421)
diff --git a/examples/typec/CMakeLists.txt b/examples/typec/CMakeLists.txt
index c7641494e..24c25908a 100644
--- a/examples/typec/CMakeLists.txt
+++ b/examples/typec/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/family_support.cmake)
diff --git a/examples/typec/CMakePresets.json b/examples/typec/CMakePresets.json
new file mode 100644
index 000000000..c22e8c0ec
--- /dev/null
+++ b/examples/typec/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/typec/power_delivery/CMakeLists.txt b/examples/typec/power_delivery/CMakeLists.txt
index 012eff095..837b4996a 100644
--- a/examples/typec/power_delivery/CMakeLists.txt
+++ b/examples/typec/power_delivery/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.17)
+cmake_minimum_required(VERSION 3.20)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
diff --git a/examples/typec/power_delivery/CMakePresets.json b/examples/typec/power_delivery/CMakePresets.json
new file mode 100644
index 000000000..5cd8971e9
--- /dev/null
+++ b/examples/typec/power_delivery/CMakePresets.json
@@ -0,0 +1,6 @@
+{
+ "version": 6,
+ "include": [
+ "../../../hw/bsp/BoardPresets.json"
+ ]
+}
diff --git a/examples/typec/power_delivery/src/main.c b/examples/typec/power_delivery/src/main.c
index 068dbbeb1..de0db4721 100644
--- a/examples/typec/power_delivery/src/main.c
+++ b/examples/typec/power_delivery/src/main.c
@@ -71,9 +71,8 @@ int main(void)
}
}
-#if TUSB_MCU_VENDOR_ESPRESSIF
-void app_main(void)
-{
+#ifdef ESP_PLATFORM
+void app_main(void) {
main();
}
#endif
diff --git a/examples/west.yml b/examples/west.yml
new file mode 100644
index 000000000..0683f6861
--- /dev/null
+++ b/examples/west.yml
@@ -0,0 +1,12 @@
+manifest:
+ remotes:
+ - name: zephyrproject-rtos
+ url-base: https://github.com/zephyrproject-rtos
+ projects:
+ - name: zephyr
+ remote: zephyrproject-rtos
+ revision: main
+ path: zephyr
+ import: true
+ self:
+ path: .
diff --git a/hw/bsp/BoardPresets.json b/hw/bsp/BoardPresets.json
new file mode 100644
index 000000000..24da362da
--- /dev/null
+++ b/hw/bsp/BoardPresets.json
@@ -0,0 +1,4012 @@
+{
+ "version": 6,
+ "configurePresets": [
+ {
+ "name": "default",
+ "hidden": true,
+ "description": "Configure preset for the ${presetName} board",
+ "generator": "Ninja Multi-Config",
+ "binaryDir": "${sourceDir}/build/${presetName}",
+ "cacheVariables": {
+ "CMAKE_DEFAULT_BUILD_TYPE": "RelWithDebInfo",
+ "BOARD": "${presetName}"
+ }
+ },
+ {
+ "name": "default single",
+ "hidden": true,
+ "description": "Configure preset for the ${presetName} board",
+ "generator": "Ninja",
+ "binaryDir": "${sourceDir}/build/${presetName}",
+ "cacheVariables": {
+ "BOARD": "${presetName}"
+ }
+ },
+ {
+ "name": "adafruit_clue",
+ "inherits": "default"
+ },
+ {
+ "name": "adafruit_feather_esp32_v2",
+ "inherits": "default single"
+ },
+ {
+ "name": "adafruit_feather_esp32s2",
+ "inherits": "default single"
+ },
+ {
+ "name": "adafruit_feather_esp32s3",
+ "inherits": "default single"
+ },
+ {
+ "name": "adafruit_magtag_29gray",
+ "inherits": "default"
+ },
+ {
+ "name": "adafruit_metro_esp32s2",
+ "inherits": "default single"
+ },
+ {
+ "name": "apard32690",
+ "inherits": "default"
+ },
+ {
+ "name": "arduino_nano33_ble",
+ "inherits": "default"
+ },
+ {
+ "name": "atsamd21_xpro",
+ "inherits": "default"
+ },
+ {
+ "name": "atsaml21_xpro",
+ "inherits": "default"
+ },
+ {
+ "name": "b_g474e_dpow1",
+ "inherits": "default"
+ },
+ {
+ "name": "b_u585i_iot2a",
+ "inherits": "default"
+ },
+ {
+ "name": "ch32v103r_r1_1v0",
+ "inherits": "default"
+ },
+ {
+ "name": "ch32v203c_r0_1v0",
+ "inherits": "default"
+ },
+ {
+ "name": "ch32v203g_r0_1v0",
+ "inherits": "default"
+ },
+ {
+ "name": "ch32v307v_r1_1v0",
+ "inherits": "default"
+ },
+ {
+ "name": "circuitplayground_bluefruit",
+ "inherits": "default"
+ },
+ {
+ "name": "circuitplayground_express",
+ "inherits": "default"
+ },
+ {
+ "name": "curiosity_nano",
+ "inherits": "default"
+ },
+ {
+ "name": "cynthion_d11",
+ "inherits": "default"
+ },
+ {
+ "name": "cynthion_d21",
+ "inherits": "default"
+ },
+ {
+ "name": "d5035_01",
+ "inherits": "default"
+ },
+ {
+ "name": "da14695_dk_usb",
+ "inherits": "default"
+ },
+ {
+ "name": "da1469x_dk_pro",
+ "inherits": "default"
+ },
+ {
+ "name": "daisyseed",
+ "inherits": "default"
+ },
+ {
+ "name": "double_m33_express",
+ "inherits": "default"
+ },
+ {
+ "name": "ea4088_quickstart",
+ "inherits": "default"
+ },
+ {
+ "name": "ea4357",
+ "inherits": "default"
+ },
+ {
+ "name": "ek_tm4c123gxl",
+ "inherits": "default"
+ },
+ {
+ "name": "espressif_addax_1",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_c3_devkitc",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_c6_devkitc",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_kaluga_1",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_p4_function_ev",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_s2_devkitc",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_s3_devkitc",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_s3_devkitm",
+ "inherits": "default single"
+ },
+ {
+ "name": "espressif_saola_1",
+ "inherits": "default single"
+ },
+ {
+ "name": "f1c100s",
+ "inherits": "default"
+ },
+ {
+ "name": "feather_m0_express",
+ "inherits": "default"
+ },
+ {
+ "name": "feather_m4_express",
+ "inherits": "default"
+ },
+ {
+ "name": "feather_nrf52840_express",
+ "inherits": "default"
+ },
+ {
+ "name": "feather_nrf52840_sense",
+ "inherits": "default"
+ },
+ {
+ "name": "feather_rp2040_max3421",
+ "inherits": "default"
+ },
+ {
+ "name": "feather_stm32f405",
+ "inherits": "default"
+ },
+ {
+ "name": "fomu",
+ "inherits": "default"
+ },
+ {
+ "name": "frdm_k32l2a4s",
+ "inherits": "default"
+ },
+ {
+ "name": "frdm_k32l2b",
+ "inherits": "default"
+ },
+ {
+ "name": "frdm_k64f",
+ "inherits": "default"
+ },
+ {
+ "name": "frdm_kl25z",
+ "inherits": "default"
+ },
+ {
+ "name": "frdm_mcxa153",
+ "inherits": "default"
+ },
+ {
+ "name": "frdm_mcxn947",
+ "inherits": "default"
+ },
+ {
+ "name": "itsybitsy_m0",
+ "inherits": "default"
+ },
+ {
+ "name": "itsybitsy_m4",
+ "inherits": "default"
+ },
+ {
+ "name": "itsybitsy_nrf52840",
+ "inherits": "default"
+ },
+ {
+ "name": "kuiic",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso11u37",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso11u68",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso1347",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso1549",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso1769",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso18s37",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso43s67",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso51u68",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso54114",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso54608",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso54628",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso55s28",
+ "inherits": "default"
+ },
+ {
+ "name": "lpcxpresso55s69",
+ "inherits": "default"
+ },
+ {
+ "name": "max32650evkit",
+ "inherits": "default"
+ },
+ {
+ "name": "max32650fthr",
+ "inherits": "default"
+ },
+ {
+ "name": "max32651evkit",
+ "inherits": "default"
+ },
+ {
+ "name": "max32666evkit",
+ "inherits": "default"
+ },
+ {
+ "name": "max32666fthr",
+ "inherits": "default"
+ },
+ {
+ "name": "max32690evkit",
+ "inherits": "default"
+ },
+ {
+ "name": "max78002evkit",
+ "inherits": "default"
+ },
+ {
+ "name": "mbed1768",
+ "inherits": "default"
+ },
+ {
+ "name": "mcb1800",
+ "inherits": "default"
+ },
+ {
+ "name": "mcu_link",
+ "inherits": "default"
+ },
+ {
+ "name": "mcxn947brk",
+ "inherits": "default"
+ },
+ {
+ "name": "metro_m0_express",
+ "inherits": "default"
+ },
+ {
+ "name": "metro_m4_express",
+ "inherits": "default"
+ },
+ {
+ "name": "metro_m7_1011",
+ "inherits": "default"
+ },
+ {
+ "name": "metro_m7_1011_sd",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1010_evk",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1015_evk",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1020_evk",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1024_evk",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1050_evkb",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1060_evk",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1064_evk",
+ "inherits": "default"
+ },
+ {
+ "name": "mimxrt1170_evkb",
+ "inherits": "default"
+ },
+ {
+ "name": "mm32f327x_mb39",
+ "inherits": "default"
+ },
+ {
+ "name": "mm32f327x_pitaya_lite",
+ "inherits": "default"
+ },
+ {
+ "name": "msp_exp430f5529lp",
+ "inherits": "default"
+ },
+ {
+ "name": "msp_exp432e401y",
+ "inherits": "default"
+ },
+ {
+ "name": "nanoch32v203",
+ "inherits": "default"
+ },
+ {
+ "name": "pca10056",
+ "inherits": "default"
+ },
+ {
+ "name": "pca10059",
+ "inherits": "default"
+ },
+ {
+ "name": "pca10095",
+ "inherits": "default"
+ },
+ {
+ "name": "pca10100",
+ "inherits": "default"
+ },
+ {
+ "name": "pico_sdk",
+ "inherits": "default"
+ },
+ {
+ "name": "portenta_c33",
+ "inherits": "default"
+ },
+ {
+ "name": "pybadge",
+ "inherits": "default"
+ },
+ {
+ "name": "pyboardv11",
+ "inherits": "default"
+ },
+ {
+ "name": "pyportal",
+ "inherits": "default"
+ },
+ {
+ "name": "qtpy",
+ "inherits": "default"
+ },
+ {
+ "name": "ra2a1_ek",
+ "inherits": "default"
+ },
+ {
+ "name": "ra4m1_ek",
+ "inherits": "default"
+ },
+ {
+ "name": "ra4m3_ek",
+ "inherits": "default"
+ },
+ {
+ "name": "ra6m1_ek",
+ "inherits": "default"
+ },
+ {
+ "name": "ra6m5_ek",
+ "inherits": "default"
+ },
+ {
+ "name": "ra8m1_ek",
+ "inherits": "default"
+ },
+ {
+ "name": "raspberry_pi_pico",
+ "inherits": "default"
+ },
+ {
+ "name": "raspberry_pi_pico2",
+ "inherits": "default"
+ },
+ {
+ "name": "raspberrypi_cm4",
+ "inherits": "default"
+ },
+ {
+ "name": "raspberrypi_zero",
+ "inherits": "default"
+ },
+ {
+ "name": "raspberrypi_zero2",
+ "inherits": "default"
+ },
+ {
+ "name": "samd11_xplained",
+ "inherits": "default"
+ },
+ {
+ "name": "same54_xplained",
+ "inherits": "default"
+ },
+ {
+ "name": "samg55_xplained",
+ "inherits": "default"
+ },
+ {
+ "name": "saml22_feather",
+ "inherits": "default"
+ },
+ {
+ "name": "seeeduino_xiao",
+ "inherits": "default"
+ },
+ {
+ "name": "sensorwatch_m0",
+ "inherits": "default"
+ },
+ {
+ "name": "sipeed_longan_nano",
+ "inherits": "default"
+ },
+ {
+ "name": "sparkfun_samd21_mini_usb",
+ "inherits": "default"
+ },
+ {
+ "name": "stlinkv3mini",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32c071nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f070rbnucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f072disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f072eval",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f103_bluepill",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f103_mini_2",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f103ze_iar",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f207nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f303disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f401blackpill",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f407blackvet",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f407disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f411blackpill",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f411disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f412disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f412nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f439nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f723disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f746disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f746nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f767nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32f769disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32g0b1nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32g474nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32g491nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h503nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h563nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h573i_dk",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h723nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h743eval",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h743nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h745disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h750_weact",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h750bdk",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32h7s3nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32l052dap52",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32l0538disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32l412nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32l476disco",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32l4p5nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32l4r5nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32u545nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32u575eval",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32u575nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32u5a5nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "stm32wb55nucleo",
+ "inherits": "default"
+ },
+ {
+ "name": "teensy_35",
+ "inherits": "default"
+ },
+ {
+ "name": "teensy_40",
+ "inherits": "default"
+ },
+ {
+ "name": "teensy_41",
+ "inherits": "default"
+ },
+ {
+ "name": "trinket_m0",
+ "inherits": "default"
+ },
+ {
+ "name": "uno_r4",
+ "inherits": "default"
+ },
+ {
+ "name": "waveshare_openh743i",
+ "inherits": "default"
+ },
+ {
+ "name": "xmc4500_relax",
+ "inherits": "default"
+ },
+ {
+ "name": "xmc4700_relax",
+ "inherits": "default"
+ }
+ ],
+ "buildPresets": [
+ {
+ "name": "adafruit_clue",
+ "description": "Build preset for the adafruit_clue board",
+ "configurePreset": "adafruit_clue"
+ },
+ {
+ "name": "adafruit_feather_esp32_v2",
+ "description": "Build preset for the adafruit_feather_esp32_v2 board",
+ "configurePreset": "adafruit_feather_esp32_v2"
+ },
+ {
+ "name": "adafruit_feather_esp32s2",
+ "description": "Build preset for the adafruit_feather_esp32s2 board",
+ "configurePreset": "adafruit_feather_esp32s2"
+ },
+ {
+ "name": "adafruit_feather_esp32s3",
+ "description": "Build preset for the adafruit_feather_esp32s3 board",
+ "configurePreset": "adafruit_feather_esp32s3"
+ },
+ {
+ "name": "adafruit_magtag_29gray",
+ "description": "Build preset for the adafruit_magtag_29gray board",
+ "configurePreset": "adafruit_magtag_29gray"
+ },
+ {
+ "name": "adafruit_metro_esp32s2",
+ "description": "Build preset for the adafruit_metro_esp32s2 board",
+ "configurePreset": "adafruit_metro_esp32s2"
+ },
+ {
+ "name": "apard32690",
+ "description": "Build preset for the apard32690 board",
+ "configurePreset": "apard32690"
+ },
+ {
+ "name": "arduino_nano33_ble",
+ "description": "Build preset for the arduino_nano33_ble board",
+ "configurePreset": "arduino_nano33_ble"
+ },
+ {
+ "name": "atsamd21_xpro",
+ "description": "Build preset for the atsamd21_xpro board",
+ "configurePreset": "atsamd21_xpro"
+ },
+ {
+ "name": "atsaml21_xpro",
+ "description": "Build preset for the atsaml21_xpro board",
+ "configurePreset": "atsaml21_xpro"
+ },
+ {
+ "name": "b_g474e_dpow1",
+ "description": "Build preset for the b_g474e_dpow1 board",
+ "configurePreset": "b_g474e_dpow1"
+ },
+ {
+ "name": "b_u585i_iot2a",
+ "description": "Build preset for the b_u585i_iot2a board",
+ "configurePreset": "b_u585i_iot2a"
+ },
+ {
+ "name": "ch32v103r_r1_1v0",
+ "description": "Build preset for the ch32v103r_r1_1v0 board",
+ "configurePreset": "ch32v103r_r1_1v0"
+ },
+ {
+ "name": "ch32v203c_r0_1v0",
+ "description": "Build preset for the ch32v203c_r0_1v0 board",
+ "configurePreset": "ch32v203c_r0_1v0"
+ },
+ {
+ "name": "ch32v203g_r0_1v0",
+ "description": "Build preset for the ch32v203g_r0_1v0 board",
+ "configurePreset": "ch32v203g_r0_1v0"
+ },
+ {
+ "name": "ch32v307v_r1_1v0",
+ "description": "Build preset for the ch32v307v_r1_1v0 board",
+ "configurePreset": "ch32v307v_r1_1v0"
+ },
+ {
+ "name": "circuitplayground_bluefruit",
+ "description": "Build preset for the circuitplayground_bluefruit board",
+ "configurePreset": "circuitplayground_bluefruit"
+ },
+ {
+ "name": "circuitplayground_express",
+ "description": "Build preset for the circuitplayground_express board",
+ "configurePreset": "circuitplayground_express"
+ },
+ {
+ "name": "curiosity_nano",
+ "description": "Build preset for the curiosity_nano board",
+ "configurePreset": "curiosity_nano"
+ },
+ {
+ "name": "cynthion_d11",
+ "description": "Build preset for the cynthion_d11 board",
+ "configurePreset": "cynthion_d11"
+ },
+ {
+ "name": "cynthion_d21",
+ "description": "Build preset for the cynthion_d21 board",
+ "configurePreset": "cynthion_d21"
+ },
+ {
+ "name": "d5035_01",
+ "description": "Build preset for the d5035_01 board",
+ "configurePreset": "d5035_01"
+ },
+ {
+ "name": "da14695_dk_usb",
+ "description": "Build preset for the da14695_dk_usb board",
+ "configurePreset": "da14695_dk_usb"
+ },
+ {
+ "name": "da1469x_dk_pro",
+ "description": "Build preset for the da1469x_dk_pro board",
+ "configurePreset": "da1469x_dk_pro"
+ },
+ {
+ "name": "daisyseed",
+ "description": "Build preset for the daisyseed board",
+ "configurePreset": "daisyseed"
+ },
+ {
+ "name": "double_m33_express",
+ "description": "Build preset for the double_m33_express board",
+ "configurePreset": "double_m33_express"
+ },
+ {
+ "name": "ea4088_quickstart",
+ "description": "Build preset for the ea4088_quickstart board",
+ "configurePreset": "ea4088_quickstart"
+ },
+ {
+ "name": "ea4357",
+ "description": "Build preset for the ea4357 board",
+ "configurePreset": "ea4357"
+ },
+ {
+ "name": "ek_tm4c123gxl",
+ "description": "Build preset for the ek_tm4c123gxl board",
+ "configurePreset": "ek_tm4c123gxl"
+ },
+ {
+ "name": "espressif_addax_1",
+ "description": "Build preset for the espressif_addax_1 board",
+ "configurePreset": "espressif_addax_1"
+ },
+ {
+ "name": "espressif_c3_devkitc",
+ "description": "Build preset for the espressif_c3_devkitc board",
+ "configurePreset": "espressif_c3_devkitc"
+ },
+ {
+ "name": "espressif_c6_devkitc",
+ "description": "Build preset for the espressif_c6_devkitc board",
+ "configurePreset": "espressif_c6_devkitc"
+ },
+ {
+ "name": "espressif_kaluga_1",
+ "description": "Build preset for the espressif_kaluga_1 board",
+ "configurePreset": "espressif_kaluga_1"
+ },
+ {
+ "name": "espressif_p4_function_ev",
+ "description": "Build preset for the espressif_p4_function_ev board",
+ "configurePreset": "espressif_p4_function_ev"
+ },
+ {
+ "name": "espressif_s2_devkitc",
+ "description": "Build preset for the espressif_s2_devkitc board",
+ "configurePreset": "espressif_s2_devkitc"
+ },
+ {
+ "name": "espressif_s3_devkitc",
+ "description": "Build preset for the espressif_s3_devkitc board",
+ "configurePreset": "espressif_s3_devkitc"
+ },
+ {
+ "name": "espressif_s3_devkitm",
+ "description": "Build preset for the espressif_s3_devkitm board",
+ "configurePreset": "espressif_s3_devkitm"
+ },
+ {
+ "name": "espressif_saola_1",
+ "description": "Build preset for the espressif_saola_1 board",
+ "configurePreset": "espressif_saola_1"
+ },
+ {
+ "name": "f1c100s",
+ "description": "Build preset for the f1c100s board",
+ "configurePreset": "f1c100s"
+ },
+ {
+ "name": "feather_m0_express",
+ "description": "Build preset for the feather_m0_express board",
+ "configurePreset": "feather_m0_express"
+ },
+ {
+ "name": "feather_m4_express",
+ "description": "Build preset for the feather_m4_express board",
+ "configurePreset": "feather_m4_express"
+ },
+ {
+ "name": "feather_nrf52840_express",
+ "description": "Build preset for the feather_nrf52840_express board",
+ "configurePreset": "feather_nrf52840_express"
+ },
+ {
+ "name": "feather_nrf52840_sense",
+ "description": "Build preset for the feather_nrf52840_sense board",
+ "configurePreset": "feather_nrf52840_sense"
+ },
+ {
+ "name": "feather_rp2040_max3421",
+ "description": "Build preset for the feather_rp2040_max3421 board",
+ "configurePreset": "feather_rp2040_max3421"
+ },
+ {
+ "name": "feather_stm32f405",
+ "description": "Build preset for the feather_stm32f405 board",
+ "configurePreset": "feather_stm32f405"
+ },
+ {
+ "name": "fomu",
+ "description": "Build preset for the fomu board",
+ "configurePreset": "fomu"
+ },
+ {
+ "name": "frdm_k32l2a4s",
+ "description": "Build preset for the frdm_k32l2a4s board",
+ "configurePreset": "frdm_k32l2a4s"
+ },
+ {
+ "name": "frdm_k32l2b",
+ "description": "Build preset for the frdm_k32l2b board",
+ "configurePreset": "frdm_k32l2b"
+ },
+ {
+ "name": "frdm_k64f",
+ "description": "Build preset for the frdm_k64f board",
+ "configurePreset": "frdm_k64f"
+ },
+ {
+ "name": "frdm_kl25z",
+ "description": "Build preset for the frdm_kl25z board",
+ "configurePreset": "frdm_kl25z"
+ },
+ {
+ "name": "frdm_mcxa153",
+ "description": "Build preset for the frdm_mcxa153 board",
+ "configurePreset": "frdm_mcxa153"
+ },
+ {
+ "name": "frdm_mcxn947",
+ "description": "Build preset for the frdm_mcxn947 board",
+ "configurePreset": "frdm_mcxn947"
+ },
+ {
+ "name": "itsybitsy_m0",
+ "description": "Build preset for the itsybitsy_m0 board",
+ "configurePreset": "itsybitsy_m0"
+ },
+ {
+ "name": "itsybitsy_m4",
+ "description": "Build preset for the itsybitsy_m4 board",
+ "configurePreset": "itsybitsy_m4"
+ },
+ {
+ "name": "itsybitsy_nrf52840",
+ "description": "Build preset for the itsybitsy_nrf52840 board",
+ "configurePreset": "itsybitsy_nrf52840"
+ },
+ {
+ "name": "kuiic",
+ "description": "Build preset for the kuiic board",
+ "configurePreset": "kuiic"
+ },
+ {
+ "name": "lpcxpresso11u37",
+ "description": "Build preset for the lpcxpresso11u37 board",
+ "configurePreset": "lpcxpresso11u37"
+ },
+ {
+ "name": "lpcxpresso11u68",
+ "description": "Build preset for the lpcxpresso11u68 board",
+ "configurePreset": "lpcxpresso11u68"
+ },
+ {
+ "name": "lpcxpresso1347",
+ "description": "Build preset for the lpcxpresso1347 board",
+ "configurePreset": "lpcxpresso1347"
+ },
+ {
+ "name": "lpcxpresso1549",
+ "description": "Build preset for the lpcxpresso1549 board",
+ "configurePreset": "lpcxpresso1549"
+ },
+ {
+ "name": "lpcxpresso1769",
+ "description": "Build preset for the lpcxpresso1769 board",
+ "configurePreset": "lpcxpresso1769"
+ },
+ {
+ "name": "lpcxpresso18s37",
+ "description": "Build preset for the lpcxpresso18s37 board",
+ "configurePreset": "lpcxpresso18s37"
+ },
+ {
+ "name": "lpcxpresso43s67",
+ "description": "Build preset for the lpcxpresso43s67 board",
+ "configurePreset": "lpcxpresso43s67"
+ },
+ {
+ "name": "lpcxpresso51u68",
+ "description": "Build preset for the lpcxpresso51u68 board",
+ "configurePreset": "lpcxpresso51u68"
+ },
+ {
+ "name": "lpcxpresso54114",
+ "description": "Build preset for the lpcxpresso54114 board",
+ "configurePreset": "lpcxpresso54114"
+ },
+ {
+ "name": "lpcxpresso54608",
+ "description": "Build preset for the lpcxpresso54608 board",
+ "configurePreset": "lpcxpresso54608"
+ },
+ {
+ "name": "lpcxpresso54628",
+ "description": "Build preset for the lpcxpresso54628 board",
+ "configurePreset": "lpcxpresso54628"
+ },
+ {
+ "name": "lpcxpresso55s28",
+ "description": "Build preset for the lpcxpresso55s28 board",
+ "configurePreset": "lpcxpresso55s28"
+ },
+ {
+ "name": "lpcxpresso55s69",
+ "description": "Build preset for the lpcxpresso55s69 board",
+ "configurePreset": "lpcxpresso55s69"
+ },
+ {
+ "name": "max32650evkit",
+ "description": "Build preset for the max32650evkit board",
+ "configurePreset": "max32650evkit"
+ },
+ {
+ "name": "max32650fthr",
+ "description": "Build preset for the max32650fthr board",
+ "configurePreset": "max32650fthr"
+ },
+ {
+ "name": "max32651evkit",
+ "description": "Build preset for the max32651evkit board",
+ "configurePreset": "max32651evkit"
+ },
+ {
+ "name": "max32666evkit",
+ "description": "Build preset for the max32666evkit board",
+ "configurePreset": "max32666evkit"
+ },
+ {
+ "name": "max32666fthr",
+ "description": "Build preset for the max32666fthr board",
+ "configurePreset": "max32666fthr"
+ },
+ {
+ "name": "max32690evkit",
+ "description": "Build preset for the max32690evkit board",
+ "configurePreset": "max32690evkit"
+ },
+ {
+ "name": "max78002evkit",
+ "description": "Build preset for the max78002evkit board",
+ "configurePreset": "max78002evkit"
+ },
+ {
+ "name": "mbed1768",
+ "description": "Build preset for the mbed1768 board",
+ "configurePreset": "mbed1768"
+ },
+ {
+ "name": "mcb1800",
+ "description": "Build preset for the mcb1800 board",
+ "configurePreset": "mcb1800"
+ },
+ {
+ "name": "mcu_link",
+ "description": "Build preset for the mcu_link board",
+ "configurePreset": "mcu_link"
+ },
+ {
+ "name": "mcxn947brk",
+ "description": "Build preset for the mcxn947brk board",
+ "configurePreset": "mcxn947brk"
+ },
+ {
+ "name": "metro_m0_express",
+ "description": "Build preset for the metro_m0_express board",
+ "configurePreset": "metro_m0_express"
+ },
+ {
+ "name": "metro_m4_express",
+ "description": "Build preset for the metro_m4_express board",
+ "configurePreset": "metro_m4_express"
+ },
+ {
+ "name": "metro_m7_1011",
+ "description": "Build preset for the metro_m7_1011 board",
+ "configurePreset": "metro_m7_1011"
+ },
+ {
+ "name": "metro_m7_1011_sd",
+ "description": "Build preset for the metro_m7_1011_sd board",
+ "configurePreset": "metro_m7_1011_sd"
+ },
+ {
+ "name": "mimxrt1010_evk",
+ "description": "Build preset for the mimxrt1010_evk board",
+ "configurePreset": "mimxrt1010_evk"
+ },
+ {
+ "name": "mimxrt1015_evk",
+ "description": "Build preset for the mimxrt1015_evk board",
+ "configurePreset": "mimxrt1015_evk"
+ },
+ {
+ "name": "mimxrt1020_evk",
+ "description": "Build preset for the mimxrt1020_evk board",
+ "configurePreset": "mimxrt1020_evk"
+ },
+ {
+ "name": "mimxrt1024_evk",
+ "description": "Build preset for the mimxrt1024_evk board",
+ "configurePreset": "mimxrt1024_evk"
+ },
+ {
+ "name": "mimxrt1050_evkb",
+ "description": "Build preset for the mimxrt1050_evkb board",
+ "configurePreset": "mimxrt1050_evkb"
+ },
+ {
+ "name": "mimxrt1060_evk",
+ "description": "Build preset for the mimxrt1060_evk board",
+ "configurePreset": "mimxrt1060_evk"
+ },
+ {
+ "name": "mimxrt1064_evk",
+ "description": "Build preset for the mimxrt1064_evk board",
+ "configurePreset": "mimxrt1064_evk"
+ },
+ {
+ "name": "mimxrt1170_evkb",
+ "description": "Build preset for the mimxrt1170_evkb board",
+ "configurePreset": "mimxrt1170_evkb"
+ },
+ {
+ "name": "mm32f327x_mb39",
+ "description": "Build preset for the mm32f327x_mb39 board",
+ "configurePreset": "mm32f327x_mb39"
+ },
+ {
+ "name": "mm32f327x_pitaya_lite",
+ "description": "Build preset for the mm32f327x_pitaya_lite board",
+ "configurePreset": "mm32f327x_pitaya_lite"
+ },
+ {
+ "name": "msp_exp430f5529lp",
+ "description": "Build preset for the msp_exp430f5529lp board",
+ "configurePreset": "msp_exp430f5529lp"
+ },
+ {
+ "name": "msp_exp432e401y",
+ "description": "Build preset for the msp_exp432e401y board",
+ "configurePreset": "msp_exp432e401y"
+ },
+ {
+ "name": "nanoch32v203",
+ "description": "Build preset for the nanoch32v203 board",
+ "configurePreset": "nanoch32v203"
+ },
+ {
+ "name": "pca10056",
+ "description": "Build preset for the pca10056 board",
+ "configurePreset": "pca10056"
+ },
+ {
+ "name": "pca10059",
+ "description": "Build preset for the pca10059 board",
+ "configurePreset": "pca10059"
+ },
+ {
+ "name": "pca10095",
+ "description": "Build preset for the pca10095 board",
+ "configurePreset": "pca10095"
+ },
+ {
+ "name": "pca10100",
+ "description": "Build preset for the pca10100 board",
+ "configurePreset": "pca10100"
+ },
+ {
+ "name": "pico_sdk",
+ "description": "Build preset for the pico_sdk board",
+ "configurePreset": "pico_sdk"
+ },
+ {
+ "name": "portenta_c33",
+ "description": "Build preset for the portenta_c33 board",
+ "configurePreset": "portenta_c33"
+ },
+ {
+ "name": "pybadge",
+ "description": "Build preset for the pybadge board",
+ "configurePreset": "pybadge"
+ },
+ {
+ "name": "pyboardv11",
+ "description": "Build preset for the pyboardv11 board",
+ "configurePreset": "pyboardv11"
+ },
+ {
+ "name": "pyportal",
+ "description": "Build preset for the pyportal board",
+ "configurePreset": "pyportal"
+ },
+ {
+ "name": "qtpy",
+ "description": "Build preset for the qtpy board",
+ "configurePreset": "qtpy"
+ },
+ {
+ "name": "ra2a1_ek",
+ "description": "Build preset for the ra2a1_ek board",
+ "configurePreset": "ra2a1_ek"
+ },
+ {
+ "name": "ra4m1_ek",
+ "description": "Build preset for the ra4m1_ek board",
+ "configurePreset": "ra4m1_ek"
+ },
+ {
+ "name": "ra4m3_ek",
+ "description": "Build preset for the ra4m3_ek board",
+ "configurePreset": "ra4m3_ek"
+ },
+ {
+ "name": "ra6m1_ek",
+ "description": "Build preset for the ra6m1_ek board",
+ "configurePreset": "ra6m1_ek"
+ },
+ {
+ "name": "ra6m5_ek",
+ "description": "Build preset for the ra6m5_ek board",
+ "configurePreset": "ra6m5_ek"
+ },
+ {
+ "name": "ra8m1_ek",
+ "description": "Build preset for the ra8m1_ek board",
+ "configurePreset": "ra8m1_ek"
+ },
+ {
+ "name": "raspberry_pi_pico",
+ "description": "Build preset for the raspberry_pi_pico board",
+ "configurePreset": "raspberry_pi_pico"
+ },
+ {
+ "name": "raspberry_pi_pico2",
+ "description": "Build preset for the raspberry_pi_pico2 board",
+ "configurePreset": "raspberry_pi_pico2"
+ },
+ {
+ "name": "raspberrypi_cm4",
+ "description": "Build preset for the raspberrypi_cm4 board",
+ "configurePreset": "raspberrypi_cm4"
+ },
+ {
+ "name": "raspberrypi_zero",
+ "description": "Build preset for the raspberrypi_zero board",
+ "configurePreset": "raspberrypi_zero"
+ },
+ {
+ "name": "raspberrypi_zero2",
+ "description": "Build preset for the raspberrypi_zero2 board",
+ "configurePreset": "raspberrypi_zero2"
+ },
+ {
+ "name": "samd11_xplained",
+ "description": "Build preset for the samd11_xplained board",
+ "configurePreset": "samd11_xplained"
+ },
+ {
+ "name": "same54_xplained",
+ "description": "Build preset for the same54_xplained board",
+ "configurePreset": "same54_xplained"
+ },
+ {
+ "name": "samg55_xplained",
+ "description": "Build preset for the samg55_xplained board",
+ "configurePreset": "samg55_xplained"
+ },
+ {
+ "name": "saml22_feather",
+ "description": "Build preset for the saml22_feather board",
+ "configurePreset": "saml22_feather"
+ },
+ {
+ "name": "seeeduino_xiao",
+ "description": "Build preset for the seeeduino_xiao board",
+ "configurePreset": "seeeduino_xiao"
+ },
+ {
+ "name": "sensorwatch_m0",
+ "description": "Build preset for the sensorwatch_m0 board",
+ "configurePreset": "sensorwatch_m0"
+ },
+ {
+ "name": "sipeed_longan_nano",
+ "description": "Build preset for the sipeed_longan_nano board",
+ "configurePreset": "sipeed_longan_nano"
+ },
+ {
+ "name": "sparkfun_samd21_mini_usb",
+ "description": "Build preset for the sparkfun_samd21_mini_usb board",
+ "configurePreset": "sparkfun_samd21_mini_usb"
+ },
+ {
+ "name": "stlinkv3mini",
+ "description": "Build preset for the stlinkv3mini board",
+ "configurePreset": "stlinkv3mini"
+ },
+ {
+ "name": "stm32c071nucleo",
+ "description": "Build preset for the stm32c071nucleo board",
+ "configurePreset": "stm32c071nucleo"
+ },
+ {
+ "name": "stm32f070rbnucleo",
+ "description": "Build preset for the stm32f070rbnucleo board",
+ "configurePreset": "stm32f070rbnucleo"
+ },
+ {
+ "name": "stm32f072disco",
+ "description": "Build preset for the stm32f072disco board",
+ "configurePreset": "stm32f072disco"
+ },
+ {
+ "name": "stm32f072eval",
+ "description": "Build preset for the stm32f072eval board",
+ "configurePreset": "stm32f072eval"
+ },
+ {
+ "name": "stm32f103_bluepill",
+ "description": "Build preset for the stm32f103_bluepill board",
+ "configurePreset": "stm32f103_bluepill"
+ },
+ {
+ "name": "stm32f103_mini_2",
+ "description": "Build preset for the stm32f103_mini_2 board",
+ "configurePreset": "stm32f103_mini_2"
+ },
+ {
+ "name": "stm32f103ze_iar",
+ "description": "Build preset for the stm32f103ze_iar board",
+ "configurePreset": "stm32f103ze_iar"
+ },
+ {
+ "name": "stm32f207nucleo",
+ "description": "Build preset for the stm32f207nucleo board",
+ "configurePreset": "stm32f207nucleo"
+ },
+ {
+ "name": "stm32f303disco",
+ "description": "Build preset for the stm32f303disco board",
+ "configurePreset": "stm32f303disco"
+ },
+ {
+ "name": "stm32f401blackpill",
+ "description": "Build preset for the stm32f401blackpill board",
+ "configurePreset": "stm32f401blackpill"
+ },
+ {
+ "name": "stm32f407blackvet",
+ "description": "Build preset for the stm32f407blackvet board",
+ "configurePreset": "stm32f407blackvet"
+ },
+ {
+ "name": "stm32f407disco",
+ "description": "Build preset for the stm32f407disco board",
+ "configurePreset": "stm32f407disco"
+ },
+ {
+ "name": "stm32f411blackpill",
+ "description": "Build preset for the stm32f411blackpill board",
+ "configurePreset": "stm32f411blackpill"
+ },
+ {
+ "name": "stm32f411disco",
+ "description": "Build preset for the stm32f411disco board",
+ "configurePreset": "stm32f411disco"
+ },
+ {
+ "name": "stm32f412disco",
+ "description": "Build preset for the stm32f412disco board",
+ "configurePreset": "stm32f412disco"
+ },
+ {
+ "name": "stm32f412nucleo",
+ "description": "Build preset for the stm32f412nucleo board",
+ "configurePreset": "stm32f412nucleo"
+ },
+ {
+ "name": "stm32f439nucleo",
+ "description": "Build preset for the stm32f439nucleo board",
+ "configurePreset": "stm32f439nucleo"
+ },
+ {
+ "name": "stm32f723disco",
+ "description": "Build preset for the stm32f723disco board",
+ "configurePreset": "stm32f723disco"
+ },
+ {
+ "name": "stm32f746disco",
+ "description": "Build preset for the stm32f746disco board",
+ "configurePreset": "stm32f746disco"
+ },
+ {
+ "name": "stm32f746nucleo",
+ "description": "Build preset for the stm32f746nucleo board",
+ "configurePreset": "stm32f746nucleo"
+ },
+ {
+ "name": "stm32f767nucleo",
+ "description": "Build preset for the stm32f767nucleo board",
+ "configurePreset": "stm32f767nucleo"
+ },
+ {
+ "name": "stm32f769disco",
+ "description": "Build preset for the stm32f769disco board",
+ "configurePreset": "stm32f769disco"
+ },
+ {
+ "name": "stm32g0b1nucleo",
+ "description": "Build preset for the stm32g0b1nucleo board",
+ "configurePreset": "stm32g0b1nucleo"
+ },
+ {
+ "name": "stm32g474nucleo",
+ "description": "Build preset for the stm32g474nucleo board",
+ "configurePreset": "stm32g474nucleo"
+ },
+ {
+ "name": "stm32g491nucleo",
+ "description": "Build preset for the stm32g491nucleo board",
+ "configurePreset": "stm32g491nucleo"
+ },
+ {
+ "name": "stm32h503nucleo",
+ "description": "Build preset for the stm32h503nucleo board",
+ "configurePreset": "stm32h503nucleo"
+ },
+ {
+ "name": "stm32h563nucleo",
+ "description": "Build preset for the stm32h563nucleo board",
+ "configurePreset": "stm32h563nucleo"
+ },
+ {
+ "name": "stm32h573i_dk",
+ "description": "Build preset for the stm32h573i_dk board",
+ "configurePreset": "stm32h573i_dk"
+ },
+ {
+ "name": "stm32h723nucleo",
+ "description": "Build preset for the stm32h723nucleo board",
+ "configurePreset": "stm32h723nucleo"
+ },
+ {
+ "name": "stm32h743eval",
+ "description": "Build preset for the stm32h743eval board",
+ "configurePreset": "stm32h743eval"
+ },
+ {
+ "name": "stm32h743nucleo",
+ "description": "Build preset for the stm32h743nucleo board",
+ "configurePreset": "stm32h743nucleo"
+ },
+ {
+ "name": "stm32h745disco",
+ "description": "Build preset for the stm32h745disco board",
+ "configurePreset": "stm32h745disco"
+ },
+ {
+ "name": "stm32h750_weact",
+ "description": "Build preset for the stm32h750_weact board",
+ "configurePreset": "stm32h750_weact"
+ },
+ {
+ "name": "stm32h750bdk",
+ "description": "Build preset for the stm32h750bdk board",
+ "configurePreset": "stm32h750bdk"
+ },
+ {
+ "name": "stm32h7s3nucleo",
+ "description": "Build preset for the stm32h7s3nucleo board",
+ "configurePreset": "stm32h7s3nucleo"
+ },
+ {
+ "name": "stm32l052dap52",
+ "description": "Build preset for the stm32l052dap52 board",
+ "configurePreset": "stm32l052dap52"
+ },
+ {
+ "name": "stm32l0538disco",
+ "description": "Build preset for the stm32l0538disco board",
+ "configurePreset": "stm32l0538disco"
+ },
+ {
+ "name": "stm32l412nucleo",
+ "description": "Build preset for the stm32l412nucleo board",
+ "configurePreset": "stm32l412nucleo"
+ },
+ {
+ "name": "stm32l476disco",
+ "description": "Build preset for the stm32l476disco board",
+ "configurePreset": "stm32l476disco"
+ },
+ {
+ "name": "stm32l4p5nucleo",
+ "description": "Build preset for the stm32l4p5nucleo board",
+ "configurePreset": "stm32l4p5nucleo"
+ },
+ {
+ "name": "stm32l4r5nucleo",
+ "description": "Build preset for the stm32l4r5nucleo board",
+ "configurePreset": "stm32l4r5nucleo"
+ },
+ {
+ "name": "stm32u545nucleo",
+ "description": "Build preset for the stm32u545nucleo board",
+ "configurePreset": "stm32u545nucleo"
+ },
+ {
+ "name": "stm32u575eval",
+ "description": "Build preset for the stm32u575eval board",
+ "configurePreset": "stm32u575eval"
+ },
+ {
+ "name": "stm32u575nucleo",
+ "description": "Build preset for the stm32u575nucleo board",
+ "configurePreset": "stm32u575nucleo"
+ },
+ {
+ "name": "stm32u5a5nucleo",
+ "description": "Build preset for the stm32u5a5nucleo board",
+ "configurePreset": "stm32u5a5nucleo"
+ },
+ {
+ "name": "stm32wb55nucleo",
+ "description": "Build preset for the stm32wb55nucleo board",
+ "configurePreset": "stm32wb55nucleo"
+ },
+ {
+ "name": "teensy_35",
+ "description": "Build preset for the teensy_35 board",
+ "configurePreset": "teensy_35"
+ },
+ {
+ "name": "teensy_40",
+ "description": "Build preset for the teensy_40 board",
+ "configurePreset": "teensy_40"
+ },
+ {
+ "name": "teensy_41",
+ "description": "Build preset for the teensy_41 board",
+ "configurePreset": "teensy_41"
+ },
+ {
+ "name": "trinket_m0",
+ "description": "Build preset for the trinket_m0 board",
+ "configurePreset": "trinket_m0"
+ },
+ {
+ "name": "uno_r4",
+ "description": "Build preset for the uno_r4 board",
+ "configurePreset": "uno_r4"
+ },
+ {
+ "name": "waveshare_openh743i",
+ "description": "Build preset for the waveshare_openh743i board",
+ "configurePreset": "waveshare_openh743i"
+ },
+ {
+ "name": "xmc4500_relax",
+ "description": "Build preset for the xmc4500_relax board",
+ "configurePreset": "xmc4500_relax"
+ },
+ {
+ "name": "xmc4700_relax",
+ "description": "Build preset for the xmc4700_relax board",
+ "configurePreset": "xmc4700_relax"
+ }
+ ],
+ "workflowPresets": [
+ {
+ "name": "adafruit_clue",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "adafruit_clue"
+ },
+ {
+ "type": "build",
+ "name": "adafruit_clue"
+ }
+ ]
+ },
+ {
+ "name": "adafruit_feather_esp32_v2",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "adafruit_feather_esp32_v2"
+ },
+ {
+ "type": "build",
+ "name": "adafruit_feather_esp32_v2"
+ }
+ ]
+ },
+ {
+ "name": "adafruit_feather_esp32s2",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "adafruit_feather_esp32s2"
+ },
+ {
+ "type": "build",
+ "name": "adafruit_feather_esp32s2"
+ }
+ ]
+ },
+ {
+ "name": "adafruit_feather_esp32s3",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "adafruit_feather_esp32s3"
+ },
+ {
+ "type": "build",
+ "name": "adafruit_feather_esp32s3"
+ }
+ ]
+ },
+ {
+ "name": "adafruit_magtag_29gray",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "adafruit_magtag_29gray"
+ },
+ {
+ "type": "build",
+ "name": "adafruit_magtag_29gray"
+ }
+ ]
+ },
+ {
+ "name": "adafruit_metro_esp32s2",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "adafruit_metro_esp32s2"
+ },
+ {
+ "type": "build",
+ "name": "adafruit_metro_esp32s2"
+ }
+ ]
+ },
+ {
+ "name": "apard32690",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "apard32690"
+ },
+ {
+ "type": "build",
+ "name": "apard32690"
+ }
+ ]
+ },
+ {
+ "name": "arduino_nano33_ble",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "arduino_nano33_ble"
+ },
+ {
+ "type": "build",
+ "name": "arduino_nano33_ble"
+ }
+ ]
+ },
+ {
+ "name": "atsamd21_xpro",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "atsamd21_xpro"
+ },
+ {
+ "type": "build",
+ "name": "atsamd21_xpro"
+ }
+ ]
+ },
+ {
+ "name": "atsaml21_xpro",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "atsaml21_xpro"
+ },
+ {
+ "type": "build",
+ "name": "atsaml21_xpro"
+ }
+ ]
+ },
+ {
+ "name": "b_g474e_dpow1",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "b_g474e_dpow1"
+ },
+ {
+ "type": "build",
+ "name": "b_g474e_dpow1"
+ }
+ ]
+ },
+ {
+ "name": "b_u585i_iot2a",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "b_u585i_iot2a"
+ },
+ {
+ "type": "build",
+ "name": "b_u585i_iot2a"
+ }
+ ]
+ },
+ {
+ "name": "ch32v103r_r1_1v0",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ch32v103r_r1_1v0"
+ },
+ {
+ "type": "build",
+ "name": "ch32v103r_r1_1v0"
+ }
+ ]
+ },
+ {
+ "name": "ch32v203c_r0_1v0",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ch32v203c_r0_1v0"
+ },
+ {
+ "type": "build",
+ "name": "ch32v203c_r0_1v0"
+ }
+ ]
+ },
+ {
+ "name": "ch32v203g_r0_1v0",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ch32v203g_r0_1v0"
+ },
+ {
+ "type": "build",
+ "name": "ch32v203g_r0_1v0"
+ }
+ ]
+ },
+ {
+ "name": "ch32v307v_r1_1v0",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ch32v307v_r1_1v0"
+ },
+ {
+ "type": "build",
+ "name": "ch32v307v_r1_1v0"
+ }
+ ]
+ },
+ {
+ "name": "circuitplayground_bluefruit",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "circuitplayground_bluefruit"
+ },
+ {
+ "type": "build",
+ "name": "circuitplayground_bluefruit"
+ }
+ ]
+ },
+ {
+ "name": "circuitplayground_express",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "circuitplayground_express"
+ },
+ {
+ "type": "build",
+ "name": "circuitplayground_express"
+ }
+ ]
+ },
+ {
+ "name": "curiosity_nano",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "curiosity_nano"
+ },
+ {
+ "type": "build",
+ "name": "curiosity_nano"
+ }
+ ]
+ },
+ {
+ "name": "cynthion_d11",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "cynthion_d11"
+ },
+ {
+ "type": "build",
+ "name": "cynthion_d11"
+ }
+ ]
+ },
+ {
+ "name": "cynthion_d21",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "cynthion_d21"
+ },
+ {
+ "type": "build",
+ "name": "cynthion_d21"
+ }
+ ]
+ },
+ {
+ "name": "d5035_01",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "d5035_01"
+ },
+ {
+ "type": "build",
+ "name": "d5035_01"
+ }
+ ]
+ },
+ {
+ "name": "da14695_dk_usb",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "da14695_dk_usb"
+ },
+ {
+ "type": "build",
+ "name": "da14695_dk_usb"
+ }
+ ]
+ },
+ {
+ "name": "da1469x_dk_pro",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "da1469x_dk_pro"
+ },
+ {
+ "type": "build",
+ "name": "da1469x_dk_pro"
+ }
+ ]
+ },
+ {
+ "name": "daisyseed",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "daisyseed"
+ },
+ {
+ "type": "build",
+ "name": "daisyseed"
+ }
+ ]
+ },
+ {
+ "name": "double_m33_express",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "double_m33_express"
+ },
+ {
+ "type": "build",
+ "name": "double_m33_express"
+ }
+ ]
+ },
+ {
+ "name": "ea4088_quickstart",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ea4088_quickstart"
+ },
+ {
+ "type": "build",
+ "name": "ea4088_quickstart"
+ }
+ ]
+ },
+ {
+ "name": "ea4357",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ea4357"
+ },
+ {
+ "type": "build",
+ "name": "ea4357"
+ }
+ ]
+ },
+ {
+ "name": "ek_tm4c123gxl",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ek_tm4c123gxl"
+ },
+ {
+ "type": "build",
+ "name": "ek_tm4c123gxl"
+ }
+ ]
+ },
+ {
+ "name": "espressif_addax_1",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_addax_1"
+ },
+ {
+ "type": "build",
+ "name": "espressif_addax_1"
+ }
+ ]
+ },
+ {
+ "name": "espressif_c3_devkitc",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_c3_devkitc"
+ },
+ {
+ "type": "build",
+ "name": "espressif_c3_devkitc"
+ }
+ ]
+ },
+ {
+ "name": "espressif_c6_devkitc",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_c6_devkitc"
+ },
+ {
+ "type": "build",
+ "name": "espressif_c6_devkitc"
+ }
+ ]
+ },
+ {
+ "name": "espressif_kaluga_1",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_kaluga_1"
+ },
+ {
+ "type": "build",
+ "name": "espressif_kaluga_1"
+ }
+ ]
+ },
+ {
+ "name": "espressif_p4_function_ev",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_p4_function_ev"
+ },
+ {
+ "type": "build",
+ "name": "espressif_p4_function_ev"
+ }
+ ]
+ },
+ {
+ "name": "espressif_s2_devkitc",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_s2_devkitc"
+ },
+ {
+ "type": "build",
+ "name": "espressif_s2_devkitc"
+ }
+ ]
+ },
+ {
+ "name": "espressif_s3_devkitc",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_s3_devkitc"
+ },
+ {
+ "type": "build",
+ "name": "espressif_s3_devkitc"
+ }
+ ]
+ },
+ {
+ "name": "espressif_s3_devkitm",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_s3_devkitm"
+ },
+ {
+ "type": "build",
+ "name": "espressif_s3_devkitm"
+ }
+ ]
+ },
+ {
+ "name": "espressif_saola_1",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "espressif_saola_1"
+ },
+ {
+ "type": "build",
+ "name": "espressif_saola_1"
+ }
+ ]
+ },
+ {
+ "name": "f1c100s",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "f1c100s"
+ },
+ {
+ "type": "build",
+ "name": "f1c100s"
+ }
+ ]
+ },
+ {
+ "name": "feather_m0_express",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "feather_m0_express"
+ },
+ {
+ "type": "build",
+ "name": "feather_m0_express"
+ }
+ ]
+ },
+ {
+ "name": "feather_m4_express",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "feather_m4_express"
+ },
+ {
+ "type": "build",
+ "name": "feather_m4_express"
+ }
+ ]
+ },
+ {
+ "name": "feather_nrf52840_express",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "feather_nrf52840_express"
+ },
+ {
+ "type": "build",
+ "name": "feather_nrf52840_express"
+ }
+ ]
+ },
+ {
+ "name": "feather_nrf52840_sense",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "feather_nrf52840_sense"
+ },
+ {
+ "type": "build",
+ "name": "feather_nrf52840_sense"
+ }
+ ]
+ },
+ {
+ "name": "feather_rp2040_max3421",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "feather_rp2040_max3421"
+ },
+ {
+ "type": "build",
+ "name": "feather_rp2040_max3421"
+ }
+ ]
+ },
+ {
+ "name": "feather_stm32f405",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "feather_stm32f405"
+ },
+ {
+ "type": "build",
+ "name": "feather_stm32f405"
+ }
+ ]
+ },
+ {
+ "name": "fomu",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "fomu"
+ },
+ {
+ "type": "build",
+ "name": "fomu"
+ }
+ ]
+ },
+ {
+ "name": "frdm_k32l2a4s",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "frdm_k32l2a4s"
+ },
+ {
+ "type": "build",
+ "name": "frdm_k32l2a4s"
+ }
+ ]
+ },
+ {
+ "name": "frdm_k32l2b",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "frdm_k32l2b"
+ },
+ {
+ "type": "build",
+ "name": "frdm_k32l2b"
+ }
+ ]
+ },
+ {
+ "name": "frdm_k64f",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "frdm_k64f"
+ },
+ {
+ "type": "build",
+ "name": "frdm_k64f"
+ }
+ ]
+ },
+ {
+ "name": "frdm_kl25z",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "frdm_kl25z"
+ },
+ {
+ "type": "build",
+ "name": "frdm_kl25z"
+ }
+ ]
+ },
+ {
+ "name": "frdm_mcxa153",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "frdm_mcxa153"
+ },
+ {
+ "type": "build",
+ "name": "frdm_mcxa153"
+ }
+ ]
+ },
+ {
+ "name": "frdm_mcxn947",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "frdm_mcxn947"
+ },
+ {
+ "type": "build",
+ "name": "frdm_mcxn947"
+ }
+ ]
+ },
+ {
+ "name": "itsybitsy_m0",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "itsybitsy_m0"
+ },
+ {
+ "type": "build",
+ "name": "itsybitsy_m0"
+ }
+ ]
+ },
+ {
+ "name": "itsybitsy_m4",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "itsybitsy_m4"
+ },
+ {
+ "type": "build",
+ "name": "itsybitsy_m4"
+ }
+ ]
+ },
+ {
+ "name": "itsybitsy_nrf52840",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "itsybitsy_nrf52840"
+ },
+ {
+ "type": "build",
+ "name": "itsybitsy_nrf52840"
+ }
+ ]
+ },
+ {
+ "name": "kuiic",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "kuiic"
+ },
+ {
+ "type": "build",
+ "name": "kuiic"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso11u37",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso11u37"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso11u37"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso11u68",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso11u68"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso11u68"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso1347",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso1347"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso1347"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso1549",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso1549"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso1549"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso1769",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso1769"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso1769"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso18s37",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso18s37"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso18s37"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso43s67",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso43s67"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso43s67"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso51u68",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso51u68"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso51u68"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso54114",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso54114"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso54114"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso54608",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso54608"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso54608"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso54628",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso54628"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso54628"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso55s28",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso55s28"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso55s28"
+ }
+ ]
+ },
+ {
+ "name": "lpcxpresso55s69",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "lpcxpresso55s69"
+ },
+ {
+ "type": "build",
+ "name": "lpcxpresso55s69"
+ }
+ ]
+ },
+ {
+ "name": "max32650evkit",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "max32650evkit"
+ },
+ {
+ "type": "build",
+ "name": "max32650evkit"
+ }
+ ]
+ },
+ {
+ "name": "max32650fthr",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "max32650fthr"
+ },
+ {
+ "type": "build",
+ "name": "max32650fthr"
+ }
+ ]
+ },
+ {
+ "name": "max32651evkit",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "max32651evkit"
+ },
+ {
+ "type": "build",
+ "name": "max32651evkit"
+ }
+ ]
+ },
+ {
+ "name": "max32666evkit",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "max32666evkit"
+ },
+ {
+ "type": "build",
+ "name": "max32666evkit"
+ }
+ ]
+ },
+ {
+ "name": "max32666fthr",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "max32666fthr"
+ },
+ {
+ "type": "build",
+ "name": "max32666fthr"
+ }
+ ]
+ },
+ {
+ "name": "max32690evkit",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "max32690evkit"
+ },
+ {
+ "type": "build",
+ "name": "max32690evkit"
+ }
+ ]
+ },
+ {
+ "name": "max78002evkit",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "max78002evkit"
+ },
+ {
+ "type": "build",
+ "name": "max78002evkit"
+ }
+ ]
+ },
+ {
+ "name": "mbed1768",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mbed1768"
+ },
+ {
+ "type": "build",
+ "name": "mbed1768"
+ }
+ ]
+ },
+ {
+ "name": "mcb1800",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mcb1800"
+ },
+ {
+ "type": "build",
+ "name": "mcb1800"
+ }
+ ]
+ },
+ {
+ "name": "mcu_link",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mcu_link"
+ },
+ {
+ "type": "build",
+ "name": "mcu_link"
+ }
+ ]
+ },
+ {
+ "name": "mcxn947brk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mcxn947brk"
+ },
+ {
+ "type": "build",
+ "name": "mcxn947brk"
+ }
+ ]
+ },
+ {
+ "name": "metro_m0_express",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "metro_m0_express"
+ },
+ {
+ "type": "build",
+ "name": "metro_m0_express"
+ }
+ ]
+ },
+ {
+ "name": "metro_m4_express",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "metro_m4_express"
+ },
+ {
+ "type": "build",
+ "name": "metro_m4_express"
+ }
+ ]
+ },
+ {
+ "name": "metro_m7_1011",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "metro_m7_1011"
+ },
+ {
+ "type": "build",
+ "name": "metro_m7_1011"
+ }
+ ]
+ },
+ {
+ "name": "metro_m7_1011_sd",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "metro_m7_1011_sd"
+ },
+ {
+ "type": "build",
+ "name": "metro_m7_1011_sd"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1010_evk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1010_evk"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1010_evk"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1015_evk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1015_evk"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1015_evk"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1020_evk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1020_evk"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1020_evk"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1024_evk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1024_evk"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1024_evk"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1050_evkb",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1050_evkb"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1050_evkb"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1060_evk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1060_evk"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1060_evk"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1064_evk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1064_evk"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1064_evk"
+ }
+ ]
+ },
+ {
+ "name": "mimxrt1170_evkb",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mimxrt1170_evkb"
+ },
+ {
+ "type": "build",
+ "name": "mimxrt1170_evkb"
+ }
+ ]
+ },
+ {
+ "name": "mm32f327x_mb39",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mm32f327x_mb39"
+ },
+ {
+ "type": "build",
+ "name": "mm32f327x_mb39"
+ }
+ ]
+ },
+ {
+ "name": "mm32f327x_pitaya_lite",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "mm32f327x_pitaya_lite"
+ },
+ {
+ "type": "build",
+ "name": "mm32f327x_pitaya_lite"
+ }
+ ]
+ },
+ {
+ "name": "msp_exp430f5529lp",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "msp_exp430f5529lp"
+ },
+ {
+ "type": "build",
+ "name": "msp_exp430f5529lp"
+ }
+ ]
+ },
+ {
+ "name": "msp_exp432e401y",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "msp_exp432e401y"
+ },
+ {
+ "type": "build",
+ "name": "msp_exp432e401y"
+ }
+ ]
+ },
+ {
+ "name": "nanoch32v203",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "nanoch32v203"
+ },
+ {
+ "type": "build",
+ "name": "nanoch32v203"
+ }
+ ]
+ },
+ {
+ "name": "pca10056",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pca10056"
+ },
+ {
+ "type": "build",
+ "name": "pca10056"
+ }
+ ]
+ },
+ {
+ "name": "pca10059",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pca10059"
+ },
+ {
+ "type": "build",
+ "name": "pca10059"
+ }
+ ]
+ },
+ {
+ "name": "pca10095",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pca10095"
+ },
+ {
+ "type": "build",
+ "name": "pca10095"
+ }
+ ]
+ },
+ {
+ "name": "pca10100",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pca10100"
+ },
+ {
+ "type": "build",
+ "name": "pca10100"
+ }
+ ]
+ },
+ {
+ "name": "pico_sdk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pico_sdk"
+ },
+ {
+ "type": "build",
+ "name": "pico_sdk"
+ }
+ ]
+ },
+ {
+ "name": "portenta_c33",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "portenta_c33"
+ },
+ {
+ "type": "build",
+ "name": "portenta_c33"
+ }
+ ]
+ },
+ {
+ "name": "pybadge",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pybadge"
+ },
+ {
+ "type": "build",
+ "name": "pybadge"
+ }
+ ]
+ },
+ {
+ "name": "pyboardv11",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pyboardv11"
+ },
+ {
+ "type": "build",
+ "name": "pyboardv11"
+ }
+ ]
+ },
+ {
+ "name": "pyportal",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "pyportal"
+ },
+ {
+ "type": "build",
+ "name": "pyportal"
+ }
+ ]
+ },
+ {
+ "name": "qtpy",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "qtpy"
+ },
+ {
+ "type": "build",
+ "name": "qtpy"
+ }
+ ]
+ },
+ {
+ "name": "ra2a1_ek",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ra2a1_ek"
+ },
+ {
+ "type": "build",
+ "name": "ra2a1_ek"
+ }
+ ]
+ },
+ {
+ "name": "ra4m1_ek",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ra4m1_ek"
+ },
+ {
+ "type": "build",
+ "name": "ra4m1_ek"
+ }
+ ]
+ },
+ {
+ "name": "ra4m3_ek",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ra4m3_ek"
+ },
+ {
+ "type": "build",
+ "name": "ra4m3_ek"
+ }
+ ]
+ },
+ {
+ "name": "ra6m1_ek",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ra6m1_ek"
+ },
+ {
+ "type": "build",
+ "name": "ra6m1_ek"
+ }
+ ]
+ },
+ {
+ "name": "ra6m5_ek",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ra6m5_ek"
+ },
+ {
+ "type": "build",
+ "name": "ra6m5_ek"
+ }
+ ]
+ },
+ {
+ "name": "ra8m1_ek",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "ra8m1_ek"
+ },
+ {
+ "type": "build",
+ "name": "ra8m1_ek"
+ }
+ ]
+ },
+ {
+ "name": "raspberry_pi_pico",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "raspberry_pi_pico"
+ },
+ {
+ "type": "build",
+ "name": "raspberry_pi_pico"
+ }
+ ]
+ },
+ {
+ "name": "raspberry_pi_pico2",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "raspberry_pi_pico2"
+ },
+ {
+ "type": "build",
+ "name": "raspberry_pi_pico2"
+ }
+ ]
+ },
+ {
+ "name": "raspberrypi_cm4",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "raspberrypi_cm4"
+ },
+ {
+ "type": "build",
+ "name": "raspberrypi_cm4"
+ }
+ ]
+ },
+ {
+ "name": "raspberrypi_zero",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "raspberrypi_zero"
+ },
+ {
+ "type": "build",
+ "name": "raspberrypi_zero"
+ }
+ ]
+ },
+ {
+ "name": "raspberrypi_zero2",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "raspberrypi_zero2"
+ },
+ {
+ "type": "build",
+ "name": "raspberrypi_zero2"
+ }
+ ]
+ },
+ {
+ "name": "samd11_xplained",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "samd11_xplained"
+ },
+ {
+ "type": "build",
+ "name": "samd11_xplained"
+ }
+ ]
+ },
+ {
+ "name": "same54_xplained",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "same54_xplained"
+ },
+ {
+ "type": "build",
+ "name": "same54_xplained"
+ }
+ ]
+ },
+ {
+ "name": "samg55_xplained",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "samg55_xplained"
+ },
+ {
+ "type": "build",
+ "name": "samg55_xplained"
+ }
+ ]
+ },
+ {
+ "name": "saml22_feather",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "saml22_feather"
+ },
+ {
+ "type": "build",
+ "name": "saml22_feather"
+ }
+ ]
+ },
+ {
+ "name": "seeeduino_xiao",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "seeeduino_xiao"
+ },
+ {
+ "type": "build",
+ "name": "seeeduino_xiao"
+ }
+ ]
+ },
+ {
+ "name": "sensorwatch_m0",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "sensorwatch_m0"
+ },
+ {
+ "type": "build",
+ "name": "sensorwatch_m0"
+ }
+ ]
+ },
+ {
+ "name": "sipeed_longan_nano",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "sipeed_longan_nano"
+ },
+ {
+ "type": "build",
+ "name": "sipeed_longan_nano"
+ }
+ ]
+ },
+ {
+ "name": "sparkfun_samd21_mini_usb",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "sparkfun_samd21_mini_usb"
+ },
+ {
+ "type": "build",
+ "name": "sparkfun_samd21_mini_usb"
+ }
+ ]
+ },
+ {
+ "name": "stlinkv3mini",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stlinkv3mini"
+ },
+ {
+ "type": "build",
+ "name": "stlinkv3mini"
+ }
+ ]
+ },
+ {
+ "name": "stm32c071nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32c071nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32c071nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32f070rbnucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f070rbnucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32f070rbnucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32f072disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f072disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f072disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32f072eval",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f072eval"
+ },
+ {
+ "type": "build",
+ "name": "stm32f072eval"
+ }
+ ]
+ },
+ {
+ "name": "stm32f103_bluepill",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f103_bluepill"
+ },
+ {
+ "type": "build",
+ "name": "stm32f103_bluepill"
+ }
+ ]
+ },
+ {
+ "name": "stm32f103_mini_2",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f103_mini_2"
+ },
+ {
+ "type": "build",
+ "name": "stm32f103_mini_2"
+ }
+ ]
+ },
+ {
+ "name": "stm32f103ze_iar",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f103ze_iar"
+ },
+ {
+ "type": "build",
+ "name": "stm32f103ze_iar"
+ }
+ ]
+ },
+ {
+ "name": "stm32f207nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f207nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32f207nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32f303disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f303disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f303disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32f401blackpill",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f401blackpill"
+ },
+ {
+ "type": "build",
+ "name": "stm32f401blackpill"
+ }
+ ]
+ },
+ {
+ "name": "stm32f407blackvet",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f407blackvet"
+ },
+ {
+ "type": "build",
+ "name": "stm32f407blackvet"
+ }
+ ]
+ },
+ {
+ "name": "stm32f407disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f407disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f407disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32f411blackpill",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f411blackpill"
+ },
+ {
+ "type": "build",
+ "name": "stm32f411blackpill"
+ }
+ ]
+ },
+ {
+ "name": "stm32f411disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f411disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f411disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32f412disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f412disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f412disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32f412nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f412nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32f412nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32f439nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f439nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32f439nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32f723disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f723disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f723disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32f746disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f746disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f746disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32f746nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f746nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32f746nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32f767nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f767nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32f767nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32f769disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32f769disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32f769disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32g0b1nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32g0b1nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32g0b1nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32g474nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32g474nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32g474nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32g491nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32g491nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32g491nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32h503nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h503nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32h503nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32h563nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h563nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32h563nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32h573i_dk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h573i_dk"
+ },
+ {
+ "type": "build",
+ "name": "stm32h573i_dk"
+ }
+ ]
+ },
+ {
+ "name": "stm32h723nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h723nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32h723nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32h743eval",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h743eval"
+ },
+ {
+ "type": "build",
+ "name": "stm32h743eval"
+ }
+ ]
+ },
+ {
+ "name": "stm32h743nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h743nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32h743nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32h745disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h745disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32h745disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32h750_weact",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h750_weact"
+ },
+ {
+ "type": "build",
+ "name": "stm32h750_weact"
+ }
+ ]
+ },
+ {
+ "name": "stm32h750bdk",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h750bdk"
+ },
+ {
+ "type": "build",
+ "name": "stm32h750bdk"
+ }
+ ]
+ },
+ {
+ "name": "stm32h7s3nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32h7s3nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32h7s3nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32l052dap52",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32l052dap52"
+ },
+ {
+ "type": "build",
+ "name": "stm32l052dap52"
+ }
+ ]
+ },
+ {
+ "name": "stm32l0538disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32l0538disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32l0538disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32l412nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32l412nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32l412nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32l476disco",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32l476disco"
+ },
+ {
+ "type": "build",
+ "name": "stm32l476disco"
+ }
+ ]
+ },
+ {
+ "name": "stm32l4p5nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32l4p5nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32l4p5nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32l4r5nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32l4r5nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32l4r5nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32u545nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32u545nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32u545nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32u575eval",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32u575eval"
+ },
+ {
+ "type": "build",
+ "name": "stm32u575eval"
+ }
+ ]
+ },
+ {
+ "name": "stm32u575nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32u575nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32u575nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32u5a5nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32u5a5nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32u5a5nucleo"
+ }
+ ]
+ },
+ {
+ "name": "stm32wb55nucleo",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "stm32wb55nucleo"
+ },
+ {
+ "type": "build",
+ "name": "stm32wb55nucleo"
+ }
+ ]
+ },
+ {
+ "name": "teensy_35",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "teensy_35"
+ },
+ {
+ "type": "build",
+ "name": "teensy_35"
+ }
+ ]
+ },
+ {
+ "name": "teensy_40",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "teensy_40"
+ },
+ {
+ "type": "build",
+ "name": "teensy_40"
+ }
+ ]
+ },
+ {
+ "name": "teensy_41",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "teensy_41"
+ },
+ {
+ "type": "build",
+ "name": "teensy_41"
+ }
+ ]
+ },
+ {
+ "name": "trinket_m0",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "trinket_m0"
+ },
+ {
+ "type": "build",
+ "name": "trinket_m0"
+ }
+ ]
+ },
+ {
+ "name": "uno_r4",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "uno_r4"
+ },
+ {
+ "type": "build",
+ "name": "uno_r4"
+ }
+ ]
+ },
+ {
+ "name": "waveshare_openh743i",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "waveshare_openh743i"
+ },
+ {
+ "type": "build",
+ "name": "waveshare_openh743i"
+ }
+ ]
+ },
+ {
+ "name": "xmc4500_relax",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "xmc4500_relax"
+ },
+ {
+ "type": "build",
+ "name": "xmc4500_relax"
+ }
+ ]
+ },
+ {
+ "name": "xmc4700_relax",
+ "steps": [
+ {
+ "type": "configure",
+ "name": "xmc4700_relax"
+ },
+ {
+ "type": "build",
+ "name": "xmc4700_relax"
+ }
+ ]
+ }
+ ]
+}
diff --git a/hw/bsp/board.c b/hw/bsp/board.c
index 5bcdb7f15..1ba5a1b9d 100644
--- a/hw/bsp/board.c
+++ b/hw/bsp/board.c
@@ -60,19 +60,29 @@ int sys_read(int fhdl, char *buf, size_t count) {
int rd = (int) SEGGER_RTT_Read(0, buf, count);
return (rd > 0) ? rd : -1;
}
-
#endif
#elif defined(LOGGER_SWO)
-// Logging with SWO for ARM Cortex
-#include "board_mcu.h"
+#define ITM_BASE 0xE0000000
+#define ITM_STIM0 (*((volatile uint8_t*)(ITM_BASE + 0)))
+#define ITM_TER *((volatile uint32_t*)(ITM_BASE + 0xE00))
+#define ITM_TCR *((volatile uint32_t*)(ITM_BASE + 0xE80))
+
+#define ITM_TCR_ITMENA (1 << 0)
+
+// Logging with SWO for ARM Cortex-M
int sys_write (int fhdl, const char *buf, size_t count) {
(void) fhdl;
uint8_t const* buf8 = (uint8_t const*) buf;
- for(size_t i=0; i 0) ? (int) c : (-1);
}
+void board_putchar(int c) {
+ sys_write(0, (const char*)&c, 1);
+}
uint32_t tusb_time_millis_api(void) {
return board_millis();
@@ -146,7 +159,7 @@ uint32_t tusb_time_millis_api(void) {
//--------------------------------------------------------------------
// FreeRTOS hooks
//--------------------------------------------------------------------
-#if CFG_TUSB_OS == OPT_OS_FREERTOS && !TUSB_MCU_VENDOR_ESPRESSIF
+#if CFG_TUSB_OS == OPT_OS_FREERTOS && !defined(ESP_PLATFORM)
#include "FreeRTOS.h"
#include "task.h"
@@ -228,5 +241,4 @@ void vApplicationSetupTimerInterrupt(void) {
}
#endif
-
#endif
diff --git a/hw/bsp/board_api.h b/hw/bsp/board_api.h
index eaee1ee97..328fe9363 100644
--- a/hw/bsp/board_api.h
+++ b/hw/bsp/board_api.h
@@ -38,22 +38,24 @@ extern "C" {
#include "tusb.h"
-#if CFG_TUSB_OS == OPT_OS_FREERTOS
-#if TUSB_MCU_VENDOR_ESPRESSIF
- // ESP-IDF need "freertos/" prefix in include path.
- // CFG_TUSB_OS_INC_PATH should be defined accordingly.
- #include "freertos/FreeRTOS.h"
- #include "freertos/semphr.h"
- #include "freertos/queue.h"
- #include "freertos/task.h"
- #include "freertos/timers.h"
-#else
- #include "FreeRTOS.h"
- #include "semphr.h"
- #include "queue.h"
- #include "task.h"
- #include "timers.h"
-#endif
+#if CFG_TUSB_OS == OPT_OS_ZEPHYR
+ #include
+#elif CFG_TUSB_OS == OPT_OS_FREERTOS
+ #ifdef ESP_PLATFORM
+ // ESP-IDF need "freertos/" prefix in include path.
+ // CFG_TUSB_OS_INC_PATH should be defined accordingly.
+ #include "freertos/FreeRTOS.h"
+ #include "freertos/semphr.h"
+ #include "freertos/queue.h"
+ #include "freertos/task.h"
+ #include "freertos/timers.h"
+ #else
+ #include "FreeRTOS.h"
+ #include "semphr.h"
+ #include "queue.h"
+ #include "task.h"
+ #include "timers.h"
+ #endif
#endif
// Define the default baudrate
@@ -124,6 +126,10 @@ static inline uint32_t board_millis(void) {
// Implement your own board_millis() in any of .c file
uint32_t board_millis(void);
+#elif CFG_TUSB_OS == OPT_OS_ZEPHYR
+static inline uint32_t board_millis(void) {
+ return k_uptime_get_32();
+}
#else
#error "board_millis() is not implemented for this OS"
#endif
@@ -189,6 +195,7 @@ static inline void board_delay(uint32_t ms) {
// stdio getchar() is blocking, this is non-blocking version
int board_getchar(void);
+void board_putchar(int c);
#ifdef __cplusplus
}
diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h
deleted file mode 100644
index e720cd747..000000000
--- a/hw/bsp/board_mcu.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2020, Ha Thach (tinyusb.org)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- * This file is part of the TinyUSB stack.
- */
-
-
-#ifndef BOARD_MCU_H_
-#define BOARD_MCU_H_
-
-#include "tusb_option.h"
-
-//--------------------------------------------------------------------+
-// Low Level MCU header include. Example should be
-// platform independent and mostly doesn't need to include this file.
-// However there are still certain situation where this file is needed:
-// - FreeRTOSConfig.h to set up correct clock and NVIC interrupts for ARM Cortex
-// - SWO logging for Cortex M with ITM_SendChar() / ITM_ReceiveChar()
-//--------------------------------------------------------------------+
-
-// Include order follows OPT_MCU_ number
-#if TU_CHECK_MCU(OPT_MCU_LPC11UXX, OPT_MCU_LPC13XX, OPT_MCU_LPC15XX) || \
- TU_CHECK_MCU(OPT_MCU_LPC175X_6X, OPT_MCU_LPC177X_8X, OPT_MCU_LPC18XX) || \
- TU_CHECK_MCU(OPT_MCU_LPC40XX, OPT_MCU_LPC43XX)
- #include "chip.h"
-
-#elif TU_CHECK_MCU(OPT_MCU_LPC51UXX, OPT_MCU_LPC54XXX, OPT_MCU_LPC55XX, OPT_MCU_MCXN9)
- #include "fsl_device_registers.h"
-
-#elif TU_CHECK_MCU(OPT_MCU_KINETIS_KL, OPT_MCU_KINETIS_K32L, OPT_MCU_KINETIS_K)
- #include "fsl_device_registers.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_NRF5X
- #include "nrf.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_SAMD11 || CFG_TUSB_MCU == OPT_MCU_SAMD21 || \
- CFG_TUSB_MCU == OPT_MCU_SAMD51 || CFG_TUSB_MCU == OPT_MCU_SAME5X || \
- CFG_TUSB_MCU == OPT_MCU_SAML22 || CFG_TUSB_MCU == OPT_MCU_SAML21
- #include "sam.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_SAMG
- #undef LITTLE_ENDIAN // hack to suppress "LITTLE_ENDIAN" redefined
- #include "sam.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32F0
- #include "stm32f0xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32F1
- #include "stm32f1xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32F2
- #include "stm32f2xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32F3
- #include "stm32f3xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32F4
- #include "stm32f4xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
- #include "stm32f7xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32G4
- #include "stm32g4xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32H5
- #include "stm32h5xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32H7
- #include "stm32h7xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32L0
- #include "stm32l0xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32L1
- #include "stm32l1xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32L4
- #include "stm32l4xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32WB
- #include "stm32wbxx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32U5
- #include "stm32u5xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32G0
- #include "stm32g0xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_STM32C0
- #include "stm32c0xx.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_CXD56
- // no header needed
-
-#elif CFG_TUSB_MCU == OPT_MCU_MSP430x5xx
- #include "msp430.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_MSP432E4
- #include "msp.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_VALENTYUSB_EPTRI
- // no header needed
-
-#elif CFG_TUSB_MCU == OPT_MCU_MIMXRT1XXX
- #include "fsl_device_registers.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_NUC120
- #include "NUC100Series.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_NUC121 || CFG_TUSB_MCU == OPT_MCU_NUC126
- #include "NuMicro.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_NUC505
- #include "NUC505Series.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_ESP32S2
- // no header needed
-
-#elif CFG_TUSB_MCU == OPT_MCU_ESP32S3
- // no header needed
-
-#elif CFG_TUSB_MCU == OPT_MCU_DA1469X
- #include "DA1469xAB.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_RP2040
- #include "pico.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_EFM32GG
- #include "em_device.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_RX63X || CFG_TUSB_MCU == OPT_MCU_RX65X
- // no header needed
-
-#elif CFG_TUSB_MCU == OPT_MCU_RAXXX
- #include "bsp_api.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_GD32VF103
- #include "gd32vf103.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_MM32F327X
- #include "mm32_device.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_XMC4000
- #include "xmc_device.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_TM4C123
- #include "TM4C123.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_CH32F20X
- #include "ch32f20x.h"
-
-#elif TU_CHECK_MCU(OPT_MCU_BCM2711, OPT_MCU_BCM2835, OPT_MCU_BCM2837)
- // no header needed
-
-#elif CFG_TUSB_MCU == OPT_MCU_MAX32690
- #include "max32690.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_MAX32650
- #include "max32650.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_MAX32666
- #include "max32665.h"
-
-#elif CFG_TUSB_MCU == OPT_MCU_MAX78002
- #include "max78002.h"
-
-#else
- #error "Missing MCU header"
-#endif
-
-
-#endif /* BOARD_MCU_H_ */
diff --git a/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.cmake b/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.cmake
index 2b8cc19e0..616a83fe2 100644
--- a/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.cmake
+++ b/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.cmake
@@ -1,4 +1,4 @@
-set(CMAKE_SYSTEM_PROCESSOR arm1176jzf-s CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU arm1176jzf-s CACHE INTERNAL "System Processor")
#set(SUFFIX "")
function(update_board TARGET)
diff --git a/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.h b/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.h
index 84a106346..40a9dd198 100644
--- a/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.h
+++ b/hw/bsp/broadcom_32bit/boards/raspberrypi_zero/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Raspberry Pi Zero
+ url: https://www.raspberrypi.org/products/raspberry-pi-zero/
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/broadcom_32bit/family.c b/hw/bsp/broadcom_32bit/family.c
index 0062e2e83..f8f3b0b70 100644
--- a/hw/bsp/broadcom_32bit/family.c
+++ b/hw/bsp/broadcom_32bit/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: Raspberry Pi
+*/
+
#include "bsp/board_api.h"
#include "board.h"
diff --git a/hw/bsp/broadcom_32bit/family.cmake b/hw/bsp/broadcom_32bit/family.cmake
index 93e7d3545..5e57d8b1e 100644
--- a/hw/bsp/broadcom_32bit/family.cmake
+++ b/hw/bsp/broadcom_32bit/family.cmake
@@ -94,17 +94,17 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_BCM2835 ${RTOS})
- target_sources(${TARGET}-tinyusb PUBLIC
+ family_add_tinyusb(${TARGET} OPT_MCU_BCM2835)
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/synopsys/dwc2/dcd_dwc2.c
${TOP}/src/portable/synopsys/dwc2/hcd_dwc2.c
${TOP}/src/portable/synopsys/dwc2/dwc2_common.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
+ family_add_bin_hex(${TARGET})
family_flash_jlink(${TARGET})
endfunction()
diff --git a/hw/bsp/broadcom_32bit/family.mk b/hw/bsp/broadcom_32bit/family.mk
index a282e9961..9d4a3b76c 100644
--- a/hw/bsp/broadcom_32bit/family.mk
+++ b/hw/bsp/broadcom_32bit/family.mk
@@ -15,7 +15,7 @@ CFLAGS += \
CROSS_COMPILE = arm-none-eabi-
# mcu driver cause following warnings
-CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
+CFLAGS_GCC += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \
diff --git a/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.cmake b/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.cmake
index 919068f1d..6f1fc0225 100644
--- a/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.cmake
+++ b/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.cmake
@@ -1,4 +1,4 @@
-set(CMAKE_SYSTEM_PROCESSOR cortex-a72 CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU cortex-a72 CACHE INTERNAL "System Processor")
set(BCM_VERSION 2711)
function(update_board TARGET)
diff --git a/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.h b/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.h
index 84a106346..cadad2b27 100644
--- a/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.h
+++ b/hw/bsp/broadcom_64bit/boards/raspberrypi_cm4/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Raspberry CM4
+ url: https://www.raspberrypi.org/products/compute-module-4
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.cmake b/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.cmake
index 85f84e947..80747363a 100644
--- a/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.cmake
+++ b/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.cmake
@@ -1,4 +1,4 @@
-set(CMAKE_SYSTEM_PROCESSOR cortex-a53 CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU cortex-a53 CACHE INTERNAL "System Processor")
set(BCM_VERSION 2837)
function(update_board TARGET)
diff --git a/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.h b/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.h
index 84a106346..e6caa0294 100644
--- a/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.h
+++ b/hw/bsp/broadcom_64bit/boards/raspberrypi_zero2/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Raspberry Zero2
+ url: https://www.raspberrypi.org/products/raspberry-pi-zero-2-w
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/broadcom_64bit/family.c b/hw/bsp/broadcom_64bit/family.c
index 0062e2e83..f8f3b0b70 100644
--- a/hw/bsp/broadcom_64bit/family.c
+++ b/hw/bsp/broadcom_64bit/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: Raspberry Pi
+*/
+
#include "bsp/board_api.h"
#include "board.h"
diff --git a/hw/bsp/broadcom_64bit/family.cmake b/hw/bsp/broadcom_64bit/family.cmake
index d790944bc..1a088c2c0 100644
--- a/hw/bsp/broadcom_64bit/family.cmake
+++ b/hw/bsp/broadcom_64bit/family.cmake
@@ -101,17 +101,17 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_BCM${BCM_VERSION} ${RTOS})
- target_sources(${TARGET}-tinyusb PUBLIC
+ family_add_tinyusb(${TARGET} OPT_MCU_BCM${BCM_VERSION})
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/synopsys/dwc2/dcd_dwc2.c
${TOP}/src/portable/synopsys/dwc2/hcd_dwc2.c
${TOP}/src/portable/synopsys/dwc2/dwc2_common.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
+ family_add_bin_hex(${TARGET})
family_flash_jlink(${TARGET})
endfunction()
diff --git a/hw/bsp/broadcom_64bit/family.mk b/hw/bsp/broadcom_64bit/family.mk
index 37d381f9f..1ce80e22b 100644
--- a/hw/bsp/broadcom_64bit/family.mk
+++ b/hw/bsp/broadcom_64bit/family.mk
@@ -14,7 +14,7 @@ CFLAGS += \
CROSS_COMPILE = aarch64-none-elf-
# mcu driver cause following warnings
-CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
+CFLAGS_GCC += -Wno-error=cast-qual -Wno-error=redundant-decls
SRC_C += \
src/portable/synopsys/dwc2/dcd_dwc2.c \
diff --git a/hw/bsp/brtmm90x/boards/mm900evxb/board.h b/hw/bsp/brtmm90x/boards/mm900evxb/board.h
index 771779108..623033c2c 100644
--- a/hw/bsp/brtmm90x/boards/mm900evxb/board.h
+++ b/hw/bsp/brtmm90x/boards/mm900evxb/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: MM900EVxB
+ url: https://brtchip.com/product/mm900ev1b
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/brtmm90x/family.c b/hw/bsp/brtmm90x/family.c
index 4d81e7d52..15ff4b8ee 100644
--- a/hw/bsp/brtmm90x/family.c
+++ b/hw/bsp/brtmm90x/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: Bridgetek
+*/
+
#include "bsp/board_api.h"
#include "board.h"
diff --git a/hw/bsp/brtmm90x/family.mk b/hw/bsp/brtmm90x/family.mk
index 6df0bfdfe..2de4dc760 100644
--- a/hw/bsp/brtmm90x/family.mk
+++ b/hw/bsp/brtmm90x/family.mk
@@ -13,7 +13,6 @@ else
# The submodule BRTSG-FOSS/ft90x-sdk contains header files and source
# code for the Bridgetek SDK. This can be used instead of the prebuilt
# library.
-DEPS_SUBMODULES += hw/mcu/bridgetek/ft9xx/ft90x-sdk
# The SDK can be used to load specific files from the Bridgetek SDK.
FT9XX_SDK = hw/mcu/bridgetek/ft9xx/ft90x-sdk/Source
INC += "$(TOP)/$(FT9XX_SDK)/include"
diff --git a/hw/bsp/ch32f20x/boards/ch32f205r-r0/board.h b/hw/bsp/ch32f20x/boards/ch32f205r-r0/board.h
index d5849bddb..b855804a9 100644
--- a/hw/bsp/ch32f20x/boards/ch32f205r-r0/board.h
+++ b/hw/bsp/ch32f20x/boards/ch32f205r-r0/board.h
@@ -22,6 +22,11 @@
* THE SOFTWARE.
*/
+/* metadata:
+ name: CH32F205r-r0
+ url: https://github.com/openwch/ch32f20x
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/ch32f20x/family.c b/hw/bsp/ch32f20x/family.c
index 9717832d6..7fef71d47 100644
--- a/hw/bsp/ch32f20x/family.c
+++ b/hw/bsp/ch32f20x/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: WCH
+*/
+
#include "stdio.h"
#include "debug_uart.h"
diff --git a/hw/bsp/ch32f20x/family.mk b/hw/bsp/ch32f20x/family.mk
index c08451b9c..2ff9f79e3 100644
--- a/hw/bsp/ch32f20x/family.mk
+++ b/hw/bsp/ch32f20x/family.mk
@@ -1,6 +1,5 @@
# Submodules
CH32F20X_SDK = hw/mcu/wch/ch32f20x
-DEPS_SUBMODULES += $(CH32F20X_SDK)
# WCH-SDK paths
CH32F20X_SDK_SRC = $(CH32F20X_SDK)/EVT/EXAM/SRC
diff --git a/hw/bsp/ch32v10x/boards/ch32v103r_r1_1v0/board.h b/hw/bsp/ch32v10x/boards/ch32v103r_r1_1v0/board.h
index 3b1187c3a..1fde4244c 100644
--- a/hw/bsp/ch32v10x/boards/ch32v103r_r1_1v0/board.h
+++ b/hw/bsp/ch32v10x/boards/ch32v103r_r1_1v0/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: CH32V103R-R1-1v1
+ url: https://github.com/openwch/ch32v103/tree/main/SCHPCB/CH32V103R-R1-1v1
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/ch32v10x/family.c b/hw/bsp/ch32v10x/family.c
index 15f754e11..f25102494 100644
--- a/hw/bsp/ch32v10x/family.c
+++ b/hw/bsp/ch32v10x/family.c
@@ -1,3 +1,7 @@
+/* metadata:
+ manufacturer: WCH
+*/
+
#include
// https://github.com/openwch/ch32v307/pull/90
diff --git a/hw/bsp/ch32v10x/family.cmake b/hw/bsp/ch32v10x/family.cmake
index c0af0ef44..a73898050 100644
--- a/hw/bsp/ch32v10x/family.cmake
+++ b/hw/bsp/ch32v10x/family.cmake
@@ -9,7 +9,7 @@ set(SDK_SRC_DIR ${SDK_DIR}/EVT/EXAM/SRC)
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# toolchain set up
-set(CMAKE_SYSTEM_PROCESSOR rv32imac-ilp32 CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU rv32imac-ilp32 CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/riscv_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS CH32V103 CACHE INTERNAL "")
@@ -98,15 +98,14 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_CH32V103 ${RTOS})
+ family_add_tinyusb(${TARGET} OPT_MCU_CH32V103)
- target_sources(${TARGET}-tinyusb PUBLIC
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/wch/dcd_ch32_usbfs.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
family_add_bin_hex(${TARGET})
diff --git a/hw/bsp/ch32v20x/boards/ch32v203c_r0_1v0/board.h b/hw/bsp/ch32v20x/boards/ch32v203c_r0_1v0/board.h
index 692cf11bf..56f49205c 100644
--- a/hw/bsp/ch32v20x/boards/ch32v203c_r0_1v0/board.h
+++ b/hw/bsp/ch32v20x/boards/ch32v203c_r0_1v0/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: CH32V203C-R0-1v0
+ url: https://github.com/openwch/ch32v20x/tree/main/SCHPCB/CH32V203C-R0
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
@@ -8,6 +13,8 @@ extern "C" {
#define LED_PORT GPIOA
#define LED_PIN GPIO_Pin_0
#define LED_STATE_ON 0
+#define LED_CLOCK_EN() RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE)
+#define LED_MODE GPIO_Mode_Out_OD
#define UART_DEV USART1
#define UART_CLOCK_EN() RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE)
diff --git a/hw/bsp/ch32v20x/boards/ch32v203g_r0_1v0/board.h b/hw/bsp/ch32v20x/boards/ch32v203g_r0_1v0/board.h
index 783831edd..4a040e0df 100644
--- a/hw/bsp/ch32v20x/boards/ch32v203g_r0_1v0/board.h
+++ b/hw/bsp/ch32v20x/boards/ch32v203g_r0_1v0/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: CH32V203G-R0-1v0
+ url: https://github.com/openwch/ch32v20x/tree/main/SCHPCB/CH32V203C-R0
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
@@ -8,6 +13,8 @@ extern "C" {
#define LED_PORT GPIOA
#define LED_PIN GPIO_Pin_0
#define LED_STATE_ON 0
+#define LED_CLOCK_EN() RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE)
+#define LED_MODE GPIO_Mode_Out_OD
#define UART_DEV USART2
#define UART_CLOCK_EN() RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE)
diff --git a/hw/bsp/ch32v20x/boards/nanoch32v203/board.h b/hw/bsp/ch32v20x/boards/nanoch32v203/board.h
index 64eaf931e..63237861c 100644
--- a/hw/bsp/ch32v20x/boards/nanoch32v203/board.h
+++ b/hw/bsp/ch32v20x/boards/nanoch32v203/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: nanoCH32V203
+ url: https://github.com/wuxx/nanoCH32V203
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
@@ -8,6 +13,8 @@ extern "C" {
#define LED_PORT GPIOA
#define LED_PIN GPIO_Pin_15
#define LED_STATE_ON 0
+#define LED_CLOCK_EN() RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE)
+#define LED_MODE GPIO_Mode_Out_OD
#define UART_DEV USART1
#define UART_CLOCK_EN() RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE)
diff --git a/hw/bsp/ch32v20x/family.c b/hw/bsp/ch32v20x/family.c
index 43dd7e032..21ed94b0a 100644
--- a/hw/bsp/ch32v20x/family.c
+++ b/hw/bsp/ch32v20x/family.c
@@ -1,3 +1,7 @@
+/* metadata:
+manufacturer: WCH
+*/
+
#include
// https://github.com/openwch/ch32v307/pull/90
@@ -92,11 +96,11 @@ void board_init(void) {
SysTick_Config(SystemCoreClock / 1000);
#endif
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
+ LED_CLOCK_EN();
GPIO_InitTypeDef GPIO_InitStructure = {
.GPIO_Pin = LED_PIN,
- .GPIO_Mode = GPIO_Mode_Out_OD,
+ .GPIO_Mode = LED_MODE,
.GPIO_Speed = GPIO_Speed_10MHz,
};
GPIO_Init(LED_PORT, &GPIO_InitStructure);
diff --git a/hw/bsp/ch32v20x/family.cmake b/hw/bsp/ch32v20x/family.cmake
index 380ef190d..a5976e0ea 100644
--- a/hw/bsp/ch32v20x/family.cmake
+++ b/hw/bsp/ch32v20x/family.cmake
@@ -9,7 +9,7 @@ set(SDK_SRC_DIR ${SDK_DIR}/EVT/EXAM/SRC)
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# toolchain set up
-set(CMAKE_SYSTEM_PROCESSOR rv32imac-ilp32 CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU rv32imac-ilp32 CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/riscv_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS CH32V20X CACHE INTERNAL "")
@@ -123,16 +123,15 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_CH32V20X ${RTOS})
+ family_add_tinyusb(${TARGET} OPT_MCU_CH32V20X)
- target_sources(${TARGET}-tinyusb PUBLIC
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/wch/dcd_ch32_usbfs.c
${TOP}/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
family_add_bin_hex(${TARGET})
diff --git a/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.h b/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.h
index 7b488096e..491347034 100644
--- a/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.h
+++ b/hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.h
@@ -22,6 +22,11 @@
* THE SOFTWARE.
*/
+/* metadata:
+ name: CH32V307V-R1-1v0
+ url: https://github.com/openwch/ch32v307/tree/main/SCHPCB/CH32V307V-R1-1v0
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/ch32v307/family.c b/hw/bsp/ch32v307/family.c
index adf2dbea5..48eb8a38c 100644
--- a/hw/bsp/ch32v307/family.c
+++ b/hw/bsp/ch32v307/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: WCH
+*/
+
#include "stdio.h"
// https://github.com/openwch/ch32v307/pull/90
diff --git a/hw/bsp/ch32v307/family.cmake b/hw/bsp/ch32v307/family.cmake
index d603af62d..446e850c5 100644
--- a/hw/bsp/ch32v307/family.cmake
+++ b/hw/bsp/ch32v307/family.cmake
@@ -8,7 +8,7 @@ set(SDK_SRC_DIR ${SDK_DIR}/EVT/EXAM/SRC)
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# toolchain set up
-set(CMAKE_SYSTEM_PROCESSOR rv32imac-ilp32 CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU rv32imac-ilp32 CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/riscv_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS CH32V307 CACHE INTERNAL "")
@@ -113,15 +113,14 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_CH32V307 ${RTOS})
- target_sources(${TARGET}-tinyusb PUBLIC
+ family_add_tinyusb(${TARGET} OPT_MCU_CH32V307)
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/wch/dcd_ch32_usbhs.c
${TOP}/src/portable/wch/dcd_ch32_usbfs.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
family_add_bin_hex(${TARGET})
diff --git a/hw/bsp/da1469x/boards/da14695_dk_usb/board.h b/hw/bsp/da1469x/boards/da14695_dk_usb/board.h
index 5efdd43e0..c0810c2b6 100644
--- a/hw/bsp/da1469x/boards/da14695_dk_usb/board.h
+++ b/hw/bsp/da1469x/boards/da14695_dk_usb/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: DA14695-00HQDEVKT-U
+ url: https://www.renesas.com/en/products/wireless-connectivity/bluetooth-low-energy/da14695-00hqdevkt-u-smartbond-da14695-bluetooth-low-energy-52-usb-development-kit
+*/
+
#ifndef BOARD_H
#define BOARD_H
diff --git a/hw/bsp/da1469x/boards/da1469x_dk_pro/board.h b/hw/bsp/da1469x/boards/da1469x_dk_pro/board.h
index f969acf90..2b61e810e 100644
--- a/hw/bsp/da1469x/boards/da1469x_dk_pro/board.h
+++ b/hw/bsp/da1469x/boards/da1469x_dk_pro/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: DA1469x Development Kit Pro
+ url: https://lpccs-docs.renesas.com/um-b-090-da1469x_getting_started/DA1469x_The_hardware/DA1469x_The_hardware.html
+*/
+
#ifndef BOARD_H
#define BOARD_H
diff --git a/hw/bsp/da1469x/family.c b/hw/bsp/da1469x/family.c
index 70bedf6d9..a64ffce67 100644
--- a/hw/bsp/da1469x/family.c
+++ b/hw/bsp/da1469x/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: Renesas
+*/
+
#include "bsp/board_api.h"
#include "board.h"
#include
diff --git a/hw/bsp/da1469x/family.cmake b/hw/bsp/da1469x/family.cmake
index 8c89141fe..20d6cbc44 100644
--- a/hw/bsp/da1469x/family.cmake
+++ b/hw/bsp/da1469x/family.cmake
@@ -5,7 +5,7 @@ set(MCU_DIR ${TOP}/hw/mcu/dialog/da1469x)
# include board specific
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
-set(CMAKE_SYSTEM_PROCESSOR cortex-m33-nodsp CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU cortex-m33-nodsp CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS DA1469X CACHE INTERNAL "")
@@ -126,14 +126,13 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_DA1469X ${RTOS})
- target_sources(${TARGET}-tinyusb PUBLIC
+ family_add_tinyusb(${TARGET} OPT_MCU_DA1469X)
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/dialog/da146xx/dcd_da146xx.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
family_add_bin_hex(${TARGET})
diff --git a/hw/bsp/espressif/boards/adafruit_feather_esp32_v2/board.h b/hw/bsp/espressif/boards/adafruit_feather_esp32_v2/board.h
index 0c53df06b..15e5091f9 100644
--- a/hw/bsp/espressif/boards/adafruit_feather_esp32_v2/board.h
+++ b/hw/bsp/espressif/boards/adafruit_feather_esp32_v2/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Feather ESP32 v2
+ url: https://www.adafruit.com/product/5400
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/adafruit_feather_esp32c6/board.cmake b/hw/bsp/espressif/boards/adafruit_feather_esp32c6/board.cmake
new file mode 100644
index 000000000..9adaefb17
--- /dev/null
+++ b/hw/bsp/espressif/boards/adafruit_feather_esp32c6/board.cmake
@@ -0,0 +1,3 @@
+# Apply board specific content here
+set(IDF_TARGET "esp32c6")
+set(MAX3421_HOST 1)
diff --git a/hw/bsp/espressif/boards/adafruit_feather_esp32c6/board.h b/hw/bsp/espressif/boards/adafruit_feather_esp32c6/board.h
new file mode 100644
index 000000000..18b51410d
--- /dev/null
+++ b/hw/bsp/espressif/boards/adafruit_feather_esp32c6/board.h
@@ -0,0 +1,56 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020, Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+
+/* metadata:
+ name: Adafruit Feather EPS32-C6
+ url: https://www.adafruit.com/product/5933
+*/
+
+#ifndef BOARD_H_
+#define BOARD_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#define NEOPIXEL_PIN 15
+
+#define BUTTON_PIN 9
+#define BUTTON_STATE_ACTIVE 0
+
+// SPI for USB host shield
+#define MAX3421_SPI_HOST SPI2_HOST
+#define MAX3421_SCK_PIN 21
+#define MAX3421_MOSI_PIN 22
+#define MAX3421_MISO_PIN 23
+#define MAX3421_CS_PIN 8
+#define MAX3421_INTR_PIN 7
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* BOARD_H_ */
diff --git a/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h b/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h
index 9aa2e7535..0f607c755 100644
--- a/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h
+++ b/hw/bsp/espressif/boards/adafruit_feather_esp32s2/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Feather ESP32S2
+ url: https://www.adafruit.com/product/5000
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/adafruit_feather_esp32s3/board.h b/hw/bsp/espressif/boards/adafruit_feather_esp32s3/board.h
index 9aa2e7535..35c268cf5 100644
--- a/hw/bsp/espressif/boards/adafruit_feather_esp32s3/board.h
+++ b/hw/bsp/espressif/boards/adafruit_feather_esp32s3/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Feather ESP32S3
+ url: https://www.adafruit.com/product/5323
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.h b/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.h
index 084a7aaf2..b86089400 100644
--- a/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.h
+++ b/hw/bsp/espressif/boards/adafruit_magtag_29gray/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit MagTag 2.9" Grayscale
+ url: https://www.adafruit.com/product/4800
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h b/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h
index 137ea71ae..bc45678f7 100644
--- a/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h
+++ b/hw/bsp/espressif/boards/adafruit_metro_esp32s2/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Metro ESP32-S2
+ url: https://www.adafruit.com/product/4775
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/espressif_addax_1/board.h b/hw/bsp/espressif/boards/espressif_addax_1/board.h
index d4690f732..4a4a15e1b 100644
--- a/hw/bsp/espressif/boards/espressif_addax_1/board.h
+++ b/hw/bsp/espressif/boards/espressif_addax_1/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif Addax-1
+ url: n/a
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/espressif_c3_devkitc/board.h b/hw/bsp/espressif/boards/espressif_c3_devkitc/board.h
index 243dd47f6..a03cb5052 100644
--- a/hw/bsp/espressif/boards/espressif_c3_devkitc/board.h
+++ b/hw/bsp/espressif/boards/espressif_c3_devkitc/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif C3 DevKitC
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c3/esp32-c3-devkitc-02/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/espressif_c6_devkitc/board.h b/hw/bsp/espressif/boards/espressif_c6_devkitc/board.h
index 243dd47f6..eedd36a89 100644
--- a/hw/bsp/espressif/boards/espressif_c6_devkitc/board.h
+++ b/hw/bsp/espressif/boards/espressif_c6_devkitc/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif C6 DevKitC
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/espressif_kaluga_1/board.h b/hw/bsp/espressif/boards/espressif_kaluga_1/board.h
index 613e6ae0c..d49dc2af6 100644
--- a/hw/bsp/espressif/boards/espressif_kaluga_1/board.h
+++ b/hw/bsp/espressif/boards/espressif_kaluga_1/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif Kaluga 1
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s2/esp32-s2-kaluga-1/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/espressif_p4_function_ev/board.h b/hw/bsp/espressif/boards/espressif_p4_function_ev/board.h
index e57f7c51f..40c4963d9 100644
--- a/hw/bsp/espressif/boards/espressif_p4_function_ev/board.h
+++ b/hw/bsp/espressif/boards/espressif_p4_function_ev/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif P4 Function EV
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
@@ -36,9 +41,10 @@
#define BUTTON_PIN 35
#define BUTTON_STATE_ACTIVE 0
-// For CI hardware test, to test both device and host on the same HS port with help of
-#define HIL_DEVICE_HOST_MUX_PIN 47
-#define HIL_DEVICE_STATE 1
+// For CI hardware test, to test both device and host on the same HS port with help of TS3USB30
+// https://www.adafruit.com/product/5871
+#define HIL_TS3USB30_MODE_PIN 47
+#define HIL_TS3USB30_MODE_DEVICE 1
#ifdef __cplusplus
}
diff --git a/hw/bsp/espressif/boards/espressif_s2_devkitc/board.h b/hw/bsp/espressif/boards/espressif_s2_devkitc/board.h
index e068efef9..499a626a6 100644
--- a/hw/bsp/espressif/boards/espressif_s2_devkitc/board.h
+++ b/hw/bsp/espressif/boards/espressif_s2_devkitc/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif S2 DevKitC
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s2/esp32-s2-devkitc-1/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
@@ -31,13 +36,19 @@
extern "C" {
#endif
-// Note: On the production version (v1.2) WS2812 is connected to GPIO 18,
-// however earlier revision v1.1 WS2812 is connected to GPIO 17
#define NEOPIXEL_PIN 18
#define BUTTON_PIN 0
#define BUTTON_STATE_ACTIVE 0
+// SPI for USB host shield
+#define MAX3421_SPI_HOST SPI2_HOST
+#define MAX3421_SCK_PIN 36
+#define MAX3421_MOSI_PIN 35
+#define MAX3421_MISO_PIN 37
+#define MAX3421_CS_PIN 15
+#define MAX3421_INTR_PIN 14
+
#ifdef __cplusplus
}
#endif
diff --git a/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h b/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h
index a319fbc61..d2483c84f 100644
--- a/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h
+++ b/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif S3 DevKitC
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitc-1/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
@@ -31,7 +36,7 @@
extern "C" {
#endif
-#define NEOPIXEL_PIN 48
+#define NEOPIXEL_PIN 38
#define BUTTON_PIN 0
#define BUTTON_STATE_ACTIVE 0
diff --git a/hw/bsp/espressif/boards/espressif_s3_devkitm/board.h b/hw/bsp/espressif/boards/espressif_s3_devkitm/board.h
index a319fbc61..5c1914ebe 100644
--- a/hw/bsp/espressif/boards/espressif_s3_devkitm/board.h
+++ b/hw/bsp/espressif/boards/espressif_s3_devkitm/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif S3 DevKitM
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitm-1/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
@@ -44,6 +49,11 @@
#define MAX3421_CS_PIN 15
#define MAX3421_INTR_PIN 14
+// For CI hardware test, to test both device and host on the same HS port with help of TS3USB30
+// https://www.adafruit.com/product/5871
+#define HIL_TS3USB30_MODE_PIN 47
+#define HIL_TS3USB30_MODE_DEVICE 1
+
#ifdef __cplusplus
}
#endif
diff --git a/hw/bsp/espressif/boards/espressif_saola_1/board.h b/hw/bsp/espressif/boards/espressif_saola_1/board.h
index e068efef9..ea369f19c 100644
--- a/hw/bsp/espressif/boards/espressif_saola_1/board.h
+++ b/hw/bsp/espressif/boards/espressif_saola_1/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Espresif S2 Saola 1
+ url: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s2/esp32-s2-saola-1/index.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/espressif/boards/family.c b/hw/bsp/espressif/boards/family.c
index 048b431fb..2a5deed26 100644
--- a/hw/bsp/espressif/boards/family.c
+++ b/hw/bsp/espressif/boards/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: Espressif
+*/
+
#include "bsp/board_api.h"
#include "board.h"
@@ -45,7 +49,9 @@ static led_strip_handle_t led_strip;
static void max3421_init(void);
#endif
+#if TU_CHECK_MCU(OPT_MCU_ESP32S2, OPT_MCU_ESP32S3, OPT_MCU_ESP32P4)
static bool usb_init(void);
+#endif
//--------------------------------------------------------------------+
// Implementation
@@ -88,10 +94,10 @@ void board_init(void) {
usb_init();
#endif
-#ifdef HIL_DEVICE_HOST_MUX_PIN
- gpio_reset_pin(HIL_DEVICE_HOST_MUX_PIN);
- gpio_set_direction(HIL_DEVICE_HOST_MUX_PIN, GPIO_MODE_OUTPUT);
- gpio_set_level(HIL_DEVICE_HOST_MUX_PIN, CFG_TUD_ENABLED ? HIL_DEVICE_STATE : (1-HIL_DEVICE_STATE));
+#ifdef HIL_TS3USB30_MODE_PIN
+ gpio_reset_pin(HIL_TS3USB30_MODE_PIN);
+ gpio_set_direction(HIL_TS3USB30_MODE_PIN, GPIO_MODE_OUTPUT);
+ gpio_set_level(HIL_TS3USB30_MODE_PIN, CFG_TUD_ENABLED ? HIL_TS3USB30_MODE_DEVICE : (1-HIL_TS3USB30_MODE_DEVICE));
#endif
#if CFG_TUH_ENABLED && CFG_TUH_MAX3421
@@ -150,6 +156,10 @@ int board_getchar(void) {
return getchar();
}
+void board_putchar(int c) {
+ putchar(c);
+}
+
//--------------------------------------------------------------------
// PHY Init
//--------------------------------------------------------------------
@@ -158,7 +168,6 @@ int board_getchar(void) {
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
#include "esp_private/usb_phy.h"
-#include "soc/usb_pins.h"
static usb_phy_handle_t phy_hdl;
@@ -171,20 +180,14 @@ bool usb_init(void) {
// maybe we can use USB_OTG_MODE_DEFAULT and switch using dwc2 driver
#if CFG_TUD_ENABLED
.otg_mode = USB_OTG_MODE_DEVICE,
- .otg_speed = BOARD_TUD_RHPORT ? USB_PHY_SPEED_HIGH : USB_PHY_SPEED_FULL,
#elif CFG_TUH_ENABLED
.otg_mode = USB_OTG_MODE_HOST,
- .otg_speed= BOARD_TUH_RHPORT ? USB_PHY_SPEED_HIGH : USB_PHY_SPEED_FULL,
#endif
+ // https://github.com/hathach/tinyusb/issues/2943#issuecomment-2601888322
+ // Set speed to undefined (auto-detect) to avoid timinng/racing issue with S3 with host such as macOS
+ .otg_speed = USB_PHY_SPEED_UNDEFINED,
};
- // OTG IOs config
- // const usb_phy_otg_io_conf_t otg_io_conf = USB_PHY_SELF_POWERED_DEVICE(config->vbus_monitor_io);
- // if (config->self_powered) {
- // phy_conf.otg_io_conf = &otg_io_conf;
- // }
- // ESP_RETURN_ON_ERROR(usb_new_phy(&phy_conf, &phy_hdl), TAG, "Install USB PHY failed");
-
usb_new_phy(&phy_conf, &phy_hdl);
return true;
diff --git a/hw/bsp/espressif/family.cmake b/hw/bsp/espressif/family.cmake
index daa12cdb4..ca9eadaf6 100644
--- a/hw/bsp/espressif/family.cmake
+++ b/hw/bsp/espressif/family.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 3.5)
-
# Apply board specific content i.e IDF_TARGET must be set before project.cmake is included
include("${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake")
string(TOUPPER ${IDF_TARGET} FAMILY_MCUS)
@@ -32,8 +30,6 @@ endif ()
# Add example src and bsp directories
set(EXTRA_COMPONENT_DIRS "src" "${CMAKE_CURRENT_LIST_DIR}/boards" "${CMAKE_CURRENT_LIST_DIR}/components")
-
-# set SDKCONFIG for each IDF Target
-set(SDKCONFIG ${CMAKE_SOURCE_DIR}/sdkconfig.${IDF_TARGET})
+set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
diff --git a/hw/bsp/espressif/family.mk b/hw/bsp/espressif/family.mk
deleted file mode 100644
index 0dc21b8eb..000000000
--- a/hw/bsp/espressif/family.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-#DEPS_SUBMODULES +=
-
-UF2_FAMILY_ID_esp32s2 = 0xbfdd4eee
-UF2_FAMILY_ID_esp32s3 = 0xc47e5767
-
-BOARD_CMAKE := $(file < $(TOP)/$(BOARD_PATH)/board.cmake)
-ifneq ($(findstring esp32s2,$(BOARD_CMAKE)),)
- IDF_TARGET = esp32s2
-else
-ifneq ($(findstring esp32s3,$(BOARD_CMAKE)),)
- IDF_TARGET = esp32s3
-endif
-endif
-
-.PHONY: all clean flash bootloader-flash app-flash erase monitor dfu-flash dfu
-
-all:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) build
-
-build: all
-
-fullclean:
- if test -f sdkconfig; then $(RM) -f sdkconfig ; fi
- if test -d $(BUILD); then $(RM) -rf $(BUILD) ; fi
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) $@
-
-clean flash bootloader-flash app-flash erase monitor dfu-flash dfu size size-components size-files:
- idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) $@
-
-uf2: $(BUILD)/$(PROJECT).uf2
-
-$(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin
- @echo CREATE $@
- $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID_$(IDF_TARGET)) -b 0x0 -c -o $@ $^
diff --git a/hw/bsp/f1c100s/boards/f1c100s/board.h b/hw/bsp/f1c100s/boards/f1c100s/board.h
index 3b56a3a57..44b78f8fb 100644
--- a/hw/bsp/f1c100s/boards/f1c100s/board.h
+++ b/hw/bsp/f1c100s/boards/f1c100s/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: Lctech Pi F1C200s
+ url: https://linux-sunxi.org/Lctech_Pi_F1C200s
+*/
+
#ifndef BOARD_H
#define BOARD_H
diff --git a/hw/bsp/f1c100s/family.c b/hw/bsp/f1c100s/family.c
index 6df4a0ed8..9e864363f 100644
--- a/hw/bsp/f1c100s/family.c
+++ b/hw/bsp/f1c100s/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: Sunxi
+*/
+
#include
#include
#include
diff --git a/hw/bsp/f1c100s/family.cmake b/hw/bsp/f1c100s/family.cmake
index 0903a0143..211c6645c 100644
--- a/hw/bsp/f1c100s/family.cmake
+++ b/hw/bsp/f1c100s/family.cmake
@@ -5,7 +5,7 @@ set(SDK_DIR ${TOP}/hw/mcu/allwinner/f1c100s)
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# toolchain set up
-set(CMAKE_SYSTEM_PROCESSOR arm926ej-s CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU arm926ej-s CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS F1C100S CACHE INTERNAL "")
@@ -100,15 +100,15 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_F1C100S ${RTOS})
- target_sources(${TARGET}-tinyusb PRIVATE
+ family_add_tinyusb(${TARGET} OPT_MCU_F1C100S)
+ target_sources(${TARGET} PRIVATE
${TOP}/src/portable/sunxi/dcd_sunxi_musb.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
+ family_add_bin_hex(${TARGET})
family_flash_jlink(${TARGET})
endfunction()
diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake
index 82e3badb3..9ec80df91 100644
--- a/hw/bsp/family_support.cmake
+++ b/hw/bsp/family_support.cmake
@@ -8,6 +8,13 @@ get_filename_component(TOP ${TOP} ABSOLUTE)
set(UF2CONV_PY ${TOP}/tools/uf2/utils/uf2conv.py)
+#-------------------------------------------------------------
+# RTOS
+#-------------------------------------------------------------
+if (NOT DEFINED RTOS)
+ set(RTOS noos CACHE STRING "RTOS")
+endif ()
+
#-------------------------------------------------------------
# Toolchain
# Can be changed via -DTOOLCHAIN=gcc|iar or -DCMAKE_C_COMPILER=
@@ -27,11 +34,15 @@ if (DEFINED CMAKE_C_COMPILER)
endif ()
endif ()
-# default to gcc
if (NOT DEFINED TOOLCHAIN)
set(TOOLCHAIN gcc)
endif ()
+# Optimization
+if (NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
+ set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Build type" FORCE)
+endif ()
+
#-------------------------------------------------------------
# FAMILY and BOARD
#-------------------------------------------------------------
@@ -53,6 +64,7 @@ if (NOT DEFINED FAMILY)
# replace / with ; so that we can get the first element as FAMILY
string(REPLACE "/" ";" BOARD_PATH ${BOARD_PATH})
list(GET BOARD_PATH 0 FAMILY)
+ set(FAMILY ${FAMILY} CACHE STRING "Board family")
endif ()
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${FAMILY}/family.cmake)
@@ -73,33 +85,14 @@ if (NOT NO_WARN_RWX_SEGMENTS_SUPPORTED)
set(NO_WARN_RWX_SEGMENTS_SUPPORTED 1)
endif()
-set(WARNING_FLAGS_GNU
- -Wall
- -Wextra
- -Werror
- -Wfatal-errors
- -Wdouble-promotion
- -Wstrict-prototypes
- -Wstrict-overflow
- -Werror-implicit-function-declaration
- -Wfloat-equal
- -Wundef
- -Wshadow
- -Wwrite-strings
- -Wsign-compare
- -Wmissing-format-attribute
- -Wunreachable-code
- -Wcast-align
- -Wcast-function-type
- -Wcast-qual
- -Wnull-dereference
- -Wuninitialized
- -Wunused
- -Wreturn-type
- -Wredundant-decls
- )
-
-set(WARNING_FLAGS_IAR "")
+#----------------------------------
+# Zephyr
+#----------------------------------
+if (RTOS STREQUAL zephyr)
+ set(BOARD_ROOT ${TOP}/hw/bsp/${FAMILY})
+ set(ZEPHYR_BOARD_ALIASES ${CMAKE_CURRENT_LIST_DIR}/zephyr_board_aliases.cmake)
+ find_package(Zephyr REQUIRED HINTS ${TOP}/zephyr)
+endif ()
#-------------------------------------------------------------
# Functions
@@ -177,7 +170,6 @@ endfunction()
# Add RTOS to example
function(family_add_rtos TARGET RTOS)
if (RTOS STREQUAL "freertos")
- # freertos config
if (NOT TARGET freertos_config)
add_library(freertos_config INTERFACE)
target_include_directories(freertos_config INTERFACE ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/${FAMILY}/FreeRTOSConfig)
@@ -185,12 +177,15 @@ function(family_add_rtos TARGET RTOS)
target_link_libraries(freertos_config INTERFACE board_${BOARD})
endif()
- # freertos kernel
if (NOT TARGET freertos_kernel)
add_subdirectory(${TOP}/lib/FreeRTOS-Kernel ${CMAKE_BINARY_DIR}/lib/freertos_kernel)
endif ()
target_link_libraries(${TARGET} PUBLIC freertos_kernel)
+ target_compile_definitions(${TARGET} PUBLIC CFG_TUSB_OS=OPT_OS_FREERTOS)
+ elseif (RTOS STREQUAL "zephyr")
+ target_compile_definitions(${TARGET} PUBLIC CFG_TUSB_OS=OPT_OS_ZEPHYR)
+ target_include_directories(${TARGET} PUBLIC ${ZEPHYR_BASE}/include)
endif ()
endfunction()
@@ -198,6 +193,7 @@ endfunction()
function(family_configure_common TARGET RTOS)
family_add_rtos(${TARGET} ${RTOS})
+ # Add BOARD_${BOARD} define
string(TOUPPER ${BOARD} BOARD_UPPER)
string(REPLACE "-" "_" BOARD_UPPER ${BOARD_UPPER})
target_compile_definitions(${TARGET} PUBLIC
@@ -210,20 +206,6 @@ function(family_configure_common TARGET RTOS)
target_compile_options(${TARGET} PUBLIC ${CFLAGS_CLI})
endif()
- target_compile_options(${TARGET} PUBLIC ${WARNING_FLAGS_${CMAKE_C_COMPILER_ID}})
-
- # Generate linker map file
- if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
- target_link_options(${TARGET} PUBLIC "LINKER:-Map=$.map")
- if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0 AND NO_WARN_RWX_SEGMENTS_SUPPORTED)
- target_link_options(${TARGET} PUBLIC "LINKER:--no-warn-rwx-segments")
- endif ()
- elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
- target_link_options(${TARGET} PUBLIC "LINKER:-Map=$.map")
- elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
- target_link_options(${TARGET} PUBLIC "LINKER:--map=$.map")
- endif()
-
# ETM Trace option
if (TRACE_ETM STREQUAL "1")
target_compile_definitions(${TARGET} PUBLIC TRACE_ETM)
@@ -231,79 +213,101 @@ function(family_configure_common TARGET RTOS)
# LOGGER option
if (DEFINED LOGGER)
+ string(TOUPPER ${LOGGER} LOGGER)
target_compile_definitions(${TARGET} PUBLIC LOGGER_${LOGGER})
# Add segger rtt to example
- if(LOGGER STREQUAL "RTT" OR LOGGER STREQUAL "rtt")
- if (NOT TARGET segger_rtt)
- add_library(segger_rtt STATIC ${TOP}/lib/SEGGER_RTT/RTT/SEGGER_RTT.c)
- target_include_directories(segger_rtt PUBLIC ${TOP}/lib/SEGGER_RTT/RTT)
-# target_compile_definitions(segger_rtt PUBLIC SEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL)
- endif()
- target_link_libraries(${TARGET} PUBLIC segger_rtt)
+ if(LOGGER STREQUAL "RTT")
+ target_sources(${TARGET} PUBLIC ${TOP}/lib/SEGGER_RTT/RTT/SEGGER_RTT.c)
+ target_include_directories(${TARGET} PUBLIC ${TOP}/lib/SEGGER_RTT/RTT)
+# target_compile_definitions(${TARGET} PUBLIC SEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL)
endif ()
+ else ()
+ target_compile_definitions(${TARGET} PUBLIC LOGGER_UART)
+ endif ()
+
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ target_compile_options(${TARGET} PRIVATE
+ -Wall
+ -Wextra
+ #-Werror
+ -Wfatal-errors
+ -Wdouble-promotion
+ -Wstrict-prototypes
+ -Wstrict-overflow
+ -Werror-implicit-function-declaration
+ -Wfloat-equal
+ -Wundef
+ -Wshadow
+ -Wwrite-strings
+ -Wsign-compare
+ -Wmissing-format-attribute
+ -Wunreachable-code
+ -Wcast-align
+ -Wcast-function-type
+ -Wcast-qual
+ -Wnull-dereference
+ -Wuninitialized
+ -Wunused
+ -Wunused-function
+ -Wreturn-type
+ -Wredundant-decls
+ -Wmissing-prototypes
+ )
+ target_link_options(${TARGET} PUBLIC "LINKER:-Map=$.map")
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0
+ AND NO_WARN_RWX_SEGMENTS_SUPPORTED AND (NOT RTOS STREQUAL zephyr))
+ target_link_options(${TARGET} PUBLIC "LINKER:--no-warn-rwx-segments")
+ endif ()
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
+ target_link_options(${TARGET} PUBLIC "LINKER:--map=$.map")
endif ()
# run size after build
- find_program(SIZE_EXE ${CMAKE_SIZE})
- if(NOT ${SIZE_EXE} STREQUAL SIZE_EXE-NOTFOUND)
- add_custom_command(TARGET ${TARGET} POST_BUILD
- COMMAND ${SIZE_EXE} $
- )
- endif ()
+# find_program(SIZE_EXE ${CMAKE_SIZE})
+# if(NOT ${SIZE_EXE} STREQUAL SIZE_EXE-NOTFOUND)
+# add_custom_command(TARGET ${TARGET} POST_BUILD
+# COMMAND ${SIZE_EXE} $
+# )
+# endif ()
endfunction()
-# Add tinyusb to example
-function(family_add_tinyusb TARGET OPT_MCU RTOS)
- # tinyusb target is built for each example since it depends on example's tusb_config.h
- set(TINYUSB_TARGET_PREFIX ${TARGET}-)
- add_library(${TARGET}-tinyusb_config INTERFACE)
-
- # path to tusb_config.h
- target_include_directories(${TARGET}-tinyusb_config INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/src)
- target_compile_definitions(${TARGET}-tinyusb_config INTERFACE CFG_TUSB_MCU=${OPT_MCU})
-
- if (DEFINED LOG)
- target_compile_definitions(${TARGET}-tinyusb_config INTERFACE CFG_TUSB_DEBUG=${LOG})
- if (LOG STREQUAL "4")
- # no inline for debug level 4
- target_compile_definitions(${TARGET}-tinyusb_config INTERFACE TU_ATTR_ALWAYS_INLINE=)
- endif ()
- endif()
-
- if (RTOS STREQUAL "freertos")
- target_compile_definitions(${TARGET}-tinyusb_config INTERFACE CFG_TUSB_OS=OPT_OS_FREERTOS)
- endif ()
-
+# Add tinyusb to target
+function(family_add_tinyusb TARGET OPT_MCU)
# tinyusb's CMakeList.txt
add_subdirectory(${TOP}/src ${CMAKE_CURRENT_BINARY_DIR}/tinyusb)
- if (RTOS STREQUAL "freertos")
- # link tinyusb with freeRTOS kernel
- target_link_libraries(${TARGET}-tinyusb PUBLIC freertos_kernel)
- endif ()
+ # Add TinyUSB sources, include and common define
+ tinyusb_target_add(${TARGET})
+ target_compile_definitions(${TARGET} PUBLIC CFG_TUSB_MCU=${OPT_MCU})
+ if (DEFINED LOG)
+ target_compile_definitions(${TARGET} PUBLIC CFG_TUSB_DEBUG=${LOG})
+ if (LOG STREQUAL "4") # no inline for debug level 4
+ target_compile_definitions(${TARGET} PUBLIC TU_ATTR_ALWAYS_INLINE=)
+ endif ()
+ endif()
# use max3421 as host controller
if (MAX3421_HOST STREQUAL "1")
- target_compile_definitions(${TARGET}-tinyusb_config INTERFACE CFG_TUH_MAX3421=1)
- target_sources(${TARGET}-tinyusb PUBLIC
+ target_compile_definitions(${TARGET} PUBLIC CFG_TUH_MAX3421=1)
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/analog/max3421/hcd_max3421.c
)
endif ()
-
- # compile define from command line
- if(DEFINED CFLAGS_CLI)
- separate_arguments(CFLAGS_CLI)
- target_compile_options(${TARGET}-tinyusb PUBLIC ${CFLAGS_CLI})
- endif()
-
endfunction()
# Add bin/hex output
function(family_add_bin_hex TARGET)
- add_custom_command(TARGET ${TARGET} POST_BUILD
- COMMAND ${CMAKE_OBJCOPY} -Obinary $ $/${TARGET}.bin
- COMMAND ${CMAKE_OBJCOPY} -Oihex $ $/${TARGET}.hex
- VERBATIM)
+ if (CMAKE_C_COMPILER_ID STREQUAL "IAR")
+ add_custom_command(TARGET ${TARGET} POST_BUILD
+ COMMAND ${CMAKE_OBJCOPY} --bin $ $/${TARGET}.bin
+ COMMAND ${CMAKE_OBJCOPY} --ihex $ $/${TARGET}.hex
+ VERBATIM)
+ else()
+ add_custom_command(TARGET ${TARGET} POST_BUILD
+ COMMAND ${CMAKE_OBJCOPY} -Obinary $ $/${TARGET}.bin
+ COMMAND ${CMAKE_OBJCOPY} -Oihex $ $/${TARGET}.hex
+ VERBATIM)
+ endif()
endfunction()
# Add uf2 output
@@ -314,10 +318,10 @@ function(family_add_uf2 TARGET FAMILY_ID)
VERBATIM)
endfunction()
-#----------------------------------
+#-------------------------------------------------------
# Example Target Configure (Default rule)
# These function can be redefined in FAMILY/family.cmake
-#----------------------------------
+#--------------------------------------------------------
function(family_configure_example TARGET RTOS)
# empty function, should be redefined in FAMILY/family.cmake
@@ -399,7 +403,11 @@ endfunction()
# Add flash jlink target
function(family_flash_jlink TARGET)
if (NOT DEFINED JLINKEXE)
- set(JLINKEXE JLinkExe)
+ if(CMAKE_HOST_WIN32)
+ set(JLINKEXE JLink.exe)
+ else()
+ set(JLINKEXE JLinkExe)
+ endif()
endif ()
if (NOT DEFINED JLINK_IF)
@@ -411,26 +419,28 @@ function(family_flash_jlink TARGET)
endif ()
separate_arguments(OPTION_LIST UNIX_COMMAND ${JLINK_OPTION})
+ if (RTOS STREQUAL zephyr)
+ set(BINARY_TARGET zephyr_final)
+ set(NAME_TARGET ${CMAKE_PROJECT_NAME})
+ else ()
+ set(BINARY_TARGET ${TARGET})
+ set(NAME_TARGET ${TARGET})
+ endif ()
+
file(GENERATE
- OUTPUT $/${TARGET}.jlink
+ OUTPUT $/${BINARY_TARGET}.jlink
CONTENT "halt
-loadfile $
+loadfile $
r
go
exit"
)
- add_custom_target(${TARGET}-jlink
- DEPENDS ${TARGET}
- COMMAND ${JLINKEXE} -device ${JLINK_DEVICE} ${OPTION_LIST} -if ${JLINK_IF} -JTAGConf -1,-1 -speed auto -CommandFile $/${TARGET}.jlink
+ add_custom_target(${NAME_TARGET}-jlink
+ DEPENDS ${BINARY_TARGET}
+ COMMAND ${JLINKEXE} -device ${JLINK_DEVICE} ${OPTION_LIST} -if ${JLINK_IF} -JTAGConf -1,-1 -speed auto -CommandFile $/${BINARY_TARGET}.jlink
VERBATIM
)
-
- # optional flash post build
-# add_custom_command(TARGET ${TARGET} POST_BUILD
-# COMMAND ${JLINKEXE} -device ${JLINK_DEVICE} ${OPTION_LIST} -if ${JLINK_IF} -JTAGConf -1,-1 -speed auto -CommandFile $/${TARGET}.jlink
-# VERBATIM
-# )
endfunction()
@@ -470,13 +480,17 @@ function(family_flash_openocd TARGET)
set(OPENOCD_OPTION2 "")
endif ()
+ if (DEFINED OPENOCD_SERIAL)
+ set(OPENOCD_OPTION "-c \"adapter serial ${OPENOCD_SERIAL}\" ${OPENOCD_OPTION}")
+ endif ()
+
separate_arguments(OPTION_LIST UNIX_COMMAND ${OPENOCD_OPTION})
separate_arguments(OPTION_LIST2 UNIX_COMMAND ${OPENOCD_OPTION2})
# note skip verify since it has issue with rp2040
add_custom_target(${TARGET}-openocd
DEPENDS ${TARGET}
- COMMAND ${OPENOCD} -c "tcl_port disabled" -c "gdb_port disabled" ${OPTION_LIST} -c init -c halt -c "program $" -c reset ${OPTION_LIST2} -c exit
+ COMMAND ${OPENOCD} -c "tcl_port disabled; gdb_port disabled" ${OPTION_LIST} -c "init; halt; program $" -c reset ${OPTION_LIST2} -c exit
VERBATIM
)
endfunction()
@@ -496,10 +510,16 @@ endfunction()
# Add flash openocd adi (Analog Devices) target
# included with msdk or compiled from release branch of https://github.com/analogdevicesinc/openocd
function(family_flash_openocd_adi TARGET)
- if (DEFINED $ENV{MAXIM_PATH})
- # use openocd from msdk
- set(OPENOCD ENV{MAXIM_PATH}/Tools/OpenOCD/openocd)
- set(OPENOCD_OPTION2 "-s ENV{MAXIM_PATH}/Tools/OpenOCD/scripts")
+ if (DEFINED MAXIM_PATH)
+ # use openocd from msdk with MAXIM_PATH cmake variable first if the user specified it
+ set(OPENOCD ${MAXIM_PATH}/Tools/OpenOCD/openocd)
+ set(OPENOCD_OPTION2 "-s ${MAXIM_PATH}/Tools/OpenOCD/scripts")
+ elseif (DEFINED ENV{MAXIM_PATH})
+ # use openocd from msdk with MAXIM_PATH environment variable. Normalize
+ # since msdk can be Windows (MinGW) or Linux
+ file(TO_CMAKE_PATH "$ENV{MAXIM_PATH}" MAXIM_PATH_NORM)
+ set(OPENOCD ${MAXIM_PATH_NORM}/Tools/OpenOCD/openocd)
+ set(OPENOCD_OPTION2 "-s ${MAXIM_PATH_NORM}/Tools/OpenOCD/scripts")
else()
# compiled from source
if (NOT DEFINED OPENOCD_ADI_PATH)
@@ -606,7 +626,6 @@ function(family_flash_msp430flasher TARGET)
)
endfunction()
-
function(family_flash_uniflash TARGET)
if (NOT DEFINED DSLITE)
set(DSLITE dslite.sh)
diff --git a/hw/bsp/fomu/boards/fomu/board.h b/hw/bsp/fomu/boards/fomu/board.h
index 666ba1d98..2651c823d 100644
--- a/hw/bsp/fomu/boards/fomu/board.h
+++ b/hw/bsp/fomu/boards/fomu/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: fomu
+ url: https://tomu.im/fomu.html
+*/
+
#ifndef BOARD_H_
#define BOARD_H_
diff --git a/hw/bsp/fomu/family.c b/hw/bsp/fomu/family.c
index ccf2b12f4..61943cb01 100644
--- a/hw/bsp/fomu/family.c
+++ b/hw/bsp/fomu/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: Tomu
+*/
+
#include
#include
#include "csr.h"
diff --git a/hw/bsp/fomu/family.cmake b/hw/bsp/fomu/family.cmake
index 8d5ab144c..639373695 100644
--- a/hw/bsp/fomu/family.cmake
+++ b/hw/bsp/fomu/family.cmake
@@ -4,7 +4,7 @@ include_guard()
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# toolchain set up
-set(CMAKE_SYSTEM_PROCESSOR rv32i-ilp32 CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU rv32i-ilp32 CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/riscv_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS VALENTYUSB_EPTRI CACHE INTERNAL "")
@@ -77,14 +77,13 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_VALENTYUSB_EPTRI ${RTOS})
- target_sources(${TARGET}-tinyusb PUBLIC
+ family_add_tinyusb(${TARGET} OPT_MCU_VALENTYUSB_EPTRI)
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/valentyusb/eptri/dcd_eptri.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
family_add_bin_hex(${TARGET})
diff --git a/hw/bsp/gd32vf103/boards/sipeed_longan_nano/board.h b/hw/bsp/gd32vf103/boards/sipeed_longan_nano/board.h
index fae7c40b7..cb564a340 100644
--- a/hw/bsp/gd32vf103/boards/sipeed_longan_nano/board.h
+++ b/hw/bsp/gd32vf103/boards/sipeed_longan_nano/board.h
@@ -1,3 +1,8 @@
+/* metadata:
+ name: Sipeed Longan Nano
+ url: https://longan.sipeed.com/en/
+*/
+
#ifndef _NUCLEI_SDK_HAL_H
#define _NUCLEI_SDK_HAL_H
diff --git a/hw/bsp/gd32vf103/family.c b/hw/bsp/gd32vf103/family.c
index d4a819fb3..9d15755fc 100644
--- a/hw/bsp/gd32vf103/family.c
+++ b/hw/bsp/gd32vf103/family.c
@@ -24,6 +24,10 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ manufacturer: GigaDevice
+*/
+
#include "drv_usb_hw.h"
#include "drv_usb_dev.h"
diff --git a/hw/bsp/gd32vf103/family.cmake b/hw/bsp/gd32vf103/family.cmake
index 1441e41de..a47871b38 100644
--- a/hw/bsp/gd32vf103/family.cmake
+++ b/hw/bsp/gd32vf103/family.cmake
@@ -7,7 +7,7 @@ set(SOC_DIR ${SDK_DIR}/SoC/gd32vf103)
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# toolchain set up
-set(CMAKE_SYSTEM_PROCESSOR rv32imac-ilp32 CACHE INTERNAL "System Processor")
+set(CMAKE_SYSTEM_CPU rv32imac-ilp32 CACHE INTERNAL "System Processor")
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/riscv_${TOOLCHAIN}.cmake)
set(FAMILY_MCUS GD32VF103 CACHE INTERNAL "")
@@ -105,17 +105,17 @@ function(family_configure_example TARGET RTOS)
)
# Add TinyUSB target and port source
- family_add_tinyusb(${TARGET} OPT_MCU_GD32VF103 ${RTOS})
- target_sources(${TARGET}-tinyusb PUBLIC
+ family_add_tinyusb(${TARGET} OPT_MCU_GD32VF103)
+ target_sources(${TARGET} PUBLIC
${TOP}/src/portable/synopsys/dwc2/dcd_dwc2.c
${TOP}/src/portable/synopsys/dwc2/hcd_dwc2.c
${TOP}/src/portable/synopsys/dwc2/dwc2_common.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_link_libraries(${TARGET} PUBLIC board_${BOARD})
+
- # Link dependencies
- target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
# Flashing
+ family_add_bin_hex(${TARGET})
family_flash_jlink(${TARGET})
endfunction()
diff --git a/hw/bsp/imxrt/boards/metro_m7_1011/board.h b/hw/bsp/imxrt/boards/metro_m7_1011/board.h
index 24141f5f4..ccc4d6b9a 100644
--- a/hw/bsp/imxrt/boards/metro_m7_1011/board.h
+++ b/hw/bsp/imxrt/boards/metro_m7_1011/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Metro M7 1011
+ url: https://www.adafruit.com/product/5600
+*/
+
#ifndef BOARD_M7_1011_H_
#define BOARD_M7_1011_H_
diff --git a/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h b/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h
index 343e17f81..04d5b01b5 100644
--- a/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h
+++ b/hw/bsp/imxrt/boards/metro_m7_1011_sd/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Metro M7 1011 SD
+ url: https://www.adafruit.com/product/5600
+*/
+
#ifndef BOARD_METRO_M7_1011_SD_H_
#define BOARD_METRO_M7_1011_SD_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h
index da12075a0..6b9ec0ae1 100644
--- a/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1010_evk/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: i.MX RT1010 Evaluation Kit
+ url: https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/i-mx-rt1010-evaluation-kit:MIMXRT1010-EVK
+*/
+
#ifndef BOARD_MIMXRT1010_EVK_H_
#define BOARD_MIMXRT1010_EVK_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h
index 6ac78453f..e2ec4e627 100644
--- a/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1015_evk/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: i.MX RT1015 Evaluation Kit
+ url: https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1015-EVK
+*/
+
#ifndef BOARD_MIMXRT1015_EVK_H_
#define BOARD_MIMXRT1015_EVK_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.c b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.c
index ae1aa7fb1..b9e4851bf 100644
--- a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.c
+++ b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.c
@@ -15,11 +15,11 @@
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
-product: Clocks v11.0
+product: Clocks v15.0
processor: MIMXRT1015xxxxx
package_id: MIMXRT1015DAF5A
mcu_data: ksdk2_0
-processor_version: 13.0.2
+processor_version: 24.12.10
board: MIMXRT1015-EVK
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
diff --git a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.h b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.h
index 2acdb16a7..cccbe487a 100644
--- a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.h
+++ b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/clock_config.h
@@ -36,39 +36,39 @@ void BOARD_InitBootClocks(void);
#define BOARD_BOOTCLOCKRUN_CORE_CLOCK 500000000U /*!< Core clock frequency: 500000000Hz */
/* Clock outputs (values are in Hz): */
-#define BOARD_BOOTCLOCKRUN_AHB_CLK_ROOT 500000000UL
-#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL
-#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL
-#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL
-#define BOARD_BOOTCLOCKRUN_ENET_500M_REF_CLK 500000000UL
-#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL
-#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 196363636UL
-#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 62500000UL
-#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 62500000UL
-#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 125000000UL
-#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL
-#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL
-#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL
-#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 62500000UL
-#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL
-#define BOARD_BOOTCLOCKRUN_SAI2_CLK_ROOT 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI2_MCLK1 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI2_MCLK2 0UL
-#define BOARD_BOOTCLOCKRUN_SAI2_MCLK3 30000000UL
-#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL
-#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL
-#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL
-#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL
-#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 117333333UL
-#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL
-#define BOARD_BOOTCLOCKRUN_USBPHY1_CLK 480000000UL
+#define BOARD_BOOTCLOCKRUN_AHB_CLK_ROOT 500000000UL /* Clock consumers of AHB_CLK_ROOT output : AIPSTZ1, AIPSTZ2, AIPSTZ3, AIPSTZ4, ARM, FLEXSPI */
+#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL /* Clock consumers of CKIL_SYNC_CLK_ROOT output : CSU, EWM, GPT1, GPT2, KPP, PIT, RTWDOG, SNVS, SPDIF, TEMPMON, USB, WDOG1, WDOG2 */
+#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL /* Clock consumers of CLKO1_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL /* Clock consumers of CLKO2_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL /* Clock consumers of CLK_1M output : EWM, RTWDOG */
+#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL /* Clock consumers of CLK_24M output : GPT1, GPT2 */
+#define BOARD_BOOTCLOCKRUN_ENET_500M_REF_CLK 500000000UL /* Clock consumers of ENET_500M_REF_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL /* Clock consumers of FLEXIO1_CLK_ROOT output : FLEXIO1 */
+#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 196363636UL /* Clock consumers of FLEXSPI_CLK_ROOT output : FLEXSPI */
+#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 62500000UL /* Clock consumers of GPT1_ipg_clk_highfreq output : GPT1 */
+#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 62500000UL /* Clock consumers of GPT2_ipg_clk_highfreq output : GPT2 */
+#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 125000000UL /* Clock consumers of IPG_CLK_ROOT output : ADC1, ADC_ETC, AOI, ARM, BEE, CCM, CSU, DCDC, DCP, DMA0, DMAMUX, ENC1, EWM, FLEXIO1, FLEXRAM, FLEXSPI, GPC, GPIO1, GPIO2, GPIO3, GPIO5, IOMUXC, KPP, LPI2C1, LPI2C2, LPSPI1, LPSPI2, LPUART1, LPUART2, LPUART3, LPUART4, NVIC, OCOTP, PWM1, RTWDOG, SAI1, SAI2, SAI3, SNVS, SPDIF, SRC, TEMPMON, TMR1, TRNG, USB, WDOG1, WDOG2, XBARA, XBARB */
+#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL /* Clock consumers of LPI2C_CLK_ROOT output : LPI2C1, LPI2C2 */
+#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL /* Clock consumers of LPSPI_CLK_ROOT output : LPSPI1, LPSPI2 */
+#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL /* Clock consumers of MQS_MCLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 62500000UL /* Clock consumers of PERCLK_CLK_ROOT output : GPT1, GPT2, PIT */
+#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL /* Clock consumers of SAI1_CLK_ROOT output : N/A */
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL /* Clock consumers of SAI1_MCLK1 output : SAI1 */
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL /* Clock consumers of SAI1_MCLK2 output : SAI1 */
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL /* Clock consumers of SAI1_MCLK3 output : SAI1 */
+#define BOARD_BOOTCLOCKRUN_SAI2_CLK_ROOT 63529411UL /* Clock consumers of SAI2_CLK_ROOT output : N/A */
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK1 63529411UL /* Clock consumers of SAI2_MCLK1 output : SAI2 */
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK2 0UL /* Clock consumers of SAI2_MCLK2 output : SAI2 */
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK3 30000000UL /* Clock consumers of SAI2_MCLK3 output : SAI2 */
+#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL /* Clock consumers of SAI3_CLK_ROOT output : N/A */
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL /* Clock consumers of SAI3_MCLK1 output : SAI3 */
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL /* Clock consumers of SAI3_MCLK2 output : SAI3 */
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL /* Clock consumers of SAI3_MCLK3 output : SAI3 */
+#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL /* Clock consumers of SPDIF0_CLK_ROOT output : SPDIF */
+#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL /* Clock consumers of SPDIF0_EXTCLK_OUT output : SPDIF */
+#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 117333333UL /* Clock consumers of TRACE_CLK_ROOT output : ARM */
+#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL /* Clock consumers of UART_CLK_ROOT output : LPUART1, LPUART2, LPUART3, LPUART4 */
+#define BOARD_BOOTCLOCKRUN_USBPHY1_CLK 480000000UL /* Clock consumers of USBPHY1_CLK output : TEMPMON, USB */
/*! @brief Usb1 PLL set for BOARD_BootClockRUN configuration.
*/
diff --git a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.c b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.c
index 97224a332..76c1dae70 100644
--- a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.c
+++ b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.c
@@ -6,11 +6,11 @@
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
-product: Pins v13.1
+product: Pins v17.0
processor: MIMXRT1015xxxxx
package_id: MIMXRT1015DAF5A
mcu_data: ksdk2_0
-processor_version: 13.0.2
+processor_version: 24.12.10
board: MIMXRT1015-EVK
external_user_signals: {}
pin_labels:
@@ -32,6 +32,7 @@ power_domains: {NVCC_GPIO: '3.3'}
* END ****************************************************************************************************************/
void BOARD_InitBootPins(void) {
BOARD_InitPins();
+ BOARD_InitDEBUG_UARTPins();
}
/*
@@ -40,8 +41,6 @@ BOARD_InitPins:
- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
- pin_list:
- {pin_num: '1', peripheral: GPIO2, signal: 'gpio_io, 09', pin_signal: GPIO_EMC_09, direction: INPUT, pull_keeper_select: Pull, pull_up_down_config: Pull_Up_47K_Ohm}
- - {pin_num: '68', peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_07, pull_up_down_config: Pull_Down_100K_Ohm}
- - {pin_num: '72', peripheral: LPUART1, signal: TX, pin_signal: GPIO_AD_B0_06}
- {pin_num: '21', peripheral: GPIO3, signal: 'gpio_io, 21', pin_signal: GPIO_SD_B1_01, direction: OUTPUT}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
@@ -73,15 +72,11 @@ void BOARD_InitPins(void) {
/* Initialize GPIO functionality on GPIO_SD_B1_01 (pin 21) */
GPIO_PinInit(GPIO3, 21U, &USER_LED_config);
- IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_09_GPIO2_IO09, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_01_GPIO3_IO21, 0U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0x10B0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_EMC_09_GPIO2_IO09, 0x70B0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitQSPIPins:
@@ -113,6 +108,30 @@ void BOARD_InitQSPIPins(void) {
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_11_FLEXSPI_A_SS0_B, 0U);
}
+/*
+ * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
+BOARD_InitDEBUG_UARTPins:
+- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
+- pin_list:
+ - {pin_num: '68', peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_07, slew_rate: Slow}
+ - {pin_num: '72', peripheral: LPUART1, signal: TX, pin_signal: GPIO_AD_B0_06, slew_rate: Slow}
+ * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
+ */
+
+/* FUNCTION ************************************************************************************************************
+ *
+ * Function Name : BOARD_InitDEBUG_UARTPins
+ * Description : Configures pin routing and optionally pin electrical features.
+ *
+ * END ****************************************************************************************************************/
+void BOARD_InitDEBUG_UARTPins(void) {
+ CLOCK_EnableClock(kCLOCK_Iomuxc);
+
+ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0U);
+ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0U);
+ IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0x10B0U);
+ IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0x10B0U);
+}
/***********************************************************************************************************************
* EOF
**********************************************************************************************************************/
diff --git a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.h b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.h
index c9cbe3b72..2f3bf2c4c 100644
--- a/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.h
+++ b/hw/bsp/imxrt/boards/mimxrt1015_evk/board/pin_mux.h
@@ -37,7 +37,7 @@ extern "C" {
*/
void BOARD_InitBootPins(void);
-/* GPIO_EMC_09 (number 1), USER_BUTTON */
+/* GPIO_EMC_09 (number 1), USER_BUTTON/SW4 */
/* Routed pin properties */
#define BOARD_INITPINS_USER_BUTTON_PERIPHERAL GPIO2 /*!< Peripheral name */
#define BOARD_INITPINS_USER_BUTTON_SIGNAL gpio_io /*!< Signal name */
@@ -51,16 +51,6 @@ void BOARD_InitBootPins(void);
#define BOARD_INITPINS_USER_BUTTON_PIN 9U /*!< PORT pin number */
#define BOARD_INITPINS_USER_BUTTON_PIN_MASK (1U << 9U) /*!< PORT pin mask */
-/* GPIO_AD_B0_07 (number 68), LPUART1_RXD */
-/* Routed pin properties */
-#define BOARD_INITPINS_UART1_RXD_PERIPHERAL LPUART1 /*!< Peripheral name */
-#define BOARD_INITPINS_UART1_RXD_SIGNAL RX /*!< Signal name */
-
-/* GPIO_AD_B0_06 (number 72), LPUART1_TXD */
-/* Routed pin properties */
-#define BOARD_INITPINS_UART1_TXD_PERIPHERAL LPUART1 /*!< Peripheral name */
-#define BOARD_INITPINS_UART1_TXD_SIGNAL TX /*!< Signal name */
-
/* GPIO_SD_B1_01 (number 21), GPIO SD_B1_01 */
/* Routed pin properties */
#define BOARD_INITPINS_USER_LED_PERIPHERAL GPIO3 /*!< Peripheral name */
@@ -69,6 +59,7 @@ void BOARD_InitBootPins(void);
/* Symbols to be used with GPIO driver */
#define BOARD_INITPINS_USER_LED_GPIO GPIO3 /*!< GPIO peripheral base pointer */
+#define BOARD_INITPINS_USER_LED_INIT_GPIO_VALUE 0U /*!< GPIO output initial state */
#define BOARD_INITPINS_USER_LED_GPIO_PIN 21U /*!< GPIO pin number */
#define BOARD_INITPINS_USER_LED_GPIO_PIN_MASK (1U << 21U) /*!< GPIO pin mask */
#define BOARD_INITPINS_USER_LED_PORT GPIO3 /*!< PORT peripheral base pointer */
@@ -119,6 +110,23 @@ void BOARD_InitPins(void);
*/
void BOARD_InitQSPIPins(void);
+/* GPIO_AD_B0_07 (number 68), LPUART1_RXD */
+/* Routed pin properties */
+#define BOARD_INITDEBUG_UARTPINS_UART1_RXD_PERIPHERAL LPUART1 /*!< Peripheral name */
+#define BOARD_INITDEBUG_UARTPINS_UART1_RXD_SIGNAL RX /*!< Signal name */
+
+/* GPIO_AD_B0_06 (number 72), LPUART1_TXD */
+/* Routed pin properties */
+#define BOARD_INITDEBUG_UARTPINS_UART1_TXD_PERIPHERAL LPUART1 /*!< Peripheral name */
+#define BOARD_INITDEBUG_UARTPINS_UART1_TXD_SIGNAL TX /*!< Signal name */
+
+
+/*!
+ * @brief Configures pin routing and optionally pin electrical features.
+ *
+ */
+void BOARD_InitDEBUG_UARTPins(void);
+
#if defined(__cplusplus)
}
#endif
diff --git a/hw/bsp/imxrt/boards/mimxrt1015_evk/mimxrt1015_evk.mex b/hw/bsp/imxrt/boards/mimxrt1015_evk/mimxrt1015_evk.mex
index 88265d32e..917bed375 100644
--- a/hw/bsp/imxrt/boards/mimxrt1015_evk/mimxrt1015_evk.mex
+++ b/hw/bsp/imxrt/boards/mimxrt1015_evk/mimxrt1015_evk.mex
@@ -1,5 +1,5 @@
-
+
MIMXRT1015xxxxx
MIMXRT1015DAF5A
@@ -13,19 +13,18 @@
true
- false
false
true
false
-
+
- 13.0.2
+ 24.12.10
@@ -45,12 +44,7 @@
true
-
-
- true
-
-
-
+
true
@@ -79,12 +73,6 @@
-
-
-
-
-
-
@@ -100,7 +88,7 @@
true
-
+
true
@@ -125,15 +113,52 @@
+
+ Configures pin routing and optionally pin electrical features.
+
+ true
+ core0
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
- 13.0.2
+ 24.12.10
diff --git a/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h
index 4f4593524..3f9c97e11 100644
--- a/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1020_evk/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: i.MX RT1020 Evaluation Kit
+ url: https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1020-EVK
+*/
+
#ifndef BOARD_MIMXRT1020_EVK_H_
#define BOARD_MIMXRT1020_EVK_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h
index 27a64b464..39e63c472 100644
--- a/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1024_evk/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: i.MX RT1024 Evaluation Kit
+ url: https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/i-mx-rt1024-evaluation-kit:MIMXRT1024-EVK
+*/
+
#ifndef BOARD_MIMXRT1024_EVK_H_
#define BOARD_MIMXRT1024_EVK_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h b/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
index 97d1e446c..de7ab0535 100644
--- a/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1050_evkb/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: i.MX RT1050 Evaluation Kit revB
+ url: https://www.nxp.com/part/IMXRT1050-EVKB
+*/
+
#ifndef BOARD_MIMXRT1050_EVKB_H_
#define BOARD_MIMXRT1050_EVKB_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h
index 40b99860f..5bbacadaf 100644
--- a/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1060_evk/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: i.MX RT1060 Evaluation Kit revB
+ url: https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1060-EVKB
+*/
+
#ifndef BOARD_MIMXRT1060_EVKB_H_
#define BOARD_MIMXRT1060_EVKB_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h b/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h
index 7fca5adef..6dc01e3e7 100644
--- a/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h
+++ b/hw/bsp/imxrt/boards/mimxrt1064_evk/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: i.MX RT1064 Evaluation Kit
+ url: https://www.nxp.com/design/design-center/development-boards-and-designs/MIMXRT1064-EVK
+*/
+
#ifndef BOARD_MIMXRT1064_EVKB_H_
#define BOARD_MIMXRT1064_EVKB_H_
diff --git a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.c b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.c
index 778ab02f2..be684faee 100644
--- a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.c
+++ b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.c
@@ -15,11 +15,11 @@
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
-product: Clocks v11.0
+product: Clocks v15.0
processor: MIMXRT1064xxxxA
package_id: MIMXRT1064DVL6A
mcu_data: ksdk2_0
-processor_version: 13.0.2
+processor_version: 24.12.10
board: MIMXRT1064-EVK
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
diff --git a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.h b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.h
index 7ce24b6f4..2fa713c0d 100644
--- a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.h
+++ b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/clock_config.h
@@ -36,56 +36,56 @@ void BOARD_InitBootClocks(void);
#define BOARD_BOOTCLOCKRUN_CORE_CLOCK 600000000U /*!< Core clock frequency: 600000000Hz */
/* Clock outputs (values are in Hz): */
-#define BOARD_BOOTCLOCKRUN_AHB_CLK_ROOT 600000000UL
-#define BOARD_BOOTCLOCKRUN_CAN_CLK_ROOT 40000000UL
-#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL
-#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL
-#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL
-#define BOARD_BOOTCLOCKRUN_CSI_CLK_ROOT 12000000UL
-#define BOARD_BOOTCLOCKRUN_ENET2_125M_CLK 1200000UL
-#define BOARD_BOOTCLOCKRUN_ENET2_REF_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_ENET2_TX_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_ENET_125M_CLK 2400000UL
-#define BOARD_BOOTCLOCKRUN_ENET_25M_REF_CLK 1200000UL
-#define BOARD_BOOTCLOCKRUN_ENET_REF_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_ENET_TX_CLK 0UL
-#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL
-#define BOARD_BOOTCLOCKRUN_FLEXIO2_CLK_ROOT 30000000UL
-#define BOARD_BOOTCLOCKRUN_FLEXSPI2_CLK_ROOT 130909090UL
-#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 130909090UL
-#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 75000000UL
-#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 75000000UL
-#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 150000000UL
-#define BOARD_BOOTCLOCKRUN_LCDIF_CLK_ROOT 67500000UL
-#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL
-#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL
-#define BOARD_BOOTCLOCKRUN_LVDS1_CLK 1200000000UL
-#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL
-#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 75000000UL
-#define BOARD_BOOTCLOCKRUN_PLL7_MAIN_CLK 480000000UL
-#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL
-#define BOARD_BOOTCLOCKRUN_SAI2_CLK_ROOT 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI2_MCLK1 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI2_MCLK2 0UL
-#define BOARD_BOOTCLOCKRUN_SAI2_MCLK3 30000000UL
-#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL
-#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL
-#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL
-#define BOARD_BOOTCLOCKRUN_SEMC_CLK_ROOT 75000000UL
-#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL
-#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL
-#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 132000000UL
-#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL
-#define BOARD_BOOTCLOCKRUN_USBPHY1_CLK 480000000UL
-#define BOARD_BOOTCLOCKRUN_USBPHY2_CLK 480000000UL
-#define BOARD_BOOTCLOCKRUN_USDHC1_CLK_ROOT 198000000UL
-#define BOARD_BOOTCLOCKRUN_USDHC2_CLK_ROOT 198000000UL
+#define BOARD_BOOTCLOCKRUN_AHB_CLK_ROOT 600000000UL /* Clock consumers of AHB_CLK_ROOT output : AIPSTZ1, AIPSTZ2, AIPSTZ3, AIPSTZ4, ARM, FLEXIO3, FLEXSPI, FLEXSPI2, GPIO6, GPIO7, GPIO8, GPIO9 */
+#define BOARD_BOOTCLOCKRUN_CAN_CLK_ROOT 40000000UL /* Clock consumers of CAN_CLK_ROOT output : CAN1, CAN2, CAN3 */
+#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL /* Clock consumers of CKIL_SYNC_CLK_ROOT output : CSU, EWM, GPT1, GPT2, KPP, PIT, RTWDOG, SNVS, SPDIF, TEMPMON, TSC, USB1, USB2, WDOG1, WDOG2 */
+#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL /* Clock consumers of CLKO1_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL /* Clock consumers of CLKO2_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL /* Clock consumers of CLK_1M output : EWM, RTWDOG */
+#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL /* Clock consumers of CLK_24M output : GPT1, GPT2 */
+#define BOARD_BOOTCLOCKRUN_CSI_CLK_ROOT 12000000UL /* Clock consumers of CSI_CLK_ROOT output : CSI */
+#define BOARD_BOOTCLOCKRUN_ENET2_125M_CLK 1200000UL /* Clock consumers of ENET2_125M_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_ENET2_REF_CLK 0UL /* Clock consumers of ENET2_REF_CLK output : ENET2 */
+#define BOARD_BOOTCLOCKRUN_ENET2_TX_CLK 0UL /* Clock consumers of ENET2_TX_CLK output : ENET2 */
+#define BOARD_BOOTCLOCKRUN_ENET_125M_CLK 2400000UL /* Clock consumers of ENET_125M_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_ENET_25M_REF_CLK 1200000UL /* Clock consumers of ENET_25M_REF_CLK output : ENET, ENET2 */
+#define BOARD_BOOTCLOCKRUN_ENET_REF_CLK 0UL /* Clock consumers of ENET_REF_CLK output : ENET */
+#define BOARD_BOOTCLOCKRUN_ENET_TX_CLK 0UL /* Clock consumers of ENET_TX_CLK output : ENET */
+#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL /* Clock consumers of FLEXIO1_CLK_ROOT output : FLEXIO1 */
+#define BOARD_BOOTCLOCKRUN_FLEXIO2_CLK_ROOT 30000000UL /* Clock consumers of FLEXIO2_CLK_ROOT output : FLEXIO2, FLEXIO3 */
+#define BOARD_BOOTCLOCKRUN_FLEXSPI2_CLK_ROOT 130909090UL /* Clock consumers of FLEXSPI2_CLK_ROOT output : FLEXSPI2 */
+#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 130909090UL /* Clock consumers of FLEXSPI_CLK_ROOT output : FLEXSPI */
+#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 75000000UL /* Clock consumers of GPT1_ipg_clk_highfreq output : GPT1 */
+#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 75000000UL /* Clock consumers of GPT2_ipg_clk_highfreq output : GPT2 */
+#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 150000000UL /* Clock consumers of IPG_CLK_ROOT output : ADC1, ADC2, ADC_ETC, AOI1, AOI2, ARM, BEE, CAN1, CAN2, CAN3, CCM, CMP1, CMP2, CMP3, CMP4, CSI, CSU, DCDC, DCP, DMA0, DMAMUX, ENC1, ENC2, ENC3, ENC4, ENET, ENET2, EWM, FLEXIO1, FLEXIO2, FLEXIO3, FLEXRAM, FLEXSPI, FLEXSPI2, GPC, GPIO1, GPIO10, GPIO2, GPIO3, GPIO4, GPIO5, IOMUXC, KPP, LCDIF, LPI2C1, LPI2C2, LPI2C3, LPI2C4, LPSPI1, LPSPI2, LPSPI3, LPSPI4, LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8, NVIC, OCOTP, PMU, PWM1, PWM2, PWM3, PWM4, PXP, ROMC, RTWDOG, SAI1, SAI2, SAI3, SNVS, SPDIF, SRC, TEMPMON, TMR1, TMR2, TMR3, TMR4, TRNG, TSC, USB1, USB2, USDHC1, USDHC2, WDOG1, WDOG2, XBARA1, XBARB2, XBARB3 */
+#define BOARD_BOOTCLOCKRUN_LCDIF_CLK_ROOT 67500000UL /* Clock consumers of LCDIF_CLK_ROOT output : LCDIF */
+#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL /* Clock consumers of LPI2C_CLK_ROOT output : LPI2C1, LPI2C2, LPI2C3, LPI2C4 */
+#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL /* Clock consumers of LPSPI_CLK_ROOT output : LPSPI1, LPSPI2, LPSPI3, LPSPI4 */
+#define BOARD_BOOTCLOCKRUN_LVDS1_CLK 1200000000UL /* Clock consumers of LVDS1_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL /* Clock consumers of MQS_MCLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 75000000UL /* Clock consumers of PERCLK_CLK_ROOT output : GPT1, GPT2, PIT */
+#define BOARD_BOOTCLOCKRUN_PLL7_MAIN_CLK 480000000UL /* Clock consumers of PLL7_MAIN_CLK output : N/A */
+#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL /* Clock consumers of SAI1_CLK_ROOT output : N/A */
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL /* Clock consumers of SAI1_MCLK1 output : SAI1 */
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL /* Clock consumers of SAI1_MCLK2 output : SAI1 */
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL /* Clock consumers of SAI1_MCLK3 output : SAI1 */
+#define BOARD_BOOTCLOCKRUN_SAI2_CLK_ROOT 63529411UL /* Clock consumers of SAI2_CLK_ROOT output : N/A */
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK1 63529411UL /* Clock consumers of SAI2_MCLK1 output : SAI2 */
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK2 0UL /* Clock consumers of SAI2_MCLK2 output : SAI2 */
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK3 30000000UL /* Clock consumers of SAI2_MCLK3 output : SAI2 */
+#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL /* Clock consumers of SAI3_CLK_ROOT output : N/A */
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL /* Clock consumers of SAI3_MCLK1 output : SAI3 */
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL /* Clock consumers of SAI3_MCLK2 output : SAI3 */
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL /* Clock consumers of SAI3_MCLK3 output : SAI3 */
+#define BOARD_BOOTCLOCKRUN_SEMC_CLK_ROOT 75000000UL /* Clock consumers of SEMC_CLK_ROOT output : SEMC */
+#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL /* Clock consumers of SPDIF0_CLK_ROOT output : SPDIF */
+#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL /* Clock consumers of SPDIF0_EXTCLK_OUT output : SPDIF */
+#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 132000000UL /* Clock consumers of TRACE_CLK_ROOT output : ARM */
+#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL /* Clock consumers of UART_CLK_ROOT output : LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 */
+#define BOARD_BOOTCLOCKRUN_USBPHY1_CLK 480000000UL /* Clock consumers of USBPHY1_CLK output : TEMPMON, USB1 */
+#define BOARD_BOOTCLOCKRUN_USBPHY2_CLK 480000000UL /* Clock consumers of USBPHY2_CLK output : USB2 */
+#define BOARD_BOOTCLOCKRUN_USDHC1_CLK_ROOT 198000000UL /* Clock consumers of USDHC1_CLK_ROOT output : USDHC1 */
+#define BOARD_BOOTCLOCKRUN_USDHC2_CLK_ROOT 198000000UL /* Clock consumers of USDHC2_CLK_ROOT output : USDHC2 */
/*! @brief Arm PLL set for BOARD_BootClockRUN configuration.
*/
diff --git a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.c b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.c
index 8e975dc72..60c4bab37 100644
--- a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.c
+++ b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.c
@@ -6,11 +6,11 @@
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
-product: Pins v13.1
+product: Pins v17.0
processor: MIMXRT1064xxxxA
package_id: MIMXRT1064DVL6A
mcu_data: ksdk2_0
-processor_version: 13.0.2
+processor_version: 24.12.10
board: MIMXRT1064-EVK
pin_labels:
- {pin_num: F14, pin_signal: GPIO_AD_B0_09, label: 'JTAG_TDI/J21[5]/ENET_RST/J22[5]', identifier: USER_LED}
@@ -81,7 +81,6 @@ void BOARD_InitPins(void) {
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, 0x50A0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitDEBUG_UARTPins:
@@ -109,7 +108,6 @@ void BOARD_InitDEBUG_UARTPins(void) {
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_13_LPUART1_RX, 0x10B0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitSDRAMPins:
@@ -209,7 +207,6 @@ void BOARD_InitSDRAMPins(void) {
IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_39_SEMC_DQS, 0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitCSIPins:
@@ -267,7 +264,6 @@ void BOARD_InitCSIPins(void) {
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, 0xD8B0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitLCDPins:
@@ -360,7 +356,6 @@ void BOARD_InitLCDPins(void) {
IOMUXC_SetPinConfig(IOMUXC_GPIO_B1_15_GPIO2_IO31, 0x10B0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitCANPins:
@@ -384,7 +379,6 @@ void BOARD_InitCANPins(void) {
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_15_FLEXCAN2_RX, 0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitENETPins:
@@ -424,7 +418,6 @@ void BOARD_InitENETPins(void) {
IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_41_ENET_MDIO, 0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitUSDHCPins:
@@ -458,7 +451,6 @@ void BOARD_InitUSDHCPins(void) {
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B0_05_USDHC1_DATA3, 0U);
}
-
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitQSPIPins:
@@ -491,7 +483,6 @@ void BOARD_InitQSPIPins(void) {
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_10_FLEXSPIA_DATA02, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_11_FLEXSPIA_DATA03, 0U);
}
-
/***********************************************************************************************************************
* EOF
**********************************************************************************************************************/
diff --git a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.h b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.h
index bf494b6f6..be1461f16 100644
--- a/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.h
+++ b/hw/bsp/imxrt/boards/mimxrt1064_evk/board/pin_mux.h
@@ -47,6 +47,7 @@ void BOARD_InitBootPins(void);
/* Symbols to be used with GPIO driver */
#define BOARD_INITPINS_USER_LED_GPIO GPIO1 /*!< GPIO peripheral base pointer */
+#define BOARD_INITPINS_USER_LED_INIT_GPIO_VALUE 0U /*!< GPIO output initial state */
#define BOARD_INITPINS_USER_LED_GPIO_PIN 9U /*!< GPIO pin number */
#define BOARD_INITPINS_USER_LED_GPIO_PIN_MASK (1U << 9U) /*!< GPIO pin mask */
#define BOARD_INITPINS_USER_LED_PORT GPIO1 /*!< PORT peripheral base pointer */
diff --git a/hw/bsp/imxrt/boards/mimxrt1064_evk/mimxrt1064_evk.mex b/hw/bsp/imxrt/boards/mimxrt1064_evk/mimxrt1064_evk.mex
index 3f0948101..58247fa5b 100644
--- a/hw/bsp/imxrt/boards/mimxrt1064_evk/mimxrt1064_evk.mex
+++ b/hw/bsp/imxrt/boards/mimxrt1064_evk/mimxrt1064_evk.mex
@@ -1,5 +1,5 @@
-
+
MIMXRT1064xxxxA
MIMXRT1064DVL6A
@@ -13,19 +13,18 @@
true
- false
false
true
false
-
+
- 13.0.2
+ 24.12.10
@@ -41,7 +40,7 @@
true
-
+
true
@@ -84,7 +83,7 @@
true
-
+
true
@@ -137,7 +136,7 @@
true
-
+
true
@@ -204,12 +203,12 @@
true
-
+
true
-
+
true
@@ -277,7 +276,7 @@
true
-
+
true
@@ -450,7 +449,7 @@
true
-
+