Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:e0ba512426a7, committed 2019-01-25
- Comitter:
- Andrew Chong
- Date:
- Fri Jan 25 10:53:46 2019 +0900
- Parent:
- 0:fdc18ffe96a4
- Child:
- 2:fc3bf417cdae
- Commit message:
- Compared with K64F example and updated the codes.
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Fri Jan 25 10:53:46 2019 +0900 @@ -0,0 +1,2 @@ +mbed-os/* +simple-mbed-cloud-client/* \ No newline at end of file
--- a/main.cpp Fri Dec 14 18:04:23 2018 +0900
+++ b/main.cpp Fri Jan 25 10:53:46 2019 +0900
@@ -15,7 +15,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------
-#ifndef MBED_TEST_MODE
#include "mbed.h"
#include "simple-mbed-cloud-client.h"
@@ -26,11 +25,11 @@
EventQueue eventQueue;
// Default block device
-BlockDevice *bd = BlockDevice::get_default_instance();
-FATFileSystem fs("fs");
+BlockDevice* bd = BlockDevice::get_default_instance();
+FATFileSystem fs("sd", bd);
// Default network interface object
-NetworkInterface *net = NetworkInterface::get_default_instance();
+NetworkInterface *net;
// Declaring pointers for access to Pelion Device Management Client resources outside of main()
MbedCloudClientResource *button_res;
@@ -106,6 +105,8 @@
printf("Connecting to the network...\n");
// Connect to the internet (DHCP is expected to be on)
+ net = NetworkInterface::get_default_instance();
+
nsapi_error_t status = net->connect();
if (status != NSAPI_ERROR_OK) {
@@ -155,4 +156,3 @@
// You can easily run the eventQueue in a separate thread if required
eventQueue.dispatch_forever();
}
-#endif
--- a/mbed-os.lib Fri Dec 14 18:04:23 2018 +0900 +++ b/mbed-os.lib Fri Jan 25 10:53:46 2019 +0900 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#2fd0c5cfbd83fce62da6308f9d64c0ab64e1f0d6 +https://github.com/ARMmbed/mbed-os/#a8f0c33eaa2c52babff9655417c36f4b5edd54d7
--- a/mbed_app.json Fri Dec 14 18:04:23 2018 +0900
+++ b/mbed_app.json Fri Jan 25 10:53:46 2019 +0900
@@ -1,37 +1,32 @@
{
"macros": [
- "ARM_UC_USE_PAL_BLOCKDEVICE=1",
- "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
+ "MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
+ "PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
"MBED_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
"MBED_CLOUD_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
- "PAL_USER_DEFINED_CONFIGURATION=\"sotp_fs_config_MbedOS.h\"",
- "PAL_FS_MOUNT_POINT_PRIMARY=\"/fs\"",
- "MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\"",
- "PAL_DTLS_PEER_MIN_TIMEOUT=5000"
+ "PAL_DTLS_PEER_MIN_TIMEOUT=5000",
+ "MBED_CONF_APP_MAIN_STACK_SIZE=6000",
+ "ARM_UC_USE_PAL_BLOCKDEVICE=1",
+ "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE"
],
"target_overrides": {
"*": {
- "platform.stdio-baud-rate" : 115200,
- "platform.stdio-convert-newlines" : true,
+ "platform.stdio-baud-rate": 115200,
+ "platform.stdio-convert-newlines": true,
"update-client.storage-address" : "(1024*1024*64)",
"update-client.storage-size" : "(1024*1024*2)",
- "update-client.storage-locations" : "1",
- "mbed-trace.enable" : null,
- "nsapi.default-wifi-security" : "WPA_WPA2",
- "nsapi.default-wifi-ssid" : "\"SSID\"",
- "nsapi.default-wifi-password" : "\"PASSWORD\""
+ "update-client.storage-locations": "1",
+ "mbed-trace.enable": null
},
"SDT64B": {
"target.features_add" : ["BOOTLOADER"],
"target.components_add" : ["SD"],
- "flash-start-address" : "0x0",
- "flash-size" : "(2048*1024)",
"sotp-section-1-address" : "(32*1024)",
"sotp-section-1-size" : "(4*1024)",
"sotp-section-2-address" : "(36*1024)",
"sotp-section-2-size" : "(4*1024)",
"sotp-num-sections" : 2,
- "update-client.application-details" : "(MBED_CONF_APP_FLASH_START_ADDRESS + 40*1024)",
+ "update-client.application-details": "(40*1024)"
"sd.SPI_MOSI" : "PTB16",
"sd.SPI_MISO" : "PTB17",
"sd.SPI_CLK" : "PTB11",
@@ -47,17 +42,6 @@
"help": "Enable Developer mode to skip Factory enrollment",
"value": 1
},
- "main-stack-size": {
- "value": 6000
- },
- "flash-start-address": {
- "help": "Start address of internal flash. Only used in this config to help the definition of other macros.",
- "value": null
- },
- "flash-size": {
- "help": "Total size of internal flash. Only used in this config to help the definition of other macros.",
- "value": null
- },
"sotp-section-1-address": {
"help": "Flash sector address for SOTP sector 1",
"macro_name": "PAL_INTERNAL_FLASH_SECTION_1_ADDRESS",
@@ -82,6 +66,6 @@
"help": "Number of SOTP sections",
"macro_name": "PAL_INT_FLASH_NUM_SECTIONS",
"value": null
- }
+ }
}
}
--- a/mbed_cloud_dev_credentials.c Fri Dec 14 18:04:23 2018 +0900 +++ b/mbed_cloud_dev_credentials.c Fri Jan 25 10:53:46 2019 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. All rights reserved. + * Copyright (c) 2018 ARM Limited. All rights reserved. * 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.
--- a/simple-mbed-cloud-client.lib Fri Dec 14 18:04:23 2018 +0900 +++ b/simple-mbed-cloud-client.lib Fri Jan 25 10:53:46 2019 +0900 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/simple-mbed-cloud-client/#0995133c1d9ad3a3ceedae26c3ecf02e824e7fa5 +https://github.com/ARMmbed/simple-mbed-cloud-client/#a885642da37e1343e248730e7110f3ef0b3db4c9
--- a/update_default_resources.c Fri Dec 14 18:04:23 2018 +0900 +++ b/update_default_resources.c Fri Jan 25 10:53:46 2019 +0900 @@ -1,5 +1,5 @@ // ---------------------------------------------------------------------------- -// Copyright 2016-2017 ARM Ltd. +// Copyright 2016-2018 ARM Ltd. // // SPDX-License-Identifier: Apache-2.0 //