diff --git a/zcu102-zynqmp/baremetal/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/baremetal/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..8adaead621fcf2c77b335ae29508df369adf227e 100644 --- a/zcu102-zynqmp/baremetal/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/baremetal/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 1 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 0 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/baremetal/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/baremetal/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..8adaead621fcf2c77b335ae29508df369adf227e 100644 --- a/zcu102-zynqmp/baremetal/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/baremetal/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 1 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 0 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/baremetal/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/baremetal/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..c8792d439c977ad36a776155df859e0c9e7191d7 100644 --- a/zcu102-zynqmp/baremetal/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/baremetal/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ -#define TOKI_SYSLOG 1 + +/* + * Enable syslog component + */ +#define TOKI_SYSLOG 0 + +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 0 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/baremetal/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/baremetal/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..c8792d439c977ad36a776155df859e0c9e7191d7 100644 --- a/zcu102-zynqmp/baremetal/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/baremetal/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ -#define TOKI_SYSLOG 1 + +/* + * Enable syslog component + */ +#define TOKI_SYSLOG 0 + +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 0 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/master/freertos/include/freertos+/time/config.h b/zcu102-zynqmp/freertos/baseline/master/freertos/include/freertos+/time/config.h new file mode 100644 index 0000000000000000000000000000000000000000..0e018845b928e59a398c2555892e7e366142fc2d --- /dev/null +++ b/zcu102-zynqmp/freertos/baseline/master/freertos/include/freertos+/time/config.h @@ -0,0 +1,87 @@ +#ifndef FREERTOS_PLUS_TIME_CONFIG_H +#define FREERTOS_PLUS_TIME_CONFIG_H + +/** + * Number of second length measurements used to build + * the median second length of the master clock. + * + * This is primarily important to filter jitter of the + * master clock. Do not set this too high or + * synchronization will react slow to frequency changes + * of the master clock. + */ +#define CLK_SYNC_MEDIAN_ARRAY_SIZE 10 + +/** + * Frequency offset at which the algorithm stops skewing + * the frequency of the slave clock to syntonize with + * the master clock and instead does quick + * approximations. + * + * After CLK_CONSEQ_APPROX approximations, the algorithm + * is forced to skew the slave clock until synchronization + * is achieved. This is to avoid oscillation due to bad + * approximations. If the frequency of the master clock + * changes during this backoff period, approximations are + * unlocked again. + * + * This should be higher than CLK_SYNC_ADJ_CLAMP and + * CLK_SYNC_ADJ_FREQ to not accidently bail while adjusting + * the slave clock. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_FREQ_BAIL 1000000L + +/** + * The amount of nanoseconds the phase of the slave clock + * may be shifted compared to the master clock, before it + * is stepped. + * + * Unit: (nsec) + */ +#define CLK_SYNC_PHASE_BAIL 1000000000L + +/** + * Consecutive approximations allowed before syntonization + * via skewing is enforced. If the frequency of the master + * clock changes while no approximations are allowed, they + * are unlocked again. + */ +#define CLK_CONSEQ_APPROX 3 + +/** + * Maximum adjustment of the slave clock steerable by the + * algorithm. Be aware that very high values may lead to + * instability of the algorithm and thus deviation of the + * clocks. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_ADJ_PHASE_CLAMP 500000L + +/** + * The frequency adjustment repeatedly applied to the base + * frequency until frequencies of master and slave clock + * equal each other approximately. If this value is bigger + * than CLK_SYNC_ADJ_CLAMP, it will be ignored. + * + * This should be kept reasonably small to avoid oscillation + * of the algorithm. For high frequency deviations a faster + * approximation is used. See CLK_SYNC_BAIL. + * + * If you set this too small you will see many bails of the + * algorithm when the frequency of the master clock is + * shifted. + * + * Unit: (nsec) + */ +#define CLK_SYNC_ADJ_FREQ_CLAMP 300000L + +/** + * (CLK_SYNC_TRACE_INT_DEV == 1): Internal clock deviation + * statistics are written as STM Traces for each tick + */ +#define CLK_SYNC_TRACE_INT_DEV 1 + +#endif /* FREERTOS_PLUS_TIME_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/master/freertos/include/freertos/FreeRTOSConfig.h b/zcu102-zynqmp/freertos/baseline/master/freertos/include/freertos/FreeRTOSConfig.h index 727330d33ea9ec44ee6f25472b272f9f9923c150..535f6161c90e84d04085991deade601940973455 100644 --- a/zcu102-zynqmp/freertos/baseline/master/freertos/include/freertos/FreeRTOSConfig.h +++ b/zcu102-zynqmp/freertos/baseline/master/freertos/include/freertos/FreeRTOSConfig.h @@ -329,7 +329,7 @@ /** * Set to 1 if you wish to use an tick hook, or 0 to omit an tick hook. */ -#define configUSE_TICK_HOOK 0 +#define configUSE_TICK_HOOK 1 /** * The stack overflow detection page describes the use of this parameter. @@ -765,4 +765,12 @@ void FreeRTOS_ClearTickInterrupt( void ); */ #include "freertos+/sched-ext/config.h" + +/* + ------------------------------------------------ + ------- Timekeeping specific defines. ------- + ------------------------------------------------ +*/ +#include "freertos+/time/trace-macros.h" + #endif /* FREERTOS_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/lwipopts.h b/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/lwipopts.h index 3de81b066b3571fe155e375300401da3465cd238..a243f4b97bd73bc4ceab941ae8d28566dd3378d5 100644 --- a/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/lwipopts.h +++ b/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/lwipopts.h @@ -117,6 +117,12 @@ */ #define SYS_LIGHTWEIGHT_PROT 1 +/** + * LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX = 1 if lwIP should use a mutex + * to lock the lwIP-core instead of locking interrupts and the scheduler. + */ +#define LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX 1 + /* ------------------------------------ ---------- Memory options ---------- diff --git a/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/xlwipconfig.h b/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/xlwipconfig.h index cf07a1c7e18069f5b2fe3d241d02208b52369341..2baeb63c816f0b322dba6fda8027d57d113dda37 100644 --- a/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/xlwipconfig.h +++ b/zcu102-zynqmp/freertos/baseline/master/lwip/include/lwip/xlwipconfig.h @@ -5,4 +5,6 @@ #define XLWIP_CONFIG_XIICPS_RESET 1 +#define XLWIP_CONFIG_ENABLE_HW_PPS 1 + #endif /* __XLWIPCONFIG_H_ */ diff --git a/zcu102-zynqmp/freertos/baseline/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h b/zcu102-zynqmp/freertos/baseline/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h index 314162d07fb0e5f5c135e6938964b4be922e3ce3..118a039f79049d423edea59c8d408cb93186bd6f 100644 --- a/zcu102-zynqmp/freertos/baseline/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h +++ b/zcu102-zynqmp/freertos/baseline/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h @@ -1,6 +1,11 @@ #ifndef __XLWIPCONFIG_NETIF_XILINX_H_ #define __XLWIPCONFIG_NETIF_XILINX_H_ +/** + * Maximum number of interfaces supported + */ +#define XLWIP_MAX_IFS 1 + #define XLWIP_CONFIG_INCLUDE_GEM 1 #define XLWIP_CONFIG_INCLUDE_EMACPS 1 diff --git a/zcu102-zynqmp/freertos/baseline/master/toki-extra/hal/include/toki/config.h b/zcu102-zynqmp/freertos/baseline/master/toki-extra/hal/include/toki/config.h index e68c7dd367f53cadefa22e3db80d35a56d1eb294..26241788793f28a90eca273fae7ba39891132a5f 100644 --- a/zcu102-zynqmp/freertos/baseline/master/toki-extra/hal/include/toki/config.h +++ b/zcu102-zynqmp/freertos/baseline/master/toki-extra/hal/include/toki/config.h @@ -22,6 +22,11 @@ ******************************************************************************/ #define ENABLE_Syslog 0 +/******************************************************************************* + * Enable the adjtimex syscall (GPL licensed) + ******************************************************************************/ +#define ENABLE_timex 0 + /******************************************************************************* * toki application specific configuration options ******************************************************************************/ diff --git a/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h b/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h index d49f6139e2eba35b8509864ebb725a2b17e14c0f..a9afca1c858401e86cc21a43842e0baaebaa3152 100644 --- a/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h +++ b/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h @@ -57,10 +57,10 @@ #define RAW_DEBUG 0x80U #define MEM_DEBUG 0x80U #define MEMP_DEBUG 0x80U -#define SYS_DEBUG 0x00U +#define SYS_DEBUG 0x80U #define TIMERS_DEBUG 0x80U #define TCP_DEBUG 0x80U -#define TCP_INPUT_DEBUG 0x00U +#define TCP_INPUT_DEBUG 0x80U #define TCP_FR_DEBUG 0x80U #define TCP_RTO_DEBUG 0x80U #define TCP_CWND_DEBUG 0x80U @@ -71,10 +71,18 @@ #define UDP_DEBUG 0x80U #define TCPIP_DEBUG 0x80U #define SLIP_DEBUG 0x80U -#define DHCP_DEBUG 0x00U -#define AUTOIP_DEBUG 0x00U -#define DNS_DEBUG 0x00U -#define IP6_DEBUG 0x00U -#define DHCP6_DEBUG 0x00U +#define DHCP_DEBUG 0x80U +#define AUTOIP_DEBUG 0x80U +#define DNS_DEBUG 0x80U +#define IP6_DEBUG 0x80U +#define DHCP6_DEBUG 0x80U + +#ifndef __ASSEMBLER__ +/* Use FreeRTOS assert method */ +#define LWIP_PLATFORM_ASSERT(x) do {lwip_log_emergency("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); vApplicationAssert(__FILE__, __LINE__);} while(0) +#include +#include +#endif #endif /* TOKI_SYSLOG_LWIP_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..b8407c628a9647350b575fb411930d30eab7c645 100644 --- a/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/freertos/baseline/master/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 1 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 1 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/slave/freertos/include/freertos+/time/config.h b/zcu102-zynqmp/freertos/baseline/slave/freertos/include/freertos+/time/config.h new file mode 100644 index 0000000000000000000000000000000000000000..0e018845b928e59a398c2555892e7e366142fc2d --- /dev/null +++ b/zcu102-zynqmp/freertos/baseline/slave/freertos/include/freertos+/time/config.h @@ -0,0 +1,87 @@ +#ifndef FREERTOS_PLUS_TIME_CONFIG_H +#define FREERTOS_PLUS_TIME_CONFIG_H + +/** + * Number of second length measurements used to build + * the median second length of the master clock. + * + * This is primarily important to filter jitter of the + * master clock. Do not set this too high or + * synchronization will react slow to frequency changes + * of the master clock. + */ +#define CLK_SYNC_MEDIAN_ARRAY_SIZE 10 + +/** + * Frequency offset at which the algorithm stops skewing + * the frequency of the slave clock to syntonize with + * the master clock and instead does quick + * approximations. + * + * After CLK_CONSEQ_APPROX approximations, the algorithm + * is forced to skew the slave clock until synchronization + * is achieved. This is to avoid oscillation due to bad + * approximations. If the frequency of the master clock + * changes during this backoff period, approximations are + * unlocked again. + * + * This should be higher than CLK_SYNC_ADJ_CLAMP and + * CLK_SYNC_ADJ_FREQ to not accidently bail while adjusting + * the slave clock. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_FREQ_BAIL 1000000L + +/** + * The amount of nanoseconds the phase of the slave clock + * may be shifted compared to the master clock, before it + * is stepped. + * + * Unit: (nsec) + */ +#define CLK_SYNC_PHASE_BAIL 1000000000L + +/** + * Consecutive approximations allowed before syntonization + * via skewing is enforced. If the frequency of the master + * clock changes while no approximations are allowed, they + * are unlocked again. + */ +#define CLK_CONSEQ_APPROX 3 + +/** + * Maximum adjustment of the slave clock steerable by the + * algorithm. Be aware that very high values may lead to + * instability of the algorithm and thus deviation of the + * clocks. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_ADJ_PHASE_CLAMP 500000L + +/** + * The frequency adjustment repeatedly applied to the base + * frequency until frequencies of master and slave clock + * equal each other approximately. If this value is bigger + * than CLK_SYNC_ADJ_CLAMP, it will be ignored. + * + * This should be kept reasonably small to avoid oscillation + * of the algorithm. For high frequency deviations a faster + * approximation is used. See CLK_SYNC_BAIL. + * + * If you set this too small you will see many bails of the + * algorithm when the frequency of the master clock is + * shifted. + * + * Unit: (nsec) + */ +#define CLK_SYNC_ADJ_FREQ_CLAMP 300000L + +/** + * (CLK_SYNC_TRACE_INT_DEV == 1): Internal clock deviation + * statistics are written as STM Traces for each tick + */ +#define CLK_SYNC_TRACE_INT_DEV 1 + +#endif /* FREERTOS_PLUS_TIME_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/slave/freertos/include/freertos/FreeRTOSConfig.h b/zcu102-zynqmp/freertos/baseline/slave/freertos/include/freertos/FreeRTOSConfig.h index a1393c80c7d3a8350ab2c07dc518f8a1ca22a12a..29d6a12050228fb3cb67eb507dbb30b366fffca7 100644 --- a/zcu102-zynqmp/freertos/baseline/slave/freertos/include/freertos/FreeRTOSConfig.h +++ b/zcu102-zynqmp/freertos/baseline/slave/freertos/include/freertos/FreeRTOSConfig.h @@ -329,7 +329,7 @@ /** * Set to 1 if you wish to use an tick hook, or 0 to omit an tick hook. */ -#define configUSE_TICK_HOOK 0 +#define configUSE_TICK_HOOK 1 /** * The stack overflow detection page describes the use of this parameter. @@ -763,4 +763,12 @@ eg. for core 1 PMU ID = 175 + 1 = 176 */ */ #include "freertos+/sched-ext/config.h" + +/* + ------------------------------------------------ + ------- Timekeeping specific defines. ------- + ------------------------------------------------ +*/ +#include "freertos+/time/trace-macros.h" + #endif /* FREERTOS_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/lwipopts.h b/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/lwipopts.h index 24d96ab6bb7c147f194e4dc5669198936f544cb8..bbe0ab68ed4b06340618d45225aba19311b75ac4 100644 --- a/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/lwipopts.h +++ b/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/lwipopts.h @@ -117,6 +117,12 @@ */ #define SYS_LIGHTWEIGHT_PROT 1 +/** + * LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX = 1 if lwIP should use a mutex + * to lock the lwIP-core instead of locking interrupts and the scheduler. + */ +#define LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX 1 + /* ------------------------------------ ---------- Memory options ---------- diff --git a/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/xlwipconfig.h b/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/xlwipconfig.h index cf07a1c7e18069f5b2fe3d241d02208b52369341..2baeb63c816f0b322dba6fda8027d57d113dda37 100644 --- a/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/xlwipconfig.h +++ b/zcu102-zynqmp/freertos/baseline/slave/lwip/include/lwip/xlwipconfig.h @@ -5,4 +5,6 @@ #define XLWIP_CONFIG_XIICPS_RESET 1 +#define XLWIP_CONFIG_ENABLE_HW_PPS 1 + #endif /* __XLWIPCONFIG_H_ */ diff --git a/zcu102-zynqmp/freertos/baseline/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h b/zcu102-zynqmp/freertos/baseline/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h index 314162d07fb0e5f5c135e6938964b4be922e3ce3..118a039f79049d423edea59c8d408cb93186bd6f 100644 --- a/zcu102-zynqmp/freertos/baseline/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h +++ b/zcu102-zynqmp/freertos/baseline/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h @@ -1,6 +1,11 @@ #ifndef __XLWIPCONFIG_NETIF_XILINX_H_ #define __XLWIPCONFIG_NETIF_XILINX_H_ +/** + * Maximum number of interfaces supported + */ +#define XLWIP_MAX_IFS 1 + #define XLWIP_CONFIG_INCLUDE_GEM 1 #define XLWIP_CONFIG_INCLUDE_EMACPS 1 diff --git a/zcu102-zynqmp/freertos/baseline/slave/toki-extra/hal/include/toki/config.h b/zcu102-zynqmp/freertos/baseline/slave/toki-extra/hal/include/toki/config.h index ab961c3e4c9a3056e553cd15624e73b7ef1ccd6d..64f17040bf732bf7398c67bf8d096b967b1f60aa 100644 --- a/zcu102-zynqmp/freertos/baseline/slave/toki-extra/hal/include/toki/config.h +++ b/zcu102-zynqmp/freertos/baseline/slave/toki-extra/hal/include/toki/config.h @@ -22,6 +22,11 @@ ******************************************************************************/ #define ENABLE_Syslog 0 +/******************************************************************************* + * Enable the adjtimex syscall (GPL licensed) + ******************************************************************************/ +#define ENABLE_timex 0 + /******************************************************************************* * toki application specific configuration options ******************************************************************************/ diff --git a/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h b/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h index d49f6139e2eba35b8509864ebb725a2b17e14c0f..a9afca1c858401e86cc21a43842e0baaebaa3152 100644 --- a/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h +++ b/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h @@ -57,10 +57,10 @@ #define RAW_DEBUG 0x80U #define MEM_DEBUG 0x80U #define MEMP_DEBUG 0x80U -#define SYS_DEBUG 0x00U +#define SYS_DEBUG 0x80U #define TIMERS_DEBUG 0x80U #define TCP_DEBUG 0x80U -#define TCP_INPUT_DEBUG 0x00U +#define TCP_INPUT_DEBUG 0x80U #define TCP_FR_DEBUG 0x80U #define TCP_RTO_DEBUG 0x80U #define TCP_CWND_DEBUG 0x80U @@ -71,10 +71,18 @@ #define UDP_DEBUG 0x80U #define TCPIP_DEBUG 0x80U #define SLIP_DEBUG 0x80U -#define DHCP_DEBUG 0x00U -#define AUTOIP_DEBUG 0x00U -#define DNS_DEBUG 0x00U -#define IP6_DEBUG 0x00U -#define DHCP6_DEBUG 0x00U +#define DHCP_DEBUG 0x80U +#define AUTOIP_DEBUG 0x80U +#define DNS_DEBUG 0x80U +#define IP6_DEBUG 0x80U +#define DHCP6_DEBUG 0x80U + +#ifndef __ASSEMBLER__ +/* Use FreeRTOS assert method */ +#define LWIP_PLATFORM_ASSERT(x) do {lwip_log_emergency("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); vApplicationAssert(__FILE__, __LINE__);} while(0) +#include +#include +#endif #endif /* TOKI_SYSLOG_LWIP_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..b8407c628a9647350b575fb411930d30eab7c645 100644 --- a/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/freertos/baseline/slave/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 1 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 1 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/master/freertos/include/freertos+/time/config.h b/zcu102-zynqmp/freertos/intperf/master/freertos/include/freertos+/time/config.h new file mode 100644 index 0000000000000000000000000000000000000000..0e018845b928e59a398c2555892e7e366142fc2d --- /dev/null +++ b/zcu102-zynqmp/freertos/intperf/master/freertos/include/freertos+/time/config.h @@ -0,0 +1,87 @@ +#ifndef FREERTOS_PLUS_TIME_CONFIG_H +#define FREERTOS_PLUS_TIME_CONFIG_H + +/** + * Number of second length measurements used to build + * the median second length of the master clock. + * + * This is primarily important to filter jitter of the + * master clock. Do not set this too high or + * synchronization will react slow to frequency changes + * of the master clock. + */ +#define CLK_SYNC_MEDIAN_ARRAY_SIZE 10 + +/** + * Frequency offset at which the algorithm stops skewing + * the frequency of the slave clock to syntonize with + * the master clock and instead does quick + * approximations. + * + * After CLK_CONSEQ_APPROX approximations, the algorithm + * is forced to skew the slave clock until synchronization + * is achieved. This is to avoid oscillation due to bad + * approximations. If the frequency of the master clock + * changes during this backoff period, approximations are + * unlocked again. + * + * This should be higher than CLK_SYNC_ADJ_CLAMP and + * CLK_SYNC_ADJ_FREQ to not accidently bail while adjusting + * the slave clock. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_FREQ_BAIL 1000000L + +/** + * The amount of nanoseconds the phase of the slave clock + * may be shifted compared to the master clock, before it + * is stepped. + * + * Unit: (nsec) + */ +#define CLK_SYNC_PHASE_BAIL 1000000000L + +/** + * Consecutive approximations allowed before syntonization + * via skewing is enforced. If the frequency of the master + * clock changes while no approximations are allowed, they + * are unlocked again. + */ +#define CLK_CONSEQ_APPROX 3 + +/** + * Maximum adjustment of the slave clock steerable by the + * algorithm. Be aware that very high values may lead to + * instability of the algorithm and thus deviation of the + * clocks. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_ADJ_PHASE_CLAMP 500000L + +/** + * The frequency adjustment repeatedly applied to the base + * frequency until frequencies of master and slave clock + * equal each other approximately. If this value is bigger + * than CLK_SYNC_ADJ_CLAMP, it will be ignored. + * + * This should be kept reasonably small to avoid oscillation + * of the algorithm. For high frequency deviations a faster + * approximation is used. See CLK_SYNC_BAIL. + * + * If you set this too small you will see many bails of the + * algorithm when the frequency of the master clock is + * shifted. + * + * Unit: (nsec) + */ +#define CLK_SYNC_ADJ_FREQ_CLAMP 300000L + +/** + * (CLK_SYNC_TRACE_INT_DEV == 1): Internal clock deviation + * statistics are written as STM Traces for each tick + */ +#define CLK_SYNC_TRACE_INT_DEV 1 + +#endif /* FREERTOS_PLUS_TIME_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/master/freertos/include/freertos/FreeRTOSConfig.h b/zcu102-zynqmp/freertos/intperf/master/freertos/include/freertos/FreeRTOSConfig.h index 331fd639505da9afb0637b4b76a61677d379298b..97db335cda9acdd121fae0cfe24f3f21a674f525 100644 --- a/zcu102-zynqmp/freertos/intperf/master/freertos/include/freertos/FreeRTOSConfig.h +++ b/zcu102-zynqmp/freertos/intperf/master/freertos/include/freertos/FreeRTOSConfig.h @@ -329,7 +329,7 @@ /** * Set to 1 if you wish to use an tick hook, or 0 to omit an tick hook. */ -#define configUSE_TICK_HOOK 0 +#define configUSE_TICK_HOOK 1 /** * The stack overflow detection page describes the use of this parameter. @@ -763,4 +763,12 @@ eg. for core 1 PMU ID = 175 + 1 = 176 */ */ #include "freertos+/sched-ext/config.h" + +/* + ------------------------------------------------ + ------- Timekeeping specific defines. ------- + ------------------------------------------------ +*/ +#include "freertos+/time/trace-macros.h" + #endif /* FREERTOS_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/lwipopts.h b/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/lwipopts.h index 9f284054878f3a1d7af7d72b17f11c41b677ae39..a243f4b97bd73bc4ceab941ae8d28566dd3378d5 100644 --- a/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/lwipopts.h +++ b/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/lwipopts.h @@ -38,12 +38,28 @@ * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. * Disable this option if you use a POSIX operating system that uses the same * names (read, write & close). + * As we use newlib we can not enable this. Instead we rename within the syscall + * table or wrap the methods via newlib - whatever fits best. */ -#define LWIP_POSIX_SOCKETS_IO_NAMES 1 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +/** + * LWIP_SOCKET_SELECT==1 (default): enable select() for sockets (uses a netconn + * callback to keep track of events). + * This saves RAM (counters per socket) and code (netconn event callback), which + * should improve performance a bit). + */ +#define LWIP_SOCKET_SELECT 1 + +/** + * LWIP_SOCKET_POLL==1 (default): enable poll() for sockets (including + * struct pollfd, nfds_t, and constants) + */ +#define LWIP_SOCKET_POLL 1 /** * If LWIP_PROVIDE_ERRNO is undefined, sockets.c will utilize - * included by the platform. If LWIP_PROVIDE_ERRNO is set to 1, "lwip/arch.h" + * included by the platform. If LWIP_PROVIDE_ERRNO is defined, "lwip/arch.h" * defines the same things as does. */ //#define LWIP_PROVIDE_ERRNO 1 @@ -101,6 +117,12 @@ */ #define SYS_LIGHTWEIGHT_PROT 1 +/** + * LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX = 1 if lwIP should use a mutex + * to lock the lwIP-core instead of locking interrupts and the scheduler. + */ +#define LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX 1 + /* ------------------------------------ ---------- Memory options ---------- diff --git a/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/xlwipconfig.h b/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/xlwipconfig.h index a7d72cb989f9fbfc072ffb9bddbfff0b6afb624e..2baeb63c816f0b322dba6fda8027d57d113dda37 100644 --- a/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/xlwipconfig.h +++ b/zcu102-zynqmp/freertos/intperf/master/lwip/include/lwip/xlwipconfig.h @@ -3,70 +3,8 @@ #define XLWIP_SEMANTIC 0 -#define XLWIP_CONFIG_INCLUDE_GEM 1 -#define XLWIP_CONFIG_INCLUDE_EMACPS 1 - #define XLWIP_CONFIG_XIICPS_RESET 1 -#define XLWIP_CONFIG_EMAC_NUMBER 0 -#define XLWIP_CONFIG_N_TX_DESC 64 -#define XLWIP_CONFIG_N_RX_DESC 64 -#define XLWIP_CONFIG_N_TX_COALESCE 1 -#define XLWIP_CONFIG_N_RX_COALESCE 1 - -#define XLWIP_CONFIG_GEM_ENABLE_ERRQ 1 -#define XLWIP_CONFIG_GEM_ENABLE_IEEE1588 1 - -#define CONFIG_LINKSPEED_AUTODETECT 1 - -/** - * The size of the stack of the thread transferring incoming packets from the Xilinx driver to lwIP - */ -#define XLWIP_CONFIG_THREAD_STACKSIZE 2048 - -/** - * The priority of the thread transferring incoming packets from the Xilinx driver to lwIP - */ -#define XLWIP_CONFIG_THREAD_PRIO (8 - 1) - -/** - * The size of the stack of the thread checking for an established link on the emacps interface - */ -#define XLWIP_LINK_DETECT_THREAD_STACKSIZE 1536 - -/** - * The interval in ms by which change of link connection is determined by the emacps driver - */ -#define XLWIP_LINK_DETECT_THREAD_INTERVAL 1000 /* one second */ - -/** - * Name assigned ot the GEM interface - */ -#define XLWIP_GEM_NAME1 'e' -#define XLWIP_GEM_NAME2 '0' - -/** - * IP address assigned to the GEM interface separated into the four octets - */ -#define XLWIP_GEM_IP1 192 -#define XLWIP_GEM_IP2 168 -#define XLWIP_GEM_IP3 0 -#define XLWIP_GEM_IP4 2 - -/** - * Netmask assigned to the GEM interface separated into the four octets - */ -#define XLWIP_GEM_NM1 255 -#define XLWIP_GEM_NM2 255 -#define XLWIP_GEM_NM3 255 -#define XLWIP_GEM_NM4 0 - -/** - * Gateway assigned to the GEM interface separated into the four octets - */ -#define XLWIP_GEM_GW1 192 -#define XLWIP_GEM_GW2 168 -#define XLWIP_GEM_GW3 0 -#define XLWIP_GEM_GW4 1 +#define XLWIP_CONFIG_ENABLE_HW_PPS 1 #endif /* __XLWIPCONFIG_H_ */ diff --git a/zcu102-zynqmp/freertos/intperf/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h b/zcu102-zynqmp/freertos/intperf/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h index 314162d07fb0e5f5c135e6938964b4be922e3ce3..118a039f79049d423edea59c8d408cb93186bd6f 100644 --- a/zcu102-zynqmp/freertos/intperf/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h +++ b/zcu102-zynqmp/freertos/intperf/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h @@ -1,6 +1,11 @@ #ifndef __XLWIPCONFIG_NETIF_XILINX_H_ #define __XLWIPCONFIG_NETIF_XILINX_H_ +/** + * Maximum number of interfaces supported + */ +#define XLWIP_MAX_IFS 1 + #define XLWIP_CONFIG_INCLUDE_GEM 1 #define XLWIP_CONFIG_INCLUDE_EMACPS 1 diff --git a/zcu102-zynqmp/freertos/intperf/master/toki-extra/hal/include/toki/config.h b/zcu102-zynqmp/freertos/intperf/master/toki-extra/hal/include/toki/config.h index e68c7dd367f53cadefa22e3db80d35a56d1eb294..26241788793f28a90eca273fae7ba39891132a5f 100644 --- a/zcu102-zynqmp/freertos/intperf/master/toki-extra/hal/include/toki/config.h +++ b/zcu102-zynqmp/freertos/intperf/master/toki-extra/hal/include/toki/config.h @@ -22,6 +22,11 @@ ******************************************************************************/ #define ENABLE_Syslog 0 +/******************************************************************************* + * Enable the adjtimex syscall (GPL licensed) + ******************************************************************************/ +#define ENABLE_timex 0 + /******************************************************************************* * toki application specific configuration options ******************************************************************************/ diff --git a/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h b/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h index 583e5bfa8291853c15162993c8f2e79534b9c85a..a9afca1c858401e86cc21a43842e0baaebaa3152 100644 --- a/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h +++ b/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h @@ -4,7 +4,7 @@ /******************************************************************************* * lwIP logging configuration ******************************************************************************/ -#define TOKI_SYSLOG_COMPONENT_LWIP_ENABLED 0 +#define TOKI_SYSLOG_COMPONENT_LWIP_ENABLED 1 #define TOKI_SYSLOG_COMPONENT_LWIP_FACILITY "lwIP" @@ -57,10 +57,10 @@ #define RAW_DEBUG 0x80U #define MEM_DEBUG 0x80U #define MEMP_DEBUG 0x80U -#define SYS_DEBUG 0x00U +#define SYS_DEBUG 0x80U #define TIMERS_DEBUG 0x80U #define TCP_DEBUG 0x80U -#define TCP_INPUT_DEBUG 0x00U +#define TCP_INPUT_DEBUG 0x80U #define TCP_FR_DEBUG 0x80U #define TCP_RTO_DEBUG 0x80U #define TCP_CWND_DEBUG 0x80U @@ -71,10 +71,18 @@ #define UDP_DEBUG 0x80U #define TCPIP_DEBUG 0x80U #define SLIP_DEBUG 0x80U -#define DHCP_DEBUG 0x00U -#define AUTOIP_DEBUG 0x00U -#define DNS_DEBUG 0x00U -#define IP6_DEBUG 0x00U -#define DHCP6_DEBUG 0x00U +#define DHCP_DEBUG 0x80U +#define AUTOIP_DEBUG 0x80U +#define DNS_DEBUG 0x80U +#define IP6_DEBUG 0x80U +#define DHCP6_DEBUG 0x80U + +#ifndef __ASSEMBLER__ +/* Use FreeRTOS assert method */ +#define LWIP_PLATFORM_ASSERT(x) do {lwip_log_emergency("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); vApplicationAssert(__FILE__, __LINE__);} while(0) +#include +#include +#endif #endif /* TOKI_SYSLOG_LWIP_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h index 6148408f431d6f107a3f864a8cf44658e3322648..9a29f3013adeda017c62d469829754409cf2154b 100644 --- a/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/freertos/intperf/master/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 0 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 1 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/slave/freertos/include/freertos+/time/config.h b/zcu102-zynqmp/freertos/intperf/slave/freertos/include/freertos+/time/config.h new file mode 100644 index 0000000000000000000000000000000000000000..0e018845b928e59a398c2555892e7e366142fc2d --- /dev/null +++ b/zcu102-zynqmp/freertos/intperf/slave/freertos/include/freertos+/time/config.h @@ -0,0 +1,87 @@ +#ifndef FREERTOS_PLUS_TIME_CONFIG_H +#define FREERTOS_PLUS_TIME_CONFIG_H + +/** + * Number of second length measurements used to build + * the median second length of the master clock. + * + * This is primarily important to filter jitter of the + * master clock. Do not set this too high or + * synchronization will react slow to frequency changes + * of the master clock. + */ +#define CLK_SYNC_MEDIAN_ARRAY_SIZE 10 + +/** + * Frequency offset at which the algorithm stops skewing + * the frequency of the slave clock to syntonize with + * the master clock and instead does quick + * approximations. + * + * After CLK_CONSEQ_APPROX approximations, the algorithm + * is forced to skew the slave clock until synchronization + * is achieved. This is to avoid oscillation due to bad + * approximations. If the frequency of the master clock + * changes during this backoff period, approximations are + * unlocked again. + * + * This should be higher than CLK_SYNC_ADJ_CLAMP and + * CLK_SYNC_ADJ_FREQ to not accidently bail while adjusting + * the slave clock. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_FREQ_BAIL 1000000L + +/** + * The amount of nanoseconds the phase of the slave clock + * may be shifted compared to the master clock, before it + * is stepped. + * + * Unit: (nsec) + */ +#define CLK_SYNC_PHASE_BAIL 1000000000L + +/** + * Consecutive approximations allowed before syntonization + * via skewing is enforced. If the frequency of the master + * clock changes while no approximations are allowed, they + * are unlocked again. + */ +#define CLK_CONSEQ_APPROX 3 + +/** + * Maximum adjustment of the slave clock steerable by the + * algorithm. Be aware that very high values may lead to + * instability of the algorithm and thus deviation of the + * clocks. + * + * Unit: (nsec/sec) + */ +#define CLK_SYNC_ADJ_PHASE_CLAMP 500000L + +/** + * The frequency adjustment repeatedly applied to the base + * frequency until frequencies of master and slave clock + * equal each other approximately. If this value is bigger + * than CLK_SYNC_ADJ_CLAMP, it will be ignored. + * + * This should be kept reasonably small to avoid oscillation + * of the algorithm. For high frequency deviations a faster + * approximation is used. See CLK_SYNC_BAIL. + * + * If you set this too small you will see many bails of the + * algorithm when the frequency of the master clock is + * shifted. + * + * Unit: (nsec) + */ +#define CLK_SYNC_ADJ_FREQ_CLAMP 300000L + +/** + * (CLK_SYNC_TRACE_INT_DEV == 1): Internal clock deviation + * statistics are written as STM Traces for each tick + */ +#define CLK_SYNC_TRACE_INT_DEV 1 + +#endif /* FREERTOS_PLUS_TIME_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/slave/freertos/include/freertos/FreeRTOSConfig.h b/zcu102-zynqmp/freertos/intperf/slave/freertos/include/freertos/FreeRTOSConfig.h index 331fd639505da9afb0637b4b76a61677d379298b..97db335cda9acdd121fae0cfe24f3f21a674f525 100644 --- a/zcu102-zynqmp/freertos/intperf/slave/freertos/include/freertos/FreeRTOSConfig.h +++ b/zcu102-zynqmp/freertos/intperf/slave/freertos/include/freertos/FreeRTOSConfig.h @@ -329,7 +329,7 @@ /** * Set to 1 if you wish to use an tick hook, or 0 to omit an tick hook. */ -#define configUSE_TICK_HOOK 0 +#define configUSE_TICK_HOOK 1 /** * The stack overflow detection page describes the use of this parameter. @@ -763,4 +763,12 @@ eg. for core 1 PMU ID = 175 + 1 = 176 */ */ #include "freertos+/sched-ext/config.h" + +/* + ------------------------------------------------ + ------- Timekeeping specific defines. ------- + ------------------------------------------------ +*/ +#include "freertos+/time/trace-macros.h" + #endif /* FREERTOS_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/lwipopts.h b/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/lwipopts.h index 9f284054878f3a1d7af7d72b17f11c41b677ae39..a243f4b97bd73bc4ceab941ae8d28566dd3378d5 100644 --- a/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/lwipopts.h +++ b/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/lwipopts.h @@ -38,12 +38,28 @@ * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. * Disable this option if you use a POSIX operating system that uses the same * names (read, write & close). + * As we use newlib we can not enable this. Instead we rename within the syscall + * table or wrap the methods via newlib - whatever fits best. */ -#define LWIP_POSIX_SOCKETS_IO_NAMES 1 +#define LWIP_POSIX_SOCKETS_IO_NAMES 0 + +/** + * LWIP_SOCKET_SELECT==1 (default): enable select() for sockets (uses a netconn + * callback to keep track of events). + * This saves RAM (counters per socket) and code (netconn event callback), which + * should improve performance a bit). + */ +#define LWIP_SOCKET_SELECT 1 + +/** + * LWIP_SOCKET_POLL==1 (default): enable poll() for sockets (including + * struct pollfd, nfds_t, and constants) + */ +#define LWIP_SOCKET_POLL 1 /** * If LWIP_PROVIDE_ERRNO is undefined, sockets.c will utilize - * included by the platform. If LWIP_PROVIDE_ERRNO is set to 1, "lwip/arch.h" + * included by the platform. If LWIP_PROVIDE_ERRNO is defined, "lwip/arch.h" * defines the same things as does. */ //#define LWIP_PROVIDE_ERRNO 1 @@ -101,6 +117,12 @@ */ #define SYS_LIGHTWEIGHT_PROT 1 +/** + * LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX = 1 if lwIP should use a mutex + * to lock the lwIP-core instead of locking interrupts and the scheduler. + */ +#define LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX 1 + /* ------------------------------------ ---------- Memory options ---------- diff --git a/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/xlwipconfig.h b/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/xlwipconfig.h index a7d72cb989f9fbfc072ffb9bddbfff0b6afb624e..2baeb63c816f0b322dba6fda8027d57d113dda37 100644 --- a/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/xlwipconfig.h +++ b/zcu102-zynqmp/freertos/intperf/slave/lwip/include/lwip/xlwipconfig.h @@ -3,70 +3,8 @@ #define XLWIP_SEMANTIC 0 -#define XLWIP_CONFIG_INCLUDE_GEM 1 -#define XLWIP_CONFIG_INCLUDE_EMACPS 1 - #define XLWIP_CONFIG_XIICPS_RESET 1 -#define XLWIP_CONFIG_EMAC_NUMBER 0 -#define XLWIP_CONFIG_N_TX_DESC 64 -#define XLWIP_CONFIG_N_RX_DESC 64 -#define XLWIP_CONFIG_N_TX_COALESCE 1 -#define XLWIP_CONFIG_N_RX_COALESCE 1 - -#define XLWIP_CONFIG_GEM_ENABLE_ERRQ 1 -#define XLWIP_CONFIG_GEM_ENABLE_IEEE1588 1 - -#define CONFIG_LINKSPEED_AUTODETECT 1 - -/** - * The size of the stack of the thread transferring incoming packets from the Xilinx driver to lwIP - */ -#define XLWIP_CONFIG_THREAD_STACKSIZE 2048 - -/** - * The priority of the thread transferring incoming packets from the Xilinx driver to lwIP - */ -#define XLWIP_CONFIG_THREAD_PRIO (8 - 1) - -/** - * The size of the stack of the thread checking for an established link on the emacps interface - */ -#define XLWIP_LINK_DETECT_THREAD_STACKSIZE 1536 - -/** - * The interval in ms by which change of link connection is determined by the emacps driver - */ -#define XLWIP_LINK_DETECT_THREAD_INTERVAL 1000 /* one second */ - -/** - * Name assigned ot the GEM interface - */ -#define XLWIP_GEM_NAME1 'e' -#define XLWIP_GEM_NAME2 '0' - -/** - * IP address assigned to the GEM interface separated into the four octets - */ -#define XLWIP_GEM_IP1 192 -#define XLWIP_GEM_IP2 168 -#define XLWIP_GEM_IP3 0 -#define XLWIP_GEM_IP4 2 - -/** - * Netmask assigned to the GEM interface separated into the four octets - */ -#define XLWIP_GEM_NM1 255 -#define XLWIP_GEM_NM2 255 -#define XLWIP_GEM_NM3 255 -#define XLWIP_GEM_NM4 0 - -/** - * Gateway assigned to the GEM interface separated into the four octets - */ -#define XLWIP_GEM_GW1 192 -#define XLWIP_GEM_GW2 168 -#define XLWIP_GEM_GW3 0 -#define XLWIP_GEM_GW4 1 +#define XLWIP_CONFIG_ENABLE_HW_PPS 1 #endif /* __XLWIPCONFIG_H_ */ diff --git a/zcu102-zynqmp/freertos/intperf/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h b/zcu102-zynqmp/freertos/intperf/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h index 314162d07fb0e5f5c135e6938964b4be922e3ce3..118a039f79049d423edea59c8d408cb93186bd6f 100644 --- a/zcu102-zynqmp/freertos/intperf/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h +++ b/zcu102-zynqmp/freertos/intperf/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h @@ -1,6 +1,11 @@ #ifndef __XLWIPCONFIG_NETIF_XILINX_H_ #define __XLWIPCONFIG_NETIF_XILINX_H_ +/** + * Maximum number of interfaces supported + */ +#define XLWIP_MAX_IFS 1 + #define XLWIP_CONFIG_INCLUDE_GEM 1 #define XLWIP_CONFIG_INCLUDE_EMACPS 1 diff --git a/zcu102-zynqmp/freertos/intperf/slave/toki-extra/hal/include/toki/config.h b/zcu102-zynqmp/freertos/intperf/slave/toki-extra/hal/include/toki/config.h index ca1db70fa0ffd5b20aeababc7423c434bb79d15a..8888cb8413c8257aa26ba1628a2858133c64c0ef 100644 --- a/zcu102-zynqmp/freertos/intperf/slave/toki-extra/hal/include/toki/config.h +++ b/zcu102-zynqmp/freertos/intperf/slave/toki-extra/hal/include/toki/config.h @@ -22,6 +22,11 @@ ******************************************************************************/ #define ENABLE_Syslog 0 +/******************************************************************************* + * Enable the adjtimex syscall (GPL licensed) + ******************************************************************************/ +#define ENABLE_timex 0 + /******************************************************************************* * toki application specific configuration options ******************************************************************************/ diff --git a/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h b/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h index 583e5bfa8291853c15162993c8f2e79534b9c85a..a9afca1c858401e86cc21a43842e0baaebaa3152 100644 --- a/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h +++ b/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h @@ -4,7 +4,7 @@ /******************************************************************************* * lwIP logging configuration ******************************************************************************/ -#define TOKI_SYSLOG_COMPONENT_LWIP_ENABLED 0 +#define TOKI_SYSLOG_COMPONENT_LWIP_ENABLED 1 #define TOKI_SYSLOG_COMPONENT_LWIP_FACILITY "lwIP" @@ -57,10 +57,10 @@ #define RAW_DEBUG 0x80U #define MEM_DEBUG 0x80U #define MEMP_DEBUG 0x80U -#define SYS_DEBUG 0x00U +#define SYS_DEBUG 0x80U #define TIMERS_DEBUG 0x80U #define TCP_DEBUG 0x80U -#define TCP_INPUT_DEBUG 0x00U +#define TCP_INPUT_DEBUG 0x80U #define TCP_FR_DEBUG 0x80U #define TCP_RTO_DEBUG 0x80U #define TCP_CWND_DEBUG 0x80U @@ -71,10 +71,18 @@ #define UDP_DEBUG 0x80U #define TCPIP_DEBUG 0x80U #define SLIP_DEBUG 0x80U -#define DHCP_DEBUG 0x00U -#define AUTOIP_DEBUG 0x00U -#define DNS_DEBUG 0x00U -#define IP6_DEBUG 0x00U -#define DHCP6_DEBUG 0x00U +#define DHCP_DEBUG 0x80U +#define AUTOIP_DEBUG 0x80U +#define DNS_DEBUG 0x80U +#define IP6_DEBUG 0x80U +#define DHCP6_DEBUG 0x80U + +#ifndef __ASSEMBLER__ +/* Use FreeRTOS assert method */ +#define LWIP_PLATFORM_ASSERT(x) do {lwip_log_emergency("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); vApplicationAssert(__FILE__, __LINE__);} while(0) +#include +#include +#endif #endif /* TOKI_SYSLOG_LWIP_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h index 6148408f431d6f107a3f864a8cf44658e3322648..9a29f3013adeda017c62d469829754409cf2154b 100644 --- a/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/freertos/intperf/slave/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 0 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 1 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/lwip/master/freertos/include/freertos+/time/config.h b/zcu102-zynqmp/freertos/lwip/master/freertos/include/freertos+/time/config.h new file mode 100644 index 0000000000000000000000000000000000000000..21c85f1b3db5262edd6528a390dcc055ca6a0e83 --- /dev/null +++ b/zcu102-zynqmp/freertos/lwip/master/freertos/include/freertos+/time/config.h @@ -0,0 +1,44 @@ +#ifndef FREERTOS_PLUS_TIME_CONFIG_H +#define FREERTOS_PLUS_TIME_CONFIG_H + +/** + * Factor of the proportional component of the + * PID controller. + */ +#define CLK_SYNC_KP 0.7 +#define CLK_SYNC_AGGR_KP 0.9 + +/** + * Factor of the integral component of the + * PID controller. + */ +#define CLK_SYNC_KI 0.01 +#define CLK_SYNC_AGGR_KI 0.1 + +/** + * Offset at which to switch to aggressive PI controller. + * The aggressive mode is required to keep clocks + * synchronous for small deviations (< 1us). + */ +#define CLK_SYNC_SW_AGGR_PI 5000 + +/** + * The amount of nanoseconds the phase of the slave clock + * may be shifted compared to the master clock, before it + * is stepped. + * + * Do not set to less than the length of one tick as + * anything less than this can not be adjusted via + * stepping the clock. + * + * Unit: (nsec) + */ +#define CLK_SYNC_PHASE_BAIL 10000000L + +/** + * (CLK_SYNC_TRACE_INT_DEV == 1): Internal clock deviation + * statistics are written as STM Traces for each tick + */ +#define CLK_SYNC_TRACE_INT_DEV 1 + +#endif /* FREERTOS_PLUS_TIME_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/lwip/master/freertos/include/freertos/FreeRTOSConfig.h b/zcu102-zynqmp/freertos/lwip/master/freertos/include/freertos/FreeRTOSConfig.h index 94e2ca97fa8da1cc527068aa8f1d022ed82a4fe4..ccc8280b3c2c4500855e1b02339aad95bf97ded2 100644 --- a/zcu102-zynqmp/freertos/lwip/master/freertos/include/freertos/FreeRTOSConfig.h +++ b/zcu102-zynqmp/freertos/lwip/master/freertos/include/freertos/FreeRTOSConfig.h @@ -329,7 +329,7 @@ /** * Set to 1 if you wish to use an tick hook, or 0 to omit an tick hook. */ -#define configUSE_TICK_HOOK 0 +#define configUSE_TICK_HOOK 1 /** * The stack overflow detection page describes the use of this parameter. @@ -763,4 +763,12 @@ eg. for core 1 PMU ID = 175 + 1 = 176 */ */ #include "freertos+/sched-ext/config.h" + +/* + ------------------------------------------------ + ------- Timekeeping specific defines. ------- + ------------------------------------------------ +*/ +#include "freertos+/time/trace-macros.h" + #endif /* FREERTOS_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/lwipopts.h b/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/lwipopts.h index 3de81b066b3571fe155e375300401da3465cd238..a243f4b97bd73bc4ceab941ae8d28566dd3378d5 100644 --- a/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/lwipopts.h +++ b/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/lwipopts.h @@ -117,6 +117,12 @@ */ #define SYS_LIGHTWEIGHT_PROT 1 +/** + * LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX = 1 if lwIP should use a mutex + * to lock the lwIP-core instead of locking interrupts and the scheduler. + */ +#define LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX 1 + /* ------------------------------------ ---------- Memory options ---------- diff --git a/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/xlwipconfig.h b/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/xlwipconfig.h index cf07a1c7e18069f5b2fe3d241d02208b52369341..16b08425094e4fb0fc2256cc75207d9c729a091e 100644 --- a/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/xlwipconfig.h +++ b/zcu102-zynqmp/freertos/lwip/master/lwip/include/lwip/xlwipconfig.h @@ -5,4 +5,6 @@ #define XLWIP_CONFIG_XIICPS_RESET 1 +#define XLWIP_CONFIG_ENABLE_HW_PPS 1 + #endif /* __XLWIPCONFIG_H_ */ diff --git a/zcu102-zynqmp/freertos/lwip/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h b/zcu102-zynqmp/freertos/lwip/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h index 314162d07fb0e5f5c135e6938964b4be922e3ce3..118a039f79049d423edea59c8d408cb93186bd6f 100644 --- a/zcu102-zynqmp/freertos/lwip/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h +++ b/zcu102-zynqmp/freertos/lwip/master/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h @@ -1,6 +1,11 @@ #ifndef __XLWIPCONFIG_NETIF_XILINX_H_ #define __XLWIPCONFIG_NETIF_XILINX_H_ +/** + * Maximum number of interfaces supported + */ +#define XLWIP_MAX_IFS 1 + #define XLWIP_CONFIG_INCLUDE_GEM 1 #define XLWIP_CONFIG_INCLUDE_EMACPS 1 diff --git a/zcu102-zynqmp/freertos/lwip/master/toki-extra/hal/include/toki/config.h b/zcu102-zynqmp/freertos/lwip/master/toki-extra/hal/include/toki/config.h index 86e946b46617e3653d43f5f1648b712c9853e285..7a03bdcd3afe6b4830d77a61803099a1fde44365 100644 --- a/zcu102-zynqmp/freertos/lwip/master/toki-extra/hal/include/toki/config.h +++ b/zcu102-zynqmp/freertos/lwip/master/toki-extra/hal/include/toki/config.h @@ -20,7 +20,12 @@ /******************************************************************************* * Enable logging through the toki-syslog component ******************************************************************************/ -#define ENABLE_Syslog 0 +#define ENABLE_Syslog 1 + +/******************************************************************************* + * Enable the adjtimex syscall (GPL licensed) + ******************************************************************************/ +#define ENABLE_timex 1 /******************************************************************************* * toki application specific configuration options diff --git a/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h b/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h index d49f6139e2eba35b8509864ebb725a2b17e14c0f..a9afca1c858401e86cc21a43842e0baaebaa3152 100644 --- a/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h +++ b/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h @@ -57,10 +57,10 @@ #define RAW_DEBUG 0x80U #define MEM_DEBUG 0x80U #define MEMP_DEBUG 0x80U -#define SYS_DEBUG 0x00U +#define SYS_DEBUG 0x80U #define TIMERS_DEBUG 0x80U #define TCP_DEBUG 0x80U -#define TCP_INPUT_DEBUG 0x00U +#define TCP_INPUT_DEBUG 0x80U #define TCP_FR_DEBUG 0x80U #define TCP_RTO_DEBUG 0x80U #define TCP_CWND_DEBUG 0x80U @@ -71,10 +71,18 @@ #define UDP_DEBUG 0x80U #define TCPIP_DEBUG 0x80U #define SLIP_DEBUG 0x80U -#define DHCP_DEBUG 0x00U -#define AUTOIP_DEBUG 0x00U -#define DNS_DEBUG 0x00U -#define IP6_DEBUG 0x00U -#define DHCP6_DEBUG 0x00U +#define DHCP_DEBUG 0x80U +#define AUTOIP_DEBUG 0x80U +#define DNS_DEBUG 0x80U +#define IP6_DEBUG 0x80U +#define DHCP6_DEBUG 0x80U + +#ifndef __ASSEMBLER__ +/* Use FreeRTOS assert method */ +#define LWIP_PLATFORM_ASSERT(x) do {lwip_log_emergency("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); vApplicationAssert(__FILE__, __LINE__);} while(0) +#include +#include +#endif #endif /* TOKI_SYSLOG_LWIP_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/components/ptpd.h b/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/components/ptpd.h new file mode 100644 index 0000000000000000000000000000000000000000..43a9be0b56dade5a32708b9e2abe393fe97b2f95 --- /dev/null +++ b/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/components/ptpd.h @@ -0,0 +1,20 @@ +#ifndef TOKI_SYSLOG_PTPD_CONFIG_H +#define TOKI_SYSLOG_PTPD_CONFIG_H + +/******************************************************************************* + * ptpd logging configuration + ******************************************************************************/ +#define TOKI_SYSLOG_COMPONENT_PTPD_ENABLED 1 + +#define TOKI_SYSLOG_COMPONENT_PTPD_FACILITY "ptpd" + +/** + * ptpd logging level (messages with a lower level are disabled) + * Component specific logging level takes precedence! + * + * Levels (0..7): Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency + */ +#define TOKI_SYSLOG_COMPONENT_PTPD_LEVEL 3 + +#endif /* TOKI_SYSLOG_PTPD_CONFIG_H */ + diff --git a/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..b8407c628a9647350b575fb411930d30eab7c645 100644 --- a/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/freertos/lwip/master/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 1 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 1 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/lwip/slave/freertos/include/freertos/FreeRTOSConfig.h b/zcu102-zynqmp/freertos/lwip/slave/freertos/include/freertos/FreeRTOSConfig.h index a1393c80c7d3a8350ab2c07dc518f8a1ca22a12a..29d6a12050228fb3cb67eb507dbb30b366fffca7 100644 --- a/zcu102-zynqmp/freertos/lwip/slave/freertos/include/freertos/FreeRTOSConfig.h +++ b/zcu102-zynqmp/freertos/lwip/slave/freertos/include/freertos/FreeRTOSConfig.h @@ -329,7 +329,7 @@ /** * Set to 1 if you wish to use an tick hook, or 0 to omit an tick hook. */ -#define configUSE_TICK_HOOK 0 +#define configUSE_TICK_HOOK 1 /** * The stack overflow detection page describes the use of this parameter. @@ -763,4 +763,12 @@ eg. for core 1 PMU ID = 175 + 1 = 176 */ */ #include "freertos+/sched-ext/config.h" + +/* + ------------------------------------------------ + ------- Timekeeping specific defines. ------- + ------------------------------------------------ +*/ +#include "freertos+/time/trace-macros.h" + #endif /* FREERTOS_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/lwipopts.h b/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/lwipopts.h index 24d96ab6bb7c147f194e4dc5669198936f544cb8..bbe0ab68ed4b06340618d45225aba19311b75ac4 100644 --- a/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/lwipopts.h +++ b/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/lwipopts.h @@ -117,6 +117,12 @@ */ #define SYS_LIGHTWEIGHT_PROT 1 +/** + * LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX = 1 if lwIP should use a mutex + * to lock the lwIP-core instead of locking interrupts and the scheduler. + */ +#define LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX 1 + /* ------------------------------------ ---------- Memory options ---------- diff --git a/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/xlwipconfig.h b/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/xlwipconfig.h index cf07a1c7e18069f5b2fe3d241d02208b52369341..2baeb63c816f0b322dba6fda8027d57d113dda37 100644 --- a/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/xlwipconfig.h +++ b/zcu102-zynqmp/freertos/lwip/slave/lwip/include/lwip/xlwipconfig.h @@ -5,4 +5,6 @@ #define XLWIP_CONFIG_XIICPS_RESET 1 +#define XLWIP_CONFIG_ENABLE_HW_PPS 1 + #endif /* __XLWIPCONFIG_H_ */ diff --git a/zcu102-zynqmp/freertos/lwip/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h b/zcu102-zynqmp/freertos/lwip/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h index 314162d07fb0e5f5c135e6938964b4be922e3ce3..118a039f79049d423edea59c8d408cb93186bd6f 100644 --- a/zcu102-zynqmp/freertos/lwip/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h +++ b/zcu102-zynqmp/freertos/lwip/slave/lwip/ports/netif/xilinx/include/netif/xlwip_netif_config.h @@ -1,6 +1,11 @@ #ifndef __XLWIPCONFIG_NETIF_XILINX_H_ #define __XLWIPCONFIG_NETIF_XILINX_H_ +/** + * Maximum number of interfaces supported + */ +#define XLWIP_MAX_IFS 1 + #define XLWIP_CONFIG_INCLUDE_GEM 1 #define XLWIP_CONFIG_INCLUDE_EMACPS 1 diff --git a/zcu102-zynqmp/freertos/lwip/slave/toki-extra/hal/include/toki/config.h b/zcu102-zynqmp/freertos/lwip/slave/toki-extra/hal/include/toki/config.h index ab961c3e4c9a3056e553cd15624e73b7ef1ccd6d..5a2f54f6645b13cd9e47f6bdf84e4d9d88c12753 100644 --- a/zcu102-zynqmp/freertos/lwip/slave/toki-extra/hal/include/toki/config.h +++ b/zcu102-zynqmp/freertos/lwip/slave/toki-extra/hal/include/toki/config.h @@ -15,13 +15,18 @@ /******************************************************************************* * Initialize lwIP ******************************************************************************/ -#define ENABLE_lwIPStack 0 +#define ENABLE_lwIPStack 1 /******************************************************************************* * Enable logging through the toki-syslog component ******************************************************************************/ #define ENABLE_Syslog 0 +/******************************************************************************* + * Enable the adjtimex syscall (GPL licensed) + ******************************************************************************/ +#define ENABLE_timex 0 + /******************************************************************************* * toki application specific configuration options ******************************************************************************/ diff --git a/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h b/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h index d49f6139e2eba35b8509864ebb725a2b17e14c0f..a9afca1c858401e86cc21a43842e0baaebaa3152 100644 --- a/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h +++ b/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/components/lwip.h @@ -57,10 +57,10 @@ #define RAW_DEBUG 0x80U #define MEM_DEBUG 0x80U #define MEMP_DEBUG 0x80U -#define SYS_DEBUG 0x00U +#define SYS_DEBUG 0x80U #define TIMERS_DEBUG 0x80U #define TCP_DEBUG 0x80U -#define TCP_INPUT_DEBUG 0x00U +#define TCP_INPUT_DEBUG 0x80U #define TCP_FR_DEBUG 0x80U #define TCP_RTO_DEBUG 0x80U #define TCP_CWND_DEBUG 0x80U @@ -71,10 +71,18 @@ #define UDP_DEBUG 0x80U #define TCPIP_DEBUG 0x80U #define SLIP_DEBUG 0x80U -#define DHCP_DEBUG 0x00U -#define AUTOIP_DEBUG 0x00U -#define DNS_DEBUG 0x00U -#define IP6_DEBUG 0x00U -#define DHCP6_DEBUG 0x00U +#define DHCP_DEBUG 0x80U +#define AUTOIP_DEBUG 0x80U +#define DNS_DEBUG 0x80U +#define IP6_DEBUG 0x80U +#define DHCP6_DEBUG 0x80U + +#ifndef __ASSEMBLER__ +/* Use FreeRTOS assert method */ +#define LWIP_PLATFORM_ASSERT(x) do {lwip_log_emergency("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); vApplicationAssert(__FILE__, __LINE__);} while(0) +#include +#include +#endif #endif /* TOKI_SYSLOG_LWIP_CONFIG_H */ diff --git a/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/config.h b/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/config.h index eb0a653cee00a7a3be3d9db8d7530d83170aa4e7..b8407c628a9647350b575fb411930d30eab7c645 100644 --- a/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/config.h +++ b/zcu102-zynqmp/freertos/lwip/slave/toki-extra/syslog/include/toki/syslog/configs/config.h @@ -4,6 +4,51 @@ /******************************************************************************* * Global logging configuration ******************************************************************************/ + +/* + * Enable syslog component + */ #define TOKI_SYSLOG 1 +/* + * Use deferred printing for log messages + * This reduces the effort of tasks trying to log data + * and prevents overlapping log messages. + */ +#define TOKI_SYSLOG_DEFERRED 1 + +/* + * Priority of the deferred logging task + * + * If dynamic prioritization is selected, this is the + * starting priority. + */ +#define TOKI_SYSLOG_DEFERRED_PRIO 1 + +/* + * Dynamically decide the priority of the logging task + */ +#define TOKI_SYSLOG_DEFERRED_DYN_PRIO 0 + +/* + * Initial buffer length for log messages + * + * The length of the buffer for the log message can only be determined while + * printing the actual message into the buffer. To keep the amount of messages + * low where the buffer needs to be reallocated to fit the message, this initial + * buffer length should be set high enough. At the same time we allocate a buffer + * of this size for each message, so keep it low enough to not waste all your + * memory. + */ +#define SYSLOG_BUF_LEN 50 + +/* + * Maximum queue length for stored messages + * + * This queue length is to ensure a maximum memory consumption of the syslog + * facility even when the log is spammed with messages. The log will contain + * a message warning about omitted logs if the queue length is exceeded. + */ +#define SYSLOG_QUEUE_LEN 100 + #endif /* TOKI_SYSLOG_CONFIG_H */