File tree Expand file tree Collapse file tree 6 files changed +30
-22
lines changed
src/portable/chipidea/ci_hs Expand file tree Collapse file tree 6 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ foreach(LANG IN ITEMS C CXX ASM)
8
8
#cmake_print_variables(CMAKE_${LANG}_FLAGS_INIT)
9
9
10
10
# optimization flags
11
- set (CMAKE_${LANG}_FLAGS_DEBUG_INIT "-Og" )
11
+ set (CMAKE_${LANG}_FLAGS_RELEASE_INIT "-Os" )
12
+ set (CMAKE_${LANG}_FLAGS_DEBUG_INIT "-O0" )
12
13
endforeach ()
13
14
14
15
# Linker
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/family_support.cmake)
4
4
5
5
project (tinyusb_dual_examples C CXX ASM )
6
6
family_initialize_project (tinyusb_dual_examples ${CMAKE_CURRENT_LIST_DIR} )
7
+
7
8
if (FAMILY STREQUAL "rp2040" AND NOT TARGET tinyusb_pico_pio_usb )
8
- message ("Skipping dual host/device mode examples as Pico-PIO-USB is not available" )
9
- else ()
10
- # family_add_subdirectory will filter what to actually add based on selected FAMILY
11
- family_add_subdirectory (host_hid_to_device_cdc )
12
- endif ()
9
+ message ("Skipping dual host/device mode examples as Pico-PIO-USB is not available" )
10
+ else ()
11
+ # family_add_subdirectory will filter what to actually add based on selected FAMILY
12
+ family_add_subdirectory (host_hid_to_device_cdc )
13
+ endif ()
Original file line number Diff line number Diff line change @@ -14,27 +14,27 @@ add_executable(${PROJECT})
14
14
15
15
# Example source
16
16
target_sources (${PROJECT} PUBLIC
17
- ${CMAKE_CURRENT_SOURCE_DIR} /src/main.c
18
- ${CMAKE_CURRENT_SOURCE_DIR} /src/usb_descriptors.c
19
- )
17
+ ${CMAKE_CURRENT_SOURCE_DIR} /src/main.c
18
+ ${CMAKE_CURRENT_SOURCE_DIR} /src/usb_descriptors.c
19
+ )
20
20
21
21
# Example include
22
22
target_include_directories (${PROJECT} PUBLIC
23
- ${CMAKE_CURRENT_SOURCE_DIR} /src
24
- )
23
+ ${CMAKE_CURRENT_SOURCE_DIR} /src
24
+ )
25
25
26
26
# Configure compilation flags and libraries for the example... see the corresponding function
27
27
# in hw/bsp/FAMILY/family.cmake for details.
28
28
family_configure_dual_usb_example (${PROJECT} )
29
29
30
30
# due to warnings from Pico-PIO-USB
31
31
target_compile_options (${PROJECT} PUBLIC
32
- -Wno-error=shadow
33
- -Wno-error=cast-align
34
- -Wno-error=cast-qual
35
- -Wno-error=redundant-decls
36
- -Wno-error=sign-conversion
37
- -Wno-error=conversion
38
- -Wno-error=sign-compare
39
- -Wno-error=unused-function
40
- )
32
+ -Wno-error=shadow
33
+ -Wno-error=cast-align
34
+ -Wno-error=cast-qual
35
+ -Wno-error=redundant-decls
36
+ -Wno-error=sign-conversion
37
+ -Wno-error=conversion
38
+ -Wno-error=sign-compare
39
+ -Wno-error=unused-function
40
+ )
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ if (NOT TARGET _family_support_marker)
27
27
foreach (MCU IN LISTS FAMILY_MCUS )
28
28
# For each line in only.txt
29
29
foreach (_line ${ONLYS_LINES} )
30
- # If mcu:xxx exists for this mcu then include
31
- if (${_line} STREQUAL "mcu:${MCU} " )
30
+ # If mcu:xxx exists for this mcu or board:xxx then include
31
+ if (${_line} STREQUAL "mcu:${MCU} " OR ${_line} STREQUAL "board: ${BOARD} " )
32
32
set (${RESULT} 1 PARENT_SCOPE )
33
33
return ()
34
34
endif ()
Original file line number Diff line number Diff line change @@ -173,3 +173,7 @@ endfunction()
173
173
function (family_configure_host_example TARGET )
174
174
family_configure_target (${TARGET} )
175
175
endfunction ()
176
+
177
+ function (family_configure_dual_usb_example TARGET )
178
+ family_configure_target (${TARGET} )
179
+ endfunction ()
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ bool hcd_init(uint8_t rhport)
76
76
#endif
77
77
78
78
// FIXME force full speed, still have issue with Highspeed enumeration
79
+ // 1. Have issue when plug/unplug devices, maybe the port is not reset properly
80
+ // 2. Also does not seems to detect disconnection
79
81
hcd_reg -> PORTSC1 |= PORTSC1_FORCE_FULL_SPEED ;
80
82
81
83
return ehci_init (rhport , (uint32_t ) & hcd_reg -> CAPLENGTH , (uint32_t ) & hcd_reg -> USBCMD );
You can’t perform that action at this time.
0 commit comments