Skip to content

Commit

Permalink
Update to LTS 3.0 libraires (#46)
Browse files Browse the repository at this point in the history
* Update submodule pointer for LTS3.0
* Exclude FreeRTOS example from build
* Remove bootloader signing public key. The public key should be generated by tool.
* Add task notification setting for OTA in examples
* Add MQTT downloader config
  • Loading branch information
chinglee-iot authored Jun 20, 2024
1 parent a35a007 commit ac3aced
Show file tree
Hide file tree
Showing 23 changed files with 69 additions and 95 deletions.
2 changes: 1 addition & 1 deletion Middleware/AWS/mqtt-stream
Submodule mqtt-stream updated 2 files
+4 −3 CHANGELOG.md
+45 −0 sbom.spdx
2 changes: 1 addition & 1 deletion Middleware/FreeRTOS/coreJSON
Submodule coreJSON updated 118 files
2 changes: 1 addition & 1 deletion Middleware/FreeRTOS/coreMQTT
Submodule coreMQTT updated 67 files
+47 −0 .github/.cSpellWords.txt
+21 −0 .github/pull_request_template.md
+104 −27 .github/workflows/ci.yml
+23 −0 .github/workflows/formatting.yml
+3 −3 .github/workflows/release.yml
+23 −2 CHANGELOG.md
+130 −58 README.md
+31 −0 cspell.config.yaml
+182 −84 docs/doxygen/config.doxyfile
+2 −2 docs/doxygen/include/size_table.md
+0 −439 lexicon.txt
+1 −1 manifest.yml
+17 −15 sbom.spdx
+132 −55 source/core_mqtt.c
+1 −5 source/core_mqtt_serializer.c
+1 −3 source/core_mqtt_state.c
+10 −2 source/include/core_mqtt.h
+81 −1 source/include/core_mqtt_config_defaults.h
+0 −132 source/include/core_mqtt_default_logging.h
+1 −13 source/include/core_mqtt_serializer.h
+1 −1 source/include/core_mqtt_state.h
+6 −9 source/interface/transport_interface.h
+60 −48 test/CMakeLists.txt
+1 −7 test/cbmc/include/core_mqtt_config.h
+1 −1 test/cbmc/include/event_callback_stub.h
+1 −1 test/cbmc/include/get_time_stub.h
+1 −1 test/cbmc/include/mqtt_cbmc_state.h
+1 −1 test/cbmc/include/network_interface_stubs.h
+2 −1 test/cbmc/proofs/MQTT_Connect/MQTT_Connect_harness.c
+1 −1 test/cbmc/proofs/MQTT_DeserializeAck/MQTT_DeserializeAck_harness.c
+1 −1 test/cbmc/proofs/MQTT_DeserializePublish/MQTT_DeserializePublish_harness.c
+1 −1 test/cbmc/proofs/MQTT_Disconnect/MQTT_Disconnect_harness.c
+6 −1 test/cbmc/proofs/MQTT_GetIncomingPacketTypeAndLength/MQTT_GetIncomingPacketTypeAndLength_harness.c
+1 −1 test/cbmc/proofs/MQTT_GetPacketId/MQTT_GetPacketId_harness.c
+1 −1 test/cbmc/proofs/MQTT_GetSubAckStatusCodes/MQTT_GetSubAckStatusCodes_harness.c
+1 −1 test/cbmc/proofs/MQTT_Init/MQTT_Init_harness.c
+1 −1 test/cbmc/proofs/MQTT_MatchTopic/MQTT_MatchTopic_harness.c
+1 −1 test/cbmc/proofs/MQTT_Ping/MQTT_Ping_harness.c
+1 −1 test/cbmc/proofs/MQTT_ProcessLoop/MQTT_ProcessLoop_harness.c
+2 −1 test/cbmc/proofs/MQTT_Publish/MQTT_Publish_harness.c
+1 −1 test/cbmc/proofs/MQTT_ReceiveLoop/MQTT_ReceiveLoop_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializeAck/MQTT_SerializeAck_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializeConnect/MQTT_SerializeConnect_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializeDisconnect/MQTT_SerializeDisconnect_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializePingreq/MQTT_SerializePingreq_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializePublish/MQTT_SerializePublish_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializePublishHeader/MQTT_SerializePublishHeader_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializeSubscribe/MQTT_SerializeSubscribe_harness.c
+1 −1 test/cbmc/proofs/MQTT_SerializeUnsubscribe/MQTT_SerializeUnsubscribe_harness.c
+2 −1 test/cbmc/proofs/MQTT_Subscribe/MQTT_Subscribe_harness.c
+2 −1 test/cbmc/proofs/MQTT_Unsubscribe/MQTT_Unsubscribe_harness.c
+74 −0 test/cbmc/proofs/lib/print_tool_versions.py
+57 −6 test/cbmc/proofs/lib/summarize.py
+1 −1 test/cbmc/sources/mqtt_cbmc_state.c
+1 −1 test/cbmc/stubs/event_callback_stub.c
+1 −1 test/cbmc/stubs/get_time_stub.c
+1 −1 test/cbmc/stubs/memmove.c
+1 −1 test/cbmc/stubs/network_interface_stubs.c
+36 −0 test/unit-test/cmock_opaque_types.h
+3 −7 test/unit-test/core_mqtt_config.h
+13 −6 test/unit-test/core_mqtt_serializer_utest.c
+6 −6 test/unit-test/core_mqtt_state_utest.c
+132 −2 test/unit-test/core_mqtt_utest.c
+1 −1 test/unit-test/logging/logging_levels.h
+1 −1 test/unit-test/logging/logging_stack.h
+2 −0 tools/cmock/project.yml
+22 −25 tools/coverity/misra.config
2 changes: 1 addition & 1 deletion Middleware/FreeRTOS/corePKCS11
Submodule corePKCS11 updated 147 files
2 changes: 1 addition & 1 deletion Middleware/FreeRTOS/kernel
Submodule kernel updated 804 files
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include "FreeRTOS.h"
#include "semphr.h"

/* Demo Specific configs. */
#include "core_mqtt_config.h"

/* Header include. */
#include "freertos_command_pool.h"
#include "freertos_agent_message.h"
Expand Down
2 changes: 2 additions & 0 deletions examples/common/mqtt_agent/mqtt_agent_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@

#include "core_pkcs11_config.h"

#include "core_mqtt_config.h"

/* MQTT library includes. */
#include "core_mqtt.h"

Expand Down
28 changes: 0 additions & 28 deletions examples/evkbmimxrt1060/bootloader/signing_key.pem

This file was deleted.

39 changes: 0 additions & 39 deletions examples/evkbmimxrt1060/bootloader/signing_pub_key.c

This file was deleted.

3 changes: 3 additions & 0 deletions examples/evkbmimxrt1060/defender/include/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ extern void vLoggingPrintf( const char * pcFormat,
#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 0
#define configRECORD_STACK_HIGH_ADDRESS 1

/* Task notification settings. */
#define configTASK_NOTIFICATION_ARRAY_ENTRIES ( 4 )

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
Expand Down
3 changes: 3 additions & 0 deletions examples/evkbmimxrt1060/shadow/include/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ extern void vLoggingPrintf( const char * pcFormat,
#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 0
#define configRECORD_STACK_HIGH_ADDRESS 1

/* Task notification settings. */
#define configTASK_NOTIFICATION_ARRAY_ENTRIES ( 4 )

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
Expand Down
3 changes: 3 additions & 0 deletions examples/evkbmimxrt1060/test/include/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ extern void vLoggingPrintf( const char * pcFormat,
#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 0
#define configRECORD_STACK_HIGH_ADDRESS 1

/* Task notification settings. */
#define configTASK_NOTIFICATION_ARRAY_ENTRIES ( 4 )

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
Expand Down
27 changes: 27 additions & 0 deletions examples/evkbmimxrt1060/test/include/MQTTFileDownloader_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* AWS IoT Core MQTT File Streams Embedded C v1.1.0
* Copyright (C) 2023 Amazon.com, Inc. and its affiliates. All Rights Reserved.
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License. See the LICENSE accompanying this file
* for the specific language governing permissions and limitations under
* the License.
*/

/**
* @file MQTTFileDownloader_config.h
* @brief Configs for MQTT stream.
*/

#ifndef MQTT_FILE_DOWNLOADER_CONFIG_H
#define MQTT_FILE_DOWNLOADER_CONFIG_H

/**
* Configure the Maximum size of the data payload. The smallest value is 256 bytes,
* maximum is 128KB.
*/
#ifndef mqttFileDownloader_CONFIG_BLOCK_SIZE
#define mqttFileDownloader_CONFIG_BLOCK_SIZE 512U
#endif

#endif /* #ifndef MQTT_FILE_DOWNLOADER_DEFAULT_H */
20 changes: 10 additions & 10 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ description: |-
"Reference IoT integration project using NXP i.MX RT1060 with EdgeLock® SE050 secure element and FreeRTOS LTS libraries"
dependencies:
- name: "FreeRTOS-Kernel"
version: "V10.5.1"
version: "V11.1.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Kernel.git"
path: "Middleware/FreeRTOS/kernel"
- name: "coreJSON"
version: "v3.2.0"
version: "v3.3.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/coreJSON.git"
path: "Middleware/FreeRTOS/coreJSON"
- name: "coreMQTT"
version: "v2.1.1"
version: "v2.3.0"
repository:
type: "git"
url: "https://github.com/FreeRTOS/coreMQTT.git"
path: "Middleware/FreeRTOS/coreMQTT"
- name: "corePKCS11"
version: "v3.5.0"
version: "v3.6.1"
repository:
type: "git"
url: "https://github.com/FreeRTOS/corePKCS11.git"
path: "Middleware/FreeRTOS/corePKCS11"
- name: "backoffAlgorithm"
version: "v1.3.0"
version: "v1.4.1"
repository:
type: "git"
url: "https://github.com/FreeRTOS/backoffAlgorithm"
Expand All @@ -40,13 +40,13 @@ dependencies:
url: "https://github.com/FreeRTOS/coreMQTT-Agent.git"
path: "Middleware/FreeRTOS/coreMQTT-Agent"
- name: "device-defender"
version: "v1.3.0"
version: "v1.4.0"
repository:
type: "git"
url: "https://github.com/aws/Device-Defender-for-AWS-IoT-embedded-sdk.git"
path: "Middleware/AWS/device-defender"
- name: "device-shadow"
version: "v1.3.0"
version: "v1.4.1"
repository:
type: "git"
url: "https://github.com/aws/Device-Shadow-for-AWS-IoT-embedded-sdk.git"
Expand Down Expand Up @@ -88,13 +88,13 @@ dependencies:
url: "https://github.com/ThrowTheSwitch/Unity.git"
path: "Middleware/unity"
- name: "FreeRTOS-Libraries-Integration-Tests"
version: "202210.01"
version: "692d509"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Libraries-Integration-Tests"
path: "Middleware/FreeRTOS/tests"
- name: "aws-iot-core-mqtt-file-streams-embedded-c"
version: "690fb2b"
version: "v1.1.0"
repository:
type: "git"
url: "https://github.com/aws/aws-iot-core-mqtt-file-streams-embedded-c"
Expand All @@ -106,7 +106,7 @@ dependencies:
url: "https://github.com/amazon-freertos/pkcs11.git"
path: "Middleware/FreeRTOS/pkcs11"
- name: "Jobs-for-AWS-IoT-embedded-sdk"
version: "05f2afa"
version: "v1.5.1"
repository:
type: "git"
url: "https://github.com/aws/Jobs-for-AWS-IoT-embedded-sdk.git"
Expand Down
4 changes: 2 additions & 2 deletions projects/evkmimxrt1060/defender/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down Expand Up @@ -370,7 +370,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down
4 changes: 2 additions & 2 deletions projects/evkmimxrt1060/pubsub/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down Expand Up @@ -276,7 +276,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down
4 changes: 2 additions & 2 deletions projects/evkmimxrt1060/shadow/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down Expand Up @@ -366,7 +366,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down
4 changes: 2 additions & 2 deletions projects/evkmimxrt1060/test/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down Expand Up @@ -286,7 +286,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="tests/src/mqtt/mqtt_test.c|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="freertos/examples|tests/src/mqtt/mqtt_test.c|lwip/src/netif/lowpan6_common.c|lwip/src/netif/lowpan6.c|tinycbor/src/open_memstream.c|ota/source/portable/os/ota_os_posix.c|ota/source/dependency|source/mqtt/mqtt_mutual_auth.c|lwip/src/core/ipv6|lwip/src/netif/lowpan6_ble.c|secure_element/hostlib/libCommon/infra/cm_commands.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
Expand Down

0 comments on commit ac3aced

Please sign in to comment.