From 453d69517b8f7f019ac855531e9e433d9d158f37 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 27 Nov 2024 11:10:06 +0700 Subject: [PATCH] fix multiple flag on compiling --- hw/bsp/espressif/components/tinyusb_src/CMakeLists.txt | 1 + hw/bsp/family_support.cmake | 2 ++ hw/bsp/rp2040/family.cmake | 1 + src/class/msc/msc_device.c | 2 +- test/hil/tinyusb.json | 10 ++++++---- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/bsp/espressif/components/tinyusb_src/CMakeLists.txt b/hw/bsp/espressif/components/tinyusb_src/CMakeLists.txt index 95fb2e440..00e288bad 100644 --- a/hw/bsp/espressif/components/tinyusb_src/CMakeLists.txt +++ b/hw/bsp/espressif/components/tinyusb_src/CMakeLists.txt @@ -69,6 +69,7 @@ if (DEFINED LOG) endif() if(DEFINED CFLAGS_CLI) + separate_arguments(CFLAGS_CLI) list(APPEND compile_definitions ${CFLAGS_CLI}) endif() diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake index 3f2872a30..82e3badb3 100644 --- a/hw/bsp/family_support.cmake +++ b/hw/bsp/family_support.cmake @@ -206,6 +206,7 @@ function(family_configure_common TARGET RTOS) # compile define from command line if(DEFINED CFLAGS_CLI) + separate_arguments(CFLAGS_CLI) target_compile_options(${TARGET} PUBLIC ${CFLAGS_CLI}) endif() @@ -291,6 +292,7 @@ function(family_add_tinyusb TARGET OPT_MCU RTOS) # compile define from command line if(DEFINED CFLAGS_CLI) + separate_arguments(CFLAGS_CLI) target_compile_options(${TARGET}-tinyusb PUBLIC ${CFLAGS_CLI}) endif() diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake index 8f01eac74..b2b01b1cf 100644 --- a/hw/bsp/rp2040/family.cmake +++ b/hw/bsp/rp2040/family.cmake @@ -191,6 +191,7 @@ function(family_configure_target TARGET RTOS) # compile define from command line if(DEFINED CFLAGS_CLI) + separate_arguments(CFLAGS_CLI) target_compile_options(${TARGET} PUBLIC ${CFLAGS_CLI}) endif() diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c index cfae646a1..dd66bfb6f 100644 --- a/src/class/msc/msc_device.c +++ b/src/class/msc/msc_device.c @@ -147,7 +147,7 @@ static inline uint16_t rdwr10_get_blocksize(msc_cbw_t const* cbw) { return (uint16_t) (cbw->total_bytes / block_count); } -uint8_t rdwr10_validate_cmd(msc_cbw_t const* cbw) { +static uint8_t rdwr10_validate_cmd(msc_cbw_t const* cbw) { uint8_t status = MSC_CSW_STATUS_PASSED; uint16_t const block_count = rdwr10_get_blockcount(cbw); diff --git a/test/hil/tinyusb.json b/test/hil/tinyusb.json index 580481b61..7393226eb 100644 --- a/test/hil/tinyusb.json +++ b/test/hil/tinyusb.json @@ -14,13 +14,14 @@ "name": "esptool", "uid": "4ea4f48f6bc3ee11bbb9d00f9e1b1c54", "args": "-b 1500000" - } + }, + "comment": "Use TS3USB30 mux to test both device and host" }, { "name": "espressif_s3_devkitm", "uid": "84F703C084E4", "build" : { - "flags_on": ["", "CFG_TUD_DWC2_DMA_ENABLE CFG_TUH_DWC2_DMA_ENABLE"] + "flags_on": ["", "CFG_TUD_DWC2_DMA_ENABLE"] }, "tests": { "only": ["device/cdc_msc_freertos", "device/hid_composite_freertos"] @@ -133,7 +134,7 @@ "name": "stm32f723disco", "uid": "460029001951373031313335", "build" : { - "flags_on": ["", "CFG_TUD_DWC2_DMA_ENABLE CFG_TUH_DWC2_DMA_ENABLE"] + "flags_on": ["", "CFG_TUH_DWC2_DMA_ENABLE"] }, "tests": { "device": true, "host": true, "dual": false, @@ -143,7 +144,8 @@ "name": "jlink", "uid": "000776606156", "args": "-device stm32f723ie" - } + }, + "comment": "Device port0 FS (slave only), Host port1 HS with DMA" }, { "name": "stm32h743nucleo",