Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 5f51981
Merge: ca3925a 0541598
Author: Ha Thach <[email protected]>
Date:   Mon Aug 19 21:42:14 2024 +0700

    Merge pull request hathach#2767 from hathach/minor-update

    Minor update

commit 0541598
Author: hathach <[email protected]>
Date:   Mon Aug 19 20:09:32 2024 +0700

    mimxrt1015_evk does not work reliably in hil pool (like metro m7).

commit ea4f9ce
Author: hathach <[email protected]>
Date:   Mon Aug 19 20:08:55 2024 +0700

    remove weak from dcd_edpt_close() for port without TUP_DCD_EDPT_ISO_ALLOC

commit 2158323
Author: hathach <[email protected]>
Date:   Mon Aug 19 19:07:47 2024 +0700

    update doc, re-enable metro m7 for hil, only build make windows/macos on PR

commit 0884861
Author: hathach <[email protected]>
Date:   Mon Aug 19 19:05:33 2024 +0700

    rename TUD_ENDPOINT_EXCLUSIVE_NUMBER to TUD_ENDPOINT_ONE_DIRECTION_ONLY

commit ca3925a
Merge: b8d3c0c 635bdc1
Author: Ha Thach <[email protected]>
Date:   Mon Aug 19 18:22:13 2024 +0700

    Merge pull request hathach#2708 from BrentK-ADI/max32_port

    Add port for Analog Devices MAX32 MCUs

commit 635bdc1
Author: hathach <[email protected]>
Date:   Mon Aug 19 13:20:16 2024 +0700

    fix ci build

commit 0c9d7a2
Author: hathach <[email protected]>
Date:   Mon Aug 19 12:38:45 2024 +0700

    add hwfifo_flush()

commit 8fdd8d9
Author: hathach <[email protected]>
Date:   Mon Aug 19 11:59:41 2024 +0700

    implement dcd_edpt_iso_alloc/dcd_edpt_iso_activate for musb. video_capture example with iso kind of work but not smoothly. audio example does not seems to work as expected

commit e345380
Author: hathach <[email protected]>
Date:   Sun Aug 18 17:15:07 2024 +0700

    add flash_openocd_adi() for use with max32
    add feather max32666 to the hil pool

commit 76eb2f5
Author: hathach <[email protected]>
Date:   Sun Aug 18 16:34:58 2024 +0700

    more musb update

commit fe7ffc8
Author: hathach <[email protected]>
Date:   Sat Aug 17 19:08:48 2024 +0700

    rename register bit definition to prevent conflict

commit 123830c
Author: hathach <[email protected]>
Date:   Sat Aug 17 19:06:19 2024 +0700

    remove unused register def

commit a6bee74
Author: hathach <[email protected]>
Date:   Sat Aug 17 18:07:36 2024 +0700

    define and use TUD_ENDPOINT_EXCLUSIVE_NUMBER

commit 9934733
Author: hathach <[email protected]>
Date:   Sat Aug 17 17:09:38 2024 +0700

    minor update

commit e9109f3
Author: hathach <[email protected]>
Date:   Sat Aug 17 16:34:24 2024 +0700

    refactor fifo configure/setup for dynamic and static fifo

commit eaf9cc1
Author: hathach <[email protected]>
Date:   Sat Aug 17 13:31:31 2024 +0700

    more refactor to simplify musb driver

commit 8e3093e
Author: hathach <[email protected]>
Date:   Fri Aug 16 08:21:20 2024 +0700

    update cmake profile

commit 33e3ea3
Author: hathach <[email protected]>
Date:   Thu Aug 15 23:46:33 2024 +0700

    remove analog PHY from musb_regs_t
    hil: remove ch32v203 since not reliable enough

commit 6152adb
Author: hathach <[email protected]>
Date:   Thu Aug 15 19:05:28 2024 +0700

    use musb_ep_csr_t for indexed CSR, also use indexed csr for TI access as well. Merge ep0 and epn together

commit 7d8d364
Author: hathach <[email protected]>
Date:   Thu Aug 15 16:52:50 2024 +0700

    update musb fifo usage

commit e339702
Author: hathach <[email protected]>
Date:   Thu Aug 15 16:41:20 2024 +0700

    adding universal register structs for musb

commit a9df933
Author: hathach <[email protected]>
Date:   Thu Aug 15 15:24:04 2024 +0700

    add TUP_USBIP_MUSB macro, minor rename

commit 1402e6e
Author: hathach <[email protected]>
Date:   Thu Aug 15 14:36:31 2024 +0700

    add flash-uniflash support for ti tm4c

