diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/DemoTasks/SNTPClientTask.c b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SNTPClientTask.c similarity index 99% rename from FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/DemoTasks/SNTPClientTask.c rename to FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SNTPClientTask.c index c3b9640c8c..25e5d9fc8a 100644 --- a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/DemoTasks/SNTPClientTask.c +++ b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SNTPClientTask.c @@ -270,8 +270,6 @@ static SystemClock_t systemClock; * system clock parameters. */ static SemaphoreHandle_t xMutex = NULL; -static StaticSemaphore_t xSemaphoreMutex; - /* * @brief Stores the configured time servers in an array. @@ -511,7 +509,7 @@ static CK_RV setupPkcs11ObjectForAesCmac( const SntpAuthContext_t * pAuthContext * @param[in] pServer The time server whose information is filled in the context. * @param[out] pAuthContext The authentication context to update with information about the @p pServer. */ -static bool populateAuthContextForServer( const char * pServer, +static void populateAuthContextForServer( const char * pServer, SntpAuthContext_t * pAuthContext ); /** @@ -913,7 +911,7 @@ static void sntpClient_SetTime( const SntpServerInfo_t * pTimeServer, } /**************************** Authentication Utilities and Interface Functions ***********************************************/ -static bool populateAuthContextForServer( const char * pServer, +static void populateAuthContextForServer( const char * pServer, SntpAuthContext_t * pAuthContext ) { @@ -1291,7 +1289,7 @@ void initializeSystemClock( void ) printTime( &systemClock.baseTime ); /* Initialize semaphore for guarding access to system clock variables. */ - xMutex = xSemaphoreCreateMutexStatic( &xSemaphoreMutex ); + xMutex = xSemaphoreCreateMutex(); configASSERT( xMutex ); /* Clear the first time sync completed flag of the system clock object so that a "step" correction diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/DemoTasks/SampleAppTask.c b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SampleAppTask.c similarity index 100% rename from FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/DemoTasks/SampleAppTask.c rename to FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SampleAppTask.c diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.sln b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.sln new file mode 100644 index 0000000000..1d0b55e42a --- /dev/null +++ b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.sln @@ -0,0 +1,84 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32819.101 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeRTOS-Kernel", "..\..\WindowsSimulator\FreeRTOS-Kernel\FreeRTOS-Kernel.vcxproj", "{72C209C4-49A4-4942-A201-44706C9D77EC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeRTOS+TCP", "..\..\WindowsSimulator\FreeRTOS+TCP\FreeRTOS+TCP.vcxproj", "{C90E6CC5-818B-4C97-8876-0986D989387C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coreSNTP_Demo", "coreSNTP_Demo.vcxproj", "{382DC80F-E278-4BC9-9DB6-59014486DA0F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Logging", "..\..\WindowsSimulator\Logging\Logging.vcxproj", "{BE362AC0-B10B-4276-B84E-6304652BA228}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MbedTLS", "..\..\WindowsSimulator\MbedTLS\MbedTLS.vcxproj", "{E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "corePKCS11", "..\..\WindowsSimulator\corePKCS11\corePKCS11.vcxproj", "{19F0FF1A-3368-491A-9932-A2F089508F51}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|Win32.ActiveCfg = Debug|Win32 + {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|Win32.Build.0 = Debug|Win32 + {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|x64.ActiveCfg = Debug|x64 + {72C209C4-49A4-4942-A201-44706C9D77EC}.Debug|x64.Build.0 = Debug|x64 + {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|Win32.ActiveCfg = Release|Win32 + {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|Win32.Build.0 = Release|Win32 + {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|x64.ActiveCfg = Release|x64 + {72C209C4-49A4-4942-A201-44706C9D77EC}.Release|x64.Build.0 = Release|x64 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|Win32.ActiveCfg = Debug|Win32 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|Win32.Build.0 = Debug|Win32 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|x64.ActiveCfg = Debug|x64 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Debug|x64.Build.0 = Debug|x64 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|Win32.ActiveCfg = Release|Win32 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|Win32.Build.0 = Release|Win32 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|x64.ActiveCfg = Release|x64 + {C90E6CC5-818B-4C97-8876-0986D989387C}.Release|x64.Build.0 = Release|x64 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Debug|Win32.Build.0 = Debug|Win32 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Debug|x64.ActiveCfg = Debug|x64 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Debug|x64.Build.0 = Debug|x64 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Release|Win32.ActiveCfg = Release|Win32 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Release|Win32.Build.0 = Release|Win32 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Release|x64.ActiveCfg = Release|x64 + {382DC80F-E278-4BC9-9DB6-59014486DA0F}.Release|x64.Build.0 = Release|x64 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|Win32.Build.0 = Debug|Win32 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|x64.ActiveCfg = Debug|x64 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Debug|x64.Build.0 = Debug|x64 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|Win32.ActiveCfg = Release|Win32 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|Win32.Build.0 = Release|Win32 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|x64.ActiveCfg = Release|x64 + {BE362AC0-B10B-4276-B84E-6304652BA228}.Release|x64.Build.0 = Release|x64 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Debug|Win32.ActiveCfg = Debug|Win32 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Debug|Win32.Build.0 = Debug|Win32 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Debug|x64.ActiveCfg = Debug|x64 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Debug|x64.Build.0 = Debug|x64 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Release|Win32.ActiveCfg = Release|Win32 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Release|Win32.Build.0 = Release|Win32 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Release|x64.ActiveCfg = Release|x64 + {E1016F3E-94E9-4864-9FD8-1D7C1FEFBFD7}.Release|x64.Build.0 = Release|x64 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Debug|Win32.ActiveCfg = Debug|Win32 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Debug|Win32.Build.0 = Debug|Win32 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Debug|x64.ActiveCfg = Debug|x64 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Debug|x64.Build.0 = Debug|x64 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Release|Win32.ActiveCfg = Release|Win32 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Release|Win32.Build.0 = Release|Win32 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Release|x64.ActiveCfg = Release|x64 + {19F0FF1A-3368-491A-9932-A2F089508F51}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3876F3F5-8086-4F8E-BB5E-D8840E7D926C} + EndGlobalSection + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = FreeRTOS_Plus_TCP_Minimal.vsmdi + EndGlobalSection +EndGlobal diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.vcxproj b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.vcxproj new file mode 100644 index 0000000000..59a50c43d6 --- /dev/null +++ b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.vcxproj @@ -0,0 +1,204 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {382dc80f-e278-4bc9-9db6-59014486da0f} + coreSNTP_Demo + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);.;..\..\Source\Application-Protocols\network_transport\sockets_wrapper\freertos_plus_tcp;..\..\Source\Application-Protocols\network_transport;..\..\Source\Utilities\backoff_algorithm\source\include;..\..\Source\Application-Protocols\coreSNTP\source\include;$(IncludePath) + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);.;..\..\Source\Application-Protocols\network_transport\sockets_wrapper\freertos_plus_tcp;..\..\Source\Application-Protocols\network_transport;..\..\Source\Utilities\backoff_algorithm\source\include;..\..\Source\Application-Protocols\coreSNTP\source\include;$(IncludePath) + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);.;..\..\Source\Application-Protocols\network_transport\sockets_wrapper\freertos_plus_tcp;..\..\Source\Application-Protocols\network_transport;..\..\Source\Utilities\backoff_algorithm\source\include;..\..\Source\Application-Protocols\coreSNTP\source\include;$(IncludePath) + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);.;..\..\Source\Application-Protocols\network_transport\sockets_wrapper\freertos_plus_tcp;..\..\Source\Application-Protocols\network_transport;..\..\Source\Utilities\backoff_algorithm\source\include;..\..\Source\Application-Protocols\coreSNTP\source\include;$(IncludePath) + + + false + + + + Level3 + true + MBEDTLS_CONFIG_FILE="mbedtls_config_v3.2.1.h";_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + false + + + Console + true + %(AdditionalDependencies) + + + + + Level3 + true + true + true + MBEDTLS_CONFIG_FILE="mbedtls_config_v3.2.1.h";_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + false + + + Console + true + true + true + %(AdditionalDependencies) + + + + + Level3 + true + MBEDTLS_CONFIG_FILE="mbedtls_config_v3.2.1.h";_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + false + + + Console + true + %(AdditionalDependencies) + + + + + Level3 + true + true + true + MBEDTLS_CONFIG_FILE="mbedtls_config_v3.2.1.h";_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + false + + + Console + true + true + true + %(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + {19f0ff1a-3368-491a-9932-a2f089508f51} + + + {c90e6cc5-818b-4c97-8876-0986d989387c} + false + false + + + {72c209c4-49a4-4942-a201-44706c9d77ec} + false + false + + + {be362ac0-b10b-4276-b84e-6304652ba228} + false + + + {e1016f3e-94e9-4864-9fd8-1d7c1fefbfd7} + + + + + + \ No newline at end of file diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.vcxproj.filters b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.vcxproj.filters new file mode 100644 index 0000000000..b159683a47 --- /dev/null +++ b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/coreSNTP_Demo.vcxproj.filters @@ -0,0 +1,51 @@ + + + + + {a442e1bd-e141-45a4-860d-a8eccab1b8c2} + + + {ec612a95-3f21-4e0a-b9cd-0ba89d62067e} + + + {e68c7733-fa69-477a-ae55-3569a957d412} + + + + + network_transport + + + backoff_algorithm + + + + + + coreSNTP + + + coreSNTP + + + + + network_transport + + + backoff_algorithm + + + + + + coreSNTP + + + coreSNTP + + + coreSNTP + + + \ No newline at end of file diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/core_sntp_demo.sln b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/core_sntp_demo.sln deleted file mode 100644 index dcfc1fe098..0000000000 --- a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/core_sntp_demo.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29215.179 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RTOSDemo", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.ActiveCfg = Debug|Win32 - {C686325E-3261-42F7-AEB1-DDE5280E1CEB}.Debug|Win32.Build.0 = Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {150F08BF-9D61-4CC2-8DBF-1335172A1EA4} - EndGlobalSection - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = FreeRTOS_Plus_TCP_Minimal.vsmdi - EndGlobalSection -EndGlobal diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/main.c index 62e41700ee..a9a8b045c7 100644 --- a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/main.c @@ -155,12 +155,6 @@ void vStartSntpDemo( void ) { initializeSystemClock(); - /* Configure mbedTLS to use FreeRTOS specific threading function. */ - mbedtls_threading_set_alt( mbedtls_platform_mutex_init, - mbedtls_platform_mutex_free, - mbedtls_platform_mutex_lock, - mbedtls_platform_mutex_unlock ); - /* Create the SNTP client task that is responsible for synchronizing system time with the time servers * periodically. This is created as a high priority task to keep the SNTP client operation unhindered. */ xTaskCreate( sntpTask, /* Function that implements the task. */ diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/readme.url b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/readme.url deleted file mode 100644 index 44ba477139..0000000000 --- a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/readme.url +++ /dev/null @@ -1,5 +0,0 @@ -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,11 -[InternetShortcut] -IDList= -URL=https://www.freertos.org/sntp/sntp-demo.html