From e8cbccf81decb4074f40791c1608d46c112fe0b2 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 1 Mar 2021 21:59:53 +0700 Subject: remove submodule lib/FreeRTOS --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) (limited to '.gitmodules') diff --git a/.gitmodules b/.gitmodules index 46e2d807c..1ec196a48 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,9 +22,6 @@ [submodule "lib/lwip"] path = lib/lwip url = https://github.com/lwip-tcpip/lwip.git -[submodule "lib/FreeRTOS"] - path = lib/FreeRTOS - url = https://github.com/FreeRTOS/FreeRTOS.git [submodule "lib/CMSIS_4"] path = lib/CMSIS_4 url = https://github.com/ARM-software/CMSIS.git -- cgit v1.3.1 From 7ff14a652ba1348f863338479eb3347a06fcc80a Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 1 Mar 2021 22:13:21 +0700 Subject: add submodule lib/FreeRTOS-Kernel --- .github/workflows/build.yml | 5 +-- .gitmodules | 3 ++ examples/device/cdc_msc_freertos/Makefile | 2 +- .../ses/lpc175x_6x/lpc175x_6x.emProject | 50 +++++++++++----------- .../cdc_msc_freertos/ses/nrf5x/nrf5x.emProject | 48 ++++++++++----------- .../cdc_msc_freertos/ses/samd21/samd21.emProject | 48 ++++++++++----------- .../cdc_msc_freertos/ses/samd51/samd51.emProject | 48 ++++++++++----------- .../device/cdc_msc_freertos/src/freertos_hook.c | 2 +- examples/device/hid_composite_freertos/Makefile | 2 +- .../hid_composite_freertos/src/freertos_hook.c | 2 +- lib/FreeRTOS-Kernel | 1 + 11 files changed, 106 insertions(+), 105 deletions(-) create mode 160000 lib/FreeRTOS-Kernel (limited to '.gitmodules') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0698e6385..b63a9a031 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,11 +130,8 @@ jobs: with: submodules: 'true' - - name: Checkout Sub-Submodules + - name: Setup Env run: | - # some submodule has it own submodules that need to be fetched as well - git submodule update --init --recursive lib/FreeRTOS - # Add msp430-gcc url to env echo >> $GITHUB_ENV MSP430_GCC_URL=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 diff --git a/.gitmodules b/.gitmodules index 1ec196a48..e33532c4e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -114,3 +114,6 @@ url = https://github.com/raspberrypi/pico-sdk.git fetchRecurseSubmodules = false +[submodule "lib/FreeRTOS-Kernel"] + path = lib/FreeRTOS-Kernel + url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git diff --git a/examples/device/cdc_msc_freertos/Makefile b/examples/device/cdc_msc_freertos/Makefile index 3570daa41..36174b5e1 100644 --- a/examples/device/cdc_msc_freertos/Makefile +++ b/examples/device/cdc_msc_freertos/Makefile @@ -1,7 +1,7 @@ include ../../../tools/top.mk include ../../make.mk -FREERTOS_SRC = lib/FreeRTOS/FreeRTOS/Source +FREERTOS_SRC = lib/FreeRTOS-Kernel INC += \ src \ diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject index 4dc111f2e..691f8c3b0 100644 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject +++ b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject @@ -20,7 +20,7 @@ arm_target_interface_type="SWD" build_treat_warnings_as_errors="No" c_preprocessor_definitions="LPC175x_6x;__LPC1700_FAMILY;__LPC176x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC175X_6X" - c_user_include_directories=".;../../src;$(rootDir)/hw;$(rootDir)/src;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc;$(rootDir)/lib/FreeRTOS/Source/include;$(rootDir)/lib/FreeRTOS/Source/portable/GCC/ARM_CM3" + c_user_include_directories=".;../../src;$(rootDir)/hw;$(rootDir)/src;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc;$(rootDir)/lib/FreeRTOS-Kernel/include;$(rootDir)/lib/FreeRTOS-Kernel/portable/GCC/ARM_CM3" debug_register_definition_file="LPC176x5x_Registers.xml" debug_target_connection="J-Link" gcc_enable_all_warnings="Yes" @@ -92,39 +92,39 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - + - - - - + + + + diff --git a/examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject b/examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject index f01b26d23..e964d6fb5 100644 --- a/examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject +++ b/examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject @@ -107,39 +107,39 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - + - - - - + + + + diff --git a/examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject b/examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject index b8b099b68..b3db856d3 100644 --- a/examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject +++ b/examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject @@ -100,39 +100,39 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - + - - - - + + + + diff --git a/examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject b/examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject index d84d070c0..77ff38b62 100644 --- a/examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject +++ b/examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject @@ -104,39 +104,39 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - + - - - - + + + + diff --git a/examples/device/cdc_msc_freertos/src/freertos_hook.c b/examples/device/cdc_msc_freertos/src/freertos_hook.c index 423bad4d3..df15a8de7 100644 --- a/examples/device/cdc_msc_freertos/src/freertos_hook.c +++ b/examples/device/cdc_msc_freertos/src/freertos_hook.c @@ -37,7 +37,7 @@ void vApplicationMallocFailedHook(void) TU_ASSERT(false, ); } -void vApplicationStackOverflowHook(xTaskHandle pxTask, signed char *pcTaskName) +void vApplicationStackOverflowHook(xTaskHandle pxTask, char *pcTaskName) { (void) pxTask; (void) pcTaskName; diff --git a/examples/device/hid_composite_freertos/Makefile b/examples/device/hid_composite_freertos/Makefile index cef1af5a6..db7dfd345 100644 --- a/examples/device/hid_composite_freertos/Makefile +++ b/examples/device/hid_composite_freertos/Makefile @@ -1,7 +1,7 @@ include ../../../tools/top.mk include ../../make.mk -FREERTOS_SRC = lib/FreeRTOS/FreeRTOS/Source +FREERTOS_SRC = lib/FreeRTOS-Kernel INC += \ src \ diff --git a/examples/device/hid_composite_freertos/src/freertos_hook.c b/examples/device/hid_composite_freertos/src/freertos_hook.c index 423bad4d3..df15a8de7 100644 --- a/examples/device/hid_composite_freertos/src/freertos_hook.c +++ b/examples/device/hid_composite_freertos/src/freertos_hook.c @@ -37,7 +37,7 @@ void vApplicationMallocFailedHook(void) TU_ASSERT(false, ); } -void vApplicationStackOverflowHook(xTaskHandle pxTask, signed char *pcTaskName) +void vApplicationStackOverflowHook(xTaskHandle pxTask, char *pcTaskName) { (void) pxTask; (void) pcTaskName; diff --git a/lib/FreeRTOS-Kernel b/lib/FreeRTOS-Kernel new file mode 160000 index 000000000..2a604f4a2 --- /dev/null +++ b/lib/FreeRTOS-Kernel @@ -0,0 +1 @@ +Subproject commit 2a604f4a2818b8354b5e1a39e388eb5e16cfbc1f -- cgit v1.3.1 From c34b6b2324809276664070a8c52bfa71ceaf9d06 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 2 Mar 2021 01:18:05 +0700 Subject: remove lib/CMSIS_4 submodule, move nrf to lib/CMSIS_5 --- .gitmodules | 4 ---- examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject | 2 +- hw/bsp/nrf/family.mk | 2 +- lib/CMSIS_4 | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) delete mode 160000 lib/CMSIS_4 (limited to '.gitmodules') diff --git a/.gitmodules b/.gitmodules index e33532c4e..209b6ea95 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,9 +22,6 @@ [submodule "lib/lwip"] path = lib/lwip url = https://github.com/lwip-tcpip/lwip.git -[submodule "lib/CMSIS_4"] - path = lib/CMSIS_4 - url = https://github.com/ARM-software/CMSIS.git [submodule "hw/mcu/st/cmsis_device_f4"] path = hw/mcu/st/cmsis_device_f4 url = https://github.com/STMicroelectronics/cmsis_device_f4.git @@ -113,7 +110,6 @@ path = hw/mcu/raspberrypi/pico-sdk url = https://github.com/raspberrypi/pico-sdk.git fetchRecurseSubmodules = false - [submodule "lib/FreeRTOS-Kernel"] path = lib/FreeRTOS-Kernel url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git diff --git a/examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject b/examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject index f7714f269..944199138 100644 --- a/examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject +++ b/examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject @@ -21,7 +21,7 @@ build_treat_warnings_as_errors="Yes" c_additional_options="-Wno-error=undef;-Wno-error=unused-parameter;-Wno-error=cast-align;-Wno-error=cast-function-type" c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_NRF5X;CFG_TUSB_DEBUG=1" - c_user_include_directories="../../src;$(rootDir)/lib/CMSIS_4/CMSIS/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(nrfxDir)/drivers/src" + c_user_include_directories="../../src;$(rootDir)/lib/CMSIS_5/CMSIS/Core/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(nrfxDir)/drivers/src" debug_register_definition_file="nrf52840_Registers.xml" debug_target_connection="J-Link" gcc_enable_all_warnings="Yes" diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk index 16c912dc4..4c9e36ed0 100644 --- a/hw/bsp/nrf/family.mk +++ b/hw/bsp/nrf/family.mk @@ -40,7 +40,7 @@ SRC_C += \ INC += \ $(TOP)/$(BOARD_PATH) \ - $(TOP)/lib/CMSIS_4/CMSIS/Include \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ $(TOP)/hw/mcu/nordic \ $(TOP)/hw/mcu/nordic/nrfx \ $(TOP)/hw/mcu/nordic/nrfx/mdk \ diff --git a/lib/CMSIS_4 b/lib/CMSIS_4 deleted file mode 160000 index f2cad4345..000000000 --- a/lib/CMSIS_4 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f2cad4345783c948ed4a7f5cdb02cdc0856366f1 -- cgit v1.3.1 From 7afaae7ffc71094363a54dc92ab7982d0cb84d7b Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 2 Mar 2021 10:18:44 +0700 Subject: remove submodule lib/CMSIS_5 --- .github/workflows/build.yml | 2 +- .gitmodules | 3 --- docs/getting_started.md | 6 +++--- lib/CMSIS_5 | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) delete mode 160000 lib/CMSIS_5 (limited to '.gitmodules') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b63a9a031..f90a6843d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: submodules: 'false' - name: Checkout Submodules in lib - run: git submodule update --init --recursive lib + run: git submodule update --init lib - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/.gitmodules b/.gitmodules index 209b6ea95..664e32c59 100644 --- a/.gitmodules +++ b/.gitmodules @@ -100,9 +100,6 @@ [submodule "hw/mcu/st/stm32l5xx_hal_driver"] path = hw/mcu/st/stm32l5xx_hal_driver url = https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git -[submodule "lib/CMSIS_5"] - path = lib/CMSIS_5 - url = https://github.com/ARM-software/CMSIS_5.git [submodule "lib/sct_neopixel"] path = lib/sct_neopixel url = https://github.com/gsteiert/sct_neopixel diff --git a/docs/getting_started.md b/docs/getting_started.md index dfdf02562..870491fe2 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -39,13 +39,13 @@ $ git clone https://github.com/hathach/tinyusb tinyusb $ cd tinyusb ``` -TinyUSB examples includes external repos aka submodules to provide low-level MCU peripheral's driver as well as external libraries such as FreeRTOS to compile with. Therefore we will firstly fetch those mcu driver repo by running this command in the top folder repo +Some TinyUSB examples also requires external submodule libraries in `/lib` such as FreeRTOS, Lightweight IP to build. Run following command to fetch them ``` -$ git submodule update --init --recursive +$ git submodule update --init lib ``` -It will takes a bit of time due to the number of supported MCUs, luckily we only need to do this once. Or if you only want to test with a specific mcu, you could only fetch its driver submodule. +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. ### Build diff --git a/lib/CMSIS_5 b/lib/CMSIS_5 deleted file mode 160000 index b7b26f50d..000000000 --- a/lib/CMSIS_5 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b7b26f50d00072812aec8453f643e24bafedccb5 -- cgit v1.3.1 From a64535f57d3b2d05ee5796547bf215e9e7e57282 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 5 Mar 2021 22:08:42 +0700 Subject: add back lib/CMSIS_5 submodule --- .gitmodules | 3 +++ lib/CMSIS_5 | 1 + 2 files changed, 4 insertions(+) create mode 160000 lib/CMSIS_5 (limited to '.gitmodules') diff --git a/.gitmodules b/.gitmodules index 664e32c59..c0e6eef03 100644 --- a/.gitmodules +++ b/.gitmodules @@ -110,3 +110,6 @@ [submodule "lib/FreeRTOS-Kernel"] path = lib/FreeRTOS-Kernel url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git +[submodule "lib/CMSIS_5"] + path = lib/CMSIS_5 + url = https://github.com/ARM-software/CMSIS_5.git diff --git a/lib/CMSIS_5 b/lib/CMSIS_5 new file mode 160000 index 000000000..202852626 --- /dev/null +++ b/lib/CMSIS_5 @@ -0,0 +1 @@ +Subproject commit 20285262657d1b482d132d20d755c8c330d55c1f -- cgit v1.3.1