commit 0be427b
Author: hathach <[email protected]>
Date:   Wed Aug 14 23:59:35 2024 +0700

    use max32 cmsis, fix NVIC_GetEnableIRQ() not defined when using with CMISIS < 5

commit f6b96f7
Author: hathach <[email protected]>
Date:   Wed Aug 14 22:56:59 2024 +0700

    fix spelling, add max32 to ci with arm-gcc build

commit 761399b
Merge: 5122d6d b8d3c0c
Author: hathach <[email protected]>
Date:   Wed Aug 14 06:33:42 2024 +0700

    Merge branch 'refs/heads/master' into fork/BrentK-ADI/max32_port

commit b8d3c0c
Author: Ha Thach <[email protected]>
Date:   Tue Aug 13 23:57:01 2024 +0700

    Circi dynamic config (hathach#2763)

    Circleci
    * build cmake armgcc and arm clang on circleci
    * use docker medium+

commit 9d8052b
Merge: ac1fd32 86419df
Author: Ha Thach <[email protected]>
Date:   Tue Aug 13 16:20:19 2024 +0700

    Merge pull request hathach#2762 from hathach/fsdev_iso_fix

    Fsdev iso fix

commit 86419df
Author: hathach <[email protected]>
Date:   Tue Aug 13 16:01:51 2024 +0700

    use zero wait flash for nano v203

commit 0f732a2
Author: hathach <[email protected]>
Date:   Tue Aug 13 14:50:54 2024 +0700

    remove metro m7 for now

commit 5f8599f
Author: hathach <[email protected]>
Date:   Tue Aug 13 14:35:42 2024 +0700

    metro m7 has issue with cdc_msc example randomly on hil test. Exclude it for now

commit 5254065
Author: hathach <[email protected]>
Date:   Tue Aug 13 13:51:28 2024 +0700

    change pio-usb back to upstreaam

commit f231707
Author: hathach <[email protected]>
Date:   Tue Aug 13 13:50:19 2024 +0700

    increase pyserial timeout

commit 61725a5
Author: hathach <[email protected]>
Date:   Tue Aug 13 13:16:46 2024 +0700

    fix concurrent mass storage test conflict, use pyfatfs to access disk dev by usb id instead of mounted in /media/

commit 45f50eb
Author: hathach <[email protected]>
Date:   Tue Aug 13 11:04:53 2024 +0700

    increase enum timeout

commit ad411b6
Author: hathach <[email protected]>
Date:   Tue Aug 13 10:55:17 2024 +0700

    minor update to cmake profile

commit 96c5c72
Author: HiFiPhile <[email protected]>
Date:   Mon Aug 12 18:38:23 2024 +0200

    Fix double buffer not disabled for smaller devices.

commit f565267
Author: HiFiPhile <[email protected]>
Date:   Mon Aug 12 18:32:51 2024 +0200

    Fix stm32l0 clock init.

commit 549f20d
Author: HiFiPhile <[email protected]>
Date:   Mon Aug 12 15:39:02 2024 +0200

    Fix buf_id read for ISO transfer.

commit 5666aa1
Author: HiFiPhile <[email protected]>
Date:   Mon Aug 12 15:38:22 2024 +0200

    Fix tusb_dir_t warning.

commit ac1fd32
Merge: 9ee7d1b a621c4b
Author: Ha Thach <[email protected]>
Date:   Mon Aug 12 21:26:10 2024 +0700

    Merge pull request hathach#2761 from hathach/hil-readd-v203

    readd v203 to hil pool

commit a621c4b
Author: hathach <[email protected]>
Date:   Mon Aug 12 16:39:25 2024 +0700

    fix more race with ch32v203 and setup when queuing zlp.
    improve hil test failed output

commit 7a9ef9e
Author: hathach <[email protected]>
Date:   Sun Aug 11 11:10:15 2024 +0700

    readd v203 to hil pool

commit 9ee7d1b
Merge: 18b5aff 8b88749
Author: Ha Thach <[email protected]>
Date:   Sun Aug 11 10:19:52 2024 +0700

    Merge pull request hathach#2760 from hathach/update-pio-usb

    change pio to fix rp2040 build

commit 8b88749
Author: hathach <[email protected]>
Date:   Sun Aug 11 09:51:14 2024 +0700

    skip ch32v203 for hil test

commit 2871bb0
Author: hathach <[email protected]>
Date:   Sun Aug 11 00:51:51 2024 +0700

    fix spi_set_format() -Wnull-dereference when compiling with -Os

commit c07928e
Author: hathach <[email protected]>
Date:   Sat Aug 10 22:07:10 2024 +0700

    fix build with rp2040 PICO_DEFAULT_SPI rename

commit e8f42df
Author: hathach <[email protected]>
Date:   Sat Aug 10 09:47:34 2024 +0700

    change pio to fix rp2040 build

commit 5122d6d
Author: Brent Kowal <[email protected]>
Date:   Thu Jul 25 09:08:37 2024 -0400

    Combined DCD MUSB implementations

    Combined the new MAX32 MUSB implementation with the existing (TI) implementation to provide generic code base for working the MUSB DCD peripheral.
     - Added abstraction calls for FIFO setup, EP registers, Ctrl registers and interrupt setup.
     - Combined TM4C and MSP432E into a single header file.
     - Created musb_max32.h, and removed the MAX32 specific C implementation.
     - Updated MAX32 build system to use dcd_musb.c.
     - Added MAX32 conditions for cdc_dual_ports example descriptors missed during first testing.

commit 13f5f20
Author: Brent Kowal <[email protected]>
Date:   Thu Jul 11 12:13:30 2024 -0400

    Pre-commit fixes.

    Resolve codespell and EOF errors found in the pre-commit CI task.

commit 494533f
Author: Brent Kowal <[email protected]>
Date:   Wed Jul 10 15:52:43 2024 -0400

    Minor build system fix

    Correct a case-sensitive file extension issue in the MAX32690 build scripts.  Did not present itself as an issue under MinGW or MSYS, just Linux.

commit f49725d
Author: Brent Kowal <[email protected]>
Date:   Wed Jul 10 15:18:59 2024 -0400

    BSP Cleanup

     - Added MSDK flash rules for CMake
     - Removed partial IAR support. Uniform GCC support across MAX32 parts
     - Updated build scripts for correctly signing the MAX32651
     - Added README files for the BSPs to describe flashing and limitiations

commit 0c37f93
Author: Brent Kowal <[email protected]>
Date:   Tue Jul 2 18:02:11 2024 -0400

    MAX32650/1/2 Support

    Added support for the MAX32650/1/2 series parts
     - MAX32650FTHR, MAX32650EvKit, MAX32651EvKit
     - Added special flash rule for MAX32651 due to signing required
     - Added depencies to flash-msdk rules for executable

commit 61beb63
Author: Brent Kowal <[email protected]>
Date:   Tue Jul 2 14:31:38 2024 -0400

    MAX32666 Support

    Added support for the MAX32666, Boards MAX32666EvKit and MAX32666FTHR.

commit 835a6ed
Author: Brent Kowal <[email protected]>
Date:   Tue Jul 2 11:54:23 2024 -0400

    Build System Updates

    Updated MAX32690 and MAX78002 linker and cmake scripts to work with CMake + Ninja build system.  Verified all example projects build with the tools/build.py script for both board, and both make and cmake build systems.

commit 2353c4f
Author: Brent Kowal <[email protected]>
Date:   Mon Jul 1 17:31:38 2024 -0400

    Add MAX78002 Support

     -Added support for MAX78002, MAX78002EVKIT
     -Added provisions for remaining MAX32 USB parts

commit 0b82af6
Author: Brent Kowal <[email protected]>
Date:   Mon Jul 1 16:31:17 2024 -0400

    AD-APARD32690-SL Support and Cleanup

     - Added BSP for AD-APARD32690-SL board (apard32690)
     - Ran clang-formatting on previously committed code
     - Removed LOG messages from dcd_max32.c

commit 0f28832
Author: Brent Kowal <[email protected]>
Date:   Fri Jun 28 16:55:27 2024 -0400

    Initial Commit for MAX32 Support

    Initial commit for the port of TUSB to MAX32xxx parts, staring with MAX32690
     - Added dcd_max32.c (based on dcd_musb.c) for interfacing with the peripheral
     - Added MAX32690 part family support
     - Added max32690evkit board support
     - Updated examples for unique EP number requirement
     - Updated get_deps.py to fetch the MSDK

    Known Issues / Additional Testing Required
     - msc_dual_lun only shown 1 volume on Windows
     - USBTMC does not have a valid Windowsdriver
     - DFU does not have a valid Windows driver
     - WebUSB is "Device not Recognized"
     - Need to test build scripts with IAR and Clang
  • Loading branch information
Paciente8159 committed Dec 10, 2024
1 parent 5669c1d commit 7630fc6
Show file tree
Hide file tree
Showing 107 changed files with 5,799 additions and 3,397 deletions.
105 changes: 26 additions & 79 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,39 @@
version: 2.1

commands:
setup-toolchain:
parameters:
toolchain:
type: string
toolchain_url:
type: string
steps:
# - run:
# name: Make toolchain cache key
# command: echo "<< parameters.toolchain >>-<< parameters.toolchain_url>>" > toolchain_key
# - restore_cache:
# name: Restore Toolchain Cache
# key: deps-{{ checksum "toolchain_key" }}
# paths:
# - ~/cache/<< parameters.toolchain >>
- run:
name: Install Toolchain
command: |
# Only download if folder does not exist (not cached)
if [ ! -d ~/cache/<< parameters.toolchain >> ]; then
mkdir -p ~/cache/<< parameters.toolchain >>
wget << parameters.toolchain_url>> -O toolchain.tar.gz
tar -C ~/cache/<< parameters.toolchain >> -xaf toolchain.tar.gz
fi
# - save_cache:
# name: Save Toolchain Cache
# key: deps-{{ checksum "toolchain_key" }}
# paths:
# - ~/cache/<< parameters.toolchain >>
- run:
name: Setup build environment
command: |
echo "export PATH=$PATH:`echo ~/cache/<< parameters.toolchain >>/*/bin`" >> $BASH_ENV
# Install Ninja
NINJA_URL=https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
wget $NINJA_URL -O ninja-linux.zip
unzip ninja-linux.zip -d ~/bin
get-deps:
parameters:
family:
type: string
steps:
- run:
name: Get Dependencies
command: |
python tools/get_deps.py << parameters.family >>
setup: true
orbs:
continuation: circleci/continuation@1

jobs:
arm-clang:
parameters:
family:
type: string
build-system:
type: string

set-matrix:
executor: continuation/default
docker:
- image: cimg/base:current
resource_class: medium
environment:
TOOLCHAIN_URL: https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz
resource_class: small
steps:
- checkout
- setup-toolchain:
toolchain: clang
toolchain_url: $TOOLCHAIN_URL
- get-deps:
family: << parameters.family >>
- run:
name: Build
name: Set matrix
command: |
# Only build one board per family for non PRs i.e commit to master
ONE_PER_FAMILY=""
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
ONE_PER_FAMILY="--one-per-family"
fi
python tools/build.py $ONE_PER_FAMILY -s << parameters.build-system >> --toolchain clang << parameters.family >>
MATRIX_JSON=$(python .github/workflows/ci_set_matrix.py)
echo "MATRIX_JSON=$MATRIX_JSON"
TOOLCHAIN_LIST=("arm-clang" "arm-gcc")
for toolchain in "${TOOLCHAIN_LIST[@]}"; do
FAMILY=$(echo $MATRIX_JSON | jq -r ".\"$toolchain\".family")
echo "${toolchain}_FAMILY=$FAMILY"
echo " - build:" >> .circleci/config2.yml
echo " matrix:" >> .circleci/config2.yml
echo " parameters:" >> .circleci/config2.yml
echo " toolchain: ['$toolchain']" >> .circleci/config2.yml
echo " build-system: ['cmake']" >> .circleci/config2.yml
echo " family: $FAMILY" >> .circleci/config2.yml
done
- continuation/continue:
configuration_path: .circleci/config2.yml

workflows:
build:
set-matrix:
jobs:
- arm-clang:
matrix:
parameters:
build-system:
- cmake
#family: ['stm32f1']
#family: ['stm32f1', 'stm32f2']
family: ['imxrt', 'kinetis_k kinetis_kl kinetis_k32l2', 'lpc11 lpc13 lpc15', 'lpc17 lpc18 lpc40 lpc43', 'lpc51 lpc54 lpc55', 'nrf', 'samd11 samd21 saml2x', 'samd5x_e5x samg', 'stm32f0 stm32f1 stm32f2 stm32f3', 'stm32f4', 'stm32f7', 'stm32g0 stm32g4 stm32h5', 'stm32h7', 'stm32l4 stm32u5 stm32wb']
- set-matrix
98 changes: 98 additions & 0 deletions .circleci/config2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
version: 2.1

commands:
setup-toolchain:
parameters:
toolchain:
type: string
steps:
- run:
name: Install Toolchain
command: |
TOOLCHAIN_JSON='{
"arm-clang": "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz",
"arm-gcc": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v12.3.1-1.1/xpack-arm-none-eabi-gcc-12.3.1-1.1-linux-x64.tar.gz"
}'
toolchain_url=$(echo $TOOLCHAIN_JSON | jq -r '.["<< parameters.toolchain >>"]')
echo "toolchain_url=$toolchain_url"
# download and extract toolchain
mkdir -p ~/cache/<< parameters.toolchain >>
wget $toolchain_url -O toolchain.tar.gz
tar -C ~/cache/<< parameters.toolchain >> -xaf toolchain.tar.gz
# Add toolchain to PATH
echo "export PATH=$PATH:`echo ~/cache/<< parameters.toolchain >>/*/bin`" >> $BASH_ENV
get-deps:
parameters:
family:
type: string
steps:
- run:
name: Get Dependencies
command: |
python tools/get_deps.py << parameters.family >>
# Install Pico SDK
if [ << parameters.family >> == "rp2040" ]; then
git clone --depth 1 https://github.com/raspberrypi/pico-sdk.git ~/pico-sdk
echo "export PICO_SDK_PATH=~/pico-sdk" >> $BASH_ENV
fi
jobs:
build:
parameters:
build-system:
type: string
toolchain:
type: string
family:
type: string

