Skip to content

Commit

Permalink
Merge branch 'main' into update-utilities-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chinglee-iot authored Aug 17, 2023
2 parents 0453d97 + ed27177 commit f8804b0
Show file tree
Hide file tree
Showing 104 changed files with 2,009 additions and 1,393 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/freertos_demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ jobs:
exit 1
fi
- name: Build Posix_GCC Demo for Coverage Test
shell: bash
working-directory: FreeRTOS/Demo/Posix_GCC
run: make -j COVERAGE_TEST=1

- name: Build Posix_GCC Full Demo
id: build-posix-gcc-full-demo
shell: bash
Expand All @@ -239,6 +244,7 @@ jobs:
# Build Posix_GCC Full Demo
echo "::group::Build Posix_GCC Full Demo"
sed -i -z "s/int[[:space:]]*main[[:space:]]*([[:space:]]*void[[:space:]]*)\n{/int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );/g" main.c
make clean
make -j
echo "::endgroup::"
if [ "$?" = "0" ]; then
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/freertos_plus_demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,10 @@ jobs:
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_FIPS_Ready_Windows_Simulator
run: msbuild FreeRTOS_Plus_WolfSSL.sln -t:rebuild -property:Configuration=Debug -m

- name: Build FreeRTOS+TCP IPv6 Demo
working-directory: FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_IPv6_Demo/IPv6_Multi_WinSim_demo
run: msbuild FreeRTOS_Plus_TCP_IPv6_Multi.sln -t:rebuild -property:Configuration=Debug -m

winsim_plus_demos:
name: FreeRTOS+CLI Windows Simulator Demos
runs-on: windows-2019
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,24 @@
extern void vLoggingPrintf( const char * pcFormatString,
... );

/* Set to 1 to enable IPv4. */
#define ipconfigUSE_IPv4 ( 1 )

/* Set to 1 to enable IPv6. */
#define ipconfigUSE_IPv6 ( 1 )

/* Set to 0 to disable backward compatible. */
#define ipconfigIPv4_BACKWARD_COMPATIBLE 0

/* Set to 0 to disable compatible for multiple end-points/interfaces.
* Only one interface/end-point is allowed to use when ipconfigCOMPATIBLE_WITH_SINGLE
* is set to 1. */
#define ipconfigCOMPATIBLE_WITH_SINGLE 0

/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
* 1 then FreeRTOS_debug_printf should be defined to the function used to print
* out the debugging messages. */
#define ipconfigHAS_DEBUG_PRINTF 1
#define ipconfigHAS_DEBUG_PRINTF 1
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
#define FreeRTOS_debug_printf( X ) vLoggingPrintf X
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
pcTransmittedString[ strlen( pcTransmittedString ) ] = '-';
ulTxCount++;

