384 Commits

Author SHA1 Message Date
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>
2020-10-19 08:49:54 +08:00
2eed409577 Configure maximum fragment length extension. (#350) 2020-10-18 16:57:47 -07:00
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>
2020-10-16 14:25:09 -07:00
15a7337ee0 Rename PKCS files to core. (#344)
* Rename PKCS files to core.
* Pin latest corePKCS11 release.
2020-10-16 13:38:25 -07:00
806d51caf0 Fix bug allowing an infinite subscribe loop (#348)
* Reset flag in each iteration of subscribe loop
2020-10-16 10:51:23 -07:00
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>
2020-10-14 15:55:14 -04:00
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
2020-10-14 10:48:33 -07:00
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>
2020-10-13 14:24:29 -07:00
c0591f4658 Delete tasks in multithreaded demo (#339)
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
2020-10-13 13:42:48 -07:00
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_.
2020-10-13 13:08:46 -07:00
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>
2020-10-13 12:55:26 -07:00
02aafc3a46 Delete all the guidance to use the public mosquitto broker. (#340) 2020-10-13 09:54:29 -07:00
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>
2020-10-12 18:36:31 -07:00
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.
2020-10-12 17:36:33 -07:00
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.
2020-10-12 15:40:54 -07:00
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
2020-10-11 17:07:09 -07:00
00247a7637 Remove extraneous call to MQTT_ProcessLoop (#333) 2020-10-09 10:55:12 -07:00
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>
2020-10-08 15:27:18 -07:00
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>
2020-10-08 13:56:28 -07:00
0c58a39332 Submodule PKCS #11 and add Standalone PKCS #11 demos (#323)
* Submodule PKCS #11.

* Add PKCS #11 demos.
2020-10-08 13:44:30 -07:00
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>
2020-10-07 12:46:25 -07:00
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>
2020-10-07 12:35:21 -07:00
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
2020-10-06 13:03:52 -07:00
d37b651e77 Add CMock back for the integration tests. (#321) 2020-10-05 14:07:28 -07:00
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
2020-10-05 13:20:42 -07:00
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>
2020-10-05 12:19:21 -07:00
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>
2020-10-02 20:26:02 -07:00
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>
2020-10-02 18:18:16 -04:00
a8290734d8 Bring in the patches from FreeRTOS dir to FreeRTOS-Plus (#306)
* MISRA v5

* Update patches in FreeRTOS-Plus to match those in FreeRTOS
2020-10-01 16:04:56 -04:00
6fb8b1fc33 +TCP: Fix spellings (#302)
* MISRA v5

* Add spelling corrections

* Update after Shubham's comments

* Actually fix the spelling
2020-09-28 12:55:22 -04:00
ea0033a85d Fix a breaking build by removing const (#301) 2020-09-25 11:08:35 -07:00
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>
2020-09-25 08:47:01 -07:00
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>
2020-09-24 21:53:43 -07:00
1fc1bd4321 Add CBMC proofs for FreeRTOS-Plus-CLI (#296) 2020-09-24 13:32:10 -07:00
d5862dbe01 Sync back V10.4.1 (#282)
* Move Kernel submodule pointer to 10.4.1
* Update version number to V10.4.1 (#281)
2020-09-17 17:16:33 -07:00
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>
2020-09-16 14:53:57 -07:00
50dc98a5a6 MISRA v5 (#272) 2020-09-16 12:32:21 -07:00
89d475e9b1 Update Version number to 10.4.0 (#237) 2020-09-10 19:40:24 -07:00
759fe85853 Tracelyzer version updates (#261)
* Update Tracelyzer version numbers
2020-09-10 18:52:20 -07:00
2621e60124 TCP: Update version number and History.txt (#247)
* Update the version number
* Update History.txt
2020-09-08 14:05:31 -07:00
40e410ee8e Create winbase.h (#248) 2020-09-08 12:15:59 -07:00
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>
2020-09-04 18:06:21 -07:00
c1b06040fe TCP: Update History.txt file (#243)
* Update the History.txt
2020-09-04 17:51:22 -07:00
889d3e8667 Create a new branch and address 10.8 warnings (#241) 2020-09-04 12:34:30 -07:00
05b4d4fc64 Address various MISRA warnings v3 (#240)
* Add a branch and make MISRA changes

* initialize the value

* Update after Gary's comments
2020-09-03 15:20:45 -07:00
cacf4ad7f9 Address various MISRA warnings v2 (#238)
* Address some MISRA warnings

* Change the return type

* Update FreeRTOS_Sockets.c
2020-09-02 15:37:44 -07:00
0341050048 Address MISRA errors of various kinds (#234)
* MISRA 21.15 changes

* MISRA 11.8 changes
2020-09-01 12:59:50 -07:00
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.
2020-08-31 12:55:38 -07:00
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>
2020-08-31 12:05:59 -07:00
7cb57324fd TCP: Address MISRA rule 11.3 violations (Part 2) (#227) 2020-08-31 09:49:43 -07:00