Skip to content

Commit

Permalink
Add TSN build checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed Oct 31, 2023
1 parent 54841da commit b5a18cd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ set(FREERTOS_PLUS_TCP_TEST_CONFIGURATION_LIST
ENABLE_ALL_IPV4_IPV6 # Enable all configuration settings IPv4 IPv6 UDP
DISABLE_ALL # Disable all configuration settings
HEADER_SELF_CONTAIN # Enable header self contain test
ENABLE_ALL_TSN # Enable all configuration settings with TSN
DEFAULT_CONF # Default (typical) configuration
)
if(NOT FREERTOS_PLUS_TCP_TEST_CONFIGURATION IN_LIST FREERTOS_PLUS_TCP_TEST_CONFIGURATION_LIST)
Expand Down
10 changes: 5 additions & 5 deletions source/FreeRTOS_IP.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ static eFrameProcessingResult_t prvProcessUDPPacket( NetworkBufferDescriptor_t *

/*-----------------------------------------------------------*/

/** @brief The queue used to pass events into the IP-task for processing. */
QueueHandle_t xNetworkEventQueue = NULL;

/** @brief Multi priority event queues for TX and RX, and their mapping.
*/
#if ( ipconfigMULTI_PRIORITY_EVENT_QUEUES == 1 )
/** @brief Multi priority event queues for TX and RX, and their mapping.
*/
QueueHandle_t xNetworkTxRxEventQueues[ ipconfigEVENT_QUEUES ][ 2 ] = { { NULL } };
uint8_t xQueueMapping[ ipconfigEVENT_QUEUES ] = ipconfigPACKET_PRIORITY_QUEUE_MAPPING;
#else
/** @brief The queue used to pass events into the IP-task for processing. */
QueueHandle_t xNetworkEventQueue = NULL;
#endif

/** @brief The IP packet ID. */
Expand Down
6 changes: 5 additions & 1 deletion source/include/FreeRTOSIPConfigDefaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,11 @@
#endif

#ifndef ipconfigEVENT_QUEUES
#define ipconfigEVENT_QUEUES 1
#define ipconfigEVENT_QUEUES ( 1 )
#endif

#if ( ipconfigEVENT_QUEUES > 1 )
#define ipconfigMULTI_PRIORITY_EVENT_QUEUES ( 1 )
#endif

#ifndef ipconfigBUDGET_MAPPING
Expand Down
8 changes: 8 additions & 0 deletions test/build-combination/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ target_include_directories(freertos_plus_tcp_config_default INTERFACE DefaultCon
target_link_libraries(freertos_plus_tcp_config_default INTERFACE freertos_plus_tcp_config_common)

# -------------------------------------------------------------------
add_library( freertos_plus_tcp_config_all_enable_tsn INTERFACE)
target_include_directories(freertos_plus_tcp_config_all_enable_tsn INTERFACE Enable_TSN)
target_link_libraries(freertos_plus_tcp_config_all_enable_tsn INTERFACE freertos_plus_tcp_config_common)

# -------------------------------------------------------------------

# Configuration for FreeRTOS-Kernel
if(FREERTOS_PLUS_TCP_TEST_CONFIGURATION STREQUAL "CUSTOM" )
# Check Config target is available. And then do nothing.
Expand All @@ -70,6 +76,8 @@ elseif(FREERTOS_PLUS_TCP_TEST_CONFIGURATION STREQUAL "ENABLE_ALL_IPV4_IPV6" )
elseif(FREERTOS_PLUS_TCP_TEST_CONFIGURATION STREQUAL "HEADER_SELF_CONTAIN" )
add_library( freertos_config ALIAS freertos_plus_tcp_config_header_self_contain)
include( Header_Self_Contain/headerSelfContain.cmake )
elseif(FREERTOS_PLUS_TCP_TEST_CONFIGURATION STREQUAL "ENABLE_ALL_TSN" )
add_library( freertos_config ALIAS freertos_plus_tcp_config_all_enable_tsn)
else()
add_library( freertos_config ALIAS freertos_plus_tcp_config_default)
endif()
Expand Down

0 comments on commit b5a18cd

Please sign in to comment.