printf( "\n\tSending %d bytes of data to the echo server\n", lStringLength );
printf( "\n\tSending %ld bytes of data to the echo server\n", lStringLength );
/* Send the string to the socket. */
lTransmitted = FreeRTOS_send( xSocket, /* The socket being sent to. */
( void * ) pcTransmittedString, /* The data being sent. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ void main_tcp_echo_client_tasks( void )

#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )

extern NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface );
pxFillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
extern NetworkInterface_t * pxLibslirp_FillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface );
pxLibslirp_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );

/* === End-point 0 === */
FreeRTOS_FillEndPoint( &( xInterfaces[ 0 ] ), &( xEndPoints [ 0 ] ), ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
Expand Down Expand Up @@ -202,7 +202,7 @@ void main_tcp_echo_client_tasks( void )
* events are only received if implemented in the MAC driver. */
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
struct xNetworkEndPoint * pxEndPoint )
struct xNetworkEndPoint * pxEndPoint )
#else
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent )
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
Expand Down Expand Up @@ -279,6 +279,7 @@ static void prvMiscInitialisation( void )
{
time_t xTimeNow;
uint32_t ulRandomNumbers[ 4 ];

/* Seed the random number generator. */
time( &xTimeNow );
FreeRTOS_debug_printf( ( "Seed for randomiser: %lu\n", xTimeNow ) );
Expand Down Expand Up @@ -313,10 +314,10 @@ static void prvMiscInitialisation( void )

#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
BaseType_t xApplicationDNSQueryHook_Multi( struct xNetworkEndPoint * pxEndPoint,
const char * pcName )
const char * pcName )
#else
BaseType_t xApplicationDNSQueryHook( const char * pcName )
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
{
BaseType_t xReturn;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,8 @@
#define strncasecmp _strnicmp
#define strcmpi _strcmpi

extern void vLoggingPrintf( const char * pcFormatString,
... );
#define configPRINTF( X ) vLoggingPrintf X

#endif /* FREERTOS_CONFIG_H */
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern void vLoggingPrintf( const char * pcFormatString,
/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
* 1 then FreeRTOS_debug_printf should be defined to the function used to print
* out the debugging messages. */
#define ipconfigHAS_DEBUG_PRINTF 1
#define ipconfigHAS_DEBUG_PRINTF 0
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
#define FreeRTOS_debug_printf( X ) vLoggingPrintf X
#endif
Expand All @@ -53,7 +53,7 @@ extern void vLoggingPrintf( const char * pcFormatString,
* FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1
* then FreeRTOS_printf should be set to the function used to print out the
* messages. */
#define ipconfigHAS_PRINTF 1
#define ipconfigHAS_PRINTF 0
#if ( ipconfigHAS_PRINTF == 1 )
#define FreeRTOS_printf( X ) vLoggingPrintf X
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
other libraries can be found. Note that an absolut path may also used.
Please try to avoid paths that contain whitespace.
</COMMENT>
<FREERTOS_SOURCE_DIR>..\..\..\Source\FreeRTOS-Plus-TCP\test\FreeRTOS-Kernel</FREERTOS_SOURCE_DIR>
<FREERTOS_INCLUDE_DIR>..\..\..\Source\FreeRTOS-Plus-TCP\test\FreeRTOS-Kernel\include</FREERTOS_INCLUDE_DIR>
<FREERTOS_SOURCE_DIR>..\..\..\..\FreeRTOS\Source</FREERTOS_SOURCE_DIR>
<FREERTOS_INCLUDE_DIR>..\..\..\..\FreeRTOS\Source\include</FREERTOS_INCLUDE_DIR>
<DEMO_COMMON_SOURCE_DIR>..\common</DEMO_COMMON_SOURCE_DIR>
<PLUS_TCP_SOURCE_DIR>..\..\..\Source\FreeRTOS-Plus-TCP\source</PLUS_TCP_SOURCE_DIR>
<PLUS_TCP_INCLUDE_DIR>..\..\..\Source\FreeRTOS-Plus-TCP\source\include</PLUS_TCP_INCLUDE_DIR>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void vLoggingInit( BaseType_t xLogToStdout,
/* Can only be called before the scheduler has started. */
configASSERT( xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED );

#if ( ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) )
#if ( ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) || defined( configPRINTF ) )
{
HANDLE Win32Thread;

Expand Down Expand Up @@ -215,7 +215,7 @@ void vLoggingInit( BaseType_t xLogToStdout,
SetThreadPriority( Win32Thread, THREAD_PRIORITY_IDLE );
}
}
#else /* if ( ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) ) */
#else /* if ( ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) || defined( configPRINTF ) ) */
{
/* FreeRTOSIPConfig is set such that no print messages will be output.
* Avoid compiler warnings about unused parameters. */
Expand All @@ -225,7 +225,7 @@ void vLoggingInit( BaseType_t xLogToStdout,
( void ) usRemotePort;
( void ) ulRemoteIPAddress;
}
#endif /* ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) */
#endif /* ( ipconfigHAS_DEBUG_PRINTF == 1 ) || ( ipconfigHAS_PRINTF == 1 ) || defined( configPRINTF ) */
}
/*-----------------------------------------------------------*/

Expand Down
Loading

0 comments on commit f8804b0

Please sign in to comment.