chore(cmake): update idf config for lwip & freertos

This commit is contained in:
sakumisu 2024-11-04 20:07:19 +08:00
parent c51a6f35a6
commit 608ee773de

View File

@ -77,10 +77,14 @@ set(ldfragments "osal/idf/linker.lf")
if(CONFIG_CHERRYUSB_HOST_CDC_ECM OR CONFIG_CHERRYUSB_HOST_CDC_RNDIS OR CONFIG_CHERRYUSB_HOST_CDC_NCM if(CONFIG_CHERRYUSB_HOST_CDC_ECM OR CONFIG_CHERRYUSB_HOST_CDC_RNDIS OR CONFIG_CHERRYUSB_HOST_CDC_NCM
OR CONFIG_CHERRYUSB_HOST_ASIX OR CONFIG_CHERRYUSB_HOST_RTL8152 OR CONFIG_CHERRYUSB_HOST_BL616) OR CONFIG_CHERRYUSB_HOST_ASIX OR CONFIG_CHERRYUSB_HOST_RTL8152 OR CONFIG_CHERRYUSB_HOST_BL616)
list(APPEND cherryusb_srcs platform/none/usbh_lwip.c) list(APPEND cherryusb_srcs platform/none/usbh_lwip.c)
idf_component_get_property(lwip lwip COMPONENT_LIB)
target_compile_definitions(${lwip} PRIVATE "-DPBUF_POOL_BUFSIZE=1600")
endif() endif()
idf_component_get_property(freertos_include freertos ORIG_INCLUDE_PATH)
idf_component_register(SRCS ${cherryusb_srcs} idf_component_register(SRCS ${cherryusb_srcs}
INCLUDE_DIRS ${cherryusb_incs} INCLUDE_DIRS ${cherryusb_incs} ${freertos_include}
PRIV_REQUIRES usb PRIV_REQUIRES usb
LDFRAGMENTS ${ldfragments} LDFRAGMENTS ${ldfragments}
) )