Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode
build
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "lib/pico-sdk"]
path = lib/pico-sdk
url = https://github.com/raspberrypi/pico-sdk
[submodule "lib/Pico-PIO-USB"]
path = lib/Pico-PIO-USB
url = https://github.com/sekigon-gonnoc/Pico-PIO-USB
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ set(VERSION_MINOR 170)
## Release Type Selection
option(DH_DEBUG "Build a debug version" OFF)

## Hardware Configuration
## Hardware Configuration for PICO
set(DP_PIN_DEFAULT 14 CACHE STRING "Default USB D+ Pin Number")
set(PIO_USE_TINYUSB 1 CACHE STRING "Make TinyUSB Manage the PIO USB Port")
set(PICO_BOARD "pico")
set(PICO_BOARD pico CACHE STRING "Board type")

## Hardware Configuration for Feather RP2040 USB Host
#set(DP_PIN_DEFAULT 16 CACHE STRING "Default USB D+ Pin Number")
#set(PICO_BOARD adafruit_feather_rp2040_usb_host CACHE STRING "Board type")

## Pico SDK Configuration
set(PICO_SDK_FETCH_FROM_GIT off)
set(PICO_SDK_PATH ${CMAKE_CURRENT_LIST_DIR}/pico-sdk)
set(PICO_SDK_PATH ${CMAKE_CURRENT_LIST_DIR}/lib/pico-sdk)
set(SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/src)
include(${PICO_SDK_PATH}/pico_sdk_import.cmake)

Expand All @@ -31,7 +34,7 @@ set(CMAKE_C_FLAGS "-Ofast -Wall -mcpu=cortex-m0plus -mtune=cortex-m0plus -fstack
pico_sdk_init()

## PIO USB Library Setup
set(PICO_PIO_USB_DIR ${CMAKE_CURRENT_LIST_DIR}/Pico-PIO-USB)
set(PICO_PIO_USB_DIR ${CMAKE_CURRENT_LIST_DIR}/lib/Pico-PIO-USB)

add_library(Pico-PIO-USB STATIC
${PICO_PIO_USB_DIR}/src/pio_usb.c
Expand Down Expand Up @@ -86,6 +89,7 @@ set(COMMON_LINK_LIBRARIES
hardware_gpio
hardware_pio
hardware_dma
hardware_clocks

tinyusb_device
tinyusb_host
Expand Down Expand Up @@ -143,5 +147,4 @@ add_custom_command(
target_link_options(${binary} PRIVATE
-Xlinker
--print-memory-usage
)

)
26 changes: 0 additions & 26 deletions Pico-PIO-USB/CMakeLists.txt

This file was deleted.

Loading