docker:
- image: cimg/base:current
resource_class: medium+
steps:
- checkout
- when:
condition: << parameters.build-system >> == 'cmake'
steps:
- run:
name: Install Ninja
command: |
# Install Ninja
NINJA_URL=https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
wget $NINJA_URL -O ninja-linux.zip
unzip ninja-linux.zip -d ~/bin
- setup-toolchain:
toolchain: << parameters.toolchain >>
- get-deps:
family: << parameters.family >>
- run:
name: Build
command: |
# Only build one board per family for non PRs i.e commit to master
ONE_PER_FAMILY=""
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
ONE_PER_FAMILY="--one-per-family"
fi
# Toolchain option default is gcc
if [ "<< parameters.toolchain >>" == "arm-clang" ]; then
TOOLCHAIN_OPTION="--toolchain clang"
elif [ "<< parameters.toolchain >>" == "arm-gcc" ]; then
TOOLCHAIN_OPTION="--toolchain gcc"
fi
python tools/build.py $ONE_PER_FAMILY -s << parameters.build-system >> $TOOLCHAIN_OPTION << parameters.family >>
workflows:
build:
jobs:
# - build:
# matrix:
# parameters:
# toolchain: ['arm-clang']
# build-system: ['cmake']
# family: ['imxrt']
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,29 @@ jobs:
fail-fast: false
matrix:
toolchain:
# - 'arm-clang' is built by circle-ci
# - 'arm-clang' is built by circle-ci in PR
- 'aarch64-gcc'
- 'arm-gcc'
- 'msp430-gcc'
- 'riscv-gcc'
with:
build-system: 'cmake'
toolchain: ${{ matrix.toolchain }}
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
one-per-family: ${{ github.event_name != 'pull_request' }}
one-per-family: ${{ github.event_name == 'push' }}

