adds regression for smp
This commit is contained in:
@@ -3,7 +3,7 @@ set(THREADX4TGFS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
set(MOONLIGHT_SRC_DIR ${MOONLIGHT_ROOT}/src)
|
||||
set(MOONLIGHT_INC_DIR ${MOONLIGHT_ROOT}/inc)
|
||||
|
||||
if(NOT DEFINED MOONLIGHT_TRAP_SOURCE)
|
||||
if(NOT DEFINED MOONLIGHT_TRAP_SOURCE) # Hook to use vectored traps, also used in regression testing
|
||||
set(MOONLIGHT_TRAP_SOURCE ${MOONLIGHT_SRC_DIR}/trap_non_vectored.c)
|
||||
endif()
|
||||
|
||||
@@ -15,6 +15,7 @@ set(MOONLIGHT_PLATFORM_SOURCES
|
||||
${MOONLIGHT_SRC_DIR}/exception.c
|
||||
${MOONLIGHT_SRC_DIR}/vector_table.c)
|
||||
|
||||
# define a basic library containing all generic board components
|
||||
add_library(moonlight_platform_defaults INTERFACE)
|
||||
target_include_directories(moonlight_platform_defaults INTERFACE
|
||||
${MOONLIGHT_INC_DIR}
|
||||
@@ -32,6 +33,7 @@ if(NX_DEBUG)
|
||||
NX_DEBUG_PACKET)
|
||||
endif()
|
||||
|
||||
# helper to tie in different threadx runtimes
|
||||
function(moonlight_define_platform TARGET THREADX_TARGET)
|
||||
add_library(${TARGET} OBJECT
|
||||
${MOONLIGHT_PLATFORM_SOURCES})
|
||||
@@ -41,7 +43,10 @@ function(moonlight_define_platform TARGET THREADX_TARGET)
|
||||
${THREADX_TARGET})
|
||||
endfunction()
|
||||
|
||||
moonlight_define_platform(moonlight_platform_common threadx)
|
||||
if(TARGET threadx)
|
||||
moonlight_define_platform(moonlight_platform_common threadx)
|
||||
endif()
|
||||
|
||||
if(TARGET threadx_smp)
|
||||
moonlight_define_platform(moonlight_platform_common_smp threadx_smp)
|
||||
endif()
|
||||
@@ -56,6 +61,7 @@ if(DEFINED NETXDUO_CUSTOM_PORT)
|
||||
netxduo)
|
||||
endif()
|
||||
|
||||
# helper for consumers to inject moonlight as a dependency into a target
|
||||
function(target_add_moonlight_platform TARGET)
|
||||
set(options)
|
||||
set(oneValueArgs PLATFORM_TARGET)
|
||||
@@ -66,12 +72,16 @@ function(target_add_moonlight_platform TARGET)
|
||||
endif()
|
||||
|
||||
if(NOT TAMP_PLATFORM_TARGET)
|
||||
if(NOT TARGET moonlight_platform_common)
|
||||
message(FATAL_ERROR "moonlight_platform_common is not available in this build; pass PLATFORM_TARGET explicitly")
|
||||
endif()
|
||||
set(TAMP_PLATFORM_TARGET moonlight_platform_common)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TARGET} PRIVATE ${TAMP_PLATFORM_TARGET})
|
||||
endfunction()
|
||||
|
||||
# helper to inject the network driver into a target
|
||||
function(target_add_moonlight_network_driver TARGET)
|
||||
if(NOT TARGET moonlight_network_driver)
|
||||
message(FATAL_ERROR "moonlight_network_driver requires netxduo to be available in this build")
|
||||
|
||||
Reference in New Issue
Block a user