mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-25 03:02:26 +00:00
allow imxrt build with dual exmaples
This commit is contained in:
parent
bc579c045e
commit
c0e4c02b9d
@ -8,7 +8,8 @@ foreach(LANG IN ITEMS C CXX ASM)
|
|||||||
#cmake_print_variables(CMAKE_${LANG}_FLAGS_INIT)
|
#cmake_print_variables(CMAKE_${LANG}_FLAGS_INIT)
|
||||||
|
|
||||||
# optimization flags
|
# optimization flags
|
||||||
set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-Og")
|
set(CMAKE_${LANG}_FLAGS_RELEASE_INIT "-Os")
|
||||||
|
set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-O0")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Linker
|
# Linker
|
||||||
|
@ -4,9 +4,10 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/family_support.cmake)
|
|||||||
|
|
||||||
project(tinyusb_dual_examples C CXX ASM)
|
project(tinyusb_dual_examples C CXX ASM)
|
||||||
family_initialize_project(tinyusb_dual_examples ${CMAKE_CURRENT_LIST_DIR})
|
family_initialize_project(tinyusb_dual_examples ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|
||||||
if (FAMILY STREQUAL "rp2040" AND NOT TARGET tinyusb_pico_pio_usb)
|
if (FAMILY STREQUAL "rp2040" AND NOT TARGET tinyusb_pico_pio_usb)
|
||||||
message("Skipping dual host/device mode examples as Pico-PIO-USB is not available")
|
message("Skipping dual host/device mode examples as Pico-PIO-USB is not available")
|
||||||
else()
|
else ()
|
||||||
# family_add_subdirectory will filter what to actually add based on selected FAMILY
|
# family_add_subdirectory will filter what to actually add based on selected FAMILY
|
||||||
family_add_subdirectory(host_hid_to_device_cdc)
|
family_add_subdirectory(host_hid_to_device_cdc)
|
||||||
endif()
|
endif ()
|
||||||
|
@ -27,8 +27,8 @@ if (NOT TARGET _family_support_marker)
|
|||||||
foreach(MCU IN LISTS FAMILY_MCUS)
|
foreach(MCU IN LISTS FAMILY_MCUS)
|
||||||
# For each line in only.txt
|
# For each line in only.txt
|
||||||
foreach(_line ${ONLYS_LINES})
|
foreach(_line ${ONLYS_LINES})
|
||||||
# If mcu:xxx exists for this mcu then include
|
# If mcu:xxx exists for this mcu or board:xxx then include
|
||||||
if (${_line} STREQUAL "mcu:${MCU}")
|
if (${_line} STREQUAL "mcu:${MCU}" OR ${_line} STREQUAL "board:${BOARD}")
|
||||||
set(${RESULT} 1 PARENT_SCOPE)
|
set(${RESULT} 1 PARENT_SCOPE)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
@ -173,3 +173,7 @@ endfunction()
|
|||||||
function(family_configure_host_example TARGET)
|
function(family_configure_host_example TARGET)
|
||||||
family_configure_target(${TARGET})
|
family_configure_target(${TARGET})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(family_configure_dual_usb_example TARGET)
|
||||||
|
family_configure_target(${TARGET})
|
||||||
|
endfunction()
|
||||||
|
@ -76,6 +76,8 @@ bool hcd_init(uint8_t rhport)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// FIXME force full speed, still have issue with Highspeed enumeration
|
// FIXME force full speed, still have issue with Highspeed enumeration
|
||||||
|
// 1. Have issue when plug/unplug devices, maybe the port is not reset properly
|
||||||
|
// 2. Also does not seems to detect disconnection
|
||||||
hcd_reg->PORTSC1 |= PORTSC1_FORCE_FULL_SPEED;
|
hcd_reg->PORTSC1 |= PORTSC1_FORCE_FULL_SPEED;
|
||||||
|
|
||||||
return ehci_init(rhport, (uint32_t) &hcd_reg->CAPLENGTH, (uint32_t) &hcd_reg->USBCMD);
|
return ehci_init(rhport, (uint32_t) &hcd_reg->CAPLENGTH, (uint32_t) &hcd_reg->USBCMD);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user