Commit Graph

579 Commits (main)

Author SHA1 Message Date
Carl Lundin 4ec66eb364 Move mbedtls tag to v2.25.0 4 years ago
Carl Lundin db18ff7d59 Fix pkcs11 demo build. 4 years ago
Sukhmani Minhas f4591cec06
Stack fix (#475) 4 years ago
Archit Gupta bff2f04c5f
Update submodule pointers (#476) 4 years ago
Oscar Michael Abrina 6155c025a2
Update submodules of CSDK libraries (#473) 4 years ago
Oscar Michael Abrina 028bf653f7
Delete HTTP demo task upon completion (#472)
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Archit Gupta 2e0de9aa70
Clean up demo project files (#468) 4 years ago
alfred gedeon 41237e01d0
Split networking from posix and qemu mps2 demos (#455)
Split networking from posix and qemu mps2 demos
4 years ago
RichardBarry a503a3a7a0
Add links to the MQTT agent in the non-agent mqtt demos (#470)
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.
4 years ago
Carl Lundin 1d444eecae
Update mbedtls to v2.24.0 (#465)
* 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>
4 years ago
Oscar Michael Abrina f23752164b
Map errors from FreeRTOS+TCP to mbedTLS and make read non-blocking when requesting start of frame (#452)
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>
4 years ago
Sukhmani Minhas ebd1cdf702
Add comment about handling S3 request limits to S3 download demos (#462)
- 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.
4 years ago
Oscar Michael Abrina 1c2c671e7a
Update comments about NetworkContext definition (#461)
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>
4 years ago
Archit Aggarwal d93a3d63a0
Update demos to use version macro from coreMQTT (#460)
Update demos to use the MQTT_LIBRARY_VERSION macro for the coreMQTT version they report in their metrics
4 years ago
Archit Aggarwal c0d4c7c67c
Update MQTT config for Keep Alive demo that uses dummy timer (#457)
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.
4 years ago
Carl Lundin 492ac6edb2
Move corePKCS11 forward and update to latest core_pkcs11.h (#441)
* Move corePKCS11 forward.
* Update licenses.
* strip NULL terminator.
* Add threading_alt.h
* Use github link.

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Archit Gupta 353d2ef35b
Fix FreeRTOS+TCP submodule pointer (#453)
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.
4 years ago
Sukhmani Minhas 57161da956
Update HTTP demo project files (#451)
* Update project filters

* Address inaccurate retry count
4 years ago
Sukhmani Minhas 87662ff4d8
Replace GPL with FreeRTOS license in MbedTLS demo config files (#447)
Since we own mbedtls_config.h files, updating the GPL to use the FreeRTOS license instead.
4 years ago
SarenaAWS 4538b99a9b
Change all occurrences of broker to server in coreHTTP demos folder. (#445) 4 years ago
yngki 46acf2863a
Update readme.txt (#446)
* Update readme.txt

* Update readme.txt

* Update readme.txt

* Update check-header.py

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years ago
Sukhmani Minhas d69c9c01e8
Port S3 multi-threaded download demo from C-SDK (#436)
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.
4 years ago
alfred gedeon b7b9ccb099
Qemu mps2 networking (#439)
* Demo: Add Support for netwroking in Qemu for MPS2 AN385
* Add tcp echo client
* Add steps to Readme
4 years ago
Archit Gupta 79e432738b
Adds error messages for AWS demo mqtt helpers + misc fixes (#440)
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
4 years ago
Oscar Michael Abrina 9c1efa8d02
Update WindowsTargetPlatformVersion to 10.0 (#442)
CI only supports 10.0, so this change is required for CI to build this demo correctly on Visual Studio.
4 years ago
Carl Lundin 934020a5a2
Move WolfSSL to ThirdParty and Submodule code (#433)
* 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.
4 years ago
leegeth 4651c46479
Add retries to demos in case of a failure. (#435) 4 years ago
Sukhmani Minhas d2fcf20caf
Port S3 Upload Demo from C-SDK (#417)
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.
4 years ago
Sukhmani Minhas 24def41337
Port S3 Download Demo from C-SDK (#416)
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.
4 years ago
Aniruddha Kanhere 9a452918d1
Add UDP demo running FreeRTOS+TCP (#425)
* 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
4 years ago
Archit Aggarwal eec68e8790
Fix TLS handshake failures in demos (#438)
Increase default size of FreeRTOS+TCP RX buffers in TLS demos to avoid TLS handshake failures
4 years ago
Oscar Michael Abrina 05dc34b27b
Clean up server setup instructions for MQTT and HTTP demos (#429)
- Removes a broken link to configure Windows Firewall
- Removes references to Mosquitto in the httpbin server setup instructions
4 years ago
Oscar Michael Abrina 73b0d1b259
Support multiple transports in the same compilation unit (#434)
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.
4 years ago
Archit Gupta a7825dc973
Update FreeRTOS+TCP submodule pointer (#427)
Updates the FreeRTOS+TCP submodule pointer.
This brings in a fix that needs changes in defender demo.
4 years ago
Archit Aggarwal 682447445b
Bump backoffAlgorithm submodule for API change and update demos (#426)
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
4 years ago
Carl Lundin 220dd5cc1c
corePKCS11 submodule and file path update (#424)
* Move PKCS #11 submodule forward.

* Update file path for folder update in corePKCS11.

* Update mbedtls file filter.
4 years ago
Archit Gupta 5f72c0031d
Have metrics collector return amount written (#428) 4 years ago
Archit Aggarwal 152b7db2c1
Add "Demo completed successfully" log in Jobs demo (#421) 4 years ago
Oscar Michael Abrina e2652a8711
Add HTTP plaintext demo (#423)
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.
4 years ago
Sukhmani Minhas ac1a10428b
Porting HTTP Mutual Auth Demo from C-SDK (#414)
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
4 years ago
Archit Aggarwal 036ec83b65
Replace exponential_backoff with submodule to FreeRTOS/backoffAlgorithm (#419)
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
4 years ago
Archit Gupta 5ba1e4cf95
Clean up defender demo (#422) 4 years ago
Archit Gupta ced1845508
Fix missing includes in defender demo (#418)
report_builder.c was missing FreeRTOS includes.
Additionally fixes root CA comments in AWS demos.
4 years ago
Archit Gupta 98b8fcd89d
Remove certs from AWS demos + misc fixes (#415)
Removes the AWS IoT cert that is included in the demo_config.h files of the Shadow and Jobs demos.
Additionally fixes some typos.
4 years ago
Archit Gupta 2b4f8d4094
Port Defender demo from C-SDK (#407) 4 years ago
Sukhmani Minhas 56a86428fe
Preparation for coreHTTP demos (#413)
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.
4 years ago
Carl Lundin e313e286df
Bump corePKCS11 submodule (#412)
* Move PKCS submodule forward.

* Use common mbed code.
4 years ago
SarenaAWS d59a4e4f3a
Add helpful asterisk comments to the shadow demo. (#409)
* 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.
4 years ago
Archit Gupta 3dc4516ea1
Add device defender library submodule (#406) 4 years ago
Oscar Michael Abrina ae1226b1bb
Match WindowsTargetPlatformVersion across all MQTT VS Projects (#405)
Simply updates the Visual Studio projects so that WindowsTargetPlatformVersion is set to 10.0 for all MQTT demos.
4 years ago
Archit Aggarwal c415143077
Add demo for AWS IoT Jobs library (#404) 4 years ago
Archit Aggarwal 6debf6a2c0
Add #ifndef guards for SdkLog definition to fix conflicting definitions (#403) 4 years ago
Archit Aggarwal e96fd8b872
Changes to prepare for Jobs Library Demo (#401)
* 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
4 years ago
David Chalco 07f3cbafee [AUTO][RELEASE]: Bump file header version to "202011.00" 4 years ago
Muneeb Ahmed d555cdd475
Fix incorrect size calculation in MT demo (#402) 4 years ago
Aniruddha Kanhere 4312eabeb9
Update FreeRTOS+TCP submodule pointer (#400) 4 years ago
David Chalco 82916bfda8
Manual version update - files not autoversioned with upcoming prefix (#399) 4 years ago
RichardBarry ef18289398
Simplify the mqtt multitasking demo a little (#398) 4 years ago
RichardBarry 5f6464c22e
Update urls in code to those on the server (#396)
* 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>
4 years ago
Oscar Michael Abrina 1876800382
Print metadata only after a line break (#397)
* 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>
4 years ago
Archit Aggarwal 21878bd619
Allow overriding default definitions of logging macros (#384)
* 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>
4 years ago
RichardBarry 596b466300
Add code comments on the different requirements for credential constants between evaluation and production systems. (#386)
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>
4 years ago
Carl Lundin 72e6c2ca92
Update thing name macro comment about usage of defined constants. (#387)
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
4 years ago
RichardBarry 5d3b3cb1c7
Multiple tidy up and corrections preparing for release (#390)
* 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
4 years ago
Aniruddha Kanhere df082944e0
Update FreeRTOS+TCP submodule pointer (#395) 4 years ago
Carl Lundin 1261d4f1cc
PKCS #11 URL update (#394)
* Revert "Update PKCS #11 URL. (#376)"

This reverts commit 88cf80d5d2.

* Update URLs.
4 years ago
Hein Tibosch 2dc54b8c43
Add an include directory to the WinSim project "FreeRTOS_Plus_TCP_Minimal_Windows_Simulator" (#393)
Co-authored-by: Hein Tibosch <hein@htibosch.net>
4 years ago
Oscar Michael Abrina 52d7c47cd4
Fix logging issue causing mangled new lines (#391)
* 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>
4 years ago
andysun2015 54d549cd0e
Fix wrong comments in shadow_demo_helpers.c (#392)
* Fix wrong comments in shadow_demo_helpers.c

* Fix file brief description in shadow_demo_helpers.c

* Revise the comment for democonfigMQTT_BROKER_ENDPOINT
4 years ago
Oscar Michael Abrina b302a81ffd
Filter mbedtls headers in Visual Studio Project for Shadow Demo (#389)
* Group mbedtls headers in Visual Studio Project Filters for Shadow

* Add missing source for mbedtls
4 years ago
Oscar Michael Abrina c7cd06488f
Update path for WinSim logging port (#385)
Moves Logging_WinSim.c to a nested windows folder
4 years ago
Oscar Michael Abrina 01e59a036c
Restructure platform directory (#382)
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.
4 years ago
Oscar Michael Abrina 330b8c002f
Delete printf-stdarg.c and move logging.c from Source/Logging (#381)
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.
4 years ago
Aniruddha Kanhere 698b2b46d6
Update the FreeRTOS+TCP submodule pointer (#379)
* Update the submodule pointer

* Update submodule pointer
4 years ago
Aniruddha Kanhere 98f1ec7c5f
Update the submodule pointer (#378) 4 years ago
Archit Aggarwal 6586b9b401
Update coreJSON submodule, and update call to JSON_Search API in Shadow demo (#375) 4 years ago
Carl Lundin 88cf80d5d2
Update PKCS #11 URL. (#376) 4 years ago
Oscar Michael Abrina 25cd833fd6
Rename platform files and submodules (#374)
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.
4 years ago
Oscar Michael Abrina 5a8f03b633
Update the MQTT keep-alive demo to use a mocked timer-query function (#369)
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.
4 years ago
Oscar Michael Abrina 4124ac0c57
Update path to transport_interface.h from the coreMQTT submodule (#368)
Use transport_interface.h from the source/interface folder of coreMQTT submodule in the MQTT demos as this path was changed recently.
4 years ago
Erik Tamlin 015536f35d
Updated to Percepio Tracealyzer Recorder v4.4.0 (#330)
* Updated to Tracealyzer Recorder v4.4.0
Added support for FreeRTOS v10.4.1

* Fixed version numbers in USB stream port
4 years ago
Archit Aggarwal 832a797c69
Hygiene fix in MQTT demos to log warning for unexpected PINGRESP packet event (#366)
Update MQTT demos to log warning on receiving PINGRESP packet in event callback
4 years ago
Oscar Michael Abrina 559772a4db
Update unused headers and NULL checks for platform wrappers (#367)
- 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>
4 years ago
TakayukiMatsuo c44794cd11
Update wolfSSL to the latest version(v.4.5.0) (#303)
* 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>
4 years ago
Muneeb Ahmed ee588710dd
Improve connection sharing demo (#362)
* 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
4 years ago
andysun2015 594c894699
Update device shadow submodule (#361) 4 years ago
Oscar Michael Abrina f31d10ae0f
Add instructions for MQTT broker setup on Windows for coreMQTT demos (#360)
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.
4 years ago
Oscar Michael Abrina d1c3b8321d
Add demo config option for disabling SNI (#359)
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.
4 years ago
Oscar Michael Abrina f960c4465f
Update coreMQTT submodule pointer and sync transport interface (#358)
Because the const qualifier was removed in PR #356, coreMQTT also needs to be updated to remove it.
4 years ago
andysun2015 af837b2940
Fix build warnings in Shadow demo due to snprintf and unreferenced formal parameter (#357)
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.
4 years ago
Oscar Michael Abrina 398abbaa61
Update transport interface to remove const qualifier from NetworkContext_t * in send/recv (#356)
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.
4 years ago
Oscar Michael Abrina 10842c9189
Relocate logging sources under FreeRTOS-Plus/Source/Logging (#354)
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.
4 years ago
Oscar Michael Abrina 553d448865
Update configNETWORK_INTERFACE_TO_USE default value for demos to 0L (#353)
To avoid silent errors, configNETWORK_INTERFACE_TO_USE should be defaulted to 0L.
4 years ago
Oscar Michael Abrina afc5563045
Update mbedtls VS project filters (#351)
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.
4 years ago
Muneeb Ahmed 8b32c56573
Fix incorrect operator from #349 (#352) 4 years ago
andysun2015 977b3abf54
Port shadow demo from product 4 (#341)
* 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>
4 years ago
Carl Lundin 2eed409577
Configure maximum fragment length extension. (#350) 4 years ago
Muneeb Ahmed 60ac51d7f1
Add macro to break from potential infinite loops (#349)
* 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>
4 years ago
Carl Lundin 15a7337ee0
Rename PKCS files to core. (#344)
* Rename PKCS files to core.
* Pin latest corePKCS11 release.
4 years ago
Muneeb Ahmed 806d51caf0
Fix bug allowing an infinite subscribe loop (#348)
* Reset flag in each iteration of subscribe loop
4 years ago
Sukhmani Minhas 792fde769a
Add MQTT Server Auth (Basic TLS) demo (#308)
- 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>
4 years ago
Oscar Michael Abrina e3b7a56dc8
Update coreMQTT, coreJSON, and AWS Device Shadow submodules to latest commits (#346)
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
4 years ago
SarenaAWS f1d80ffc35
Small fixes for MQTT Serializer and MQTT Keep-alive Demos (#336)
* 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>
4 years ago
Muneeb Ahmed c0591f4658
Delete tasks in multithreaded demo (#339)
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Oscar Michael Abrina 2134bd6619
Match @param style for all MQTT demos (#343)
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_.
4 years ago
Oscar Michael Abrina 5f0bf944cb
Fix MISRA warnings for platform code used by MQTT demos (#337)
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>
4 years ago
SarenaAWS 02aafc3a46
Delete all the guidance to use the public mosquitto broker. (#340) 4 years ago
SarenaAWS 748222bc07
Small MQTT Plaintext hygiene updates (#324)
- 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>
4 years ago
Oscar Michael Abrina e4d6696eb2
Add username/password authentication for MQTT Mutual Auth Demo (#334)
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.
4 years ago
Carl Lundin ec12e1719c
Move PKCS #11 Mutual Auth Demo from LTS Dev branch (#338)
Move the PKCS #11 Mutual Auth demo from the LTS development branch.

Remove left over and unused mbed TLS contexts.
4 years ago
RichardBarry 56d44da270
Exercise xTaskDelayUntil() in demos and tests (#335)
* 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
4 years ago
Archit Aggarwal 00247a7637
Remove extraneous call to MQTT_ProcessLoop (#333) 4 years ago
Oscar Michael Abrina 1b87287e16
Move MQTT Multitasking Demo from lts-development to master (#332)
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>
4 years ago
Oscar Michael Abrina 168d92132f
Move MQTT Mutual Auth Demo from lts-development to master (#331)
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>
4 years ago
Carl Lundin 0c58a39332
Submodule PKCS #11 and add Standalone PKCS #11 demos (#323)
* Submodule PKCS #11.

* Add PKCS #11 demos.
4 years ago
Oscar Michael Abrina f8e90ebddb
Move MQTT Serializer Demo from lts-development to master (#327)
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>
4 years ago
Oscar Michael Abrina 706d6888f9
Move MQTT Keep-Alive Demo from lts-development to master (#326)
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>
4 years ago
Aniruddha Kanhere 8979b3817b
Remove CBMC proofs of TCP source code (#325)
* Add CMock back for the integration tests.

* Removed the CBMC proofs for TCP

* Add the windows files to allow the CBMC proofs to run
4 years ago
Aniruddha Kanhere d37b651e77
Add CMock back for the integration tests. (#321) 4 years ago
Aniruddha Kanhere a6393ee653
This PR adds the TCP submodule to the FreeRTOS/FreeRTOS repo (#307)
* MISRA v5

* Remove TCP code

* Add TCP submodule

* Remove unit test and CMock submodule

* Update submodule pointer
4 years ago
Oscar Michael Abrina b4f50b8e3f
Move MQTT Plaintext Demo from lts-development to master (#315)
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>
4 years ago
Oscar Michael Abrina bd9db07f28
Add submodules for coreMQTT, coreJSON, and Device Shadow along with platform dependencies (#311)
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>
4 years ago
markrtuttle cdf6d93cb9
Modify CBMC proofs to make assumptions about malloc explicit. (#312)
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>
4 years ago
Aniruddha Kanhere a8290734d8
Bring in the patches from FreeRTOS dir to FreeRTOS-Plus (#306)
* MISRA v5

* Update patches in FreeRTOS-Plus to match those in FreeRTOS
4 years ago
Aniruddha Kanhere 6fb8b1fc33
+TCP: Fix spellings (#302)
* MISRA v5

* Add spelling corrections

* Update after Shubham's comments

* Actually fix the spelling
4 years ago
Aniruddha Kanhere ea0033a85d
Fix a breaking build by removing const (#301) 4 years ago
Gary Wicker 3f21957cc8
FreeRTOS+TCP: MISRA rules 10.4, 10.8, & 21.15 (#280)
* 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>
4 years ago
Andy Bennett 5d0908b23f
FreeRTOS+TCP Fix usGenerateChecksum on 8-bit platforms with odd-aligned buffers (#286)
* 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>
4 years ago
Ravishankar Bhagavandas 1fc1bd4321
Add CBMC proofs for FreeRTOS-Plus-CLI (#296) 4 years ago
Cobus van Eeden d5862dbe01
Sync back V10.4.1 (#282)
* Move Kernel submodule pointer to 10.4.1
* Update version number to V10.4.1 (#281)
4 years ago
Gary Wicker c997d887e0
Address MISRA Rule violations (#274)
* 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>
4 years ago
Aniruddha Kanhere 50dc98a5a6
MISRA v5 (#272) 4 years ago
David Chalco 89d475e9b1
Update Version number to 10.4.0 (#237) 4 years ago
Cobus van Eeden 759fe85853
Tracelyzer version updates (#261)
* Update Tracelyzer version numbers
4 years ago
Aniruddha Kanhere 2621e60124
TCP: Update version number and History.txt (#247)
* Update the version number
* Update History.txt
4 years ago
Aniruddha Kanhere 40e410ee8e
Create winbase.h (#248) 4 years ago
alfred gedeon 6b502b5dd3
Build: replace scons with makefile (#235)
* 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>
4 years ago
Aniruddha Kanhere c1b06040fe
TCP: Update History.txt file (#243)
* Update the History.txt
4 years ago
Aniruddha Kanhere 889d3e8667
Create a new branch and address 10.8 warnings (#241) 4 years ago
Aniruddha Kanhere 05b4d4fc64
Address various MISRA warnings v3 (#240)
* Add a branch and make MISRA changes

* initialize the value

* Update after Gary's comments
4 years ago
Aniruddha Kanhere cacf4ad7f9
Address various MISRA warnings v2 (#238)
* Address some MISRA warnings

* Change the return type

* Update FreeRTOS_Sockets.c
4 years ago
Aniruddha Kanhere 0341050048
Address MISRA errors of various kinds (#234)
* MISRA 21.15 changes

* MISRA 11.8 changes
4 years ago
Aniruddha Kanhere 18d238ad5c
Address a few MISRA 2.2 violations in FreeRTOS_IP.c (#230)
* Make changes for MISRA rule 2.2

* Add comments to explain changes

* Fix a typo

* Actually fix a typo

I missed a spot in the previous commit.
4 years ago
Gary Wicker e2ab092351
Address MISRA 21.15 violations in FreeRTOS_Sockets.c (#229)
* Use unsigned types/constants where needed.

* Address MISRA 21.15 violations in FreeRTOS_Sockets.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
4 years ago
Aniruddha Kanhere 7cb57324fd
TCP: Address MISRA rule 11.3 violations (Part 2) (#227) 4 years ago
Gary Wicker bcd5dec6c4
Use unsigned types/constants where needed. (#226)
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
4 years ago
Aniruddha Kanhere 3fc432f7be
TCP: Address MISRA rule11.3 violations (#225) 4 years ago
Aniruddha Kanhere 66371d0cf0
Add CBMC proof for prvProcessEthernetPacket (#199)
* Add proof

* Remove and Rename files

* Modify the makefile

* Update Makefile.json

* Add _static to FreeRTOS_IP.c

* Update prvProcessEthernetPacket_harness.c

* Update the proof and add list to stubs

* add assertions

* Update the proof

* cleanup

* Update

* Update after @yanjos-dev's comment

* Remove unnecessary assumption
4 years ago
Aniruddha Kanhere 0b48e6a3b5
Utility macros to improve readability/static analysis. (#219)
* Update FreeRTOS_IP_Private.h

* Update FreeRTOS_Sockets.h

* Update FreeRTOS_DNS.c

* Correct version number

* Update version number

* Update version number
4 years ago
alfred gedeon 638262fab1
Fix Posix demo build and remove src directory (#213)
* Fix: build errors, remove src directory and bring all files up
* Fix: Remove not needed header
* Doc: fix main comments
* Doc: fix comment

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
4 years ago
Cobus van Eeden 4a026fd703
Move forward Kernel submodule pointer (#218)
* Move forward Kernel submodule pointer
* Fixing patches for CBMC proofs
* Update proofs to assume cTxLock != 127
* Update proofs to assume cRxLock != 127
4 years ago
Aniruddha Kanhere 86117b5173
CBMC proof for vProcessGeneratedUDPPacket (#203)
* Add Proof

* Update

* Update the proof

* Update the proof

* Clean-up

* Clean-up v2

* Update freertos_api.c

* update stub
5 years ago
Aniruddha Kanhere 3c573ad091
CBMC proof for ulARPRemoveCacheEntryByMac (#198)
* Add Proof

* update

* Delete ulARPRemoveCacheEntryByMAC_harness.c

* Changes after Mark's comments

* Update after @yanjos-dev's comment

* Remove confusing variable name

* Update ulARPRemoveCacheEntryByMac_harness.c
5 years ago
Aniruddha Kanhere 6eba275f89
CBMC: Add proof for vSocketBind (#202)
* Add proof

* Update

* Update MakefileCommon.json

* Undo changes

* Undo changes in MakefileCommon.json

* Update Makefile.json

* Update Makefile.json

* Update Makefile.json

* Change v1

* Change v2
5 years ago
Ming Yue d248555de5
Update #169 -- Percepio Tracealyzer Recorder v4.3.11 (#201)
* * Pull Request for Percepio Tracealyzer Recorder v4.3.11

* Update Tracealyzer demo config file.

Co-authored-by: Erik Tamlin <erik.tamlin@percepio.com>
5 years ago
Ming Yue 70dcbe4527
Remove unused wolfSSL files. (#197)
* Remove unused wolfSSL files.

* Add back some removed ciphers.

* Update VS project file.
5 years ago
TakayukiMatsuo 94aa31c3cb
Update wolfSSL to the latest version(v.4.4.0) (#186)
* 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

Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
Co-authored-by: Ming Yue <mingyue86010@gmail.com>
5 years ago
Aniruddha Kanhere f32a0647c8
Remove CBMC patch which is not used anymore (#187)
* Delete 0002-Change-FreeRTOS_IP_Private.h-union-to-struct.patch

* Delete 0002-Change-FreeRTOS_IP_Private.h-union-to-struct.patch
5 years ago
Aniruddha Kanhere 08af68ef90
Remove dependency of CBMC on Patches (#181)
* Changes to DHCP

* CBMC DNS changes

* Changes for TCP_IP

* Changes to TCP_WIN

* Define away static to nothing

* Remove patches

* Changes after Mark's comments v1

* Update MakefileCommon.json

* Correction!
5 years ago
Aniruddha Kanhere a7fec906a4
Misc changes (#183) 5 years ago
Aniruddha Kanhere 07cf5e07e4
MISRA compliance changes for FreeRTOS+TCP headers (#165)
* misra changes

* Update FreeRTOS_IP_Private.h

* Update FreeRTOS_IP_Private.h
5 years ago
Aniruddha Kanhere e903ac0fed
UPD MISRA changes (#164)
Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years ago
Aniruddha Kanhere 97551bf44e
MISRA changes in FreeRTOS_TCP_WIN.c (#162) 5 years ago
Aniruddha Kanhere f2611cc5e5
MISRA compliance changes in FreeRTOS_Sockets{.c/.h} (#161)
* MISRA changes Sockets

* add other changes

* Update FreeRTOSIPConfig.h

* Update FreeRTOSIPConfig.h

* Update FreeRTOSIPConfig.h

* Update FreeRTOSIPConfig.h

* correction

* Add 'U'

* Update FreeRTOS_Sockets.h

* Update FreeRTOS_Sockets.h

* Update FreeRTOS_Sockets.c

* Update FreeRTOS_Sockets.h

* Update after Gary's comments

* Correction reverted
5 years ago
Aniruddha Kanhere ae4d4d38d9
MISRA compliance changes for FreeRTOS_TCP_IP.c (#160)
* MISRA tcp-ip changes

* Changes after Hein's comments on original PR

* Update FreeRTOS_TCP_IP.c

Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years ago
Aniruddha Kanhere e0d62163b0
Sync with +TCP amazon-FreeRTOS (#158)
* DNS.c commit

* IP.c commit

* Add various source & header files
5 years ago
Hein Tibosch c720c18ada
FreeRTOS+TCP Adding the combined driver for SAM4E and SAME70 v2 (#78)
* Adding a combined +TCP driver for SAM4E and SAME70

* Changes after review from Aniruddha

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
5 years ago
Aniruddha Kanhere 4237049b12
Add changes from 2225-2227 amazon-FreeRTOS (#134) 5 years ago
Aniruddha Kanhere 7caa328634
Add Full TCP test suite - not using secure sockets (#131)
* Add Full-TCP suite

* delete unnecessary files

* Change after Joshua's comments
5 years ago
Aniruddha Kanhere d5fedeaa96
Add checks in FreeRTOS_Socket.c (#104)
* Add fail-safes to FreeRTOS_Socket.c

* Use all 'pd' errors

* Correction after Hein's comments

* Correction after Hein's comments v2

* Changes after Hein's comments

* Update after Gary's comments
5 years ago
Aniruddha Kanhere a9b2aac4e9
Folder structure change + Fix broken Projects (#103)
* Update folder structure

* Correct project files

* Move test folder

* Some changes after Yuki's comments
5 years ago
Hein Tibosch 98bfc38bf3
FreeRTOS+TCP : add memory statistics and dump packets, v3 (#83)
* FreeRTOS+TCP : add memory statistics and dump packets, v3

* Two changes as requested by Aniruddha

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
5 years ago
RichardBarry 2df5eeef57
Feature/multiple direct to task notifications (#73)
* Add TaskNotifyArray.c with the single task tests updated to use the task notification array up to the point where the timer is created.

* Continue working on TaskNotifyArray.c to test the new task notification indexes.  Next TaskNotifyArray.c will be refactored to break the tests up a bit.

* Refactor and update the comments in TaskNotifyArray.c - no functional changes.

* Change from the task notify "array" to task notification "indexed" nomenclature in the new task notification API functions that work on one particular task notification with the array of task notifications.

* Update the implementation of the taskNOTIFY_TAKE() and taskNOTIFY_WAIT() trace macros to take the array index of the task notification they are acting on.
Rename configNUMBER_OF_TASK_NOTIFICATIONS to configTASK_NOTIFICATION_ARRAY_ENTRIES.
Add FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c to the Visual Studio project - the file implements tests specific to the behaviour of the indexed task notification functions and should be used in addition to the tests already provided in FreeRTOS/Demo/Common/Minimal/TaskNotify.c.
5 years ago
Aniruddha Kanhere b9e4ecfaf7
Remove Empty and Un-referenced folder from Demo (#86) 5 years ago
Aniruddha Kanhere f11bcc8acc
Fix a Bug and corresponding CBMC patch (#84)
* Update remove-static-in-freertos-tcp-ip.patch

* Update FreeRTOS_TCP_IP.c

* Update remove-static-in-freertos-tcp-ip.patch

* Update remove-static-in-freertos-tcp-ip.patch

Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years ago
Aniruddha Kanhere 6efc39f44b
Add Project for running integration tests v2 (#80)
* Project for integration tests

* relative paths in project files

* relative paths in project files-1

* relative paths in project files-2

* addressed comments

* addressed comments v2

Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years ago
Aniruddha Kanhere cb7edd2323
Sync with a:FR (#75)
* AFR sync

* AFR sync: CBMC

* AFR sync: CBMC: remove .bak files

* AFR sync: CBMC: more cleanup

* Corrected CBMC proofs

* Corrected CBMC patches

* Corrected CBMC patches-1

* Corrected CBMC patches-2

* remove .bak files (3)

Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years ago
alfred gedeon 6557291e54
Test: Add Linux Networking support with demo application (#71)
* Test: Add Linux Networking support with demo application

* Test: revert files affected by uncrustify

* Test: revert files affected by uncrustify

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years ago
Aniruddha Kanhere 95a3a02f95
FreeRTOS-Plus: Unit testing Infrastructure and examples (#72)
* Added CMock as submodule

* Makefile added

* Removed TEMP from Makefile

* Added configuration files and header files

* Update Makefile

* Test runner working

* make clean

* Example added with README

* Update README.md

* Restored +TCP files

* Cleared +TCP changes

* removed comments from Makefile

* Update README.md

* Update README.md

* Update README.md

* Updated Test/Unit-test/readme.md
5 years ago
Hein Tibosch 5003d17fed
FreeRTOS+TCP : renewing DHCP lease while network is down (#53)
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
5 years ago
AniruddhaKanhere d95624c5d6
Move CBMC proofs to FreeRTOS+ directory (#64)
* move CBMC proofs to FreeRTOS+ directory

* Failing proofs corrected

* ParseDNSReply proof added back

* removed queue_init.h from -Plus/Test

Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years ago
AniruddhaKanhere 40a31b6d35 'uL' -> 'UL' 5 years ago
AniruddhaKanhere 5b3a289b69 Changes after Gary's comments 5 years ago
AniruddhaKanhere edf68637dd Update FreeRTOS_ARP.c 5 years ago
AniruddhaKanhere 35f3ac32a8 correct debug output 5 years ago
AniruddhaKanhere 5e12a70db4 Debugging flag check added 5 years ago
AniruddhaKanhere 4e8ac8de25 Comment style consistency and Yuhui's suggestions 5 years ago
AniruddhaKanhere e43f7cd086 Cleanup 5 years ago
AniruddhaKanhere ab3b51c7a0 Update after Gary's comments 5 years ago
AniruddhaKanhere 97f7009699 Update after richard's comments 5 years ago
AniruddhaKanhere a9fcafc074 Corrected the formatting
- visual studio had messed up the formatting
5 years ago
AniruddhaKanhere c381861014 commit 2 after gary's comments 5 years ago
AniruddhaKanhere 75677a8d85 Commit after Gary's comments 5 years ago
AniruddhaKanhere 666c0da366 Update after Yuhui's comments
- removed (void) from before memcpy, memset etc.
- corrected memcpy style as suggested by Yuhui
- Added logging for xNetworkInterfaceOutput. No need to configASSERT
5 years ago
AniruddhaKanhere 4a1148d15b Coverity + MISRA compliance
Modified code to conform to the MISRA directives more closely.
5 years ago
AniruddhaKanhere ecf0f12aa1
Sync up with Amazon-freertos repo (10th March 2020) (#34)
* Sync up with amazon-freertos

* Sync up with amazon-freertos

* Sync up with amazon-freertos
5 years ago
AniruddhaKanhere c40a6da2e4
pass payload length when calling UDP callback (#30)
* pass payload length when calling UDP callback
5 years ago
AniruddhaKanhere 7e1a4bf563
Fix DHCP option Client-identifier (#28) 5 years ago
Richard Barry 9c0c37ab9b Added back some TCP/IP stack port layer files. 5 years ago
Richard Barry 7cf721ccf7 5 years ago
Yuhui.Zheng 589dd9f149 Update version number in readiness for V10.3.0 release. Sync SVN with reviewed release candidate. 5 years ago
Richard Barry 8e5addee1e Update TCP to last release versions in preparation for kernel V10.3.0 release. 5 years ago
Richard Barry 7bea399061 Update libraries and sundry check-ins ready for the V10.3.0 kernel release. 5 years ago
Yuhui.Zheng ec6f3d77c3 Sync FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP with the version in GitHub at (23665258cabe49d5d68ba23968b6845a7c80eb34).
Notes: 
- header has version 2.2.0. 
- This sync did not bring in ./test directory, though we should. 
- New NetworkInterfaces are introduced by this merge.
- Keil compiler support. 
- FreeRTOS_IP.h new API xApplicationGetRandomNumber().
- FreeRTOS_IP_Private.h new eIPEvent_t eNetworkTxEvent. 
- FreeRTOS_Stream_Buffer.h removing static xStreamBufferIsEmpty() and xStreamBufferIsFull().
- FreeRTOSConfigDefaults.h provides default ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS. 
- other type changes.
5 years ago
Richard Barry 4d4493e61a Remove the FreeRTOS-IoT-Libraries from FreeRTOS-Plus as it was an old copy with a newer copy in FreeRTOS-Labs. 5 years ago
Yuhui.Zheng 1deeb6dd84 Check socket binding result before doing anything with socket. (This is to address ARG findings.) Breaking the single return rule here, due to precedent violation at line 1039 and 1144.
prvTransferConnect() now returns:
- pdTRUE: everything's good. pdTRUE = 1.
- -pdFREERTOS_ERRNO_ENOMEM: FreeRTOS_socket() failed. -pdFREERTOS_ERRNO_ENOMEM = -12.
- -pdFREERTOS_ERRNO_EINVAL || -pdFREERTOS_ERRNO_ECANCELED: FreeRTOS_bind() failed. Negative values.

Thus, at line 569 and line 617, needs to check != pdTRUE instead of == pdFALSE.

This commit is done on behalf of Alfred.
5 years ago
Richard Barry 96bad0f6c3 Minor bug fix in NTPDemo.c -> use of FREERTOS_INVALID_SOCKET in place of NULL.
Update trace recorder code to account for uxPendedTicks renaming to xPendedTicks.
5 years ago
Richard Barry b4c06085e1 Files as per 190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview interim release. 6 years ago
Richard Barry 10b7b52995 Remove unnecessary include path from the MQTT demo. 6 years ago
Gaurav Aggarwal 38b6553abd Cosmetic changes in the MQTT demo - mostly comment updates. 6 years ago
Richard Barry fe4511b35e Continued to work on the MQTT demo project.
A few review comments added into the MQTT implementation.
6 years ago
Richard Barry 53842d4cac Remove the simple UDP client/server tasks from the MQTT demo as the demo's network connection can be tested more easily just by pinging it.
Tidy up the iot_config.h header files a little.
6 years ago
Gaurav Aggarwal 95f60318d5 Cosmetic changes in the MQTT demo
- Fix warnings in the MQTT code.
- Update comments in the iot_config.h.
6 years ago
Gaurav Aggarwal 05e7d9cc08 Remove dependency on secure sockets
Network interface implementation for FreeRTOS now directly calls into
FreeRTOS+TCP instead of going via secure sockets.
6 years ago
Gaurav Aggarwal 68fd276886 Remove IotMqtt_Assert( pTaskPool == IOT_SYSTEM_TASKPOOL ) from MQTT code
The cut down version of the task pool has only one task pool, namely,
system task pool. All the task pool API functions accept NULL as a
valid parameter for IotTaskPool_t and use the system task pool when
NULL is passed for the system task pool.

IOT_SYSTEM_TASKPOOL is defined to NULL to use system task pool and
therefore the above assert is no longer valid.
6 years ago
Gaurav Aggarwal 8ea501ef11 Update projects to use the new directory name
IotTaskPool_GetSystemTaskPool has been removed from the cut down version
of the task pool. define IOT_SYSTEM_TASKPOOL to NULL so that the MQTT library
builds successfully.

Use the new #defines in the iot_config.h.
6 years ago
Gaurav Aggarwal 9dd72d4b44 Rename \FreeRTOS-Plus\Source\FreeRTOS-Plus-IoT-SDK to \FreeRTOS-Plus\Source\FreeRTOS-IoT-Libraries. 6 years ago
Richard Barry 7af8756c97 Update task pool so tasks and timer are allocated statically. 6 years ago
Richard Barry 1840d38abf Another backup check-in during process of optimising task pool for FreeRTOS. This checkin is prior to making the task pool statically allocated. 6 years ago
Richard Barry 63c87504a0 Backup checking on - part way through optimising task pool. 6 years ago
Gaurav Aggarwal 4c775574eb Fix DNS resolution failure for test.mosquitto.org
The DNS cache entry size was not big enough to fit the DNS name and
as a result the DNS reply parsing code returned error. Increased the
size of the entry to ensure that the DNS name can fit in.
6 years ago
Gaurav Aggarwal 06f9278de3 The MQTT example now works with the local MQTT broker.
It still needs to be tested with the public mosquitto broker.
6 years ago
Gaurav Aggarwal a7ef9c3b61 Add first draft of mqtt example
Note that it is still work in progress and not working as of now.
6 years ago
Richard Barry 238a23e4d5 Add the files from the MQTT project that were not check in. 6 years ago
Richard Barry 5dd6cf1295 Add missing files so base MQTT project builds. 6 years ago
Gaurav Aggarwal d708efe997 Update the task pool demo to show re-use of recyclable jobs
The example now creates a recyclable job, schedules it and returns it
back to the task pool when it is done. It then again creates a
recyclable job and ensures that the task pool the same job present
it its cache.
6 years ago
Richard Barry 2b295f9015 Added simple UDP demo into the mqtt project to enable the network connectivity to be tested in a simple way prior to performing any MQTT operations. 6 years ago
Richard Barry d362efca8d Add MQTT project that builds on the task pool project - currently the library is building but not being used. 6 years ago
Richard Barry 3c3b32b8e4 Rename the FreeRTOS_Plus_IoT_SDK directory to FreeRTOS_IoT_Libraries. 6 years ago
Richard Barry 290c8cedfd Function rename in task pool demo. 6 years ago
Richard Barry bb0e1f356d Remove any TCP/IP functionality from the task pool demo - the TCP/IP stack is still built as it will be used in later revisions. 6 years ago
Richard Barry 2e18203bb7 Update TCP/IP tack to latest form Git. 6 years ago
Richard Barry a6a0403fd6 Synch IoT libraries with latest versions. 6 years ago
Richard Barry e4e86a464e New MSVC task pool demo now building both the task pool and TCP libraries. 6 years ago
Richard Barry 3afd918ecd Rename the task pool version of FreeRTOS_Plus_TCP_Minimal.sln to task_pool_demo.sln. 6 years ago
Richard Barry 232a94c3f0 Restart the task pool demo, this time using the minimal FreeRTOS+TCP project as a base. 6 years ago
Richard Barry d8a3ad3c6f Minor modification to the WIn32 simple TCP/IP stack example only. 6 years ago
Richard Barry e60f71855a Remove IotTaskPool_CreateRecyclableSystemJob() and IotTaskPool_ScheduleSystemJob() again, which were intended to be alternative APIs that only access the system task pool, and instead update IotTaskPool_CreateRecyclableJob() and IotTaskPool_ScheduleJob() to allow the parameter used to pass in the task pool handle to be NULL if the system task pool is the only one available.
Update the task pool demo app to include a lot more functionality.
6 years ago
Richard Barry e75b609c74 In small FreeRTOS applications it is unlikely there will be any task pools other than the system task pool. IotTaskPool_CreateRecyclableSystemJob() is therefore introduced to complement IotTaskPool_CreateRecyclableJob() that does not require the handle of the target task pool to be specified as a parameter. Likewise IotTaskPool_ScheduleSystemJob() is introduced to complement IotTaskPool_ScheduleJob() for the same reason.
IotTaskPool_CreateSystemTaskPool() calls synchronisation primitives, so cannot be called before the scheduler starts.  Add a configASSERT() to ensure the scheduler is running when it executes.
IotTaskPool_CreateSystemTaskPool() can conceivably be called from multiple different libraries that depend on the thread pool.  In this version _IotSystemTaskPool.running can be used to check the system task pool has not already been created.  If the task pool has been created simply return from IotTaskPool_CreateSystemTaskPool() instead of re-creating it (which would leak memory and leave orphaned tasks).
Call taskENTER_CRITICAL() and taskEXIT_CRITICAL() directly in place of mapping them to TASKPOOL_ENTER_CRITICAL() and TASKPOOL_EXIT_CRITICAL() in the same file.
Rename _timerThread() _timerCallback(), as it is a callback function and not a thread.
Remove the unused flags parameter from _scheduleInternal().
6 years ago
Richard Barry 76cc2a00c6 Add the first and most basic task pool example. 6 years ago
Richard Barry 87eb37342f Create a project that builds a subset of the dependencies of the IoT SDK that have been brought into SVN thus far. The application does nothing other than build at this time. 6 years ago
Richard Barry 0b0a02b76a Bring in a minimum subset of the IoT SDK - at this time just a subset of the library dependencies rather than the libraries themselves. 6 years ago
Richard Barry b51529a284 Update version number ready for next release. 6 years ago
Richard Barry 606845492b Fix potential memory leak in the Win32 FreeRTOS+TCP network interface initialisation sequence.
Introduce portMEMORY_BARRIER() macro to assist with memory access ordering when suspending the scheduler if link time optimization is used.
6 years ago
Richard Barry 50e67a89f1 Update version number in +TCP code. 6 years ago
Richard Barry 58ba10eee8 Update version number in readiness for V10.2.0 release. 6 years ago
Richard Barry ab49c6ae04 Very minor formatting changes, and remove legacy link to V8 upgrade information. 6 years ago
Richard Barry 92ae8e7aff Update version numbers ready for release. 6 years ago
Richard Barry 1a235efd2b Update trace configuration files for the updated trace recorder code. 6 years ago
Richard Barry be9c0730c3 Update trace recorder code to the latest.
Some minor changes to enable the configREMOVE_STATIC_QUALIFIER constant to be used by those debuggers that cannot cope with statics being used.
6 years ago