3081 Commits

Author SHA1 Message Date
7bbf951c71 Color printing + New checker message and emphasis (#492)
* Color printing + new message and emphasis

* omit requirements.txt from checks
2021-01-29 16:37:43 -08:00
52c9756f21 Call taskYIELD after calling FreeRTOS_send in Plaintext_FreeRTOS_send (#491)
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.
2021-01-25 14:30:42 -08:00
748a701b91 add .gitattributes, normalize line endings (#490) 2021-01-15 08:38:14 -08:00
47d37354bc Add Posix build checker to git actions (#489)
* Add Posix build checker to git actions

* fix checker path

* Fix script, checkout recursively

* fix build check script return value

* clone submodules as well with posix checker

* Add quotes to true for submodules

* Fix Submodules

* Remove pcap dependency from Makefile

* install libpcap for build check

* Add networking build to posix

* Separate network build from normal build

* add libpcap after building normal posix
2021-01-12 20:13:29 -08:00
36fd2c8d8c Update Kernel submodule (#488) 2021-01-09 14:54:47 -08:00
3a7da90c4f Qemu Mps2 network interrupt (#487)
* Enable netwrork nterrupt handling for Qemu MPS2

* Fix interrupt priority

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
2021-01-04 11:08:47 -08:00
3781cd9224 Add build dependency (#486) 2020-12-24 09:39:54 -08:00
68a500bca3 Initial vscode debug configuration (#485) 2020-12-23 19:55:09 -08:00
1c99d9f200 Prevent optimization in reset handler for QEMU MPS2 (#484) 2020-12-22 22:39:33 -08:00
28548e06fe Update Readme.md 2020-12-20 17:29:32 -08:00
0527a2a02a AutoRelease + Header Checker Upgrades (#482)
* Initial version where all deps are pylibs
* mechanism for undoing an autorelease
* misc refactor touchups
* +mechanism to baseline older commit into detached HEAD tag
* decouple kernel check configs + misc refactor improvements
* improved compatibility with git action
* Get pushes working in git action with release
* Fix header-check issue when same deletion occurs in parallel
* Add help message in case check fails
* Address PR feedback
2020-12-20 17:03:37 -08:00
1f9389c7c4 Fix: Qemu MPS2 Demo build failure 2020-12-20 17:02:32 -08:00
208b260f98 Add Full Demo to Qemu mps2 (#481)
* Add Full Demo to Qemu with MPS2

* Increase full demo heap memory

* Add Full Demo to Qemu MPS2

* Fix headers

* Fix header FreeRTOS version

* Remove commented line

* Remove commented line

* Fix header checker version, and corresponding files

* Fix checker version number requirements
2020-12-17 13:05:36 -08:00
398fa1e8a9 Update README.md 202012.00 2020-12-15 12:20:25 -07:00
da9b9a800d [AUTO][RELEASE]: Bump file header version to "202012.00" 2020-12-15 11:50:37 -07:00
45ba920ad0 [AUTO][RELEASE]: Bump submodules per manifest.yml for V202012.00 2020-12-15 10:22:10 -07:00
2e2ba99a74 [AUTO][RELEASE]: Bump file header version to "202012.00" 2020-12-15 10:20:29 -07:00
1e105be7a4 Update manifest.yml 2020-12-15 10:02:29 -07:00
b8c758b2fe Update manifest.yml 2020-12-15 09:33:59 -07:00
a34a62b885 Update manifest.yml 2020-12-15 09:21:28 -07:00
66b75ba527 History and manifest updates (#480) 2020-12-15 08:42:06 -07:00
89c6fc6baf Update FreeRTOS-Plus-TCP (#479) 2020-12-14 22:09:01 -07:00
4ec66eb364 Move mbedtls tag to v2.25.0 2020-12-14 20:52:09 -08:00
db18ff7d59 Fix pkcs11 demo build. 2020-12-14 20:52:09 -08:00
f4591cec06 Stack fix (#475) 2020-12-14 19:10:03 -08:00
b035e0321f Re-add missing license files caused by PR #471 and fix patches (#477)
* Re-add missing license files caused by PR #471.
* Fix proof patch.
2020-12-14 17:35:36 -08:00
bff2f04c5f Update submodule pointers (#476) 2020-12-14 15:45:27 -08:00
1caa60d382 Move kernel submodule to latest (#474) 2020-12-13 18:47:18 -08:00
6155c025a2 Update submodules of CSDK libraries (#473) 2020-12-13 17:31:14 -08:00
028bf653f7 Delete HTTP demo task upon completion (#472)
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
2020-12-12 21:01:59 -08:00
cf39a90d6d Fix CBMC patches. (#471)
* Fix CBMC patches.
2020-12-12 21:00:03 -08:00
2e0de9aa70 Clean up demo project files (#468) 2020-12-12 16:35:43 -08:00
adbc27f11d Fix build failure in STM32 Discovery MPU Projects (#449)
* Fix build failure in STM32 Discovery MPU Projects

Privileged data region size needs to be increased because heap is now
placed in this region.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2020-12-12 16:33:00 -08:00
d668f3c26d Add reference to Labs to Readme.md (#466) 2020-12-12 16:30:00 -08:00
41237e01d0 Split networking from posix and qemu mps2 demos (#455)
Split networking from posix and qemu mps2 demos
2020-12-12 16:29:23 -08:00
cc922e03a8 Autorelease/manifest (#469)
new release flow
2020-12-11 21:15:16 -08:00
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.
2020-12-11 21:12:44 -08:00
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>
2020-12-11 17:16:47 -08:00
639c08ce2a Remove uIP TCP/IP stack and related demos (#467)
* Remove uIP TCP/IP stack.

* Remove demos that uses uIP.

* Update Demo ReadMe.txt files.
2020-12-11 15:49:56 -08:00
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>
2020-12-11 12:51:45 -08:00
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.
2020-12-11 14:34:20 -05:00
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>
2020-12-11 11:09:03 -08:00
d264c1f153 Moved definition of ucBufferStorage out of if macro. (#459)
* Moved definition of ucBufferStorage out of if macro. If ucBufferStorage is only defined when configSUPPORT_STATIC_ALLOCATION ist set to 1, compilation will fail in cases where it is set to 0 or not defined (because it defaults to 0, as described in the documenation).
2020-12-10 20:44:54 -08:00
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
2020-12-10 12:05:02 -08:00
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.
2020-12-09 19:02:51 -08:00
9d937aa0ab Remove duplicate WinBase.h and Windows.h. (#458) 2020-12-09 13:40:20 -08:00
c6f4284b76 Update kernel submodule pointer to version 47338393f (#456)
* Update kernel submodule pointer to version 47338393f

* Fix patches.

Co-authored-by: Carl Lundin <lundinc@amazon.com>
2020-12-08 15:44:14 -08:00
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>
2020-12-07 17:30:20 -08:00
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.
2020-12-07 14:03:18 -08:00
57161da956 Update HTTP demo project files (#451)
* Update project filters

* Address inaccurate retry count
2020-12-07 10:34:12 -08:00