Skip to content

Commit

Permalink
mbed-cloud-client-example 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
teetak01 committed Feb 25, 2019
1 parent aba76ee commit 225668a
Show file tree
Hide file tree
Showing 67 changed files with 3,312 additions and 606 deletions.
75 changes: 53 additions & 22 deletions CHANGELOG.md
@@ -1,39 +1,63 @@
# Changelog for Pelion Device Management Client reference example application
# Changelog for Pelion Device Management Client example application

## Release 2.2.0 (25.02.2019)

* Updated to Mbed OS 5.11.4.
* [Mbed OS] Client 2.2.0 has fixed the internal initialization of `ns_hal_init()`, which fixes the issue of double initialization of memory when using Mesh network stacks.
* Removed the application configurations of `mbed-client.event-loop-size` for most configurations. The application uses the default configuration defined in `mbed-client`, or from Mbed OS for Mesh network stacks.
* For Wi-Fi stacks, `mbed-client.event-loop-size` needs to be 2048.
* [Linux] Updated CMake minimum version to 3.5.
* [pal-platform] Deprecated the fullBuild option in build tools.
* [Mbed OS] By default, application configuration updated to use secure storage implementation through KVstore.
* K66F now uses internal flash for both storing client credentials and the update image.
* All other boards have been changed to use LittleFS instead of FAT file system by default. FAT file system is not power-loss resilient and should not be used in embedded devices.
* Old SOTP-ESFS based storage configuration files are still available in the `configs/legacy_storage` folder.
* `NUCLEO F411RE` board still uses SOTP-ESFS implementation, as non-TRNG boards are not yet supported in new KVStore-based storage.
* Legacy Wi-Fi configuration `wifi_esp8266_v4_legacy.json` introduced in the 2.1.1 release has been removed.
* Moved the network `init` call to `main()` and added network disconnect call to end of `main()`.
* Removed extern block evice reference from `platform-common`.
* Added `TESTS/PAL/test.py` script to help run PAL porting tests.
* Added basic Device Management acceptance end-to-end tests that use the [Icetea](https://github.com/ARMmbed/icetea) test framework.

## Release 2.1.1 (19.12.2018)

* Updated to Mbed OS 5.11.0.
* Modified WiFi configuration `configs/wifi_esp8266_v4.json` to support [new ESP8266 Wi-Fi chip](https://www.esp8266.com/wiki/doku.php?id=esp8266-module-family) having 2MB or more flash and [ESP8266 AT firmware](https://www.espressif.com/en/support/download/at?keys=) 1.7.0, with serial flow control (`UART0_CTS`, `UART0_RTS`) pins and reset pin (`EXT_RSTB`) connected. For production devices, we recommend that you upgrade your ESP8266 to this version and connect those control pins to corresponding pins on the target hardware.
* Previous WiFi ESP866 is supported via new `configs/wifi_esp8266_v4_legacy.json` file.
* Modified the Wi-Fi configuration `configs/wifi_esp8266_v4.json` to support the [new ESP8266 Wi-Fi chip](https://www.esp8266.com/wiki/doku.php?id=esp8266-module-family) with 2 MB or more flash and [ESP8266 AT firmware](https://www.espressif.com/en/support/download/at?keys=) 1.7.0, with serial flow control (`UART0_CTS`, `UART0_RTS`) pins and reset pin (`EXT_RSTB`) connected. For production devices, we recommend that you upgrade your ESP8266 to this version and connect the control pins to corresponding pins on the target hardware.
* Previous Wi-Fi ESP866 is supported in the new `configs/wifi_esp8266_v4_legacy.json` file.

<span class="notes">**Note**: With legacy ESP8266 Wi-Fi with 1 MB flash, the minimum supported firmware version is now 1.6.2. **Without flow control and reset pin connected the device will eventually disconnect and fail to re-connect.** ESP8266 firmware has to be version 1.7.0 (or later) to enable flow control and only boards with 2 MB flash or more can take that firmware in.</span>
<span class="notes">**Note**: With legacy ESP8266 Wi-Fi with 1 MB flash, the minimum supported firmware version is now 1.6.2. **Without flow control and reset pin connected, the device will eventually disconnect and fail to re-connect.** ESP8266 firmware has to be version 1.7.0 (or later) to enable flow control and only boards with 2 MB flash or more can take that firmware in.</span>
* [Linux] Updated Mbed TLS to 2.15.1.

## Release 2.1.0 (11.12.2018)

* Updated to Mbed OS 5.10.3.

## Release 2.0.1 (12.10.2018)
* Application uses `wait_ms(int)` instead of `wait(float)`, this saves a bit on application size.
* [Mbed OS] Application will print NetworkInterface status over console.

* The application uses `wait_ms(int)` instead of `wait(float)`. This saves a bit on the application size.
* [Mbed OS] The application prints NetworkInterface status over the console.
* Updated to Mbed OS 5.10.1.

## Release 2.0.0 (26.09.2018)

* Updated to Mbed OS 5.10.0.
* **Breaking changes** (Due to integration of storage and networking drivers to Mbed OS 5.10 and the introduction of new APIs, the application is not compatible with previous releases of Mbed OS).
* Changed the application to use Mbed OS 5.10 network interfaces directly and removed the dependency to `easy-connect.lib`.
* Changed the application to use Mbed OS 5.10 storage interfaces directly and removed the dependency to `storage-selector.lib`.
* The example uses Mbed OS bootloader binaries and the new Mbed OS feature `FEATURE_BOOTLOADER`. This feature makes the `combine_bootloader_with_app.py` script obsolete. We have removed the obsolete script and old bootloader binaries from the application repository.
* The bootloader is now automatically combined with the application binary at compile time:
* `mbed-cloud-client-example.bin` is the binary you need to flash on the development board.
* You can use `mbed-cloud-client-example_update.bin` for the firmware update as long as prequisites for firmware update has been fullfilled. (See the application tutorial).
* `mbed-cloud-client-example.bin` is the binary you need to flash on the development board.
* You can use `mbed-cloud-client-example_update.bin` for the firmware update as long as the prequisites for firmware update are fullfilled. (See the application tutorial).
* Removed the legacy configuration file `configs/eth_v4_legacy.json` that was used for Mbed Cloud Client 1.2.6.
* Removed the `.autostart` configurations used by Online Compiler.
* Removed the `.autostart` configurations used by the online compiler.
* Enabled serial buffer in all `.json` files.
* This improves the reliability of the connection with tracing enabled, for example Nucleo F429ZI had connectivity problems with UDP & traces enabled.
* This improves the reliability of the connection with tracing enabled, for example Nucleo F429ZI had connectivity problems with UDP and traces enabled.
* Increased LWIP buffers for all STM-based targets to improve the stability of DTLS connection.
* Disabled Hardware acceleration for Ublox EVK Odin W2 and Nucleo F411RE. See Mbed OS [issue](https://github.com/ARMmbed/mbed-os/issues/6545).
* Disabled hardware acceleration for Ublox EVK Odin W2 and Nucleo F411RE. See Mbed OS [issue](https://github.com/ARMmbed/mbed-os/issues/6545).
* [LINUX] Updated Mbed TLS to 2.13.1.

## Release 1.5.0 (11.9.2018)

* Added a hardcoded RoT injection when application is configured to use developer mode. This preserves the Device Management Client credentials even when SOTP is erased (for example due to reflashing of the application binary).
* Updated to Mbed OS 5.9.6.
* Updated easy-connect to v1.2.16.
Expand All @@ -44,47 +68,54 @@


## Release 1.4.0 (13.07.2018)

* Increased application main stack-size to 5120 to fix Stack overflow with ARMCC compiled binaries when tracing is enabled.
* Linux: Updated Mbedtls to 2.10.0 in pal-platform.
* Linux: Updated Mbed TLS to 2.10.0 in `pal-platform`.
* Updated to Mbed OS 5.9.2.
* Updated easy-connect to v1.2.12.
* Updated storage-selector with support for SPI flash frequency, and Nucleo F411RE board.
* Moved the initialization of `mbed_trace()` as the first step in the application initialization. This allows the printing of any early debug information from the PAL layer when debug tracing is enabled.
* Added support for Nucleo F411RE board with Wifi-X-Nucleo shield.
* Increased the event loop thread stack size to 8192 bytes from a default value of 6144. This fixes stack overflows in some cases where crypto operations result in deep callstacks.
* Increased the event loop thread stack size to 8192 bytes from the default value of 6144. This fixes stack overflows in some cases where crypto operations result in deep callstacks.

## Release 1.3.3 (08.06.2018)

* Updated to Mbed OS 5.8.5.
* The example application prints information about the validity of the stored Cloud credentials (including Connect and Update certificates).
* Added a start-up delay of two seconds as a workaround for the SD driver initialization [issue](https://github.com/ARMmbed/sd-driver/issues/93).
* Fixed the heap corruption that took place with `print_m2mobject_stats()` when building the code with the MBED_HEAP_STATS_ENABLED flag.
* Fixed the heap corruption that took place with `print_m2mobject_stats()` when building the code with the `MBED_HEAP_STATS_ENABLED` flag.
* Added the `-DMBED_STACK_STATS_ENABLED` flag. It enables printing information on the application thread stack usage.

## Release 1.3.2 (22.05.2018)

* Updated easy-connect to v1.2.9.
* Updated to Mbed OS 5.8.4.
* Added the `partition_mode` configuration. It is enabled by default and supposed to be used with a data storage, such as an SD card.
* Linux: Updated Mbedtls to 2.7.1 in pal-platform.
* Linux: Updated Mbed TLS to 2.7.1 in pal-platform.
* Linux: Fixed CMake generation and performed generic cleanup in pal-platform scripts.

#### Platform Adaptation Layer (PAL)

* Linux: Converted all timers to use signal-based timer (`SIGEV_SIGNAL`) instead of (`SIGEV_THREAD`).
* This fixes the Valgrind warnings for possible memory leaks caused by LIBC's internal timer helper thread.
<span class="notes">**Note**: If the client application is creating a pthread before instantiating MbedCloudClient,
it needs to block the PAL_TIMER_SIGNAL from it. Otherwise the thread may get an exception caused

<span class="notes">**Note**: If the client application is creating a pthread before instantiating MbedCloudClient,
it needs to block the `PAL_TIMER_SIGNAL` from it. Otherwise, the thread may get an exception caused
by the default signal handler with a message such as "Process terminating with default action
of signal 34 (`SIGRT2`)". For a suggested way to handle this please see `mcc_platform_init()` in [here](https://github.com/ARMmbed/mbed-cloud-client-example/blob/master/source/platform/Linux/common_setup.c).</span>
of signal 34 (`SIGRT2`)". For a suggested way to handle this, see `mcc_platform_init()` in [the code](https://github.com/ARMmbed/mbed-cloud-client-example/blob/master/source/platform/Linux/common_setup.c).</span>

## Release 1.3.1.1 (27.04.2018)

* No changes.

## Release 1.3.1 (19.04.2018)

* Converted LED blinking callback from a blocking loop to event based tasklet.
* Updated to Mbed OS 5.8.1.
* Rewrote platform-specific code to have common implementation which can be shared between other Cloud applications (source/platform/).
* enabled multipartition support for application.
* enabled LittleFS support.
* enabled autoformat/autopartition for storage (controllable via compile-time flags).
* Rewrote platform-specific code to have common implementation that can be shared between other Cloud applications (source/platform/).
* Enabled multipartition support for application.
* Enabled LittleFS support.
* Enabled autoformat/autopartition for storage (controllable via compile-time flags).

## Release 1.3.0 (27.3.2018)

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
@@ -1,6 +1,6 @@
INCLUDE(CMakeForceCompiler)
# CROSS COMPILER SETTING
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 3.5)
SET(CMAKE_SYSTEM_NAME Generic)

project(mbedCloudClientExample)
Expand Down
152 changes: 152 additions & 0 deletions Makefile
@@ -0,0 +1,152 @@
## ----------------------------------------------------------------------------
## Copyright 2016-2018 ARM Ltd.
##
## SPDX-License-Identifier: Apache-2.0
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## ----------------------------------------------------------------------------

## This makefile is only for SX OS platform

## ----------------------------------------------------------- ##
## Don't touch the next line unless you know what you're doing.##
## ----------------------------------------------------------- ##
include ${SOFT_WORKDIR}/env/compilation/compilevars.mk

export MBED_CLOUD_SERVICE = ${EXTERNAL_APP_FOLDER}

# Name of the module
LOCAL_NAME := ${MBED_CLOUD_SERVICE}

# list all modules APIs that are necessary to compile this module
LOCAL_API_DEPENDS := \
${LOCAL_NAME}/mbed-cloud-client \
platform/service/posix \
${API_PLATFORM_DEPENDS} \

LOCAL_ADD_INCLUDE += . \
${LOCAL_NAME} \
${LOCAL_NAME}/source \
${LOCAL_NAME}/source/include \
${LOCAL_NAME}/source/platform/include \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/key-config-manager/source/include \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/key-config-manager/key-config-manager \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/factory-configurator-client/factory-configurator-client \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/fcc-output-info-handler/fcc-output-info-handler \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/fcc-bundle-handler/fcc-bundle-handler \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/storage/storage \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/mbed-client-esfs/source/include \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/crypto-service/crypto-service \
${LOCAL_NAME}/mbed-cloud-client/factory-configurator-client/mbed-trace-helper/mbed-trace-helper \
${LOCAL_NAME}/mbed-cloud-client \
${LOCAL_NAME}/mbed-cloud-client/mbed-client \
${LOCAL_NAME}/mbed-cloud-client/mbed-client/mbed-client \
${LOCAL_NAME}/mbed-cloud-client/mbed-trace \
${LOCAL_NAME}/mbed-cloud-client/source \
${LOCAL_NAME}/mbed-cloud-client/ns-hal-pal \
${LOCAL_NAME}/mbed-cloud-client/nanostack-libservice/mbed-client-libservice \
${LOCAL_NAME}/mbed-cloud-client/mbed-client-pal/Source/PAL-Impl/Services-API \
${LOCAL_NAME}/mbed-cloud-client/mbed-client-pal/Configs/pal_config \
${LOCAL_NAME}/mbed-cloud-client/mbed-client-pal/Configs/pal_config/SXOS \
${LOCAL_NAME}/mbed-cloud-client/mbed-client/mbed-client-c \
${LOCAL_NAME}/mbed-cloud-client/mbed-coap/mbed-coap \
${LOCAL_NAME}/mbed-cloud-client/nanostack-libservice \
${LOCAL_NAME}/mbed-cloud-client/sal-stack-nanostack-eventloop \
${LOCAL_NAME}/mbed-cloud-client/certificate-enrollment-client/certificate-enrollment-client \
${LOCAL_NAME}/mbed-cloud-client/update-client-hub \
${LOCAL_NAME}/mbed-cloud-client/update-client-hub/modules/common \

LOCAL_EXPORT_FLAG += __SXOS__

LOCAL_EXPORT_FLAG += "'PAL_USER_DEFINED_CONFIGURATION=\"SXOS/sxos_sotp.h\"'"
LOCAL_EXPORT_FLAG += "'MBED_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"'"
LOCAL_EXPORT_FLAG += "'MBED_CLOUD_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"'"

LOCAL_EXPORT_FLAG += "'MBED_CONF_MBED_CLIENT_EVENT_LOOP_SIZE=12000'"
LOCAL_EXPORT_FLAG += "PAL_SIMULATOR_FLASH_OVER_FILE_SYSTEM=1"
LOCAL_EXPORT_FLAG += "MBED_CONF_MBED_TRACE_ENABLE"
LOCAL_EXPORT_FLAG += "MBED_CONF_APP_CLOUD_MODE=1"
LOCAL_EXPORT_FLAG += "MBED_CONF_APP_DEVELOPER_MODE=1"

# not yet
LOCAL_EXPORT_FLAG += "MBED_CONF_MBED_CLOUD_CLIENT_DISABLE_CERTIFICATE_ENROLLMENT=1"

# Disable code using STL as it not available on SDK
LOCAL_EXPORT_FLAG += "MBED_CLOUD_CLIENT_STL_API=0"
LOCAL_EXPORT_FLAG += "MBED_CLOUD_CLIENT_STD_NAMESPACE_POLLUTION=0"

# Compile the sub-modules, except when the "service" must be used as a library.
# list all the modules that need to be compiled prior to using this module

LOCAL_MODULE_DEPENDS += \
${LOCAL_NAME}/mbed-cloud-client \

# One can compile and run the PAL unit tests instead of example-app
# by "PAL_UNIT_TESTING=1 ctmake CT_PRODUCT=20180930 dbmerge -j" command.
#
# By default, the example app itself is built. By having the PAL tests in
# same makefile, one can easily be sure the configuration is the same and
# the changes in PAL during porting can be tested by its own unit tests and
# then running the example itself.
ifndef PAL_UNIT_TESTING

# this enables the mbed_cloud_application_entrypoint(void) from main.cpp
LOCAL_EXPORT_FLAG += MBED_CLOUD_APPLICATION_NONSTANDARD_ENTRYPOINT

else
# the PAL tests have mbed_cloud_application_entrypoint(void) too, which is enabled
# from pal_tests_nonstandard_entrypoint.c by PAL_UNIT_TESTING_NONSTANDARD_ENTRYPOINT.
LOCAL_EXPORT_FLAG += "PAL_UNIT_TESTING_NONSTANDARD_ENTRYPOINT"

# build the tests
LOCAL_MODULE_DEPENDS += ${LOCAL_NAME}/mbed-cloud-client/mbed-client-pal/Test

# These are needed for building PAL SOTP tests. Note: the flag is renamed on yet-to-be-merged
# version of esfs without backwards compatibility, so we need to have both here for some time.
LOCAL_EXPORT_FLAG += "SOTP_TESTING"
LOCAL_EXPORT_FLAG += "RBP_TESTING"
endif

# Generate the revision (version) file automatically during the make process.
AUTO_GEN_REVISION_HEADER := no

# This is a top-level module
IS_TOP_LEVEL := yes

# Generates the CoolWatcher headers automatically.
AUTO_XMD2H ?= no

# code is not in one "src/" directory as SDK expects by default
USE_DIFFERENT_SOURCE_LAYOUT := yes
USE_DIFFERENT_SOURCE_LAYOUT_ARM := yes

C_SRC := ${wildcard *.c}
C++_SRC := ${wildcard *.cpp}

C_SRC += ${wildcard source/*.c}
C++_SRC += ${wildcard source/*.cpp}

C_SRC += ${wildcard source/platform/*.c}
C++_SRC += ${wildcard source/platform/*.cpp}

C_SRC += ${wildcard source/platform/SXOS/*.c}
C++_SRC += ${wildcard source/platform/SXOS/*.cpp}

C_SRC += ${wildcard mbed-cloud-client/mbed-trace/source/*.c}
C_SRC += ${wildcard mbed-cloud-client/nanostack-libservice/source/libip6string/*.c}


## ------------------------------------- ##
## Do Not touch below this line ##
## ------------------------------------- ##
include ${SOFT_WORKDIR}/env/compilation/compilerules.mk

0 comments on commit 225668a

Please sign in to comment.