Skip to content

Commit

Permalink
mcux: middleware: usb: fix USB MW to use new OSA
Browse files Browse the repository at this point in the history
- Added includes of OSA when used with USB MW
- Added include path on global level to avoid undefined
  #include <fsl_os_abstraction.h> and other headers

Signed-off-by: Radim Lipka <Radim.Lipka@nxp.com>
  • Loading branch information
Radimli authored and dleach02 committed Oct 24, 2024
1 parent 78b3972 commit 6fc4915
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mcux/hal_nxp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,19 @@ if(CONFIG_ETH_MCUX)
endif()

if (CONFIG_USB_DEVICE_DRIVER)
set(CONFIG_USE_component_osa_zephyr true)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/components/osa
)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb
)
include(middleware_usb_phy)
include_ifdef(CONFIG_USB_DC_NXP_EHCI middleware_usb_device_ehci)
include_ifdef(CONFIG_USB_DC_NXP_LPCIP3511 middleware_usb_device_ip3511fs)
include(set_component_osa)

zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/device)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/phy)
Expand All @@ -412,12 +419,19 @@ endif()


if (CONFIG_UDC_DRIVER)
set(CONFIG_USE_component_osa_zephyr true)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/mcux-sdk/components/osa
)

list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb
)
include_ifdef(CONFIG_DT_HAS_NXP_USBPHY_ENABLED middleware_usb_phy)
include_ifdef(CONFIG_UDC_NXP_EHCI middleware_usb_device_ehci)
include_ifdef(CONFIG_UDC_NXP_IP3511 middleware_usb_device_ip3511fs)
include(set_component_osa)

zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/device)
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/middleware/mcux-sdk-middleware-usb/phy)
Expand All @@ -435,6 +449,10 @@ if(${MCUX_DEVICE} MATCHES "RW61")
endif()
endif()

if(${CONFIG_USE_component_osa_zephyr})
zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/mcux-sdk/components/osa)
endif()

include_ifdef(CONFIG_USE_component_osa_zephyr set_component_osa)

if(CONFIG_WIFI_NXP)
Expand Down

0 comments on commit 6fc4915

Please sign in to comment.