* Update submodule pointers
This is needed to address doxygen failures (Which are already fixed in
the submoduled repos).
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Updated submodule libraries to latest release
* Updated pointer for FreeRTOS-Plus-TCP
* Updated README about SNTP
* Updated link for coreSNTP on freertos.org
* Updated corePKCS11 to 'update-pkcs11submodule' branch for testing
* Update corePKCS11 version in manifest.yml
* Updated corePKCS11 pointer to v3.1.0
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
* Replace library links with the application-protocols one
The ReadMe.txt refers to library link on FreeRTOS.org which will not be available until after the library is released in github. Instead, use top level page https://www.freertos.org/application-protocols.html which lists all the libraries in this directory which is also easy for user to navigate and could avoid this issue when releasing new library.
* Update FreeRTOS-Plus/Source/Application-Protocols/readme.txt
Co-authored-by: Archit Aggarwal <architag@amazon.com>
* Update FreeRTOS-Plus/Source/Application-Protocols/readme.txt
Co-authored-by: Paul Bartell <pbartell@amazon.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
Co-authored-by: Paul Bartell <pbartell@amazon.com>
* Remove submodules of community and partner contribution repos, and stale directory of FreeRTOS+UDP
* Obselete NTP demo and rename of HTTP server demo folder
* Update manifest.yml
Since `mbedtls_error.c` is already part of the mbedTLS submodule, the duplicate files are removed from this repository.
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Issue
The existing clock discipline algorithm in the coreSNTP demo yields an inaccurate wall-clock time (in UTC) that is always behind the astronomical UTC time by the chosen polling interval period of the demo. The issue with the clock discipline algorithm was that it was calculating the slew rate to make the system clock be gradually compensated for the previous time synchronization clock drift over the period of the subsequent polling time interval. Thereby, the clock slew rate correction calculated is always lower than it should be (because it does not incorporate possible clock drift that would occur over another period of time polling interval till the next time synchronization attempt).
Fix
This PR fixes the clock discipline algorithm to make the demo calculate its system time that matches the astronomical UTC time.
The fix involves simplifying the clock discipline algorithm to use a combination of step and slew correction approaches where:
1. Step correction is applied on EVERY time successful synchronization with a time server. This immediately corrects the system time to match server time.
2. Slew rate is calculated ONCE (on the second successful time synchronization with server) and applied henceforth, on every time polling interval period to compensate gradually for the system clock drift during the period.
This PR makes the following changes in the coreSNTP demo:
To suggest the most secure way of using SNTP communication, we are adding a documentation note about the Network Time Security in the SNTP demo.
Hygiene update of using the FreeRTOS/backoffAlgorithm utility library for calculating time polling period interval backoff when time requests are rejected by a time server.
Issue
There is a possible vulnerability of Denial of Service attack by keeping the UDP socket for the SNTP client task always open in the coreSNTP demo. The Denial of Service attack can occur from receiving multiple server response (duplicated or malicious) for a single SNTP time request sent by the client, and thereby, filing the socket network buffer response packets that affect future time requests.
Solution
This PR fixes this vulnerability by updating the demo to keep a UDP socket open only for the time period of waiting for server response, closing the socket on either receiving a server response or experiencing server timeout, and re-creating a UDP socket for the next polling try. This PR also adds another security functionality using a random port for UDP socket to protect against spoofing attacks from "off-network path" attackers.
Update the coreSNTP submodule to the latest commit. Also, make updates to the coreSNTP demo for the new changes in the SNTP library which include the following:
1. Update to the type for packet size from size_t to uint16_t for parameters in the transport and authentication interfaces.
2. Change in the call to Sntp_SendTimeRequest API to pass the new blockTimeMs parameter added to the API.
3. Update to the clock-offfset type from int32_t to int64_t for representing information in milliseconds. To accommodate this update in the SntpSetTime_t interface, the mathematical model for representing system clock has been updated to store slew rate as milliseconds/second (instead of second/second). This change improves the accuracy of the WinSim demo time correction (because the milliseconds of time difference between server and client time is corrected over the entire polling interval which makes a significant difference!).
This PR also adds demo config macros for setting the block time values passed to the Sntp_SendTimeRequest and Sntp_ReceiveTimeResponse APIs.
Update the coreSNTP demo to showcase use of symmetric key algorithm of authentication scheme for securing SNTP communication between client and server.
The demo uses the AES-128-CMAC algorithm for the generating Message Authentication Code for the client on sending the SNTP time request to server as well as validating the server response received by verifying if the payload present authentication code can be generated. Use of an authentication mechanism in SNTP communication protects against server spoofing attacks as well as man-in-the-middle attacks of server response modification.
The demo uses corePKCS11 library for the AES-CMAC operations. Also, the demo adds functionality of generating random number, using corePKCS11, for sending as a parameter to the Sntp_SendTimeRequest API.
Note: For symmetric key based security mechanism to be protective against malicious, it is IMPORTANT to securely pre-share the symmetric key between client and server.
Add the FreeRTOS/coreSNTP library as a submodule (along with manifest.yaml file update) and add a demo project to showcase use of the coreSNTP library for having a SNTP client daemon in the system for periodically synchronizing system time with the internet to maintain Coordinated Univeral Time (UTC) in a device. This demo maintains UTC time of system in RAM, thereby, representing systems without a Real-Time Clock (RTC) module in the device.
Note: This demo shows use of coreSNTP library for SNTP communication with NTP/SNTP time servers in non-authenticated mode (i.e. without any security mechanism payload beyond the standard 48 bytes of NTP packet exchange between client-server).
* Added spell check
* All words
* Add a missing word
* Fix header checks
* Fix header checks v1
* Fix header check v2
* Updated freertos link in header
* Fixed afr link in the header
* Fix last of header checks
* Update the spell check script to check amazon licensed files only
* Fixed paths and added comments
* Try with modified repo
* Add inplace substitute option to sed
* Use official repo as the spell checker source
* Add vendor file to the ignored list
Co-authored-by: root <root@ip-172-31-5-28.us-west-2.compute.internal>
This change adds the OTA demos and required dependencies and helper components .
* Add demos , configs and project files
* Add subscription manager
* Add HTTP utils
* Submodules the OTA LTS 3.0 Library.
* Add OTA pal
It is recommended by the AWS IoT Jobs service to use DescribeJobExecution API for scaling purposes instead of StartNextPendingJobExecution API. Thus, update the Jobs demo to replace the latter API call with the former API call.
* Clean up demo config for wolfSSL mutual auth.
* Add comment about picking the correct ROOT CA.
* uncrustify using_wolfSSL.c and some other code style changes.
* Apply suggestions from code review
Co-authored-by: Archit Aggarwal <architag@amazon.com>
FreeRTOS_send adds the packet to be sent to the IP task's queue for
later processing. The packet is sent later by the IP task. When
FreeRTOS is used in collaborative mode (i.e. configUSE_PREEMPTION is 0),
the Plaintext_FreeRTOS_send function returns without actually sending
the packet as the IP task never gets a chance to run.
The fact that Plaintext_FreeRTOS_send returns without actually sending
the packet causes an issue in the MQTT_Connect which expects the CONNECT
packet to be actually sent and waits for CONNACK.
This commit adds a taskYIELD call after calling FreeRTOS_send to ensure
that the IP task gets a chance to run and send the packet before the
Plaintext_FreeRTOS_send function returns.
Add URL file links to the MQTT agent documentation page.
Add comment blocks into each demo that also point toward the MQTT agent documentation to ensure users are aware the agent method exists.
* Set mbedtls submodule tag to v2.24.0
* Update projects
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
From the FreeRTOS documentation, pdFREERTOS_ERRNO_ENOSPC means that timeout occurred before any data could be sent or received.
- In the plaintext transport-interface implementation, we would directly return `-pdFREERTOS_ERRNO_ENOSPC`. However, an error like this can occur when the TCP buffer is full, so this ought to be retriable. Libraries that consume the transport interface interpret a return value of 0 to mean that send/recv can be invoked again to get the data. As such, we should appropriately set the return value as 0 when the status is `-pdFREERTOS_ERRNO_ENOSPC`.
- In the mbedTLS port, we would directly return whatever `FreeRTOS_send` or `FreeRTOS_recv` returns. However, sometimes, the return value can be an error. In such cases, we ought to map an error from FreeRTOS+TCP to an equivalent error in mbedTLS. In the case of `-pdFREERTOS_ERRNO_ENOSPC`, we map that to `MBEDTLS_ERR_SSL_TIMEOUT`. When the mbedTLS transport-interface send/recv wrapper sees that value, it appropriately returns 0, so that the library can retry the send/recv. I've verified that when the mbedTLS port returns an error, that same error is returned by `mbedtls_ssl_write` & `mbedtls_ssl_read`.
- The TCP socket may have a receive block time. If bytesToRecv is greater than 1 then a frame is likely already part way through reception and blocking to wait for the desired number of bytes to be available is the
most efficient thing to do. If bytesToRecv is 1 then this may be a speculative call to read to find the start of a new frame, in which case blocking is not desirable as it could block an entire protocol agent task for the duration of the read block time and therefore negatively impact performance. So if bytesToRecv is 1 then don't call recv unless it is known that bytes are already available.
Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
- Adding a comment to the top of S3 download and multi-threaded download demo source code files, to explain how to handle S3 request limits. This is done to prevent users from treating this case as a bug.
- Increasing ipconfigTCP_RX_BUFFER_LENGTH to 5000, as was done recently for other demos.
Small change that simply specifies why the NetworkContext must be defined by each compilation unit along with details on how to include it to your project.
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
The MQTT library has been updated with the MQTT_RECV_POLLING_TIMEOUT_MS and MQTT_SEND_RETRY_TIMEOUT_MS configurations which should be set to zero when using a dummy timer function to avoid possibility of infinite loop when retrying failed transport send/receive calls. As the MQTT Keep Alive demo uses a dummy timer function, this PR updates the demo configuration to set these timeouts to zero.
The FreeRTOS+TCP submodule pointer was set to a commit not in main,
which also lacked commits in main, which ended up causing build failures
for defender demo.
Adding demo to demonstrate the use of pre-signed URLs to connect and download from a S3 bucket. Sends multiple GET requests synchronously to download a file in chunks using range headers. Uses a request and response task in addition to the main HTTP servicing task.
Switch MQTT helpers to logging error message instead of error code.
Adds time parameter to xProccessLoop so defender demo does not wait extra time.
Fixes some incorrect returns in metrics_collector.c
* Submodule wolfSSL and move wolfSSL and WolfSSL-FIPS-Ready to ThirdParty folder.
* Update VS studio project.
* Update FIPS project settings.
* Update FIPS demo readme.
* Add md to ignored file extensions.
Adding demo to use script-generated pre-signed URLs to establish a TLS connection and upload a small file to an S3 bucket using a single PUT request, and then verify the upload by obtaining the file size from S3 and comparing it to the size of the local file.
Adding demo to use script-generated pre-signed URLs to establish a TLS connection and synchronously download a file from an S3 bucket, with multiple GET requests.
* Add FreeRTOS+TCP UDP only demo.
* Update folder name and remove old one
* Update the network interface to be used.
* Update headers
* Update header
* Header update and folder name correction
* Remove WinPCap folder
By removing the definition of the NetworkContext struct in the header file, we allow the application to define it. This allows an application writer to use multiple transports in the same compilation unit. That way, multiple .c files do not have to be created for each transport.
The API of FreeRTOS/backoffAlgorithm library has changed to remove dependency on random number generator; instead require the caller to generate the random number and pass it to the BackoffAlgorithm_GetNextBackoff API for backoff period calculation. This PR updates the submodule pointer commit, and updates the demos and tests to use the simplied library API
Adds the HTTP plaintext demo from C SDK. No functionality is changed, but naming is updated appropriately. It is using freertos_plus_tcp plaintext transport implementation to send HTTP requests and then logs the response from the server.
Add demo to establish a mutually-authenticated network connection with the server before sending and verifying a simple POST request.
* Add demo files
* Move all "Http_Demo_Helpers" files into Common
* Update project files and add vendor config files
* Update http_demo_utils.c after backoff updates
A new repository, FreeRTOS/backoffAlgorithm, has been created for hosting the library for backoff calculation. This repo replaces the FreeRTOS-Plus/Source/Utilities/exponential_backoff with the submodule to the new repository, and updates all the demos that use retry logic to use the backoffAlgorithm API
Adding common utilities that will be used by 4 coreHTTP demos:
- Adding coreHTTP submodule pointer to FreeRTOS-Plus/Source/Application-Protocols/coreHTTP
- Adding folder FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/Http_Demo_Helpers with functions common to demos.
* Add helpful asterisk comments to the shadow demo.
* Update FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c
* Add stuff to the license header for GHA checks.
* Add submodule pointer to the aws/jobs-for-aws-iot-embedded-sdk repository for the Jobs library
* Commonize the MQTT helper functions used by the Device Shadow demo by re-locating them to FreeRTOS-Plus/Demo/AWS/MQTT_Demo_Helpers and updating the Device Shadow demo to use the new files
* URLs have changed on the FreeRTOS.org site - this commit matches the URLs in the code with the new URLs on the website.
* Add link to device shadow directory to the shadow docs.
* Update main.c
* Update main.c
* Update readme.txt
* Update main.c
* Update main.c
* Update readme.txt
Co-authored-by: yngki <47755894+yngki@users.noreply.github.com>
* Fix logging stack to print message in the first SdkLog
* Do not log metadata if on the same line
* Fix wrong var name
* Change task names to DemoTask
* Change for shadow too
* Move declaration to a separate line
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
* Update logging_stack.h file to avoid use of __FUNCTION__ macro
* Revert to use __FUNCTION__ instead of __FILE__
* Fix comment about metadata format
* Fix incorrect mapping of SdkLog function
* Fix typo causing LOG_METADATA_ARGS to be undefined
* Fix another bug with SdkLog macro definition
* Fix formatting
* Move mapping of SdkLog to vLoggingPrintf from logging_stack to config files
* Remove dependency of LIBRARY_LOG_NAME on LIBRARY_METADATA_* macros
* Minor improvements
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
Only comments have changed. No code changes.
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
* Update to the WolfSSL FIPS ready demo: Add a debug break point into the configASSERT() implementation along with a comment telling users how to update the integrity check hash if they hit the breakpoint.
* Updates in the root directory: Remove "New - Stream and Message Buffers.url" as the feature is no longer new, and edit the readme.md file as the repo now contains 'core' libraries in addition to 'FreeRTOS+' libraries.
* FreeRTOS-Plus/Source/Utilities: Add readme files and links to documentation.
* Application-Protocols: Add readme and URL links.
* Remove Index.html from the end of a URL in the readme.txt file.
* Demo-IP-Protocols: Add readme.txt files and code comments saying the protocols are not intended for production use.
* coreMQTT: Remove links to deprecated documentation, add readme and correct links to documentation.
* General: Correct URLs in source files and .url files.
* Update readme.txt
* Fix logging issue caused by using \n as the default newline character
* Update the other demos
* Fix accidentally changed NETWORK_INTERFACE
* Set \r\n as default instead
* Update sources to reflect \r\n change
* Get rid of configLOGGING_NEW_LINE altogether
Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
* Fix wrong comments in shadow_demo_helpers.c
* Fix file brief description in shadow_demo_helpers.c
* Revise the comment for democonfigMQTT_BROKER_ENDPOINT
This updates the platform and logging directory and moves it to the following places:
FreeRTOS\FreeRTOS-Plus\Source\Utilities
FreeRTOS\FreeRTOS-Plus\Source\Application-Protocols\network_transport\freertos_plus_tcp
Project files are updated to follow suite. All updated demos are tested to work as expected.
printf-stdarg.c seems have to been moved by mistake when moving logging sources to a common folder.
Also, because logging.c is specific to Windows, it is moved to FreeRTOS-Plus/Demo/Common/Logging/Logging_WinSim.c.
This updates FreeRTOS-Plus/Source/Application-Protocols/platform folder based on feedback to include separate folders for tls and plaintext. In addition, the device-shadow-for-aws-iot-embedded-c submodule is renamed to device-shadow.
Because we would like to show an example of how the coreMQTT library is used without an actual timer query function, the keep-alive demo is updated to used a mocked function that always returns 0. As such, MQTT_ReceiveLoop must be passed a timeout of 0 so that it runs for exactly 1 iteration. Therefore, MQTT_ReceiveLoop is called repeatedly until an acknowledgement packet from the broker is received or the maximum iterations are reached.
- Remove unused headers in the plaintext FreeRTOS sockets wrapper
- Update MFLN even though the preceding optional configuration returned an mbedTLS error
- Remove an unused `NULL` check in a private method that is already checked by the public connect method
- Add a `NULL` check to the public disconnect method
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
* deleted old version wolfSSL before updating
* updated wolfSSL to the latest version(v4.4.0)
* updated wolfSSL to the latest version(v4.4.0)
* added macros for timing resistance
* Add wolfSSL-FIPS-Ready to Demo and Source
* Add wolfSSL-FIPS-Ready to Demo and Source
* Update README_wolfSSL_FIPS_Ready.md
* Remove unused files
* Update to wolfSSL-4.5.0-FIPS-Ready
* Increase FIPS version number for the default
* Update wolfSSL to the latest version(v.4.5.0)
* Fix version number
* Fix comments from github
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
Co-authored-by: Ming Yue <mingyue86010@gmail.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Co-authored-by: Alfred Gedeon <alfred2g@hotmail.com>
* Add a daemon socket listener so that the process loop will only execute if data is available on the socket.
* Set process loop timeout to 0 so that other commands do not have to wait for a process loop that isn't doing anything.
* Add an additional publisher task to show multiple tasks publishing simultaneously.
* Clarify what is meant by "synchronous" and "asynchronous" publishes.
* Fix possible race condition in task notification waits.
* Move task notification wait loop to its own function.
* The prvMQTTConnect function was doing more than just connecting, so it was split into more functions.
* Minor name changes for clarity.
* Add macros for AWS IoT metrics
This adds instructions for setting up a local Mosquitto broker on Windows for use with the coreMQTT demos. There are different instructions for mutual auth, server auth, and plaintext.
This creates a democonfigDISABLE_SNI option for the demos so that it can easily be toggled by users who are using a local MQTT broker with no hostname. However, it is and should be enabled by default whenever possible.
Fixes build warnings by making the following changes:
- Add header file for snprintf to prevent building warning in Visual Studio.
- Add for compiler warning about unused parameters.
This removes a warning involving const qualifiers. The NetworkContext_t * cannot be declared as const in TransportRecv and TransportSend because mbedtls_ssl_write and mbedtls_ssl_read require non-const pointers. Therefore, the const qualifier is removed from transport_interface.h.
As suggested, because logging_stack.h and logging_levels.h are used not only by demos but also by platform-specific transport code, it would make sense to move FreeRTOS-Plus/Demos/Common/Logging to FreeRTOS-Plus/Source/Logging. The same is done for demo_logging.c and demo_logging.h, which are duplicated by several demos. Win32.vcxproj project files are also updated to follow suite.
The mbedTLS sources used to show up in the root directory of the Visual Studio Project. This change updates WIN32.vcxproj.filters so that it appears under FreeRTOS+\mbedtls\library instead.
* Port shadow demo from product 4
* Fix coding style and formating
* Change assert to configASSERT and fix comments.
* Delete the demo task when it finish
* Relocate the shadow demo code under AWS folder.
* Fix uncrustify.
* Update FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
* Update FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
* Fix comments
* Update from comments.
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
* Break from potentially infinite loops in connection sharing demo
* Use QoS1 subscription for resilience against network disconnect
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
- Porting MQTT basic TLS demo from C-SDK.
- This demo shows the use of the managed MQTT API over a server-authenticated connection.
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
This updates submodules for coreMQTT, coreJSON, and AWS Device Shadow. Some of which contain library fixes.
* Update coreMQTT to latest commit
* Update submodules for coreJSON and AWS Device Shadow to latest commit
* Some update to the demo comments and other fixes.
- Delete the leading underscore in the milliseconds helper macros.
- Add articles to some comments.
- Add clarify to come comments.
- Delete the extraneous line endings of log statements.
- Delete unused headers in the keep-alive demo.
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
Some demos like MQTT plaintext, serializer, and keep alive do not use @param[in] or @param[out] and instead use @param only. This change makes it so that the style matches among all demos. In addition, because FREERTOS_CONFIG_H has no trailing underscore, CORE_MQTT_CONFIG_H_ is changed to CORE_MQTT_CONFIG_H and same for MBEDTLS_CONFIG_H_.
In addition to fixing MISRA warnings, code is updated to have complexity <= 8. Also, this adds changes from PR #313, which allows the support of simultaneous connections in the mbedTLS transport wrapper.
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
- Fix the config file header include gaurd
- Fixes comments only in the main prvMQTTDemoTask( void * pvParameters )
- Deletes unused headers.
- Check the return value of MQTT_Disconnect().
Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
MQTT allows authentication through a username/password in the CONNECT packet. This PR allows the username/password to be passed that way through a config macro. Metrics are also collected for AWS IoT Core through a set of configurable macros that are hard coded to FreeRTOS #tskKERNEL_VERSION_NUMBER. The appropriate ALPN protocols are passed when using AWS IoT Core for username/password authentication.
* Update AbortDelay.c so it uses both vTaskDelayUntil() and xTaskDelayUntil().
Update TaskNotifyArray.c to prevent false positive test failures that appear to be caused by unwarranted integer promotion.
Add use of xTaskDelayUntil() to blocktim.c
This moves the MQTT Multitasking Demo under FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Multitask
The project files such as WIN32.vcxproj and WIN32.vcxproj.filters are updated to point to the sources and includes from the coreMQTT submodule.
No changes are made to the actual code. Only paths are updated.
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
This moves the MQTT Mutual Auth Demo under FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth
The project files such as WIN32.vcxproj and WIN32.vcxproj.filters are updated to point to the sources and includes from the coreMQTT submodule.
No changes are made to the actual code. Only paths are updated.
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: SarenaAWS <6563840+sarenameas@users.noreply.github.com>
Co-authored-by: leegeth <51681119+leegeth@users.noreply.github.com>
This moves the MQTT Serializer Demo under FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Serializer.
The project files such as WIN32.vcxproj and WIN32.vcxproj.filters are updated to point to the sources and includes from the coreMQTT submodule.
No changes are made to the actual code. Only names and paths are updated.
Co-authored-by: leegeth <51681119+leegeth@users.noreply.github.com>
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
This moves the MQTT Keep-Alive Demo under FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Keep_Alive.
The project files such as WIN32.vcxproj and WIN32.vcxproj.filters are updated to point to the sources and includes from the coreMQTT submodule.
No changes are made to the actual code. Only paths are updated.
Co-authored-by: SarenaAWS <6563840+sarenameas@users.noreply.github.com>
This moves the MQTT Plaintext Demo under FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Plain_Text
The project files such as WIN32.vcxproj and WIN32.vcxproj.filters are updated to point to the sources and includes from the coreMQTT submodule.
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: leegeth <51681119+leegeth@users.noreply.github.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
This adds coreMQTT, coreJSON, and Device Shadow as submodules to the following directories:
coreMQTT: FreeRTOS-Plus/Source/Application-Protocols/coreMQTT
coreJSON: FreeRTOS-Plus/Source/coreJSON
Device Shadow: FreeRTOS/FreeRTOS-Plus/Source/AWS/device-shadow-for-aws-iot-embedded-sdk
Platform sources and includes that are utilized by these libraries are also moved from lts-development branch to master:
FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries-LTS-Beta2/c_sdk/platform (lts-development) ->
FreeRTOS-Plus/Source/Application-Protocols/platform (master)
Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
Co-authored-by: leegeth <51681119+leegeth@users.noreply.github.com>
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
Some proofs assume that some pointers returned by malloc are not
NULL. This patch modifies those proofs to make these assumptions
explicit with `__CPROVER_assume(pointer != NULL)` for all such
pointers.
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Use unsigned types/constants where needed.
* Address MISRA 21.15 violations in FreeRTOS_Sockets.c
* Address MISRA rule violations in code (primarily Rule 2.2)
* Inline had been disabled for Coverity builds, preventing
Coverity from correctly identifying dead code; this change
removes the disabling of inline during Coverity builds.
* Added an explanation for the inline suppression of Rule
11.4 in prvSocketValid().
* Address MISRA Rule Violations (10.4 & 10.8)
* MISRA: Rule 21.15 changes
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Change type of usGenerateChecksum's ulAlignBits to intptr_t
Not all platforms have 32-bit pointers. 8-bit machines such as avr8 have
16-bit pointers.
This patch changes the type of ulAlignBits and renames it to uxAlignBits to
reflect the type change.
This fixes a compiler warning on machines with pointers that aren't
32-bits.
Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>
* Fix usGenerateChecksum on odd-aligned buffers with non zero usSum
usGenerateChecksum would generate an incorrect checksum when pucNextData
was odd-aligned and usSum was non-zero.
This was caused by the byte order of usSum not matching the byte order of
the subsequent summing operation.
Odd-aligned buffers are common on 8-bit platforms such as avr8 when using
one of the FreeRTOS dynamic heap allocators.
Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>
* Feedback from PR#122
https://github.com/FreeRTOS/FreeRTOS/pull/122
+ Use a uintptr_t rather than an intptr_t.
Changes supplied by Hein Tibosch.
Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Use unsigned types/constants where needed.
* Address MISRA 21.15 violations in FreeRTOS_Sockets.c
* Address MISRA rule violations in code (primarily Rule 2.2)
* Inline had been disabled for Coverity builds, preventing
Coverity from correctly identifying dead code; this change
removes the disabling of inline during Coverity builds.
* Added an explanation for the inline suppression of Rule
11.4 in prvSocketValid().
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Build: transform scons into Makefile
* Build: add Makefile dependencies
* Build: remove some tabs from Makefile
* Build: Make builds out of source, move wait for event to kernel port
* Test: update the full test to print status messages
* Build: replace lpthread with pthread
Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
* Update FreeRTOS_IP_Private.h
* Update FreeRTOS_Sockets.h
* Update FreeRTOS_DNS.c
* Correct version number
* Update version number
* Update version number