Simple Mbed Cloud client application for NuMaker-PFM-M487 and NuMaker-PFM-NUC472 over Ethernet.

This application contains the example codes to:

1) Connect PFM-M487/PFM-NUC472 boards to Pelion

2) Enable Firmware update

For storage, PFM-M487/PFM-NUC472 support both SPI interface SD and built-in SD bus SD.

For connectivity, PFM-M487/PFM-NUC472 support Ethernet (on-board) by default.

This example supports Ethernet and built-in SD by default.

https://os.mbed.com/media/cache/platforms/NuMaker-PFM-M487.png.170x170_q85.png https://os.mbed.com/media/cache/platforms/NuMaker-PFM-NUC472Small.png.170x170_q85.png

Committer:
ccli8
Date:
Wed Nov 28 13:29:37 2018 +0800
Revision:
13:11364511c2a9
Parent:
12:21d96c437a2f
Fix Greentea sync error

With 'platform.stdio-buffered-serial' configured to true, stdio console is implemented by UARTSerial
which would register IRQ handler and intercept sync packet sent by host to DUT. When configuring
'platform.stdio-buffered-serial' configured to false, stdio console is implemented by DirectSerial
which wouldn't intercept sync packet in normal case.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ccli8 7:6aee86899520 1 {
ccli8 11:beac893830b4 2 "config": {
ccli8 11:beac893830b4 3 "format-storage-layer-on-error": {
ccli8 11:beac893830b4 4 "help": "Whether to format the storage layer when it cannot be read - always disable for production devices!",
ccli8 11:beac893830b4 5 "value": 1
ccli8 11:beac893830b4 6 },
ccli8 11:beac893830b4 7 "developer-mode": {
ccli8 11:beac893830b4 8 "help": "Enable Developer mode to skip Factory enrollment",
ccli8 11:beac893830b4 9 "value": 1
ccli8 11:beac893830b4 10 },
ccli8 11:beac893830b4 11 "main-stack-size": {
ccli8 11:beac893830b4 12 "value": 6000
ccli8 11:beac893830b4 13 }
ccli8 11:beac893830b4 14 },
ccli8 7:6aee86899520 15 "macros": [
ccli8 11:beac893830b4 16 "ARM_UC_USE_PAL_BLOCKDEVICE=1",
ccli8 11:beac893830b4 17 "MBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE",
ccli8 7:6aee86899520 18 "MBED_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
ccli8 7:6aee86899520 19 "MBED_CLOUD_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_user_config.h\"",
ccli8 11:beac893830b4 20 "PAL_FS_MOUNT_POINT_PRIMARY=\"/fs\""
ccli8 7:6aee86899520 21 ],
ccli8 7:6aee86899520 22 "target_overrides": {
ccli8 7:6aee86899520 23 "*": {
ccli8 11:beac893830b4 24 "target.features_add" : ["BOOTLOADER"],
ccli8 11:beac893830b4 25 "platform.stdio-baud-rate" : 115200,
ccli8 11:beac893830b4 26 "platform.stdio-convert-newlines" : true,
ccli8 13:11364511c2a9 27 "platform.stdio-buffered-serial" : false,
ccli8 11:beac893830b4 28 "mbed-client.event-loop-size" : 1024,
ccli8 11:beac893830b4 29 "nanostack-hal.event_loop_thread_stack_size": 8192,
ccli8 11:beac893830b4 30 "update-client.storage-address" : "(1024*1024*64)",
ccli8 11:beac893830b4 31 "update-client.storage-size" : "(1024*1024*2)",
ccli8 11:beac893830b4 32 "update-client.storage-locations" : 1,
ccli8 11:beac893830b4 33 "mbed-trace.enable" : 0,
ccli8 11:beac893830b4 34 "nsapi.default-wifi-security" : "WPA_WPA2",
ccli8 11:beac893830b4 35 "nsapi.default-wifi-ssid" : "\"SSID\"",
ccli8 11:beac893830b4 36 "nsapi.default-wifi-password" : "\"Password\""
ccli8 11:beac893830b4 37 },
ccli8 11:beac893830b4 38 "STM_EMAC": {
ccli8 11:beac893830b4 39 "target.components_add" : ["SD"],
ccli8 11:beac893830b4 40 "lwip.pbuf-pool-size" : 16,
ccli8 11:beac893830b4 41 "lwip.mem-size" : 12500,
ccli8 11:beac893830b4 42 "client_app.pal_number_of_partition": 1,
ccli8 11:beac893830b4 43 "client_app.partition_mode" : 1,
ccli8 11:beac893830b4 44 "client_app.auto_partition" : 1
ccli8 7:6aee86899520 45 },
ccli8 7:6aee86899520 46 "K64F": {
ccli8 11:beac893830b4 47 "target.components_add" : ["SD"],
ccli8 11:beac893830b4 48 "target.network-default-interface-type" : "ETHERNET",
ccli8 11:beac893830b4 49 "update-client.bootloader-details" : "0x00007188",
ccli8 11:beac893830b4 50 "update-client.application-details" : "(40*1024)",
ccli8 11:beac893830b4 51 "client_app.sotp-section-1-address" : "(32*1024)",
ccli8 11:beac893830b4 52 "client_app.sotp-section-1-size" : "( 4*1024)",
ccli8 11:beac893830b4 53 "client_app.sotp-section-2-address" : "(36*1024)",
ccli8 11:beac893830b4 54 "client_app.sotp-section-2-size" : "( 4*1024)"
ccli8 7:6aee86899520 55 },
ccli8 7:6aee86899520 56 "K66F": {
ccli8 11:beac893830b4 57 "target.components_add" : ["SD"],
ccli8 11:beac893830b4 58 "target.network-default-interface-type" : "ETHERNET",
ccli8 11:beac893830b4 59 "update-client.bootloader-details" : "0x00007188",
ccli8 11:beac893830b4 60 "update-client.application-details" : "(40*1024)",
ccli8 11:beac893830b4 61 "client_app.sotp-section-1-address" : "(32*1024)",
ccli8 11:beac893830b4 62 "client_app.sotp-section-1-size" : "( 4*1024)",
ccli8 11:beac893830b4 63 "client_app.sotp-section-2-address" : "(36*1024)",
ccli8 11:beac893830b4 64 "client_app.sotp-section-2-size" : "( 4*1024)"
ccli8 7:6aee86899520 65 },
ccli8 7:6aee86899520 66 "NUCLEO_F429ZI": {
ccli8 11:beac893830b4 67 "target.components_add" : ["SD"],
ccli8 11:beac893830b4 68 "target.network-default-interface-type" : "ETHERNET",
ccli8 11:beac893830b4 69 "target.app_offset" : "0x10400",
ccli8 11:beac893830b4 70 "target.header_offset" : "0x10000",
ccli8 11:beac893830b4 71 "target.bootloader_img" : "bootloader/mbed-bootloader-F429ZI.bin",
ccli8 11:beac893830b4 72 "target.components_add" : ["SD"],
ccli8 11:beac893830b4 73 "update-client.bootloader-details" : "0x080078CC",
ccli8 11:beac893830b4 74 "sd.SPI_MOSI" : "PE_6",
ccli8 11:beac893830b4 75 "sd.SPI_MISO" : "PE_5",
ccli8 11:beac893830b4 76 "sd.SPI_CLK" : "PE_2",
ccli8 11:beac893830b4 77 "sd.SPI_CS" : "PE_4",
ccli8 7:6aee86899520 78 "update-client.application-details" : "(0x08000000+64*1024)",
ccli8 11:beac893830b4 79 "client_app.sotp-section-1-address" : "(0x081C0000)",
ccli8 11:beac893830b4 80 "client_app.sotp-section-1-size" : "(128*1024)",
ccli8 11:beac893830b4 81 "client_app.sotp-section-2-address" : "(0x081E0000)",
ccli8 11:beac893830b4 82 "client_app.sotp-section-2-size" : "(128*1024)"
ccli8 7:6aee86899520 83 },
ccli8 7:6aee86899520 84 "NUMAKER_PFM_NUC472": {
ccli8 7:6aee86899520 85 "target.components_add" : ["NUSD"],
ccli8 7:6aee86899520 86 "target.network-default-interface-type" : "ETHERNET",
ccli8 7:6aee86899520 87 "update-client.bootloader-details" : "0x0",
ccli8 7:6aee86899520 88 "update-client.application-details" : "0x13000",
ccli8 7:6aee86899520 89
ccli8 7:6aee86899520 90 "drivers.uart-serial-rxbuf-size" : 1024,
ccli8 7:6aee86899520 91 "drivers.uart-serial-txbuf-size" : 1024,
ccli8 7:6aee86899520 92
ccli8 11:beac893830b4 93 "client_app.sotp-section-1-address" : "0x11000",
ccli8 11:beac893830b4 94 "client_app.sotp-section-1-size" : "0x1000",
ccli8 11:beac893830b4 95 "client_app.sotp-section-2-address" : "0x12000",
ccli8 11:beac893830b4 96 "client_app.sotp-section-2-size" : "0x1000",
ccli8 7:6aee86899520 97
ccli8 7:6aee86899520 98 "update-client.storage-address" : "(1024*1024*480)",
ccli8 7:6aee86899520 99 "update-client.storage-size" : "(1024*1024*2)",
ccli8 7:6aee86899520 100
ccli8 7:6aee86899520 101 "target.macros_add": [
ccli8 7:6aee86899520 102 "ESP8266_AT_SEL=ESP8266_AT_EXTERN"
ccli8 7:6aee86899520 103 ]
ccli8 7:6aee86899520 104 },
ccli8 7:6aee86899520 105 "NUMAKER_PFM_M487": {
ccli8 7:6aee86899520 106 "target.components_add" : ["NUSD"],
ccli8 7:6aee86899520 107 "target.network-default-interface-type" : "ETHERNET",
ccli8 7:6aee86899520 108 "update-client.bootloader-details" : "0x0",
ccli8 7:6aee86899520 109 "update-client.application-details" : "0x13000",
ccli8 7:6aee86899520 110
ccli8 7:6aee86899520 111 "drivers.uart-serial-rxbuf-size" : 1024,
ccli8 7:6aee86899520 112 "drivers.uart-serial-txbuf-size" : 1024,
ccli8 7:6aee86899520 113
ccli8 11:beac893830b4 114 "client_app.sotp-section-1-address" : "0x11000",
ccli8 11:beac893830b4 115 "client_app.sotp-section-1-size" : "0x1000",
ccli8 11:beac893830b4 116 "client_app.sotp-section-2-address" : "0x12000",
ccli8 11:beac893830b4 117 "client_app.sotp-section-2-size" : "0x1000",
ccli8 7:6aee86899520 118
ccli8 7:6aee86899520 119 "update-client.storage-address" : "(1024*1024*480)",
ccli8 7:6aee86899520 120 "update-client.storage-size" : "(1024*1024*2)",
ccli8 7:6aee86899520 121
ccli8 7:6aee86899520 122 "target.macros_add": [
ccli8 7:6aee86899520 123 "ESP8266_AT_SEL=ESP8266_AT_EXTERN"
ccli8 7:6aee86899520 124 ]
ccli8 12:21d96c437a2f 125 },
ccli8 12:21d96c437a2f 126 "NUMAKER_IOT_M487": {
ccli8 12:21d96c437a2f 127 "target.components_add" : ["NUSD"],
ccli8 12:21d96c437a2f 128 "target.network-default-interface-type" : "WIFI",
ccli8 12:21d96c437a2f 129 "update-client.bootloader-details" : "0x0",
ccli8 12:21d96c437a2f 130 "update-client.application-details" : "0x13000",
ccli8 12:21d96c437a2f 131
ccli8 12:21d96c437a2f 132 "drivers.uart-serial-rxbuf-size" : 1024,
ccli8 12:21d96c437a2f 133 "drivers.uart-serial-txbuf-size" : 1024,
ccli8 12:21d96c437a2f 134
ccli8 12:21d96c437a2f 135 "client_app.sotp-section-1-address" : "0x11000",
ccli8 12:21d96c437a2f 136 "client_app.sotp-section-1-size" : "0x1000",
ccli8 12:21d96c437a2f 137 "client_app.sotp-section-2-address" : "0x12000",
ccli8 12:21d96c437a2f 138 "client_app.sotp-section-2-size" : "0x1000",
ccli8 12:21d96c437a2f 139
ccli8 12:21d96c437a2f 140 "update-client.storage-address" : "(1024*1024*480)",
ccli8 12:21d96c437a2f 141 "update-client.storage-size" : "(1024*1024*2)",
ccli8 12:21d96c437a2f 142
ccli8 12:21d96c437a2f 143 "target.macros_add": [
ccli8 12:21d96c437a2f 144 "ESP8266_AT_SEL=ESP8266_AT_ONBOARD"
ccli8 12:21d96c437a2f 145 ]
ccli8 7:6aee86899520 146 }
ccli8 7:6aee86899520 147 }
ccli8 7:6aee86899520 148 }