Skip to content

Commit 33d1f56

Browse files
authored
Merge pull request ARMmbed#21 from ARMmbed/release-1.4.0
mbed-cloud-client-example 1.4.0
2 parents 26e1b73 + d111ac1 commit 33d1f56

28 files changed

+248
-99
lines changed

CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
# Changelog for Mbed Cloud Client Reference Example
22

3-
## Release 1.3.3 (11.06.2018)
3+
## Release 1.4.0 (13.07.2018)
4+
* Increased application main stack-size to 5120 to fix Stack overflow with ARMCC compiled binaries when tracing is enabled.
5+
* Linux: Updated Mbedtls to 2.10.0 in pal-platform.
6+
* Updated to Mbed OS 5.9.2.
7+
* Updated easy-connect to v1.2.12.
8+
* Updated storage-selector with support for SPI flash frequency, and Nucleo F411RE board.
9+
* Moved mbed_trace() init as first step in application init to allow printing any early debug-information from PAL-layer when debug tracing is enabled.
10+
* Added support for Nucleo F411RE board with Wifi-X-Nucleo shield.
11+
* Increased the Mbed Cloud Client event loop thread stack size to 8192 bytes from default value of 6144. This fixes stack overflows in some cases
12+
where crypto operations result in deep callstacks.
13+
14+
## Release 1.3.3 (08.06.2018)
415
* Updated to Mbed OS 5.8.5.
516
* The example application prints information about the validity of the stored Cloud credentials (including Connect and Update certificates).
617
* 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).
718
* Fixed the heap corruption that took place with `print_m2mobject_stats()` when building the code with the MBED_HEAP_STATS_ENABLED flag.
819
* Added the `-DMBED_STACK_STATS_ENABLED` flag. It enables printing information on the application thread stack usage.
920

1021
## Release 1.3.2 (22.05.2018)
11-
* Updated easy-connect to v1.2.9
12-
* Updated to Mbed OS 5.8.4
22+
* Updated easy-connect to v1.2.9.
23+
* Updated to Mbed OS 5.8.4.
1324
* Added the `partition_mode` configuration. It is enabled by default and supposed to be used with a data storage, such as an SD card.
1425
* Linux: Updated Mbedtls to 2.7.1 in pal-platform.
1526
* Linux: Fixed CMake generation and performed generic cleanup in pal-platform scripts.

