diff --git a/.github/workflows/build_aarch64.yml b/.github/workflows/build_aarch64.yml index 800a54380..30df2bdf0 100644 --- a/.github/workflows/build_aarch64.yml +++ b/.github/workflows/build_aarch64.yml @@ -43,7 +43,7 @@ jobs: uses: actions/checkout@v3 - name: Checkout common submodules in lib - run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel + run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - name: Checkout hathach/linkermap uses: actions/checkout@v3 @@ -72,7 +72,7 @@ jobs: run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` - name: Get Dependencies - run: python3 tools/get_dependencies.py ${{ matrix.family }} + run: python3 tools/get_family_deps.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 ff69d15c6..b5a92d6e3 100644 --- a/.github/workflows/build_arm.yml +++ b/.github/workflows/build_arm.yml @@ -81,7 +81,7 @@ jobs: echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk - name: Get Dependencies - run: python3 tools/get_dependencies.py ${{ matrix.family }} + run: python3 tools/get_family_deps.py ${{ matrix.family }} - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/.github/workflows/build_iar.yml b/.github/workflows/build_iar.yml index 33e77c3dc..afb6efb6b 100644 --- a/.github/workflows/build_iar.yml +++ b/.github/workflows/build_iar.yml @@ -44,14 +44,8 @@ jobs: - name: Checkout submodules and dependencies run: | - git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel - python3 tools/get_dependencies.py ${{ matrix.family }} - - #- 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 lib/FreeRTOS-Kernel lib/lwip + python3 tools/get_family_deps.py ${{ matrix.family }} - name: Build run: python3 tools/build_family.py ${{ matrix.family }} CC=iccarm diff --git a/.github/workflows/build_msp430.yml b/.github/workflows/build_msp430.yml index 2c7785806..6832c54b3 100644 --- a/.github/workflows/build_msp430.yml +++ b/.github/workflows/build_msp430.yml @@ -70,7 +70,7 @@ jobs: run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` - name: Get Dependencies - run: python3 tools/get_dependencies.py ${{ matrix.family }} + run: python3 tools/get_family_deps.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 3a961d327..7ce674485 100644 --- a/.github/workflows/build_renesas.yml +++ b/.github/workflows/build_renesas.yml @@ -70,7 +70,7 @@ jobs: run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` - name: Get Dependencies - run: python3 tools/get_dependencies.py ${{ matrix.family }} + run: python3 tools/get_family_deps.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 fb4d4d28c..876ebbdef 100644 --- a/.github/workflows/build_riscv.yml +++ b/.github/workflows/build_riscv.yml @@ -71,7 +71,7 @@ jobs: run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` - name: Get Dependencies - run: python3 tools/get_dependencies.py ${{ matrix.family }} + run: python3 tools/get_family_deps.py ${{ matrix.family }} - name: Build run: python3 tools/build_family.py ${{ matrix.family }} diff --git a/.github/workflows/build_win_mac.yml b/.github/workflows/build_win_mac.yml index bad9f3162..7c884abd9 100644 --- a/.github/workflows/build_win_mac.yml +++ b/.github/workflows/build_win_mac.yml @@ -50,7 +50,7 @@ jobs: run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip - name: Get Dependencies - run: python3 tools/get_dependencies.py stm32f4 + run: python3 tools/get_family_deps.py stm32f4 - name: Build run: python3 tools/build_family.py stm32f4 stm32f411disco diff --git a/.gitignore b/.gitignore index 4a12f6ab7..bd4271925 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,57 @@ cov-int /_bin/ __pycache__ +# submodules +hw/mcu/allwinner +hw/mcu/bridgetek/ft9xx/ft90x-sdk +hw/mcu/broadcom +hw/mcu/gd/nuclei-sdk +hw/mcu/infineon/mtb-xmclib-cat3 +hw/mcu/microchip +hw/mcu/mindmotion/mm32sdk +hw/mcu/nordic/nrfx +hw/mcu/nuvoton +hw/mcu/nxp/lpcopen +hw/mcu/nxp/mcux-sdk +hw/mcu/nxp/nxp_sdk +hw/mcu/raspberry_pi/Pico-PIO-USB +hw/mcu/renesas/rx +hw/mcu/silabs/cmsis-dfp-efm32gg12b +hw/mcu/sony/cxd56/spresense-exported-sdk +hw/mcu/st/cmsis_device_f0 +hw/mcu/st/cmsis_device_f1 +hw/mcu/st/cmsis_device_f2 +hw/mcu/st/cmsis_device_f3 +hw/mcu/st/cmsis_device_f4 +hw/mcu/st/cmsis_device_f7 +hw/mcu/st/cmsis_device_g0 +hw/mcu/st/cmsis_device_g4 +hw/mcu/st/cmsis_device_h7 +hw/mcu/st/cmsis_device_l0 +hw/mcu/st/cmsis_device_l1 +hw/mcu/st/cmsis_device_l4 +hw/mcu/st/cmsis_device_l5 +hw/mcu/st/cmsis_device_u5 +hw/mcu/st/cmsis_device_wb +hw/mcu/st/stm32f0xx_hal_driver +hw/mcu/st/stm32f1xx_hal_driver +hw/mcu/st/stm32f2xx_hal_driver +hw/mcu/st/stm32f3xx_hal_driver +hw/mcu/st/stm32f4xx_hal_driver +hw/mcu/st/stm32f7xx_hal_driver +hw/mcu/st/stm32g0xx_hal_driver +hw/mcu/st/stm32g4xx_hal_driver +hw/mcu/st/stm32h7xx_hal_driver +hw/mcu/st/stm32l0xx_hal_driver +hw/mcu/st/stm32l1xx_hal_driver +hw/mcu/st/stm32l4xx_hal_driver +hw/mcu/st/stm32l5xx_hal_driver +hw/mcu/st/stm32u5xx_hal_driver +hw/mcu/st/stm32wbxx_hal_driver +hw/mcu/ti +hw/mcu/wch/ch32v307 +lib/CMSIS_5 +lib/FreeRTOS-Kernel +lib/lwip +lib/sct_neopixel +tools/uf2 diff --git a/.gitmodules b/.gitmodules index ba72b015b..320a5f7f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,163 +1,12 @@ -[submodule "hw/mcu/nordic/nrfx"] - path = hw/mcu/nordic/nrfx - url = https://github.com/NordicSemiconductor/nrfx.git [submodule "tools/uf2"] path = tools/uf2 url = https://github.com/microsoft/uf2.git -[submodule "hw/mcu/sony/cxd56/spresense-exported-sdk"] - path = hw/mcu/sony/cxd56/spresense-exported-sdk - url = https://github.com/sonydevworld/spresense-exported-sdk.git -[submodule "hw/mcu/ti"] - path = hw/mcu/ti - url = https://github.com/hathach/ti_driver.git -[submodule "hw/mcu/microchip"] - path = hw/mcu/microchip - url = https://github.com/hathach/microchip_driver.git -[submodule "hw/mcu/nuvoton"] - path = hw/mcu/nuvoton - url = https://github.com/majbthrd/nuc_driver.git [submodule "lib/lwip"] path = lib/lwip url = https://github.com/lwip-tcpip/lwip.git -[submodule "hw/mcu/st/cmsis_device_f4"] - path = hw/mcu/st/cmsis_device_f4 - url = https://github.com/STMicroelectronics/cmsis_device_f4.git -[submodule "hw/mcu/st/stm32f4xx_hal_driver"] - path = hw/mcu/st/stm32f4xx_hal_driver - url = https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_f0"] - path = hw/mcu/st/cmsis_device_f0 - url = https://github.com/STMicroelectronics/cmsis_device_f0.git -[submodule "hw/mcu/st/stm32f0xx_hal_driver"] - path = hw/mcu/st/stm32f0xx_hal_driver - url = https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_f1"] - path = hw/mcu/st/cmsis_device_f1 - url = https://github.com/STMicroelectronics/cmsis_device_f1.git -[submodule "hw/mcu/st/stm32f1xx_hal_driver"] - path = hw/mcu/st/stm32f1xx_hal_driver - url = https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_f2"] - path = hw/mcu/st/cmsis_device_f2 - url = https://github.com/STMicroelectronics/cmsis_device_f2.git -[submodule "hw/mcu/st/stm32f2xx_hal_driver"] - path = hw/mcu/st/stm32f2xx_hal_driver - url = https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_f3"] - path = hw/mcu/st/cmsis_device_f3 - url = https://github.com/STMicroelectronics/cmsis_device_f3.git -[submodule "hw/mcu/st/stm32f3xx_hal_driver"] - path = hw/mcu/st/stm32f3xx_hal_driver - url = https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_f7"] - path = hw/mcu/st/cmsis_device_f7 - url = https://github.com/STMicroelectronics/cmsis_device_f7.git -[submodule "hw/mcu/st/stm32f7xx_hal_driver"] - path = hw/mcu/st/stm32f7xx_hal_driver - url = https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_h7"] - path = hw/mcu/st/cmsis_device_h7 - url = https://github.com/STMicroelectronics/cmsis_device_h7.git -[submodule "hw/mcu/st/stm32h7xx_hal_driver"] - path = hw/mcu/st/stm32h7xx_hal_driver - url = https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_l0"] - path = hw/mcu/st/cmsis_device_l0 - url = https://github.com/STMicroelectronics/cmsis_device_l0.git -[submodule "hw/mcu/st/stm32l0xx_hal_driver"] - path = hw/mcu/st/stm32l0xx_hal_driver - url = https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_l1"] - path = hw/mcu/st/cmsis_device_l1 - url = https://github.com/STMicroelectronics/cmsis_device_l1.git -[submodule "hw/mcu/st/stm32l1xx_hal_driver"] - path = hw/mcu/st/stm32l1xx_hal_driver - url = https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_l4"] - path = hw/mcu/st/cmsis_device_l4 - url = https://github.com/STMicroelectronics/cmsis_device_l4.git -[submodule "hw/mcu/st/stm32l4xx_hal_driver"] - path = hw/mcu/st/stm32l4xx_hal_driver - url = https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_g0"] - path = hw/mcu/st/cmsis_device_g0 - url = https://github.com/STMicroelectronics/cmsis_device_g0.git -[submodule "hw/mcu/st/stm32g0xx_hal_driver"] - path = hw/mcu/st/stm32g0xx_hal_driver - url = https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_g4"] - path = hw/mcu/st/cmsis_device_g4 - url = https://github.com/STMicroelectronics/cmsis_device_g4.git -[submodule "hw/mcu/st/stm32g4xx_hal_driver"] - path = hw/mcu/st/stm32g4xx_hal_driver - url = https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_l5"] - path = hw/mcu/st/cmsis_device_l5 - url = https://github.com/STMicroelectronics/cmsis_device_l5.git -[submodule "hw/mcu/st/stm32l5xx_hal_driver"] - path = hw/mcu/st/stm32l5xx_hal_driver - url = https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git -[submodule "hw/mcu/st/cmsis_device_wb"] - path = hw/mcu/st/cmsis_device_wb - url = https://github.com/STMicroelectronics/cmsis_device_wb.git -[submodule "hw/mcu/st/stm32wbxx_hal_driver"] - path = hw/mcu/st/stm32wbxx_hal_driver - url = https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git -[submodule "lib/sct_neopixel"] - path = lib/sct_neopixel - url = https://github.com/gsteiert/sct_neopixel [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 -[submodule "hw/mcu/silabs/cmsis-dfp-efm32gg12b"] - path = hw/mcu/silabs/cmsis-dfp-efm32gg12b - url = https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b -[submodule "hw/mcu/renesas/rx"] - path = hw/mcu/renesas/rx - url = https://github.com/kkitayam/rx_device.git -[submodule "hw/mcu/nxp/lpcopen"] - path = hw/mcu/nxp/lpcopen - url = https://github.com/hathach/nxp_lpcopen.git -[submodule "hw/mcu/nxp/mcux-sdk"] - path = hw/mcu/nxp/mcux-sdk - url = https://github.com/NXPmicro/mcux-sdk.git -[submodule "hw/mcu/nxp/nxp_sdk"] - path = hw/mcu/nxp/nxp_sdk - url = https://github.com/hathach/nxp_sdk.git -[submodule "hw/mcu/gd/nuclei-sdk"] - path = hw/mcu/gd/nuclei-sdk - url = https://github.com/Nuclei-Software/nuclei-sdk.git -[submodule "hw/mcu/bridgetek/ft9xx/ft90x-sdk"] - path = hw/mcu/bridgetek/ft9xx/ft90x-sdk - url = https://github.com/BRTSG-FOSS/ft90x-sdk -[submodule "hw/mcu/mindmotion/mm32sdk"] - path = hw/mcu/mindmotion/mm32sdk - url = https://github.com/hathach/mm32sdk.git -[submodule "hw/mcu/broadcom"] - path = hw/mcu/broadcom - url = https://github.com/adafruit/broadcom-peripherals.git - branch = main-build -[submodule "hw/mcu/infineon/mtb-xmclib-cat3"] - path = hw/mcu/infineon/mtb-xmclib-cat3 - url = https://github.com/Infineon/mtb-xmclib-cat3.git -[submodule "hw/mcu/allwinner"] - path = hw/mcu/allwinner - url = https://github.com/hathach/allwinner_driver.git -[submodule "hw/mcu/wch/ch32v307"] - path = hw/mcu/wch/ch32v307 - url = https://github.com/openwch/ch32v307.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 -[submodule "hw/mcu/st/cmsis_device_u5"] - path = hw/mcu/st/cmsis_device_u5 - url = https://github.com/STMicroelectronics/cmsis_device_u5 -[submodule "hw/mcu/st/stm32u5xx_hal_driver"] - path = hw/mcu/st/stm32u5xx_hal_driver - url = https://github.com/STMicroelectronics/stm32u5xx_hal_driver [submodule "hw/mcu/renesas/fsp"] path = hw/mcu/renesas/fsp url = https://github.com/renesas/fsp diff --git a/examples/rules.mk b/examples/rules.mk index 7f3535bba..f8e4001ec 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -193,7 +193,7 @@ endif .PHONY: get-deps get-deps: ifdef DEPS_SUBMODULES - git -C $(TOP) submodule update --init $(DEPS_SUBMODULES) + $(PYTHON) $(TOP)/tools/get_deps.py $(DEPS_SUBMODULES) endif .PHONY: size diff --git a/hw/bsp/rx/boards/gr_citrus/board.mk b/hw/bsp/rx/boards/gr_citrus/board.mk index 4f2770725..7bef40614 100644 --- a/hw/bsp/rx/boards/gr_citrus/board.mk +++ b/hw/bsp/rx/boards/gr_citrus/board.mk @@ -1,5 +1,3 @@ -DEPS_SUBMODULES += hw/mcu/renesas/rx - CFLAGS += \ -mcpu=rx610 \ -misa=v1 \ diff --git a/hw/bsp/stm32h7/boards/daisyseed/board.h b/hw/bsp/stm32h7/boards/daisyseed/board.h index 579c09727..0ad809720 100644 --- a/hw/bsp/stm32h7/boards/daisyseed/board.h +++ b/hw/bsp/stm32h7/boards/daisyseed/board.h @@ -57,9 +57,9 @@ //--------------------------------------------------------------------+ static inline void board_stm32h7_clock_init(void) { - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; + RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 }; /*!< Supply configuration update enable */ /* For STM32H750XB, use "HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);" */ diff --git a/hw/bsp/stm32h7/boards/stm32h723nucleo/board.h b/hw/bsp/stm32h7/boards/stm32h723nucleo/board.h index 56a48ec24..0eb5e76ad 100644 --- a/hw/bsp/stm32h7/boards/stm32h723nucleo/board.h +++ b/hw/bsp/stm32h7/boards/stm32h723nucleo/board.h @@ -64,8 +64,8 @@ //--------------------------------------------------------------------+ static inline void board_stm32h7_clock_init(void) { - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; + RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; /* The PWR block is always enabled on the H7 series- there is no clock enable. For now, use the default VOS3 scale mode (lowest) and limit clock @@ -111,7 +111,7 @@ static inline void board_stm32h7_clock_init(void) separate. However, the main system PLL (PLL1) doesn't have a direct connection to the USB peripheral clock to generate 48 MHz, so we do this dance. This will connect PLL1's Q output to the USB peripheral clock. */ - RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct; + RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct = { 0 }; RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB; RCC_PeriphCLKInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_PLL; diff --git a/hw/bsp/stm32h7/boards/stm32h743eval/board.h b/hw/bsp/stm32h7/boards/stm32h743eval/board.h index af2063ce0..666bec9a1 100644 --- a/hw/bsp/stm32h7/boards/stm32h743eval/board.h +++ b/hw/bsp/stm32h7/boards/stm32h743eval/board.h @@ -63,9 +63,9 @@ //--------------------------------------------------------------------+ static inline void board_stm32h7_clock_init(void) { - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; + RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 }; /*!< Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); diff --git a/hw/bsp/stm32h7/boards/stm32h743nucleo/board.h b/hw/bsp/stm32h7/boards/stm32h743nucleo/board.h index 06148c875..8c6a7ce5a 100644 --- a/hw/bsp/stm32h7/boards/stm32h743nucleo/board.h +++ b/hw/bsp/stm32h7/boards/stm32h743nucleo/board.h @@ -55,8 +55,8 @@ //--------------------------------------------------------------------+ static inline void board_stm32h7_clock_init(void) { - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; + RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; /* The PWR block is always enabled on the H7 series- there is no clock enable. For now, use the default VOS3 scale mode (lowest) and limit clock @@ -102,7 +102,7 @@ static inline void board_stm32h7_clock_init(void) separate. However, the main system PLL (PLL1) doesn't have a direct connection to the USB peripheral clock to generate 48 MHz, so we do this dance. This will connect PLL1's Q output to the USB peripheral clock. */ - RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct; + RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct = { 0 }; RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB; RCC_PeriphCLKInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_PLL; diff --git a/hw/bsp/stm32h7/boards/stm32h745disco/board.h b/hw/bsp/stm32h7/boards/stm32h745disco/board.h index d33e0c8eb..d7d3e8723 100644 --- a/hw/bsp/stm32h7/boards/stm32h745disco/board.h +++ b/hw/bsp/stm32h7/boards/stm32h745disco/board.h @@ -57,9 +57,9 @@ //--------------------------------------------------------------------+ static inline void board_stm32h7_clock_init(void) { - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct = { 0 }; + RCC_OscInitTypeDef RCC_OscInitStruct = { 0 }; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 }; /*!< Supply configuration update enable */ /* For STM32H750XB, use "HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);" */ diff --git a/hw/mcu/allwinner b/hw/mcu/allwinner deleted file mode 160000 index 8e5e89e8e..000000000 --- a/hw/mcu/allwinner +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8e5e89e8e132c0fd90e72d5422e5d3d68232b756 diff --git a/hw/mcu/bridgetek/ft9xx/ft90x-sdk b/hw/mcu/bridgetek/ft9xx/ft90x-sdk deleted file mode 160000 index 91060164a..000000000 --- a/hw/mcu/bridgetek/ft9xx/ft90x-sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 91060164afe239fcb394122e8bf9eb24d3194eb1 diff --git a/hw/mcu/broadcom b/hw/mcu/broadcom deleted file mode 160000 index 083700860..000000000 --- a/hw/mcu/broadcom +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 08370086080759ed54ac1136d62d2ad24c6fa267 diff --git a/hw/mcu/gd/nuclei-sdk b/hw/mcu/gd/nuclei-sdk deleted file mode 160000 index 7eb7bfa9e..000000000 --- a/hw/mcu/gd/nuclei-sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7eb7bfa9ea4fbeacfafe1d5f77d5a0e6ed3922e7 diff --git a/hw/mcu/infineon/mtb-xmclib-cat3 b/hw/mcu/infineon/mtb-xmclib-cat3 deleted file mode 160000 index daf5500d0..000000000 --- a/hw/mcu/infineon/mtb-xmclib-cat3 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit daf5500d03cba23e68c2f241c30af79cd9d63880 diff --git a/hw/mcu/microchip b/hw/mcu/microchip deleted file mode 160000 index 9e8b37e30..000000000 --- a/hw/mcu/microchip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9e8b37e307d8404033bb881623a113931e1edf27 diff --git a/hw/mcu/mindmotion/mm32sdk b/hw/mcu/mindmotion/mm32sdk deleted file mode 160000 index 708a71529..000000000 --- a/hw/mcu/mindmotion/mm32sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 708a7152952ac595d24837069dcc0f7f59a4c30b diff --git a/hw/mcu/nordic/nrfx b/hw/mcu/nordic/nrfx deleted file mode 160000 index 281cc2e17..000000000 --- a/hw/mcu/nordic/nrfx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 281cc2e178fd9a470d844b3afdea9eb322a0b0e8 diff --git a/hw/mcu/nuvoton b/hw/mcu/nuvoton deleted file mode 160000 index 2204191ec..000000000 --- a/hw/mcu/nuvoton +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2204191ec76283371419fbcec207da02e1bc22fa diff --git a/hw/mcu/nxp/lpcopen b/hw/mcu/nxp/lpcopen deleted file mode 160000 index 43c45c854..000000000 --- a/hw/mcu/nxp/lpcopen +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 43c45c85405a5dd114fff0ea95cca62837740c13 diff --git a/hw/mcu/nxp/mcux-sdk b/hw/mcu/nxp/mcux-sdk deleted file mode 160000 index ae2ab01d9..000000000 --- a/hw/mcu/nxp/mcux-sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae2ab01d9d70ad00cd0e935c2552bd5f0e5c0294 diff --git a/hw/mcu/nxp/nxp_sdk b/hw/mcu/nxp/nxp_sdk deleted file mode 160000 index 845c8fc49..000000000 --- a/hw/mcu/nxp/nxp_sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 845c8fc49b6fb660f06a5c45225494eacb06f00c diff --git a/hw/mcu/raspberry_pi/Pico-PIO-USB b/hw/mcu/raspberry_pi/Pico-PIO-USB deleted file mode 160000 index 9ff3f52fd..000000000 --- a/hw/mcu/raspberry_pi/Pico-PIO-USB +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9ff3f52fd3c1f81532bce8dd311aa8fc8d9b2665 diff --git a/hw/mcu/renesas/rx b/hw/mcu/renesas/rx deleted file mode 160000 index 706b4e0cf..000000000 --- a/hw/mcu/renesas/rx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 706b4e0cf485605c32351e2f90f5698267996023 diff --git a/hw/mcu/silabs/cmsis-dfp-efm32gg12b b/hw/mcu/silabs/cmsis-dfp-efm32gg12b deleted file mode 160000 index f1c31b788..000000000 --- a/hw/mcu/silabs/cmsis-dfp-efm32gg12b +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f1c31b7887669cb230b3ea63f9b56769078960bc diff --git a/hw/mcu/sony/cxd56/spresense-exported-sdk b/hw/mcu/sony/cxd56/spresense-exported-sdk deleted file mode 160000 index 2ec2a1538..000000000 --- a/hw/mcu/sony/cxd56/spresense-exported-sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ec2a1538362696118dc3fdf56f33dacaf8f4067 diff --git a/hw/mcu/st/cmsis_device_f0 b/hw/mcu/st/cmsis_device_f0 deleted file mode 160000 index 2fc25ee22..000000000 --- a/hw/mcu/st/cmsis_device_f0 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2fc25ee22264bc27034358be0bd400b893ef837e diff --git a/hw/mcu/st/cmsis_device_f1 b/hw/mcu/st/cmsis_device_f1 deleted file mode 160000 index 6601104a6..000000000 --- a/hw/mcu/st/cmsis_device_f1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6601104a6397299b7304fd5bcd9a491f56cb23a6 diff --git a/hw/mcu/st/cmsis_device_f2 b/hw/mcu/st/cmsis_device_f2 deleted file mode 160000 index 182fcb368..000000000 --- a/hw/mcu/st/cmsis_device_f2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 182fcb3681ce116816feb41b7764f1b019ce796f diff --git a/hw/mcu/st/cmsis_device_f3 b/hw/mcu/st/cmsis_device_f3 deleted file mode 160000 index 5e4ee5ed7..000000000 --- a/hw/mcu/st/cmsis_device_f3 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b diff --git a/hw/mcu/st/cmsis_device_f4 b/hw/mcu/st/cmsis_device_f4 deleted file mode 160000 index 2615e866f..000000000 --- a/hw/mcu/st/cmsis_device_f4 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2615e866fa48fe1ff1af9e31c348813f2b19e7ec diff --git a/hw/mcu/st/cmsis_device_f7 b/hw/mcu/st/cmsis_device_f7 deleted file mode 160000 index fc676ef1a..000000000 --- a/hw/mcu/st/cmsis_device_f7 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fc676ef1ad177eb874eaa06444d3d75395fc51f4 diff --git a/hw/mcu/st/cmsis_device_g0 b/hw/mcu/st/cmsis_device_g0 deleted file mode 160000 index 08258b28e..000000000 --- a/hw/mcu/st/cmsis_device_g0 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 08258b28ee95f50cb9624d152a1cbf084be1f9a5 diff --git a/hw/mcu/st/cmsis_device_g4 b/hw/mcu/st/cmsis_device_g4 deleted file mode 160000 index ce822adb1..000000000 --- a/hw/mcu/st/cmsis_device_g4 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ce822adb1dc552b3aedd13621edbc7fdae124878 diff --git a/hw/mcu/st/cmsis_device_h7 b/hw/mcu/st/cmsis_device_h7 deleted file mode 160000 index 60dc2c913..000000000 --- a/hw/mcu/st/cmsis_device_h7 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 60dc2c913203dc8629dc233d4384dcc41c91e77f diff --git a/hw/mcu/st/cmsis_device_l0 b/hw/mcu/st/cmsis_device_l0 deleted file mode 160000 index 06748ca1f..000000000 --- a/hw/mcu/st/cmsis_device_l0 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 06748ca1f93827befdb8b794402320d94d02004f diff --git a/hw/mcu/st/cmsis_device_l1 b/hw/mcu/st/cmsis_device_l1 deleted file mode 160000 index 7f16ec0a1..000000000 --- a/hw/mcu/st/cmsis_device_l1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7f16ec0a1c4c063f84160b4cc6bf88ad554a823e diff --git a/hw/mcu/st/cmsis_device_l4 b/hw/mcu/st/cmsis_device_l4 deleted file mode 160000 index 6ca7312fa..000000000 --- a/hw/mcu/st/cmsis_device_l4 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6ca7312fa6a5a460b5a5a63d66da527fdd8359a6 diff --git a/hw/mcu/st/cmsis_device_l5 b/hw/mcu/st/cmsis_device_l5 deleted file mode 160000 index d922865fc..000000000 --- a/hw/mcu/st/cmsis_device_l5 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d922865fc0326a102c26211c44b8e42f52c1e53d diff --git a/hw/mcu/st/cmsis_device_u5 b/hw/mcu/st/cmsis_device_u5 deleted file mode 160000 index bc00f3c9d..000000000 --- a/hw/mcu/st/cmsis_device_u5 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc00f3c9d8a4e25220f84c26d414902cc6bdf566 diff --git a/hw/mcu/st/cmsis_device_wb b/hw/mcu/st/cmsis_device_wb deleted file mode 160000 index 9c5d1920d..000000000 --- a/hw/mcu/st/cmsis_device_wb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9c5d1920dd9fabbe2548e10561d63db829bb744f diff --git a/hw/mcu/st/stm32f0xx_hal_driver b/hw/mcu/st/stm32f0xx_hal_driver deleted file mode 160000 index 0e95cd886..000000000 --- a/hw/mcu/st/stm32f0xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0e95cd88657030f640a11e690a8a5186c7712ea5 diff --git a/hw/mcu/st/stm32f1xx_hal_driver b/hw/mcu/st/stm32f1xx_hal_driver deleted file mode 160000 index 1dd9d3662..000000000 --- a/hw/mcu/st/stm32f1xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29 diff --git a/hw/mcu/st/stm32f2xx_hal_driver b/hw/mcu/st/stm32f2xx_hal_driver deleted file mode 160000 index c75ace9b9..000000000 --- a/hw/mcu/st/stm32f2xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c75ace9b908a9aca631193ebf2466963b8ea33d0 diff --git a/hw/mcu/st/stm32f3xx_hal_driver b/hw/mcu/st/stm32f3xx_hal_driver deleted file mode 160000 index 1761b6207..000000000 --- a/hw/mcu/st/stm32f3xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1761b6207318ede021706e75aae78f452d72b6fa diff --git a/hw/mcu/st/stm32f4xx_hal_driver b/hw/mcu/st/stm32f4xx_hal_driver deleted file mode 160000 index 04e99fbda..000000000 --- a/hw/mcu/st/stm32f4xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 04e99fbdabd00ab8f370f377c66b0a4570365b58 diff --git a/hw/mcu/st/stm32f7xx_hal_driver b/hw/mcu/st/stm32f7xx_hal_driver deleted file mode 160000 index f7ffdf6bf..000000000 --- a/hw/mcu/st/stm32f7xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f7ffdf6bf72110e58b42c632b0a051df5997e4ee diff --git a/hw/mcu/st/stm32g0xx_hal_driver b/hw/mcu/st/stm32g0xx_hal_driver deleted file mode 160000 index 5b53e6cee..000000000 --- a/hw/mcu/st/stm32g0xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5b53e6cee664a82b16c86491aa0060e2110c00cb diff --git a/hw/mcu/st/stm32g4xx_hal_driver b/hw/mcu/st/stm32g4xx_hal_driver deleted file mode 160000 index 8b4518417..000000000 --- a/hw/mcu/st/stm32g4xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8b4518417706d42eef5c14e56a650005abf478a8 diff --git a/hw/mcu/st/stm32h7xx_hal_driver b/hw/mcu/st/stm32h7xx_hal_driver deleted file mode 160000 index d8461b980..000000000 --- a/hw/mcu/st/stm32h7xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d8461b980b59b1625207d8c4f2ce0a9c2a7a3b04 diff --git a/hw/mcu/st/stm32l0xx_hal_driver b/hw/mcu/st/stm32l0xx_hal_driver deleted file mode 160000 index fbdacaf6f..000000000 --- a/hw/mcu/st/stm32l0xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b diff --git a/hw/mcu/st/stm32l1xx_hal_driver b/hw/mcu/st/stm32l1xx_hal_driver deleted file mode 160000 index 44efc446f..000000000 --- a/hw/mcu/st/stm32l1xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 44efc446fa69ed8344e7fd966e68ed11043b35d9 diff --git a/hw/mcu/st/stm32l4xx_hal_driver b/hw/mcu/st/stm32l4xx_hal_driver deleted file mode 160000 index aee3d5bf2..000000000 --- a/hw/mcu/st/stm32l4xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aee3d5bf283ae5df87532b781bdd01b7caf256fc diff --git a/hw/mcu/st/stm32l5xx_hal_driver b/hw/mcu/st/stm32l5xx_hal_driver deleted file mode 160000 index 675c32a75..000000000 --- a/hw/mcu/st/stm32l5xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 675c32a75df37f39d50d61f51cb0dcf53f07e1cb diff --git a/hw/mcu/st/stm32u5xx_hal_driver b/hw/mcu/st/stm32u5xx_hal_driver deleted file mode 160000 index 2e1d4cdb3..000000000 --- a/hw/mcu/st/stm32u5xx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2e1d4cdb386e33391cb261dfff4fefa92e4aa35a diff --git a/hw/mcu/st/stm32wbxx_hal_driver b/hw/mcu/st/stm32wbxx_hal_driver deleted file mode 160000 index 2c5f06638..000000000 --- a/hw/mcu/st/stm32wbxx_hal_driver +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2c5f06638be516c1b772f768456ba637f077bac8 diff --git a/hw/mcu/ti b/hw/mcu/ti deleted file mode 160000 index 143ed6cc2..000000000 --- a/hw/mcu/ti +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 143ed6cc20a7615d042b03b21e070197d473e6e5 diff --git a/hw/mcu/wch/ch32v307 b/hw/mcu/wch/ch32v307 deleted file mode 160000 index 17761f5cf..000000000 --- a/hw/mcu/wch/ch32v307 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 17761f5cf9dbbf2dcf665b7c04934188add20082 diff --git a/lib/CMSIS_5 b/lib/CMSIS_5 deleted file mode 160000 index 202852626..000000000 --- a/lib/CMSIS_5 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 20285262657d1b482d132d20d755c8c330d55c1f diff --git a/lib/sct_neopixel b/lib/sct_neopixel deleted file mode 160000 index e73e04ca6..000000000 --- a/lib/sct_neopixel +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e73e04ca63495672d955f9268e003cffe168fcd8 diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index afc14b010..4aeb85fc0 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -187,11 +187,16 @@ static void xact_out_dma(uint8_t epnum) } else { - // Trigger DMA move data from Endpoint -> SRAM - NRF_USBD->ISOOUT.PTR = (uint32_t) xfer->buffer; - NRF_USBD->ISOOUT.MAXCNT = xact_len; + if (xfer->started) + { + // Trigger DMA move data from Endpoint -> SRAM + NRF_USBD->ISOOUT.PTR = (uint32_t) xfer->buffer; + NRF_USBD->ISOOUT.MAXCNT = xact_len; - start_dma(&NRF_USBD->TASKS_STARTISOOUT); + start_dma(&NRF_USBD->TASKS_STARTISOOUT); + } else { + atomic_flag_clear(&_dcd.dma_running); + } } } else diff --git a/tools/get_dependencies.py b/tools/get_dependencies.py deleted file mode 100644 index e7d3e0a76..000000000 --- a/tools/get_dependencies.py +++ /dev/null @@ -1,25 +0,0 @@ -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 diff --git a/tools/get_deps.py b/tools/get_deps.py new file mode 100644 index 000000000..6e7093816 --- /dev/null +++ b/tools/get_deps.py @@ -0,0 +1,101 @@ +import sys +import subprocess +from pathlib import Path +from multiprocessing import Pool + +# path, url, commit (Alphabet sorted by path) +deps_list = { + 'hw/mcu/allwinner' : [ 'https://github.com/hathach/allwinner_driver.git', '8e5e89e8e132c0fd90e72d5422e5d3d68232b756'], + 'hw/mcu/bridgetek/ft9xx/ft90x-sdk' : [ 'https://github.com/BRTSG-FOSS/ft90x-sdk.git', '91060164afe239fcb394122e8bf9eb24d3194eb1'], + 'hw/mcu/broadcom' : [ 'https://github.com/adafruit/broadcom-peripherals.git', '08370086080759ed54ac1136d62d2ad24c6fa267'], + 'hw/mcu/gd/nuclei-sdk' : [ 'https://github.com/Nuclei-Software/nuclei-sdk.git', '7eb7bfa9ea4fbeacfafe1d5f77d5a0e6ed3922e7'], + 'hw/mcu/infineon/mtb-xmclib-cat3' : [ 'https://github.com/Infineon/mtb-xmclib-cat3.git', 'daf5500d03cba23e68c2f241c30af79cd9d63880'], + 'hw/mcu/microchip' : [ 'https://github.com/hathach/microchip_driver.git', '9e8b37e307d8404033bb881623a113931e1edf27'], + 'hw/mcu/mindmotion/mm32sdk' : [ 'https://github.com/hathach/mm32sdk.git', '708a7152952ac595d24837069dcc0f7f59a4c30b'], + 'hw/mcu/nordic/nrfx' : [ 'https://github.com/NordicSemiconductor/nrfx.git', '281cc2e178fd9a470d844b3afdea9eb322a0b0e8'], + 'hw/mcu/nuvoton' : [ 'https://github.com/majbthrd/nuc_driver.git', '2204191ec76283371419fbcec207da02e1bc22fa'], + 'hw/mcu/nxp/lpcopen' : [ 'https://github.com/hathach/nxp_lpcopen.git', '43c45c85405a5dd114fff0ea95cca62837740c13'], + 'hw/mcu/nxp/mcux-sdk' : [ 'https://github.com/NXPmicro/mcux-sdk.git', 'ae2ab01d9d70ad00cd0e935c2552bd5f0e5c0294'], + 'hw/mcu/nxp/nxp_sdk' : [ 'https://github.com/hathach/nxp_sdk.git', '845c8fc49b6fb660f06a5c45225494eacb06f00c'], + 'hw/mcu/raspberry_pi/Pico-PIO-USB' : [ 'https://github.com/sekigon-gonnoc/Pico-PIO-USB.git', '9ff3f52fd3c1f81532bce8dd311aa8fc8d9b2665'], + 'hw/mcu/renesas/rx' : [ 'https://github.com/kkitayam/rx_device.git', '706b4e0cf485605c32351e2f90f5698267996023'], + 'hw/mcu/silabs/cmsis-dfp-efm32gg12b' : [ 'https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b.git', 'f1c31b7887669cb230b3ea63f9b56769078960bc'], + 'hw/mcu/sony/cxd56/spresense-exported-sdk' : [ 'https://github.com/sonydevworld/spresense-exported-sdk.git', '2ec2a1538362696118dc3fdf56f33dacaf8f4067'], + 'hw/mcu/st/cmsis_device_f0' : [ 'https://github.com/STMicroelectronics/cmsis_device_f0.git', '2fc25ee22264bc27034358be0bd400b893ef837e'], + 'hw/mcu/st/cmsis_device_f1' : [ 'https://github.com/STMicroelectronics/cmsis_device_f1.git', '6601104a6397299b7304fd5bcd9a491f56cb23a6'], + 'hw/mcu/st/cmsis_device_f2' : [ 'https://github.com/STMicroelectronics/cmsis_device_f2.git', '182fcb3681ce116816feb41b7764f1b019ce796f'], + 'hw/mcu/st/cmsis_device_f3' : [ 'https://github.com/STMicroelectronics/cmsis_device_f3.git', '5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b'], + 'hw/mcu/st/cmsis_device_f4' : [ 'https://github.com/STMicroelectronics/cmsis_device_f4.git', '2615e866fa48fe1ff1af9e31c348813f2b19e7ec'], + 'hw/mcu/st/cmsis_device_f7' : [ 'https://github.com/STMicroelectronics/cmsis_device_f7.git', 'fc676ef1ad177eb874eaa06444d3d75395fc51f4'], + 'hw/mcu/st/cmsis_device_g0' : [ 'https://github.com/STMicroelectronics/cmsis_device_g0.git', '08258b28ee95f50cb9624d152a1cbf084be1f9a5'], + 'hw/mcu/st/cmsis_device_g4' : [ 'https://github.com/STMicroelectronics/cmsis_device_g4.git', 'ce822adb1dc552b3aedd13621edbc7fdae124878'], + 'hw/mcu/st/cmsis_device_h7' : [ 'https://github.com/STMicroelectronics/cmsis_device_h7.git', '60dc2c913203dc8629dc233d4384dcc41c91e77f'], + 'hw/mcu/st/cmsis_device_l0' : [ 'https://github.com/STMicroelectronics/cmsis_device_l0.git', '06748ca1f93827befdb8b794402320d94d02004f'], + 'hw/mcu/st/cmsis_device_l1' : [ 'https://github.com/STMicroelectronics/cmsis_device_l1.git', '7f16ec0a1c4c063f84160b4cc6bf88ad554a823e'], + 'hw/mcu/st/cmsis_device_l4' : [ 'https://github.com/STMicroelectronics/cmsis_device_l4.git', '6ca7312fa6a5a460b5a5a63d66da527fdd8359a6'], + 'hw/mcu/st/cmsis_device_l5' : [ 'https://github.com/STMicroelectronics/cmsis_device_l5.git', 'd922865fc0326a102c26211c44b8e42f52c1e53d'], + 'hw/mcu/st/cmsis_device_u5' : [ 'https://github.com/STMicroelectronics/cmsis_device_u5.git', 'bc00f3c9d8a4e25220f84c26d414902cc6bdf566'], + 'hw/mcu/st/cmsis_device_wb' : [ 'https://github.com/STMicroelectronics/cmsis_device_wb.git', '9c5d1920dd9fabbe2548e10561d63db829bb744f'], + 'hw/mcu/st/stm32f0xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git', '0e95cd88657030f640a11e690a8a5186c7712ea5'], + 'hw/mcu/st/stm32f1xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git', '1dd9d3662fb7eb2a7f7d3bc0a4c1dc7537915a29'], + 'hw/mcu/st/stm32f2xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git', 'c75ace9b908a9aca631193ebf2466963b8ea33d0'], + 'hw/mcu/st/stm32f3xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git', '1761b6207318ede021706e75aae78f452d72b6fa'], + 'hw/mcu/st/stm32f4xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git', '04e99fbdabd00ab8f370f377c66b0a4570365b58'], + 'hw/mcu/st/stm32f7xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git', 'f7ffdf6bf72110e58b42c632b0a051df5997e4ee'], + 'hw/mcu/st/stm32g0xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git', '5b53e6cee664a82b16c86491aa0060e2110c00cb'], + 'hw/mcu/st/stm32g4xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git', '8b4518417706d42eef5c14e56a650005abf478a8'], + 'hw/mcu/st/stm32h7xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git', 'd8461b980b59b1625207d8c4f2ce0a9c2a7a3b04'], + 'hw/mcu/st/stm32l0xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git', 'fbdacaf6f8c82a4e1eb9bd74ba650b491e97e17b'], + 'hw/mcu/st/stm32l1xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git', '44efc446fa69ed8344e7fd966e68ed11043b35d9'], + 'hw/mcu/st/stm32l4xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git', 'aee3d5bf283ae5df87532b781bdd01b7caf256fc'], + 'hw/mcu/st/stm32l5xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git', '675c32a75df37f39d50d61f51cb0dcf53f07e1cb'], + 'hw/mcu/st/stm32u5xx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git', '2e1d4cdb386e33391cb261dfff4fefa92e4aa35a'], + 'hw/mcu/st/stm32wbxx_hal_driver' : [ 'https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git', '2c5f06638be516c1b772f768456ba637f077bac8'], + 'hw/mcu/ti' : [ 'https://github.com/hathach/ti_driver.git', '143ed6cc20a7615d042b03b21e070197d473e6e5'], + 'hw/mcu/wch/ch32v307' : [ 'https://github.com/openwch/ch32v307.git', '17761f5cf9dbbf2dcf665b7c04934188add20082'], + 'lib/CMSIS_5' : [ 'https://github.com/ARM-software/CMSIS_5.git', '20285262657d1b482d132d20d755c8c330d55c1f'], + #'lib/FreeRTOS-Kernel' : [ 'https://github.com/FreeRTOS/FreeRTOS-Kernel.git', '2a604f4a2818b8354b5e1a39e388eb5e16cfbc1f'], + #'lib/lwip' : [ 'https://github.com/lwip-tcpip/lwip.git', '159e31b689577dbf69cf0683bbaffbd71fa5ee10'], + 'lib/sct_neopixel' : [ 'https://github.com/gsteiert/sct_neopixel.git', 'e73e04ca63495672d955f9268e003cffe168fcd8'], + #'tools/uf2' : [ 'https://github.com/microsoft/uf2.git', '19615407727073e36d81bf239c52108ba92e7660'], +} + +# TOP is tinyusb root dir +TOP = Path(__file__).parent.parent.resolve() + + +def get_a_dep(d): + if d not in deps_list.keys(): + print('{} is not found in dependency list') + return 1 + url = deps_list[d][0] + commit = deps_list[d][1] + print('cloning {} with {}'.format(d, url)) + + p = Path(TOP / d) + git_cmd = "git -C {}".format(p) + + # Init git deps if not existed + if not p.exists(): + p.mkdir(parents=True) + subprocess.run("{} init".format(git_cmd), shell=True) + subprocess.run("{} remote add origin {}".format(git_cmd, url), shell=True) + + # Check if commit is already fetched + result = subprocess.run("{} rev-parse HEAD".format(git_cmd, commit), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + head = result.stdout.decode("utf-8").splitlines()[0] + + if commit != head: + subprocess.run("{} fetch --depth 1 origin {}".format(git_cmd, commit), shell=True) + subprocess.run("{} checkout FETCH_HEAD".format(git_cmd), shell=True) + + return 0 + + +if __name__ == "__main__": + status = 0 + all_deps = sys.argv[1:] + with Pool() as pool: + result = pool.map(get_a_dep, all_deps) + status = sum(result) + sys.exit(status) diff --git a/tools/get_family_deps.py b/tools/get_family_deps.py new file mode 100644 index 000000000..071d7b756 --- /dev/null +++ b/tools/get_family_deps.py @@ -0,0 +1,21 @@ +import sys +import subprocess +import os + +# TOP is tinyusb root dir +TOP = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +def get_family_dep(family): + for entry in os.scandir("{}/hw/bsp/{}/boards".format(TOP, family)): + if entry.is_dir(): + result = subprocess.run("make -C {}/examples/device/board_test BOARD={} get-deps".format(TOP, entry.name), + shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + print(result.stdout.decode("utf-8")) + return result.returncode + + +status = 0 +for d in sys.argv[1:]: + status += get_family_dep(d) + +sys.exit(status)