From d4d7d35afbfe831b20ba83c2689c678361bfb709 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 2 Mar 2022 13:24:51 +0700 Subject: checkout pio-usb --- .github/workflows/build_arm.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 177f1076e..085274eb5 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -82,6 +82,7 @@ jobs: run: | git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk + git submodule update --init lib/Pico-PIO-USB - name: Set Toolchain URL run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz -- cgit v1.3.1 From ccafb42c8261d8304fce0af46c0ddc3adf6da56f Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 20 Apr 2022 14:40:55 +0700 Subject: disable blank issues, add online docs link --- .github/ISSUE_TEMPLATE/config.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 735a5ef22..28fd27467 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,8 @@ +blank_issues_enabled: false contact_links: - name: TinyUSB Discussion url: https://github.com/hathach/tinyusb/discussions about: If you have other questions or need help, post it here. + - name: TinyUSB Docs + url: https://docs.tinyusb.org/ + about: Online documentation -- cgit v1.3.1 From 3a1c7339cd54cc03233c2337e95403260992738f Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 24 Apr 2022 16:48:49 +0100 Subject: Replace actions/setup-ruby with replacement ruby/setup-ruby --- .github/workflows/build_arm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 177f1076e..fc5eec1df 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Ruby - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: ruby-version: '2.7' -- cgit v1.3.1 From 35d1a71ed7d3b3ea42b4d38c7cdc85233b815348 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 24 Apr 2022 16:49:29 +0100 Subject: GH Update to actions/checkout@v3 --- .github/workflows/build_aarch64.yml | 4 ++-- .github/workflows/build_arm.yml | 8 ++++---- .github/workflows/build_esp.yml | 4 ++-- .github/workflows/build_msp430.yml | 4 ++-- .github/workflows/build_renesas.yml | 4 ++-- .github/workflows/build_riscv.yml | 4 ++-- .github/workflows/trigger.yml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to '.github') diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml index 8cf7852b9..1720ba592 100644 --- a/.github/workflows/build_aarch64.yml +++ b/.github/workflows/build_aarch64.yml @@ -24,13 +24,13 @@ jobs: uses: actions/setup-python@v2 - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel - name: Checkout hathach/linkermap - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: hathach/linkermap path: linkermap diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index fc5eec1df..133671f82 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -20,7 +20,7 @@ jobs: ruby-version: '2.7' - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Unit Tests run: | @@ -66,13 +66,13 @@ jobs: uses: actions/setup-python@v2 - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel - name: Checkout hathach/linkermap - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: hathach/linkermap path: linkermap @@ -135,7 +135,7 @@ jobs: uses: actions/setup-python@v2 - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip diff --git a/.github/workflows/build_esp.yml b/.github/workflows/build_esp.yml index 1ed76ef4d..6a46773b2 100644 --- a/.github/workflows/build_esp.yml +++ b/.github/workflows/build_esp.yml @@ -29,10 +29,10 @@ jobs: run: docker pull espressif/idf:latest - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Checkout hathach/linkermap - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: hathach/linkermap path: linkermap diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml index 98dc36cd9..6a468ab04 100644 --- a/.github/workflows/build_msp430.yml +++ b/.github/workflows/build_msp430.yml @@ -21,13 +21,13 @@ jobs: uses: actions/setup-python@v2 - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - name: Checkout hathach/linkermap - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: hathach/linkermap path: linkermap diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml index 6eb042d72..50618ff6b 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -21,13 +21,13 @@ jobs: uses: actions/setup-python@v2 - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - name: Checkout hathach/linkermap - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: hathach/linkermap path: linkermap diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml index 0c7b2d154..2d670138d 100644 --- a/.github/workflows/build_riscv.yml +++ b/.github/workflows/build_riscv.yml @@ -22,13 +22,13 @@ jobs: uses: actions/setup-python@v2 - name: Checkout TinyUSB - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - name: Checkout hathach/linkermap - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: hathach/linkermap path: linkermap diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml index 40750a2f9..780d6f4f3 100644 --- a/.github/workflows/trigger.yml +++ b/.github/workflows/trigger.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Push to tinyusb_src run: | -- cgit v1.3.1 From 4586d8f119f779d1ef5f937e5c79e0ea2c84579c Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 16 May 2022 13:44:06 +0700 Subject: add upstream Pico-PIO-USB --- .github/workflows/build_arm.yml | 2 +- .gitmodules | 3 +++ hw/bsp/rp2040/family.cmake | 18 +++++++++++------- hw/mcu/raspberry_pi/Pico-PIO-USB | 1 + 4 files changed, 16 insertions(+), 8 deletions(-) create mode 160000 hw/mcu/raspberry_pi/Pico-PIO-USB (limited to '.github') diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 085274eb5..bec879a93 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -82,7 +82,7 @@ jobs: run: | git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk - git submodule update --init lib/Pico-PIO-USB + git submodule update --init hw/mcu/raspberry_pi/Pico-PIO-USB - name: Set Toolchain URL run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz diff --git a/.gitmodules b/.gitmodules index 21bbf08c0..044ac24ec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -146,3 +146,6 @@ [submodule "hw/mcu/allwinner"] path = hw/mcu/allwinner url = https://github.com/hathach/allwinner_driver.git +[submodule "hw/mcu/raspberry_pi/Pico-PIO-USB"] + path = hw/mcu/raspberry_pi/Pico-PIO-USB + url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake index f52274c15..17ae3de9b 100644 --- a/hw/bsp/rp2040/family.cmake +++ b/hw/bsp/rp2040/family.cmake @@ -63,15 +63,19 @@ if (NOT TARGET _rp2040_family_inclusion_marker) #------------------------------------ add_library(pico_pio_usb INTERFACE) + if (NOT DEFINED PICO_PIO_USB_PATH) + set(PICO_PIO_USB_PATH "${TOP}/hw/mcu/raspberry_pi/Pico-PIO-USB") + endif() + target_sources(pico_pio_usb INTERFACE - ${TOP}/lib/Pico-PIO-USB/src/pio_usb.c - ${TOP}/lib/Pico-PIO-USB/src/pio_usb_host.c - ${TOP}/lib/Pico-PIO-USB/src/pio_usb_device.c - ${TOP}/lib/Pico-PIO-USB/src/usb_crc.c + ${PICO_PIO_USB_PATH}/src/pio_usb.c + ${PICO_PIO_USB_PATH}/src/pio_usb_host.c + ${PICO_PIO_USB_PATH}/src/pio_usb_device.c + ${PICO_PIO_USB_PATH}/src/usb_crc.c ) target_include_directories(pico_pio_usb INTERFACE - ${TOP}/lib/Pico-PIO-USB/src + ${PICO_PIO_USB_PATH}/src ) target_link_libraries(pico_pio_usb INTERFACE @@ -188,8 +192,8 @@ if (NOT TARGET _rp2040_family_inclusion_marker) function(family_configure_pico_pio_usb_example TARGET) family_configure_target(${TARGET}) target_link_libraries(${TARGET} PUBLIC pico_stdlib pico_pio_usb) - pico_generate_pio_header(tinyusb_common_base ${TOP}/lib/Pico-PIO-USB/src/usb_tx.pio) - pico_generate_pio_header(tinyusb_common_base ${TOP}/lib/Pico-PIO-USB/src/usb_rx.pio) + pico_generate_pio_header(tinyusb_common_base ${PICO_PIO_USB_PATH}/src/usb_tx.pio) + pico_generate_pio_header(tinyusb_common_base ${PICO_PIO_USB_PATH}/src/usb_rx.pio) endfunction() function(family_initialize_project PROJECT DIR) diff --git a/hw/mcu/raspberry_pi/Pico-PIO-USB b/hw/mcu/raspberry_pi/Pico-PIO-USB new file mode 160000 index 000000000..2a9fefd6c --- /dev/null +++ b/hw/mcu/raspberry_pi/Pico-PIO-USB @@ -0,0 +1 @@ +Subproject commit 2a9fefd6ccf42e5d8570ae83fdc54c9c875ebdd1 -- cgit v1.3.1 From 835ab01cab9ebe20eac46da1853eb158e1248f01 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 24 Jun 2022 21:52:51 +0700 Subject: fix stm32 g4 and wb build issue with freertos, also add them to ci build --- .github/workflows/build_arm.yml | 2 ++ hw/bsp/board_mcu.h | 8 +++++++- hw/bsp/stm32g4/family.c | 4 +++- hw/bsp/stm32wb/family.c | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 5a796a49b..6e4702735 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -57,8 +57,10 @@ jobs: - 'stm32f1' - 'stm32f4' - 'stm32f7' + - 'stm32g4' - 'stm32h7' - 'stm32l4' + - 'stm32wb' - 'tm4c123' - 'xmc4000' steps: diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h index b911e1e53..8202479cb 100644 --- a/hw/bsp/board_mcu.h +++ b/hw/bsp/board_mcu.h @@ -31,7 +31,7 @@ #include "tusb_option.h" //--------------------------------------------------------------------+ -// Low Level MCU header include. TinyUSB stack and example should be +// 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 @@ -80,6 +80,9 @@ #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_STM32H7 #include "stm32h7xx.h" @@ -92,6 +95,9 @@ #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_CXD56 // no header needed diff --git a/hw/bsp/stm32g4/family.c b/hw/bsp/stm32g4/family.c index 461dc61a1..a2312b0d8 100644 --- a/hw/bsp/stm32g4/family.c +++ b/hw/bsp/stm32g4/family.c @@ -73,7 +73,9 @@ void board_init(void) SysTick->CTRL &= ~1U; // If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher ) - NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); + NVIC_SetPriority(USB_HP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY); + NVIC_SetPriority(USB_LP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY); + NVIC_SetPriority(USBWakeUp_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY); #endif GPIO_InitTypeDef GPIO_InitStruct; diff --git a/hw/bsp/stm32wb/family.c b/hw/bsp/stm32wb/family.c index 1ed38308b..9f1f46f4d 100644 --- a/hw/bsp/stm32wb/family.c +++ b/hw/bsp/stm32wb/family.c @@ -67,7 +67,8 @@ void board_init(void) SysTick->CTRL &= ~1U; // If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher ) - NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); + NVIC_SetPriority(USB_HP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY); + NVIC_SetPriority(USB_LP_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY); #endif GPIO_InitTypeDef GPIO_InitStruct; -- cgit v1.3.1 From 1e00fe78c7271ecc1b813b10efaf929f4172054e Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 29 Jun 2022 14:07:00 +0700 Subject: use action gcc --- .github/workflows/build_arm.yml | 48 ++++++++--------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) (limited to '.github') diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 6e4702735..27cb9f1f7 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -65,7 +65,7 @@ jobs: - 'xmc4000' steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 - name: Checkout TinyUSB uses: actions/checkout@v3 @@ -79,32 +79,17 @@ jobs: repository: hathach/linkermap path: linkermap - - name: Checkout pico-sdk + - name: Checkout pico-sdk for rp2040 if: matrix.family == 'rp2040' run: | git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk git submodule update --init hw/mcu/raspberry_pi/Pico-PIO-USB - - name: Set Toolchain URL - run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz - - - name: Cache Toolchain - uses: actions/cache@v2 - id: cache-toolchain + - name: Install ARM GCC + uses: carlosperate/arm-none-eabi-gcc-action@v1 with: - path: ~/cache/ - key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }} - - - name: Install Toolchain - if: steps.cache-toolchain.outputs.cache-hit != 'true' - run: | - mkdir -p ~/cache/toolchain - wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz - tar -C ~/cache/toolchain -xaf toolchain.tar.gz - - - name: Set Toolchain Path - run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + release: '11.2-2022.02' - name: Build run: python3 tools/build_family.py ${{ matrix.family }} @@ -135,7 +120,7 @@ jobs: steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 - name: Checkout TinyUSB uses: actions/checkout@v3 @@ -143,25 +128,10 @@ jobs: - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Set Toolchain URL - run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz - - - name: Cache Toolchain - uses: actions/cache@v2 - id: cache-toolchain + - name: Install ARM GCC + uses: carlosperate/arm-none-eabi-gcc-action@v1 with: - path: ~/cache/ - key: ${{ runner.os }}-21-03-04-${{ env.TOOLCHAIN_URL }} - - - name: Install Toolchain - if: steps.cache-toolchain.outputs.cache-hit != 'true' - run: | - mkdir -p ~/cache/toolchain - wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz - tar -C ~/cache/toolchain -xaf toolchain.tar.gz - - - name: Set Toolchain Path - run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + release: '11.2-2022.02' - name: Build run: python3 tools/build_board.py ${{ matrix.example }} -- cgit v1.3.1 From 12341118e373cce10cb868f234009e9d37bff940 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 1 Jul 2022 16:24:58 +0700 Subject: add get-deps target update ci to get-deps first --- .github/workflows/build_arm.yml | 13 +++++++++---- docs/reference/getting_started.rst | 7 ++++++- examples/make.mk | 5 ----- examples/rules.mk | 27 ++++++++++++++++++--------- 4 files changed, 33 insertions(+), 19 deletions(-) (limited to '.github') diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 27cb9f1f7..7cc1b10f9 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -67,6 +67,11 @@ jobs: - name: Setup Python uses: actions/setup-python@v3 + - name: Install ARM GCC + uses: carlosperate/arm-none-eabi-gcc-action@v1 + with: + release: '11.2-2022.02' + - name: Checkout TinyUSB uses: actions/checkout@v3 @@ -86,10 +91,10 @@ jobs: echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk git submodule update --init hw/mcu/raspberry_pi/Pico-PIO-USB - - name: Install ARM GCC - uses: carlosperate/arm-none-eabi-gcc-action@v1 - with: - release: '11.2-2022.02' + - name: Get Dependencies + run: | + b=`find hw/bsp/${{ matrix.family }}/boards -depth -maxdepth 1 -type d -name '[^.]?*' -printf %f -quit` + make BOARD={b} get-deps - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/docs/reference/getting_started.rst b/docs/reference/getting_started.rst index fa5c51eff..1088d4700 100644 --- a/docs/reference/getting_started.rst +++ b/docs/reference/getting_started.rst @@ -50,7 +50,12 @@ Some TinyUSB examples also requires external submodule libraries in ``/lib`` suc $ git submodule update --init lib -In addition, MCU driver submodule is also needed to provide low-level MCU peripheral's driver. Luckily, it will be fetched if needed when you run the ``make`` to build your board. +In addition, MCU driver submodule is also needed to provide low-level MCU peripheral's driver. To download these depencies for your board, run the ``get-dpes`` as follow. + +.. code-block:: + + $ make BOARD=feather_nrf52840_express get-deps + Some modules will also require a module-specific SDK (e.g. RP2040) or binary (e.g. Sony Spresense) to build examples. diff --git a/examples/make.mk b/examples/make.mk index 27e1db38c..47520d660 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -45,11 +45,6 @@ else SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c)) endif -# Fetch submodules depended by family -fetch_submodule_if_empty = $(if $(wildcard $(TOP)/$1/*),,$(info $(shell git -C $(TOP) submodule update --init $1))) -ifdef DEPS_SUBMODULES - $(foreach s,$(DEPS_SUBMODULES),$(call fetch_submodule_if_empty,$(s))) -endif #-------------- Cross Compiler ------------ # Can be set by board, default to ARM GCC diff --git a/examples/rules.mk b/examples/rules.mk index 538dffbcf..c3134056a 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -5,6 +5,7 @@ # Set all as default goal .DEFAULT_GOAL := all +# ---------------- GNU Make Start ----------------------- # ESP32-Sx and RP2040 has its own CMake build system ifeq (,$(findstring $(FAMILY),esp32s2 esp32s3 rp2040)) @@ -141,7 +142,23 @@ $(BUILD)/obj/%_asm.o: %.S @echo AS $(notdir $@) @$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $< -endif # GNU Make +endif + +.PHONY: clean +clean: +ifeq ($(CMDEXE),1) + rd /S /Q $(subst /,\,$(BUILD)) +else + $(RM) -rf $(BUILD) +endif +# ---------------- GNU Make End ----------------------- + +# get depenecies +.PHONY: get-deps +get-deps: + ifdef DEPS_SUBMODULES + git -C $(TOP) submodule update --init $(DEPS_SUBMODULES) + endif size: $(BUILD)/$(PROJECT).elf -@echo '' @@ -152,14 +169,6 @@ size: $(BUILD)/$(PROJECT).elf linkermap: $(BUILD)/$(PROJECT).elf @linkermap -v $<.map -.PHONY: clean -clean: -ifeq ($(CMDEXE),1) - rd /S /Q $(subst /,\,$(BUILD)) -else - $(RM) -rf $(BUILD) -endif - # --------------------------------------- # Flash Targets # --------------------------------------- -- cgit v1.3.1 From 5323472afd1f35d0e62bd58bb3293bcfce36483b Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 1 Jul 2022 16:37:34 +0700 Subject: update get-deps for ci --- .github/workflows/build_arm.yml | 2 +- tools/build_board.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 7cc1b10f9..935d57e06 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -94,7 +94,7 @@ jobs: - name: Get Dependencies run: | b=`find hw/bsp/${{ matrix.family }}/boards -depth -maxdepth 1 -type d -name '[^.]?*' -printf %f -quit` - make BOARD={b} get-deps + make -C examples/device/board_test BOARD=${b} get-deps - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/tools/build_board.py b/tools/build_board.py index 62a4ea82f..8d10ef820 100644 --- a/tools/build_board.py +++ b/tools/build_board.py @@ -1,6 +1,7 @@ import os import sys import time +import subprocess from multiprocessing import Pool import build_utils @@ -38,6 +39,10 @@ if __name__ == '__main__': filter_with_input(all_boards) all_boards.sort() + # Get dependencies + for b in all_boards: + subprocess.run("make -C examples/device/board_test BOARD={} get-deps".format(b), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + print(build_separator) print(build_utils.build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM')) total_time = time.monotonic() -- cgit v1.3.1 From 53db23142a89def1ad2f866863a559a931eeb035 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 1 Jul 2022 17:23:14 +0700 Subject: add get-dependencies.py --- .github/workflows/build_aarch64.yml | 3 +++ .github/workflows/build_arm.yml | 15 ++++++--------- .github/workflows/build_msp430.yml | 3 +++ .github/workflows/build_renesas.yml | 3 +++ .github/workflows/build_riscv.yml | 3 +++ hw/bsp/rp2040/family.mk | 2 ++ tools/get_dependencies.py | 25 +++++++++++++++++++++++++ 7 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 tools/get_dependencies.py (limited to '.github') diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml index 1720ba592..b4ea8a0eb 100644 --- a/.github/workflows/build_aarch64.yml +++ b/.github/workflows/build_aarch64.yml @@ -55,6 +55,9 @@ jobs: - name: Set Toolchain Path run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + - name: Get Dependencies + run: python3 tools/get_dependencies.py ${{ matrix.family }} + - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/.github/workflows/build_arm.yml b/.github/workflows/build_arm.yml index 935d57e06..4297ba895 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -89,12 +89,9 @@ jobs: run: | git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk - git submodule update --init hw/mcu/raspberry_pi/Pico-PIO-USB - name: Get Dependencies - run: | - b=`find hw/bsp/${{ matrix.family }}/boards -depth -maxdepth 1 -type d -name '[^.]?*' -printf %f -quit` - make -C examples/device/board_test BOARD=${b} get-deps + run: python3 tools/get_dependencies.py ${{ matrix.family }} - name: Build run: python3 tools/build_family.py ${{ matrix.family }} @@ -127,16 +124,16 @@ jobs: - name: Setup Python uses: actions/setup-python@v3 + - name: Install ARM GCC + uses: carlosperate/arm-none-eabi-gcc-action@v1 + with: + release: '11.2-2022.02' + - name: Checkout TinyUSB uses: actions/checkout@v3 - name: Checkout common submodules in lib run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - - name: Install ARM GCC - uses: carlosperate/arm-none-eabi-gcc-action@v1 - with: - release: '11.2-2022.02' - - name: Build run: python3 tools/build_board.py ${{ matrix.example }} diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml index 6a468ab04..ea93f09a0 100644 --- a/.github/workflows/build_msp430.yml +++ b/.github/workflows/build_msp430.yml @@ -52,6 +52,9 @@ jobs: - name: Set Toolchain Path run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + - name: Get Dependencies + run: python3 tools/get_dependencies.py ${{ matrix.family }} + - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/.github/workflows/build_renesas.yml b/.github/workflows/build_renesas.yml index 50618ff6b..2563d3549 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -53,6 +53,9 @@ jobs: - name: Set Toolchain Path run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + - name: Get Dependencies + run: python3 tools/get_dependencies.py ${{ matrix.family }} + - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/.github/workflows/build_riscv.yml b/.github/workflows/build_riscv.yml index 2d670138d..90dc35206 100644 --- a/.github/workflows/build_riscv.yml +++ b/.github/workflows/build_riscv.yml @@ -53,6 +53,9 @@ jobs: - name: Set Toolchain Path run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + - name: Get Dependencies + run: python3 tools/get_dependencies.py ${{ matrix.family }} + - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/hw/bsp/rp2040/family.mk b/hw/bsp/rp2040/family.mk index 5db784b14..cf6b53793 100644 --- a/hw/bsp/rp2040/family.mk +++ b/hw/bsp/rp2040/family.mk @@ -1,6 +1,8 @@ JLINK_DEVICE = rp2040_m0_0 PYOCD_TARGET = rp2040 +DEPS_SUBMODULES += hw/mcu/raspberry_pi/Pico-PIO-USB + ifeq ($(DEBUG), 1) CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug endif diff --git a/tools/get_dependencies.py b/tools/get_dependencies.py new file mode 100644 index 000000000..e7d3e0a76 --- /dev/null +++ b/tools/get_dependencies.py @@ -0,0 +1,25 @@ +import os +import sys +import subprocess + + +# dependency lookup (ABC sorted) +# deps = { +# 'LPC11UXX' : [ [] ] +# } + + +def get_family_dep(family): + for entry in os.scandir("hw/bsp/{}/boards".format(family)): + if entry.is_dir(): + result = subprocess.run("make -C examples/device/board_test BOARD={} get-deps".format(entry.name), + shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + print(result.stdout.decode("utf-8")) + return result.returncode + +status = 0 +all_family = sys.argv[1:] +for f in all_family: + status += get_family_dep(f) + +sys.exit(status) \ No newline at end of file -- cgit v1.3.1 From d36ea6ddc1674c03764d69708cea63b5631e6766 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 28 Jul 2022 12:23:01 +0700 Subject: update issue template --- .github/ISSUE_TEMPLATE/bug_report.yml | 8 +++++ .github/ISSUE_TEMPLATE/feature_request.md | 14 --------- .github/ISSUE_TEMPLATE/feature_request.yml | 49 ++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 14 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index c0b520e35..2958d3b12 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -76,3 +76,11 @@ body: description: If applicable, add screenshots to help explain your problem. validations: required: false + + - type: checkboxes + attributes: + label: I have checked existing issues, dicussion and documentation + description: You agree to check all the resources above before opening a new issue. + options: + - label: I confirm I have checked existing issues, dicussion and documentation. + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 562d3113b..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea for this project -title: '' -labels: Feature 💡 -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..e168b73a6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,49 @@ +name: Feature Request +description: Suggest an idea for this project +labels: 'Feature 💡' +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this request! + It's okay to leave some blank if it doesn't apply to your request. + + - type: input + attributes: + label: Related area + description: Please briefly explain the area of your Feature Request. + placeholder: eg. new port support, device stack, class driver ... + validations: + required: true + + - type: input + attributes: + label: Hardware specification + description: Please provide if your proposal depends on specific Hardware. + placeholder: eg. rp2040, samd51 ... + validations: + required: true + + - type: textarea + attributes: + label: Is your feature request related to a problem? + description: Please provide a clear and concise description of what the problem is. Add relevant issue link. + placeholder: ex. I'm facing the issue/missing function... + validations: + required: true + + - type: textarea + attributes: + label: Describe the solution you'd like + description: Please provide a clear and concise description of what you want to happen. + placeholder: ex. When using this function... + validations: + required: true + + - type: checkboxes + attributes: + label: I have checked existing issues, dicussion and documentation + description: You agree to check all the resources above before opening a new issue. + options: + - label: I confirm I have checked existing issues, dicussion and documentation. + required: true -- cgit v1.3.1 From 05e19b7848cea88031b912f69be04bf6a0fdd163 Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Fri, 19 Aug 2022 23:57:39 +0700 Subject: Update feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index e168b73a6..19f403246 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -41,9 +41,9 @@ body: required: true - type: checkboxes - attributes: - label: I have checked existing issues, dicussion and documentation - description: You agree to check all the resources above before opening a new issue. - options: - - label: I confirm I have checked existing issues, dicussion and documentation. - required: true + attributes: + label: I have checked existing issues, dicussion and documentation + description: You agree to check all the resources above before opening a new issue. + options: + - label: I confirm I have checked existing issues, dicussion and documentation. + required: true -- cgit v1.3.1 From 660e8f50a7b551eec7e02f78c828a54394920e51 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 23 Aug 2022 14:43:09 +0700 Subject: try to fix release body in tinyusb_src (not tested) --- .github/workflows/trigger.yml | 4 +++- docs/info/changelog.rst | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to '.github') diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml index 780d6f4f3..e434ca238 100644 --- a/.github/workflows/trigger.yml +++ b/.github/workflows/trigger.yml @@ -55,4 +55,6 @@ jobs: git push origin ${{ github.event.release.tag_name }} # Send POST reqwuest to release https://docs.github.com/en/rest/reference/repos#create-a-release - curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "${{ github.event.release.body }}", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases + bb={{ github.event.release.body }} + bb=${bb//\n/\\\n} + curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "$bb", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases diff --git a/docs/info/changelog.rst b/docs/info/changelog.rst index 67bb6af65..da29e04fb 100644 --- a/docs/info/changelog.rst +++ b/docs/info/changelog.rst @@ -57,8 +57,7 @@ Host Stack - 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 - + - Also add _sync() as sync/blocking version for above APIs 0.13.0 ====== -- cgit v1.3.1