258 Commits

Author SHA1 Message Date
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
bcd5dec6c4 Use unsigned types/constants where needed. (#226)
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2020-08-28 16:24:25 -07:00
3fc432f7be TCP: Address MISRA rule11.3 violations (#225) 2020-08-28 15:14:37 -07:00
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
2020-08-27 16:25:17 -07:00
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
2020-08-27 15:37:03 -07:00
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>
2020-08-27 00:41:42 -07:00
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
2020-08-26 23:50:09 -07:00
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
2020-08-24 17:06:31 -07:00
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
2020-08-24 16:46:50 -07:00
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
2020-08-24 11:35:48 -07:00
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>
2020-08-13 14:29:33 -07:00
70dcbe4527 Remove unused wolfSSL files. (#197)
* Remove unused wolfSSL files.

* Add back some removed ciphers.

* Update VS project file.
2020-08-11 17:06:59 -07:00
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>
2020-08-07 15:58:14 -07:00
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
2020-08-03 16:45:10 -07:00
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!
2020-08-01 16:38:23 -07:00
a7fec906a4 Misc changes (#183) 2020-07-29 17:39:36 -07:00
07cf5e07e4 MISRA compliance changes for FreeRTOS+TCP headers (#165)
* misra changes

* Update FreeRTOS_IP_Private.h

* Update FreeRTOS_IP_Private.h
2020-07-29 16:15:38 -07:00
e903ac0fed UPD MISRA changes (#164)
Co-authored-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
2020-07-29 16:03:14 -07:00
97551bf44e MISRA changes in FreeRTOS_TCP_WIN.c (#162) 2020-07-29 15:52:00 -07:00
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
2020-07-29 15:38:37 -07:00
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>
2020-07-29 13:56:57 -07:00
e0d62163b0 Sync with +TCP amazon-FreeRTOS (#158)
* DNS.c commit

* IP.c commit

* Add various source & header files
2020-07-22 18:06:23 -07:00
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>
2020-07-13 14:35:44 -07:00
4237049b12 Add changes from 2225-2227 amazon-FreeRTOS (#134) 2020-07-13 12:07:56 -07:00
7caa328634 Add Full TCP test suite - not using secure sockets (#131)
* Add Full-TCP suite

* delete unnecessary files

* Change after Joshua's comments
2020-07-10 23:32:30 -07:00
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
2020-07-01 13:56:27 -07:00
a9b2aac4e9 Folder structure change + Fix broken Projects (#103)
* Update folder structure

* Correct project files

* Move test folder

* Some changes after Yuki's comments
2020-06-26 12:09:36 -07:00