summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-05-16 13:44:06 +0700
committerhathach <[email protected]>2022-05-16 13:44:06 +0700
commit4586d8f119f779d1ef5f937e5c79e0ea2c84579c (patch)
tree04b2cf10840b3e5ba520e61a90feea633c0023bf
parentbe2a51316cd708a99899732acf43920537b97526 (diff)
add upstream Pico-PIO-USB
-rw-r--r--.github/workflows/build_arm.yml2
-rw-r--r--.gitmodules3
-rw-r--r--hw/bsp/rp2040/family.cmake18
m---------hw/mcu/raspberry_pi/Pico-PIO-USB0
4 files changed, 15 insertions, 8 deletions
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
+Subproject 2a9fefd6ccf42e5d8570ae83fdc54c9c875ebdd