Hello.
I try to modify pelion-ready-example on NUCLEO_F746ZG target to use without an internal flash storage.
To reach my goal I try to set external secure storage feature:
"mbed-cloud-client.external-sst-support": 1
After that I get compilation error:
./simple-mbed-cloud-client/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:5: error: 'DeviceKey' was not declared in this scope
[Here] (DeviceKey was not declared for RZ_A1H target · Issue #10876 · ARMmbed/mbed-os · GitHub) I found solution and add FLASHIAP component:
"target.components_add" : ["FLASHIAP"],
Now it seems that internal flash is required again.
More over is correct compiled but fail on client initialization:
[DBG ][PAL ]: Init for the 1st time, initializing the modules
[DBG ][PAL ]: Network init
[DBG ][PAL ]: TLS init
[DBG ][PAL ]: Crypto init
[DBG ][PAL ]: Internal Flash init
[DBG ][PAL ]: SOTP init
[DBG ][PAL ]: init of SOTP module has failed with status 2
[DBG ][PAL ]: Destroying modules
[ERR ][PAL ]:
Init failed
[DBG ][PAL ]: FINISH PAL INIT
[ERR ][fcc ]: key_config_manager.c:43:kcm_init:<=== Failed initializing PAL (4294967294)
[ERR ][fcc ]: key_config_manager.c:103:kcm_item_store:<=== KCM initialization failed
[INFO][fcc ]: key_config_manager.c:98:kcm_item_store:===>
[INFO][fcc ]: key_config_manager.c:36:kcm_init:===>
[DBG ][PAL ]: Init for the 1st time, initializing the modules
[DBG ][PAL ]: Network init
[DBG ][PAL ]: TLS init
[DBG ][PAL ]: Crypto init
[DBG ][PAL ]: Internal Flash init
[DBG ][PAL ]: SOTP init
[DBG ][PAL ]: init of SOTP module has failed with status 2
[DBG ][PAL ]: Destroying modules
[ERR ][PAL ]:
Init failed
[DBG ][PAL ]: FINISH PAL INIT
[ERR ][fcc ]: key_config_manager.c:43:kcm_init:<=== Failed initializing PAL (4294967294)
[ERR ][fcc ]: key_config_manager.c:103:kcm_item_store:<=== KCM initialization failed
[INFO][fcc ]: factory_configurator_client.c:81:fcc_init:===>
[DBG ][PAL ]: Init for the 1st time, initializing the modules
[DBG ][PAL ]: Network init
[DBG ][PAL ]: TLS init
[DBG ][PAL ]: Crypto init
[DBG ][PAL ]: Internal Flash init
[DBG ][PAL ]: SOTP init
[DBG ][PAL ]: init of SOTP module has failed with status 2
[DBG ][PAL ]: Destroying modules
[ERR ][PAL ]:
Init failed
[DBG ][PAL ]: FINISH PAL INIT
[ERR ][fcc ]: factory_configurator_client.c:89:fcc_init:<=== Failed initializing internal storage (4294967294)
[ERR ][SMCC]: Factory Client Configuration failed with status 4
Pelion Client initialization failed (1)
[ERR ][UC ]: [HUB ] update_client_hub.c:428: Update Client not initialized
[DBG ][mClt]: CloudClientStorage::uninitialize_storage
[INFO][fcc ]: key_config_manager.c:73:kcm_finalize:===>
[INFO][fcc ]: key_config_manager.c:89:kcm_finalize:<===
Here is my mbed_app.json
{
"target_overrides": {
"*": {
"platform.stdio-baud-rate" : 115200,
"platform.stdio-convert-newlines" : true,
"mbed-trace.enable" : null,
"nsapi.default-wifi-security" : "WPA_WPA2",
"nsapi.default-wifi-ssid" : "\"SSID\"",
"nsapi.default-wifi-password" : "\"Password\""
},
"NUCLEO_F746ZG": {
"target.components_add" : ["SD"],
"sd.SPI_MOSI" : "PC_12",
"sd.SPI_MISO" : "PC_11",
"sd.SPI_CLK" : "PC_10",
"sd.SPI_CS" : "PC_9",
"device-management.flash-start-address" : "0x08000000",
"storage.storage_type" : "FILESYSTEM_NO_RBP",
"storage_filesystem_no_rbp.blockdevice" : "SD",
"storage_filesystem_no_rbp.mount_point" : "fs",
"storage_filesystem_no_rbp.folder_path" : "kvstore",
"update-client.storage-address" : "(64*1024*1024)",
"update-client.storage-size" : "(2*1024*1024)",
"update-client.storage-locations" : 1,
"mbed-cloud-client.external-sst-support" : 1,
"mbed-cloud-client.update-storage" : "ARM_UCP_FILESYSTEM",
"esp32.wifi-debug" : true,
"esp32.wifi-en" : "PD_4",
"esp32.wifi-io0" : "PD_3",
"esp32.wifi-rts" : "NC",
"esp32.wifi-cts" : "NC",
"esp32.wifi-tx" : "PD_5",
"esp32.wifi-rx" : "PD_6",
"esp32.wifi-baudrate" : 115200,
"mbed-trace.enable" : 1
}
},
"config": {
"format-storage-layer-on-error": {
"help": "Whether to format the storage layer when it cannot be read - always disable for production devices!",
"value": 1
},
"main-stack-size": {
"value": 6000
},
"use-button": {
"help": "Whether the target has a button",
"macro_name": "USE_BUTTON",
"value": true
},
"button-pressed-state": {
"help": "Value of the button when pressed",
"value": 1
},
"no_led": {
"help": "This flag disables the heartbeat thread in tests. This is useful for platforms that don't have an LED or the LED is used for other functionality like LED on the SPI clockline etc",
"value": null
},
"tests-fs-size": {
"help": "Maximum size of the file system used for tests",
"value": null
}
}
}
Is it possible to use pelion without using internal flash? And how I can make it?