# ---------------------------------------
# Build CMake arm-gcc
# only build with push, for PR: all board is built by circle-ci
# ---------------------------------------
cmake-arm-gcc:
if: github.event_name == 'push'
needs: set-matrix
uses: ./.github/workflows/build_util.yml
with:
build-system: 'cmake'
toolchain: 'arm-gcc'
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['arm-gcc'].family) }}
one-per-family: true

# ---------------------------------------
# Build Make
Expand All @@ -80,7 +93,7 @@ jobs:
fail-fast: false
matrix:
toolchain:
# 'arm-clang' is built by circle-ci
# 'arm-clang' would be built by circle-ci
- 'aarch64-gcc'
- 'arm-gcc'
- 'msp430-gcc'
Expand All @@ -90,12 +103,13 @@ jobs:
build-system: 'make'
toolchain: ${{ matrix.toolchain }}
build-args: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.toolchain].family) }}
one-per-family: ${{ github.event_name != 'pull_request' }}
one-per-family: ${{ github.event_name == 'push' }}

# ---------------------------------------
# Build Make on Windows/MacOS
# ---------------------------------------
make-os:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/build_util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ jobs:
shell: bash

- name: Build
if: inputs.toolchain != 'esp-idf'
run: |
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
- name: Build using ESP-IDF docker
if: inputs.toolchain == 'esp-idf'
run: |
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 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
shell: bash
1 change: 1 addition & 0 deletions .github/workflows/ci_set_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"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"],
"mcx": ["arm-gcc"],
"mm32": ["arm-gcc"],
"msp430": ["msp430-gcc"],
Expand Down
Loading

0 comments on commit 7630fc6

Please sign in to comment.