configs/eth_v4.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
45
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
@@ -15,7 +16,8 @@
1516
"storage-selector.storage" : "SD_CARD",
1617
"update-client.storage-address" : "(1024*1024*64)",
1718
"update-client.storage-size" : "(1024*1024*2)",
18-
"update-client.storage-locations": "1"
19+
"update-client.storage-locations": "1",
20+
"nanostack-hal.event_loop_thread_stack_size": 8192
1921
},
2022
"K64F": {
2123
"target.mbed_app_start" : "0x0000a400",
@@ -28,15 +30,14 @@
2830
"update-client.application-details": "(0x08000000+64*1024)"
2931
},
3032
"UBLOX_EVK_ODIN_W2": {
33+
"target.network-default-interface-type": "ETHERNET",
3134
"target.mbed_app_start" : "0x08010400",
32-
"target.device_has_remove": ["EMAC"],
3335
"update-client.bootloader-details" : "0x08007300",
3436
"update-client.application-details": "(0x08000000+64*1024)"
3537
}
3638
},
3739
"config": {
3840
"network-interface": {
39-
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN",
4041
"value": "ETHERNET"
4142
},
4243
"developer-mode": {

configs/eth_v4_legacy.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS_legacy.h\"",
45
"PAL_DEVICE_KEY_DERIVATION_BACKWARD_COMPATIBILITY_CALC=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FILESYSTEM"
@@ -15,7 +16,8 @@
1516
"storage-selector.storage" : "SD_CARD",
1617
"update-client.storage-address" : "(1024*1024*64)",
1718
"update-client.storage-size" : "(1024*1024*2)",
18-
"update-client.storage-locations": "1"
19+
"update-client.storage-locations": "1",
20+
"nanostack-hal.event_loop_thread_stack_size": 8192
1921
},
2022
"K64F": {
2123
"target.mbed_app_start" : "0x00020400",
@@ -28,7 +30,6 @@
2830
},
2931
"config": {
3032
"network-interface": {
31-
"help": "Options are ETHERNET",
3233
"value": "ETHERNET"
3334
},
3435
"developer-mode": {

configs/eth_v6.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
45
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
@@ -17,7 +18,8 @@
1718
"storage-selector.storage" : "SD_CARD",
1819
"update-client.storage-address" : "(1024*1024*64)",
1920
"update-client.storage-size" : "(1024*1024*2)",
20-
"update-client.storage-locations": "1"
21+
"update-client.storage-locations": "1",
22+
"nanostack-hal.event_loop_thread_stack_size": 8192
2123
},
2224
"K64F": {
2325
"target.mbed_app_start" : "0x0000a400",
@@ -30,15 +32,14 @@
3032
"update-client.application-details": "(0x08000000+64*1024)"
3133
},
3234
"UBLOX_EVK_ODIN_W2": {
33-
"target.device_has_remove": ["EMAC"],
35+
"target.network-default-interface-type": "ETHERNET",
3436
"target.mbed_app_start" : "0x08010400",
3537
"update-client.bootloader-details" : "0x08007300",
3638
"update-client.application-details": "(0x08000000+64*1024)"
3739
}
3840
},
3941
"config": {
4042
"network-interface": {
41-
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN",
4243
"value": "ETHERNET"
4344
},
4445
"developer-mode": {

configs/mesh_6lowpan.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
45
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
@@ -24,7 +25,8 @@
2425
"update-client.storage-address" : "(1024*1024*64)",
2526
"update-client.storage-size" : "(1024*1024*2)",
2627
"update-client.storage-locations": "1",
27-
"client_app.pal_dtls_peer_min_timeout": "10000"
28+
"client_app.pal_dtls_peer_min_timeout": "10000",
29+
"nanostack-hal.event_loop_thread_stack_size": 8192
2830
},
2931
"K64F": {
3032
"target.mbed_app_start" : "0x0000a400",
@@ -36,11 +38,6 @@
3638
"update-client.bootloader-details" : "0x080078CC",
3739
"update-client.application-details": "(0x08000000+64*1024)",
3840
"target.macros_add": ["ATMEL_SPI_MOSI=PB_5"]
39-
},
40-
"UBLOX_EVK_ODIN_W2": {
41-
"target.mbed_app_start" : "0x08010400",
42-
"update-client.bootloader-details" : "0x08007300",
43-
"update-client.application-details": "(0x08000000+64*1024)"
4441
}
4542
},
4643
"config": {

configs/mesh_thread.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
45
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
@@ -25,7 +26,8 @@
2526
"update-client.storage-address" : "(1024*1024*64)",
2627
"update-client.storage-size" : "(1024*1024*2)",
2728
"update-client.storage-locations": "1",
28-
"client_app.pal_dtls_peer_min_timeout": "10000"
29+
"client_app.pal_dtls_peer_min_timeout": "10000",
30+
"nanostack-hal.event_loop_thread_stack_size": 8192
2931
},
3032
"K64F": {
3133
"target.mbed_app_start" : "0x0000a400",
@@ -37,11 +39,6 @@
3739
"update-client.bootloader-details" : "0x080078CC",
3840
"update-client.application-details": "(0x08000000+64*1024)",
3941
"target.macros_add": ["ATMEL_SPI_MOSI=PB_5"]
40-
},
41-
"UBLOX_EVK_ODIN_W2": {
42-
"target.mbed_app_start" : "0x08010400",
43-
"update-client.bootloader-details" : "0x08007300",
44-
"update-client.application-details": "(0x08000000+64*1024)"
4542
}
4643
},
4744
"config": {

configs/wifi_esp8266_v4.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
45
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
@@ -16,7 +17,8 @@
1617
"storage-selector.storage" : "SD_CARD",
1718
"update-client.storage-address" : "(1024*1024*64)",
1819
"update-client.storage-size" : "(1024*1024*2)",
19-
"update-client.storage-locations": "1"
20+
"update-client.storage-locations": "1",
21+
"nanostack-hal.event_loop_thread_stack_size": 8192
2022
},
2123
"K64F": {
2224
"target.mbed_app_start" : "0x0000a400",
@@ -39,7 +41,6 @@
3941
},
4042
"config": {
4143
"network-interface":{
42-
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN",
4344
"value": "WIFI_ESP8266"
4445
},
4546
"wifi-ssid": {

configs/wifi_f411re_v4.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS_SW_TRNG.h\"",
4+
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_non_trng_config_MbedOS.h\"",
5+
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
6+
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
7+
],
8+
"target_overrides": {
9+
"*": {
10+
"platform.stdio-baud-rate": 115200,
11+
"platform.stdio-convert-newlines": true,
12+
"mbed-client.event-loop-size": 1024,
13+
"mbed-trace.enable": null,
14+
"storage-selector.filesystem" : "FAT",
15+
"storage-selector.mount-point": "\"sd\"",
16+
"storage-selector.storage" : "SD_CARD",
17+
"update-client.storage-address" : "(1024*1024*64)",
18+
"update-client.storage-size" : "(1024*1024*2)",
19+
"update-client.storage-locations": "1",
20+
"nanostack-hal.event_loop_thread_stack_size": 8192
21+
},
22+
"NUCLEO_F411RE": {
23+
"target.mbed_app_start" : "0x08010400",
24+
"update-client.bootloader-details" : "(0x08000000+30*1024)",
25+
"update-client.application-details": "(0x08000000+64*1024)"
26+
}
27+
},
28+
"config": {
29+
"network-interface": {
30+
"value": "WIFI_IDW0XX1"
31+
},
32+
"wifi-ssid": {
33+
"help": "WiFi SSID",
34+
"value": "\"SSID\""
35+
},
36+
"wifi-password": {
37+
"help": "WiFi Password",
38+
"value": "\"Password\""
39+
},
40+
"developer-mode": {
41+
"help": "Enable Developer mode to skip Factory enrollment",
42+
"value": 1
43+
}
44+
}
45+
}

