Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Sync release branch with release-candidate for 202012.00 release (#2887)
Browse files Browse the repository at this point in the history
* Change metrics malloc to metrics specific macro (#2435)

* Change pvPortMalloc to metrics specific macro

* Use uncrustify 0.71.0_f instead of 0.66.1_f

* Add dependency on BLE for MQTT demo wrapper (#2627)

* Add CODEOWNERS (#2632)

* Update CODEOWNERS

* Fixed the BLE_Unit_MQTT_Serialize MTB Build Failure. (#2630)

* Fixed the BLE_Unit_MQTT_Serialize MTB Build Failure.

* Remove the file path to a proper place in the afr.mk file.

* Move ble_mqtt_serialize under BLE supported section.

* Fix demos on Marvell (#2633)

Problem: Many demos were failing in Marvell board due to lack of memory in heap while establishing a TLS connection.
Root Cause: Establishing a TLS connection requires a good amount of memory in the HEAP. The tasks created with xTaskCreate() function also allocates the memory for the stack in the heap. Marvell's heap(~73KB) was running out of space due to these allocations.
Fix: Optimized the stack sizes for different tasks for the demo and verified the demos.

* Update timeout for BLE demo and integration test. (#2634)

* increase timeout for shadow ble demo and BLE integration tests

* short circuit eWiFiFailure for pxIPConfig == NULL

* add back - memset to zero

* Prefix topic name with thing name for demo (#2646) (#2652)

* Modify topic to include thing name

* Update BLE demo and test configs (#2655)

* Update demo config for BLE demos
* Increase timeout to 5 seconds

* Update ESP-IDF submodule to fix type conflict in i2c.h and spi.h (#2660)

* Initialize the local variable to fix the BLE_Unit_MQTT_Serialize hang-up issue during run time.

* Reduce Psoc64 board delay before the starting of the test code.

* Test: Fix unit test not building (#2665)

* Test: Fix unit test not building

* Fix: indent

* Test: remove dependency on coreMQTT for UT

* Test: remve coreMQTT path from UT

* Test: remove coreMQTT path from UT

* Test: fix bool for usage

* Test: Add back new line

* Test: fix build failure

* Add submodules and CMake configuration of HTTP, Defender and Jobs libraries (#2670)

* Connection sharing demo changes from FreeRTOS (#2620)

* 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

* Bump cryptography from 3.0 to 3.2 in /tools/ota_e2e_tests (#2644)

Bumps [cryptography](https://github.com/pyca/cryptography) from 3.0 to 3.2.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst)
- [Commits](pyca/cryptography@3.0...3.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Test: Fix Unit tests

* Test: Fix warnings

* Test: Fix unit test

* Test: Fix UT buffer overflow

* Move Kernel submodule pointer. (#2689)

* Fix MISRA error for transport secure socket (#2640)

Fix the following MISRA errors in transport secure socket:
- misra c 5.2
- misra c 10.4
- misra c 14.3
- misra c 15.7

* Update TCP submodule (#2692)

* Update submodule pointer. (#2699)

* Fix the Psoc64 MTB project BLE demo build failure.

* afr.cmake: Add BUILD_CLONE_SUBMODULES option (#2639)

This option is similar to the option under the same name already used
in some submodules of the repository. If set to OFF, it skips automatic
submodule update during building. This is useful for focused builds
of particular targets, which use only a subset of submodules (which
then need to be updated externally). In particular in continuous
integration contexts, this can save build time/bandwidth.

Signed-off-by: Paul Sokolovsky <[email protected]>

* AFR NimBLE: Add included services in `pxAddServiceBlob()` (#2662)

* NimBLE AFR: Save full AFR service instead of only service pointers (#2653)

* Update IDE project files for coreHTTP, Device Defender and Jobs libraries (#2702)

* Change logging and fix in ble transport interface (#2718)

* Change logging and fix in send()

* Update unit tests

* Create a macro for semaphore delay. (#2712)

* Create a macro for semaphore delay.

* Fix HTTP proofs failing due to change of http_parser location (#2724)

* Fix memory leak in tearDown of integration tests (#2725)

* Fix memory leak in shadow and integration tests

* Check return status of SecureSocketsTransport_Disconnect

* Improve metadata mechanism for submoduled libraries cmake files (#2732)

### Issue
The existing CMake configurations of the submoduled libraries add their `*.cmake`/`CMakeLists.txt` files to the generated metadata by explicitly including them in the source list of demo/library modules definition. 
This causes when using the internal tool to auto-update the IDE project files for file additions/deletions in the codebase because the tool adds the CMake files (by utilizing the "sources" list from CMake configuration) to project files. Some IDE builds face build failures with presence of cmake files in the project files.

### Solution
Introduce a new CMake function, `afr_module_cmake_files` to add module-specific CMake files to metadata. This function creates an internal CMake CACHE list variable per module of the form, `AFR_MODULE_<module_name>_CMAKE_FILES`  if the new function is called by a CMake module. 
If the CMake module is _enabled_ (i.e. present in `AFR_MODULES_ENABLED`) within the CMake configuration (with `cmake .. -DVENDOR=<vendor> ..` command), then the new module-specific cmake list (if created through the new function call) is inspected to add the registered cmake files to metadata.

### Verification
I have verified that the new function adds the cmake files registered through the `afr_module_cmake_files` function to the `metadata/console/cmake_files.txt` file that is generated when using the `-DAFR_METADATA_MODE=1 flag in the `cmake ..` command

* IDE Generator Run

* Cypress64 project fix

* Nordic project fix

* Nuvoton project fix

* Add demo for AWS IoT Jobs library (#2728)

* IDE Generator Run

* Update metadata configuration of Jobs demo

* Cypress64 project update

* Nuvoton project update

* IDE Generator Run

* Cypress project fix

* Nuvoton project fix

* Cypress project fix

* Cypress project fix

* Add a missing LICENSE file in jsmn library (#2737)

* Update metadata configuration of Jobs demo (#2736)

* Added transport_interface.h for unit test

* Fixed CMock unit tests

* Hygiene improvements to AWS IoT Jobs demo (#2742)

* coreMQTT_integration Tests: Implement polling up to a count on the blocking function, MQTT_ProcessLoop. (#2749)

* Implement waitForPacket to poll on blocking MQTT_ProcessLoop.

* Update for PR comments.

* undo change

* Delete irrelevant comments.

* Shim from HTTP V1 library to coreHTTP (Serializer only) (#2739)

Provides backwards compatibility for the existing API by updating IotHttpsClient_AddHeader and IotHttpsClient_InitializeRequest to call HTTPClient_AddHeader and HTTPClient_InitializeRequestHeaders respectively. This is the first part of two. The next part will update IotHttpsClient_SendSync, IotHttpsClient_SendAsync, and IotHttpsClient_WriteRequestBody to call HTTPClient_Send.

* Get integration tests passing after updating IotHttpsClient_InitializeRequest

* Update aws_tests projects with IDE generator

* Get tests passing with HTTPClient_AddHeader Shim

* Remove CBMC for HTTP

* Conditionally add http_parser based on FAMILY_NAME

* Update project files for all other boards

* Add coreHTTP to demo sources for cypress

* Do not write Connection header in _sendHttpsHeaders

* Changelog update for next release (#2752)

* Changelog update for next release

* lower heading level

* Update TCP submodule pointer (#2756)

* Disable logging for HTTP unit tests (#2757)

This simply disables HTTP unit-test logs, which don't add much substance as errors are forced by these tests. This is done to fix an issue where boards stop printing test results from having to print too many logs. The same was also done for MQTT tests in an older commit. Note that integration tests for HTTP already do not log anything besides the test results.

* coreMQTT_Integration test: Implement waiting on a publish packet, even one that is duplicate. (#2755)

* Implement waiting on a publish packet, even one that is duplicate.
- A duplicate publish from the broker will not invoke the event callback from
MQTT ProcessLoop. If the evencallback is not invoked the usual boolean flags
indicating that a packet was received cannot be set. This change updates waiting
on a packet to input a boolean expression as a flag instead of a bool pointer.

* Add retries for coreMQTT demos in case of a failure in a loop. (#2758)

Co-authored-by: SarenaAWS <[email protected]>
Co-authored-by: Archit Aggarwal <[email protected]>

* Add config for enabling Jobs demo (#2765)

* Fix Shadow demo misalignment with MQTT demo helper. (#2764)

* Fix Shadow demo misalignment with MQTT demo helper.

* Apply suggestions from code review

Co-authored-by: Archit Aggarwal <[email protected]>

* Fix metadata logic for adding Cmake files (#2766)

This PR fixes 2 issues with creation of metadata for cmake files from the afr_module_cmake_files CMake function:

1. The generated metadata/console/cmake_files.txt file contains non-semi-colon separated list of cmake files added with afr_module_cmake_files.
2. Successive runs of metadata generation with cmake .. -DAFR_METADATA_MODE=1 ... results in duplicated entries of cmake files added through afr_module_cmake_files

* Add S3 Download Demo From C-SDK (#2743)

-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.

* Add demo files
* Update project and config files

* Add coreHTTP Integration Tests (#2763)

Adding integration tests for the coreHTTP library:
- Tests simple GET, HEAD, POST, and PUT requests, as well as a chunked streaming response and a line-feed only response.

* Add S3 Upload Demo From C-SDK (#2745)

- Adding demo to demonstrate the use of pre-signed URLs to connect and upload to a S3 bucket.

* Add demo files
* Add configs and update project files

* Fix an issue in retry logic in coreMQTT mutual auth demo. (#2771)

* Remove metadata of old HTTP and Device Defender libraries and demo modules (#2773)

Remove visibtility of the old HTTP (at libraries/c_sdk/standard/https ) and old Defender ( at libraries/c_sdk/aws/defender ) libraries and their demos by removing the metadata configuration.
This is done as their refactored library counterparts, coreHTTP and device_defender_for_aws will be shown on the FreeRTOS console.

* Update logging to not print metadata in line breaks for WinSim ports (#2760)

A newline was printed with metadata because it was configured to only clear the message buffer for LF rather than CRLF. In addition, the message number and tick count were always printed even though the log was on the same line. This is updated so that information is only logged with each CRLF.

This follows changes from FreeRTOS/FreeRTOS#397.

* Wait for the publish in Subscribe_Publish_With_Qos1 and Subscribe_Publish_With_Qos2 tests. (#2775)

* Remove OTA E2E from public repo

* Shim from HTTP V1 library to coreHTTP (HTTPClient_Send) (#2770)

* Create shim for HTTPClient_Send

* Remove task pool but has probs

* Map network interface return value of 0 to -1

* Add docs for transportRecv, transportSend

* Allocate request tasks

* Create a separate task pool

* Remove references to original task pool

* Add extra config macros

* Add static memory configurations

* Push source file

* Remove unused functions and macros

* Update comment to be more precise

* Update libraries/c_sdk/standard/https/src/iot_https_client.c

Co-authored-by: SarenaAWS <[email protected]>

* Update libraries/c_sdk/standard/https/src/iot_https_client.c

Co-authored-by: SarenaAWS <[email protected]>

* Update libraries/c_sdk/standard/https/src/private/iot_https_internal.h

Co-authored-by: SarenaAWS <[email protected]>

* Switch RECV and SEND ticks

* Address PR comments

* Fix logic for cleaning resources

* Uncrustify

* Update taskpool comments to say dispatch queue instead

* Make the static declaration local to the function

* Choose priority to match that of the task pool

* Fix log message

Co-authored-by: SarenaAWS <[email protected]>

* Fix build failures of Device Shadow and Jobs demos from FreeRTOS console (#2777)

* Fix Build Combination failures of Device Shadow and Jobs demo builds

* Make mqtt_demo_helpers an INTERNAL module

* Similar changes for AFR::http_demo_helpers module

* Fix Device Shadow over BLE demo builds by updating cmake dependency

* Remove hard-dependency on AFR::mqtt_demo_helpers missed in previous commit

Co-authored-by: leegeth <[email protected]>

* Review comment

Co-authored-by: leegeth <[email protected]>

* Fix CBMC MakefileLinux.json prerequisite symbol.

This commit fixes the symbol used to represent the prerequisites of a
Makefile target from $< to $^. The latter symbol expands to all of a
target's prerequisites, not just the first one. This is needed to ensure
that all object files get linked together.

* Make CBMC patch.py look for touch file before patching.

* Make CBMC Makefile.common check for external sat solver.

* Make CBMC type header script use absolute paths.

The type header script runs goto-instrument in a temporary directory,
so the script must construct absolute paths to the inputs before
changing directory to run the command.

* Add litani submodule to build CBMC proofs concurrently.

This commit adds Litani, hosted at https://github.com/awslabs/aws-build-accumulator
Litani is a build tool for running proofs and generating reports. This
commit is in preparation for converting the CBMC proofs to run using
Litani, which will help with proof and CI maintenance.

* Make CBMC proofs build concurrently with litani.

* Add retries to device shadow demo if a demo iteration is failed. (#2776)

* Submodule FreeRTOS/backoffAlgorithm and update demos and tests for new API (#2767)

Replace the retry_utils library folder with submodule to the refactored library, now hosted, in FreeRTOS/backoffAlgorithm
Update the demos and integration tests to use the refactored library API.

Note: For the random number generator function provided to the refactored retry_utils library, the PKCS11 module has been used to so that if the board platform supports a True Random Number Generator, the back-off calculation can take advantage of that.

* Revert bad check-in for configure.json (#2788)

* hygiene: relocate afr_module_cmake_files function definition (#2787)

* Add retries to coreHTTP demos if a failure happens. (#2778)

* Add retries to Jobs demo if a failure occurs. (#2782)

Co-authored-by: Archit Aggarwal <[email protected]>

* Add PKCS log defines for secure element boards. (#2789)

* Adding HTTP Mutual Auth Demo from C-SDK (#2738)

Adding demo to demonstrate use of the coreHTTP library using a mutually-authenticated network connection. Sends a simple message using a POST request and waits for a server response.
* Adds demo files, vendor configs, and updates project files

* Remove compilation warnings and clean only upon error (#2791)

The queue was always deallocated even though everything was initialized successfully, so the status must be checked before cleanup. This also fixes any possible compilation warnings in MSVC.

* Update FreeRTOS console text for Jobs and Device Shadow libraries (#2790)

* Add struct tm by default

* Cypress update (#2794)

Add missing coreHTTP integration test sources in aws_test.mk and afr.mk, which were leading to build failures.

* Update HTTP Shim stack sizes to resolve overflow (#2795)

* Fix metadata issue of coreMQTT demo not getting enabled (#2798)

* Fix metadata issue of coreMQTT demo not getting enabled
* Update dependency on AFR::pkcs11_helpers to be conditional for MQTT demo wrapper module
* Remove hard dependency on pkcs11_helpers for MQTT wrapper target

* Run IDE Generator (#2800)

* Add logging to include for OptigaX. (#2801)

* Update HTTP shim stack sizes for TI & ST (#2802)

Originally, default stack size of configMINIMAL_STACK_SIZE * 2 for HTTP shim dispatch task was insufficient for TI & ST, causing original HTTP demos to freeze. Therefore, we multiply by 4 instead, resulting in the following unused stack space:
For ST: Stack unused: 89, total: 360, used: 271
For TI: Stack unused: 131, total: 360, used: 229

* Add AWS IoT compatible tests to the HTTP system tests. (#2784)

- Remove unnecessary function call layer.
- Add coreHTTP_Integration_AWS_IoT_Compatible to aws_test_runner.c and all boards.

* Update demos and tests for backoffAlgorithm API change (#2796)

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

* Add defender demo (#2799)

* Add a new defender demo and lwip metrics collector.

* Add new defender demo option to config files.

* Add LWIP bytes out metric suppoort on MT7697 board.

* Update mt7697 project files for new defender demo.

* Removed unused files.

* Update MT7697 project file include path.

* Clean up some unused configs.

* Update H files header.

* Remove duplicate core_mqtt_config.h file.

* Clean up the demo config files.

* Rename demo config file.

* Update include header for the renamed demo config file.

* Add standard header to remove the warning.

* Update MT7697 project file for the file names change.

* Change the Metric log-print from info level back to debug level.

* Update and align demo return type with demo helper.

* Formatting Comments.

Co-authored-by: SarenaAWS <[email protected]>

* Update comments

Co-authored-by: SarenaAWS <[email protected]>

* Update comments

Co-authored-by: SarenaAWS <[email protected]>

* Update demos/device_defender_for_aws/metrics_collector/lwip/metrics_collector.c

Co-authored-by: SarenaAWS <[email protected]>

* Update demos/device_defender_for_aws/metrics_collector/lwip/metrics_collector.c

Co-authored-by: SarenaAWS <[email protected]>

* Add missing parameters in function discriptions.

* Update demos/device_defender_for_aws/metrics_collector/lwip/metrics_collector.h

Co-authored-by: SarenaAWS <[email protected]>

* Update demos/device_defender_for_aws/metrics_collector/lwip/metrics_collector.c

Co-authored-by: SarenaAWS <[email protected]>

* Update demos/device_defender_for_aws/metrics_collector/lwip/metrics_collector.c

Co-authored-by: SarenaAWS <[email protected]>

* Switch from iot_demo_logging.h to logging_stack.h.

* Run uncrustify.

* Remove forward datagrams from out packets metric.

* Add lwip get UDP support.

* Change the xTaskGetTickCount as the report ID.

* Remove the lwip IP address dependency.

* Fix IP address lwip dependency.

* Rollabck the project files.

* Add demo project CMakeLists metadata.

* Replace log functions from iot_demo_logging.h

* Add lisence

* Fix Typos.

* Add ProcessLoop helper function.

* Make the lwip metrics netif port configurable.

* Update demo config file.

* Make Defender demo publish callback only process the incomming  MQTT publish message.

* Uncrustify

* First updates to the demo

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Mediatek demo now works

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Update comments in CMakeLists.txt

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add cypress changes

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Remove an unnecessary lwip define for using metric collect.

* Add FreeRTOS+TCP port

* Update winsim project config

* Demo fixes

* Add defender demo to windows project

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add defender demo to platforms using FreeRTOS+TCP

Added platforms are:
- Espressif
- Microchip
- Marvell
- Renesas
- Xilinx

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Update winsim project using IDE generator

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add retries

* Fix formatting

* Fix metrics_collector.h docs

* Remove defender demo from espressif

Signed-off-by: Gaurav Aggarwal <[email protected]>

* uncrustify

* IDE generator changes

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Incorporate feedback

* fix processloop issue

* Incorportate feedback

* Add mqtt strerror to mqtt helpers

* fix format specifiers

* Address feedback

Co-authored-by: Ming Yue <[email protected]>
Co-authored-by: SarenaAWS <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>

* Add dependency on internal mqtt_demo_helpers module for device defender wrapper target (#2806)

* Change shadow tests to use starfield certificate

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Fix build failure for connection sharing demo. (#2809)

* Update HTTP shim stack sizes for Cypress64 (#2810)

Originally, default stack size of configMINIMAL_STACK_SIZE * 2 for HTTP shim dispatch task was insufficient for Cypress64, causing original HTTP demos to freeze. Therefore, we multiply by 4 instead, resulting in the following unused stack space:
Stack unused: 232, total: 520, used: 288.

* README updates with memory estimates for MQTT Shim (#2748)

* Remove old defender demo (#2812)

Removes old defender library demo as we now have the new defender library demo.

* updating cypress asset to submodules

* Fix demo build for Nuvoton ethernet. (#2818)

* Update HTTP Shim configs for Nuvoton & ST (#2816)

Originally, default stack size of configMINIMAL_STACK_SIZE * 2 for HTTP shim dispatch task was insufficient for Nuvoton, causing original HTTP demos to freeze. Therefore, we multiply by 4 instead, resulting in the following unused stack space:
Stack unused: 171, total: 400, used: 229

* Add memory estimates for HTTPS V1 compatibility layer (#2817)

Provides code sizes for the HTTPS V1 compatibility layer in comparison to coreHTTP

* Update Nuvoton ethernet project with device defender demo files. (#2819)

* Update corePKCS11 and PKCS integration tests (#2814)

* Move corePKCS11 submodule forward.
* Add provisioning of RSA public key to test code.
* Update functions using an API that changed in core_pkcs11.h

* fixing typos

* Fix build warnings in MQTT COmpatibility Layer. (#2821)

* Add directions for using pre-signed URL script to main S3 demo files (#2807)

Add references to pre-signed URL script to the top of main demo files for a better user experience. Also revert a transport timeout value change, add the retry note recently added to other demos, and some other minor comment updates.

* Use Starfield Root CA cert (#2824)

Update TI config file to use a self-signed root CA certificate.

* Adding HTTP Multithreaded Download Demo from C-SDK (#2751)

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 separate thread to service HTTP tasks.

* Strip NULL terminator from xFindObjectLabel calls using sizeof. (#2825)

* Fix TLS connection caused by bad core_pki_utils.c change. (#2830)

Move corePKCS11 module forward.

* Remove old HTTPS demos (#2827)

Removing 4 old HTTPS S3 demos.

* FreeRTOS+TCP: Update Submodule Pointer (#2826) (#2831)

* Update TCP submodule pointer

* Update the submodule pointer of TCP to V2.3.2

* Update defender demos

* Update Harness for vDHCPProcess

* Nuvoton build issue fix (#2832)

* Add stub metrics collector (#2823) (#2833)

Since we only implement defender metrics collection on FreeRTOS+TCP or lwIP, this adds a stub metrics collector to allow the demo to be built and run on other platforms using stubbed metrics.

* bump version to 202012.00 (#2839)

* Update Cypress Metadata.

* cypress: Do not create boot image when AFR_METADATA_MODE=1

* Omitt the error message of cannot find objcopy in METADATA_MODE.

* Omitt error of cannot find cysecuretoos in METADATA_MODE.

* formatting

* Remove indent.

* Reduce buffer sizes (#2844)

* Move threading_alt.h to mbedtls_config folder. (#2841)

* Move threading_alt.h to mbedtls_config folder.

* Update include path.

* Revert cypress asset updates (#2847)

* Revert "Merge pull request #2840 from mingyue86010/release-candidate"

This reverts commit 6c41800, reversing
changes made to c8d2dab.

* Revert "Merge pull request #2815 from shuopeng-deng/cypress-asset-submodule"

This reverts commit 39f7b60, reversing
changes made to 80fd993.

* update library versions and checksum file (#2850)

* update library versions and checksum file

* fix secure sockets versioning

* Update kernel submodule pointer to version 4733839 (#2849) (#2853)

* Update kernel submodule pointer to version 4733839
* Fix CBMC patch.

* update checksum, and projects (#2855)

* Fix S3 multi threading demo failure on NXP (#2857)

* Fix build combinations issues for defender demo (#2858)

* Fix missing freertos_plus_tcp_utils

This change brings the freertos_plus_tcp_utils module in when the
device_defender_demo_dependencies module is selected for the FreeRTOS
console.

* Dedupe defender demo CMakeLists

Moves the duplicated parts of the defender demo cmake configuration out
of the metrics collector conditional blocks.

* Remove explicit lwip dependency for metrics_collector

ESP32 doesn't use 3rdparty::lwip, and the explicit dependency was not
nessesary, so this change removes it from the configuration for lwip
metrics collection.

* Split freertos_plus_tcp_utils into seperate file

Build combinations were failing when freertos_plus_tcp_utils was in the
same cmake file as freertos_plus_tcp. This moves it to its own file with
the file name same as the module in order to fix the build combinations
issue. This also fixes the build failures on Marvell.

* Run IDE generator

* Fix BLE test failures (#2854) (#2856)

* Update Cypress43/54 project files for new libraries/demos (#2865)

Adding coreMQTT, coreHTTP, jobs, shadow, and defender libraries/demos to Cypress43 and Cypress54 project files, to update IDE folder structure (doesn't affect build). Also add missing coreHTTP sources to aws_demo.mk.

* Update ESP-IDF submodule to fix issue with LWIP_TCPIP_CORE_LOCKING

* Add comment about handling S3 request limits to S3 download demos (#2871)

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.

* Update FreeRTOS+TCP submodule pointer (#2869)

* Add support for collecting metrics in demos connecting to AWS IoT (#2860)

Add support for collecting metrics of OS, Kernel version and MQTT client version through demos that connect to AWS IoT. These metrics are OPTIONAL for users. These metrics help AWS IoT improve security and provide better technical support.

* Changelog update for 202012.00 (#2862)

* Changelog update for 202012.00

* update to latest submdules, update pkcs tests version and checksum (#2874)

* Add files via upload (#2876)

* Update HTTPS V1 Shim to work with new coreHTTP changes (#2878)

Because coreHTTP requires a response to return successfully, the shim is updated to pass the smallest valid HTTP response so that HTTPClient_Send can return a successful status provided there are no errors from sending the request.

* Revert "Add support for collecting metrics in demos connecting to AWS IoT (#2860)" (#2879)

This reverts commit 498aa35.

* update library submodules (#2883)

* add back ota e2e tests from previuous release (#2884)

* update submodules and checksum file (#2886)

Co-authored-by: Muneeb Ahmed <[email protected]>
Co-authored-by: Archit Aggarwal <[email protected]>
Co-authored-by: Cobus van Eeden <[email protected]>
Co-authored-by: Ming Yue <[email protected]>
Co-authored-by: leegeth <[email protected]>
Co-authored-by: Ravishankar Bhagavandas <[email protected]>
Co-authored-by: David Chalco <[email protected]>
Co-authored-by: David Chalco <[email protected]>
Co-authored-by: Shubham Kulkarni <[email protected]>
Co-authored-by: alfred gedeon <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joseph Julicher <[email protected]>
Co-authored-by: Carl Lundin <[email protected]>
Co-authored-by: andysun2015 <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>
Co-authored-by: Paul Sokolovsky <[email protected]>
Co-authored-by: Prasad Alatkar <[email protected]>
Co-authored-by: Oscar Michael Abrina <[email protected]>
Co-authored-by: Eric Yeh <[email protected]>
Co-authored-by: SarenaAWS <[email protected]>
Co-authored-by: Sukhmani Minhas <[email protected]>
Co-authored-by: Mark R. Tuttle <[email protected]>
Co-authored-by: Archit Gupta <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: Shuopeng Deng <[email protected]>
Co-authored-by: Shubham Kulkarni <[email protected]>
Co-authored-by: sbammi <[email protected]>
  • Loading branch information
1 parent fd27d7b commit dc53c9c
Show file tree
Hide file tree
Showing 676 changed files with 41,152 additions and 14,875 deletions.
19 changes: 15 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "http-parser"]
path = libraries/3rdparty/http_parser
url = https://github.com/nodejs/http-parser.git
branch = v2.9.2
[submodule "unity"]
path = libraries/3rdparty/unity
url = https://github.com/ThrowTheSwitch/Unity.git
Expand Down Expand Up @@ -45,3 +41,18 @@
[submodule "libraries/device_shadow_for_aws"]
path = libraries/device_shadow_for_aws
url = https://github.com/aws/device-shadow-for-aws-iot-embedded-sdk.git
[submodule "libraries/coreHTTP"]
path = libraries/coreHTTP
url = https://github.com/FreeRTOS/coreHTTP.git
[submodule "libraries/jobs_for_aws"]
path = libraries/jobs_for_aws
url = https://github.com/aws/jobs-for-aws-iot-embedded-sdk.git
[submodule "libraries/device_defender_for_aws"]
path = libraries/device_defender_for_aws
url = https://github.com/aws/device-defender-for-aws-iot-embedded-sdk.git
[submodule "libraries/abstractions/backoff_algorithm"]
path = libraries/abstractions/backoff_algorithm
url = https://github.com/FreeRTOS/backoffAlgorithm.git
[submodule "tools/litani"]
path = tools/litani
url = https://github.com/awslabs/aws-build-accumulator
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,81 @@
# Change Log
This repository contains the `FreeRTOS AWS Reference Integrations`, which are pre-integrated FreeRTOS projects that demonstrate connectivity with AWS IoT. The repository contains projects for many different microcontroller evaluation boards.

## 202012.00 December 2020

### New Features

#### coreHTTP v2.0.0

- The coreHTTP (https://github.com/FreeRTOS/coreHTTP) library provides the ability to establish an HTTP connection with a server over a customer-implemented transport layer, which can either be a secure channel like a TLS session (mutually authenticated or server-only authentication) or a non-secure channel like a plaintext TCP connection. The HTTP connection can be used to make "GET" (include range requests), "PUT", "POST" and "HEAD" requests. The library provides a mechanism to register a customer-defined callback for receiving parsed header fields in an HTTP response. The library has been refactored for memory optimization, and is a client implementation of a subset of the HTTP/1.1 (https://tools.ietf.org/html/rfc2616) standard.
- See memory requirements for the latest release here (https://docs.aws.amazon.com/embedded-csdk/202011.00/lib-ref/libraries/standard/coreHTTP/docs/doxygen/output/html/index.html#http_memory_requirements).

#### backoffAlgorithm v1.0.0

- The backoffAlgorithm (https://github.com/FreeRTOS/backoffAlgorithm) library is a utility library to calculate backoff period for network operation retries (like failed network connection with server) using an exponential backoff with jitter algorithm. This library uses the "Full Jitter" strategy for the exponential backoff with jitter algorithm. More information about the algorithm can be seen in the Exponential Backoff and Jitter (https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/) AWS blog.
- Exponential backoff with jitter is typically used when retrying a failed connection or network operation with the server. An exponential backoff with jitter helps to mitigate the request failures made to servers, that are caused due to network congestion or high load on the server, by spreading out retry requests across multiple devices. Besides, in an environment with poor connectivity, a client can get disconnected at any time. A backoff strategy helps the client to conserve battery by not repeatedly attempting reconnections when they are unlikely to succeed.
- The backoffAlgorithm library has no dependencies on libraries other than the standard C library.

#### AWS IoT Device Defender v1.0.1

- The AWS IoT Device Defender (https://github.com/aws/device-defender-for-aws-iot-embedded-sdk) library enables you to interact with the AWS IoT Device Defender service to continuously monitor security metrics from devices for deviations from what you have defined as appropriate behavior for each device. If something doesn’t look right, AWS IoT Device Defender sends out an alert so you can take action to remediate the issue. More details about Device Defender can be found in AWS IoT Device Defender documentation (https://docs.aws.amazon.com/iot/latest/developerguide/device-defender.html).
- The AWS IoT Device Defender library has no dependencies on additional libraries other than the standard C library. It also doesn’t have any platform dependencies, such as threading or synchronization. It can be used with any MQTT library and any JSON library (see demos (https://github.com/aws/amazon-freertos/tree/master/demos/device_defender_for_aws) with coreMQTT and coreJSON).
- See memory requirements for the latest release here (https://docs.aws.amazon.com/embedded-csdk/202011.00/lib-ref/libraries/aws/device-defender-for-aws-iot-embedded-sdk/docs/doxygen/output/html/index.html#defender_memory_requirements).

#### AWS IoT Jobs v1.0.0

- The AWS IoT Jobs (https://github.com/aws/jobs-for-aws-iot-embedded-sdk) library enables you to interact with the AWS IoT Jobs service which notifies one or more connected devices of a pending “Job”. A Job can be used to manage your fleet of devices, update firmware and security certificates on your devices, or perform administrative tasks such as restarting devices and performing diagnostics. For documentation of the service, please see the AWS IoT Developer Guide (https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html). Interactions with the Jobs service use the MQTT protocol. This library provides an API to compose and recognize the MQTT topic strings used by the Jobs service.
- The AWS IoT Jobs library has no dependencies on additional libraries other than the standard C library. It also doesn’t have any platform dependencies, such as threading or synchronization. It can be used with any MQTT library and any JSON library (see demos (https://github.com/aws/amazon-freertos/tree/master/demos/jobs_for_aws) with coreMQTT and coreJSON).
- See memory requirements for the latest release (https://docs.aws.amazon.com/embedded-csdk/202011.00/lib-ref/libraries/aws/jobs-for-aws-iot-embedded-sdk/docs/doxygen/output/html/index.html#jobs_memory_requirements)here (https://docs.aws.amazon.com/embedded-csdk/202011.00/lib-ref/libraries/aws/jobs-for-aws-iot-embedded-sdk/docs/doxygen/output/html/index.html#jobs_memory_requirements).

#### HTTP Compatibility Layer v1.2.0

- The HTTP Compatibility Layer provides backwards compatibility from coreHTTP library to HTTPS V1.x.x APIs. In addition, the HTTP Compatibility Layer maintains the dependency of the network abstraction and linear containers from the HTTPS V1.x.x library. The task pool dependency is removed in order to allow the user to allocate tasks on the stack rather than exclusively on the heap.
- Configuration settings using C preprocessor constants, for the HTTP Compatibility Layer, are available in addition to the original configurations of the HTTPS V1.x.x library (https://docs.aws.amazon.com/freertos/latest/lib-ref/html2/https/https_config.html). They can be set with a #define in the config file (iot_config.h) or by using a compiler option such as -D in gcc. If a configuration setting is not defined, the HTTP Compatibility Layer will use a "sensible" default value (unless otherwise noted). Because they are compile-time constants, this HTTP Compatibility Layer must be rebuilt if a configuration setting is changed.
- IOT_HTTPS_DISPATCH_QUEUE_SIZE - The number of requests in the queue that are ready to be sent to the HTTP server.
- IOT_HTTPS_DISPATCH_TASK_COUNT - The number of tasks that are responsible for sending requests from the dispatch queue.
- IOT_HTTPS_DISPATCH_TASK_STACK_SIZE - The stack size of each dispatch task, sized appropriately for each board.
- IOT_HTTPS_DISPATCH_USE_STATIC_MEMORY - If set to 1, the memory used by the dispatch task will be allocated statically by the library. Otherwise, memory will be allocated on the heap.
- IOT_HTTPS_DISPATCH_TASK_PRIORITY - The priority of each dispatch task. This priority is deliberately chosen to match the original taskpool's priority. Doing so prevents starvation of the network-receive task and tasks potentially used by other libraries.
- See memory requirements for the latest release (https://docs.aws.amazon.com/embedded-csdk/202011.00/lib-ref/libraries/aws/jobs-for-aws-iot-embedded-sdk/docs/doxygen/output/html/index.html#jobs_memory_requirements) here (https://github.com/aws/amazon-freertos/blob/master/libraries/c_sdk/standard/https/CODESIZE.md).

### Updates

#### FreeRTOS kernel V10.4.3

- Includes FreeRTOS kernel V10.4.3
- Additional details can be found here: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/V10.4.3-kernel-only/History.txt

#### FreeRTOS-Plus-TCP v2.3.2

- When a protocol error occurs during the SYN-phase of a TCP connection, a child socket will now be closed (calling FreeRTOS_closesocket() ), instead of being given the eCLOSE_WAIT status. A client socket, which calls connect() to establish a connection, will receive the eCLOSE_WAIT status, just like before.

#### coreMQTT v1.1.0

- Update logs and format specifiers to use standard C types.
- Add dependence on stdbool.h
- Introduce two new configuration macros for setting the timeout for transport reads and sends.

#### coreJSON v3.0.0

- Added an API function to iterate over a collection in a JSON document.

#### corePKCS11 v3.0.0

- Updated xFindObjectWithLabelAndClass to include a size parameter to allow passing in the size of the label, in order to avoid calling strlen in the library code.
- Added CBMC memory proofs for all functions.
- Removed threading_alt.h from corePKCS11.
- Restructured third party folder in order to align with other core repositories. Folders located in “corePKCS11/3rdparty” are now in “corePKCS11/source/dependency/3rdparty”.
- Updated logs and format specifiers to use standard C types.

#### AWS IoT Device Shadow v1.0.2

- Update logs and format specifiers to use standard C types.

#### MQTT Compatibility Layer v2.3.1

- Fixes for compiler warnings by removing unused functions and variables.

## 202011.00 November 2020

### New Features
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
endif()

project(amazon-freertos)
set(PROJECT_VERSION "202011.00")
set(PROJECT_VERSION_MAJOR "202011")
set(PROJECT_VERSION "202012.00")
set(PROJECT_VERSION_MAJOR "202012")
set(PROJECT_VERSION_MINOR "00")

# Import global configurations.
Expand Down
Loading

0 comments on commit dc53c9c

Please sign in to comment.