configs/wifi_odin_v4.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
45
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
@@ -15,7 +16,8 @@
1516
"storage-selector.storage" : "SD_CARD",
1617
"update-client.storage-address" : "(1024*1024*64)",
1718
"update-client.storage-size" : "(1024*1024*2)",
18-
"update-client.storage-locations": "1"
19+
"update-client.storage-locations": "1",
20+
"nanostack-hal.event_loop_thread_stack_size": 8192
1921
},
2022
"UBLOX_EVK_ODIN_W2": {
2123
"target.mbed_app_start" : "0x08010400",
@@ -25,7 +27,6 @@
2527
},
2628
"config": {
2729
"network-interface":{
28-
"help": "Options are ETHERNET, WIFI_ESP8266, WIFI_ODIN",
2930
"value": "WIFI_ODIN"
3031
},
3132
"wifi-ssid": {

define.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ endif()
2727

2828
add_definitions(-DPAL_DTLS_PEER_MIN_TIMEOUT=5000)
2929
add_definitions(-DMBED_CONF_APP_DEVELOPER_MODE=1)
30+
add_definitions(-DMBED_CONF_MBED_TRACE_ENABLE=0)
3031
add_definitions(-DPLATFORM_ENABLE_BUTTON=1)
3132
add_definitions(-DPLATFORM_ENABLE_LED=1)

easy-connect.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/ARMmbed/easy-connect/#21a78a40e94ba9298e05ce54738c6b42657ae010
1+
https://github.com/ARMmbed/easy-connect/#aaf89690919fc378799e680119a58a222402799f

main.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,27 @@ void main_application(void)
117117
#ifdef TARGET_LIKE_MBED
118118
wait(2);
119119
#endif
120-
mcc_platform_sw_build_info();
121-
// run_application() will first initialize the program and then call main_application()
120+
// Initialize trace-library first
121+
if (application_init_mbed_trace() != 0) {
122+
printf("Failed initializing mbed trace\n" );
123+
return;
124+
}
122125

126+
// Initialize storage
123127
if (mcc_platform_storage_init() != 0) {
124128
printf("Failed to initialize storage\n" );
125129
return;
126130
}
127131

132+
// Initialize platform-specific components
128133
if(mcc_platform_init() != 0) {
129134
printf("ERROR - platform_init() failed!\n");
130135
return;
131136
}
132137

138+
// Print platform information
139+
mcc_platform_sw_build_info();
140+
133141
// Print some statistics of the object sizes and their heap memory consumption.
134142
// NOTE: This *must* be done before creating MbedCloudClient, as the statistic calculation
135143
// creates and deletes M2MSecurity and M2MDevice singleton objects, which are also used by
@@ -142,10 +150,9 @@ void main_application(void)
142150
SimpleM2MClient mbedClient;
143151

144152
// application_init() runs the following initializations:
145-
// 1. trace initialization
146-
// 2. platform initialization
147-
// 3. print memory statistics if MBED_HEAP_STATS_ENABLED is defined
148-
// 4. FCC initialization.
153+
// 1. platform initialization
154+
// 2. print memory statistics if MBED_HEAP_STATS_ENABLED is defined
155+
// 3. FCC initialization.
149156
if (!application_init()) {
150157
printf("Initialization failed, exiting application!\n");
151158
return;

mbed-cloud-client.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/ARMmbed/mbed-cloud-client/#3137b3d7c8da10bae38749a9384e5e5c77a55012
1+
https://github.com/ARMmbed/mbed-cloud-client/#9b0bc6a2f3f1f5dbb5be1827db83004d531b99c9

mbed-os.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/ARMmbed/mbed-os/#367dbdf5145f4d6aa3e483c147fe7bda1ce23a36
1+
https://github.com/ARMmbed/mbed-os/#62f8b922b420626514fd4690107aff4188469833

mbed_app.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"macros": [
3+
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
34
"PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
45
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
56
"MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
@@ -15,7 +16,8 @@
1516
"storage-selector.storage" : "SD_CARD",
1617
"update-client.storage-address" : "(1024*1024*64)",
1718
"update-client.storage-size" : "(1024*1024*2)",
18-
"update-client.storage-locations": "1"
19+
"update-client.storage-locations": "1",
20+
"nanostack-hal.event_loop_thread_stack_size": 8192
1921
},
2022
"K64F": {
2123
"target.mbed_app_start" : "0x0000a400",
@@ -28,10 +30,15 @@
2830
"update-client.application-details": "(0x08000000+64*1024)"
2931
},
3032
"UBLOX_EVK_ODIN_W2": {
31-
"target.device_has_remove": ["EMAC"],
33+
"target.network-default-interface-type": "ETHERNET",
3234
"target.mbed_app_start" : "0x08010400",
3335
"update-client.bootloader-details" : "0x08007300",
3436
"update-client.application-details": "(0x08000000+64*1024)"
37+
},
38+
"NUCLEO_F411RE": {
39+
"target.mbed_app_start" : "0x08010400",
40+
"update-client.bootloader-details" : "(0x08000000+30*1024)",
41+
"update-client.application-details": "(0x08000000+64*1024)"
3542
}
3643
},
3744
"config": {

mbed_lib.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"name": "client_app",
33
"macros": [
4-
"MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
54
"MBED_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
65
"MBED_CLOUD_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
7-
"MBED_CONF_APP_MAIN_STACK_SIZE=4608",
6+
"MBED_CONF_APP_MAIN_STACK_SIZE=5120",
87
"PLATFORM_ENABLE_BUTTON=1",
98
"PLATFORM_ENABLE_LED=1"
109
],
@@ -66,6 +65,12 @@
6665
"sotp-section-2-address" : "(36*1024)",
6766
"sotp-section-2-size" : "( 4*1024)"
6867
},
68+
"NUCLEO_F411RE": {
69+
"sotp-section-1-address" : "(0x08000000+32*1024)",
70+
"sotp-section-1-size" : "(16*1024)",
71+
"sotp-section-2-address" : "(0x08000000+48*1024)",
72+
"sotp-section-2-size" : "(16*1024)"
73+
},
6974
"NUCLEO_F429ZI": {
7075
"sotp-section-1-address" : "(0x08000000+32*1024)",
7176
"sotp-section-1-size" : "(16*1024)",

0 commit comments

Comments
 (0)