Code Monkey home page Code Monkey logo

mbed-cloud-client-example's Introduction

mbed-cloud-client-example's People

Contributors

jenia81 avatar teetak01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mbed-cloud-client-example's Issues

Problem with importing project to IDE

Hi,

I want to modify your example but I have a problem with importing the project to IDE (CLion). The problem is that cmake don't see common.cmake file and unrecognise expressions like
SET (CMAKE_CXX_COMPILER "/usr/bin/clang++")

Maybe someone is able to write some instruction on how to start with it?

mbed-cloud-client example run in ARM9 system problem

  1. I use "python pal-platform/pal-platform.py fullbuild --target ARM_OpenWRT_mbedtls --toolchain GCC-OPENWRT --external ./../define.txt --name mbedCloudClientExample.elf" can build success.
    but when I run ".elf" in my system will occur error.
  2. when I run "/out/Release/mbedCloudClientExample.elf" will occur "MBEDTLS_ERR_ECP_INVALID_KEY".
    this error come from the function "static int ecp_check_pubkey_sw( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *pt )".
  3. but, when I run "/out/Debug/mbedCloudClientExample.elf" will occur "MBEDTLS_ERR_X509_INVALID_FORMAT".
    This error come from the function "static int x509_crt_parse_der_core( mbedtls_x509_crt *crt, const unsigned char *buf, size_t buflen )"
  4. my system cpu is "arm926ej-s" and I run in Linux_4.4 Kernel.
  5. why run Release/.elf and Debug/.elf have different result..??
  6. and, how can I solve these error...??(any suggestion..??)

Fail to combine bootloader/application programs of HEX format

During my evaluation of Mbed Cloud 1.3.1 on our on-going NUMAKER_PFM_M2351 target, I fail to combine bootloader/application programs of HEX format. I re-produce the issue on K64F:

Environment


Target
K64F

"K64F": {
        "supported_form_factors": ["ARDUINO"],
        "core": "Cortex-M4F",
        "supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
        "extra_labels": ["Freescale", "MCUXpresso_MCUS", "KSDK2_MCUS", "FRDM", "KPSDK_MCUS", "KPSDK_CODE", "MCU_K64F"],
        "is_disk_virtual": true,
        "macros": ["CPU_MK64FN1M0VMD12", "FSL_RTOS_MBED"],
        "inherits": ["Target"],
        "detect_code": ["0240"],
        "device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_FC", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE", "STDIO_MESSAGES", "STORAGE", "TRNG", "FLASH"],
        "features": ["LWIP", "STORAGE"],
        "release_versions": ["2", "5"],
        "device_name": "MK64FN1M0xxx12",
        "bootloader_supported": true,
        
        "OUTPUT_EXT": "hex"
        
    },

mbed-bootloader
v3.3.0

mbed-cloud-client-bootloader
1.3.1.1

mbed-os
5.8.3

ARM Toolchain
ARM 5.24

GCC Toolchain
7-2017-q4-major) 7.2.1

Steps to reproduce


To build mbed-bootloader, I run:
mbed compile -m K64F -t ARM --profile tiny.json
And copy built mbed-bootloader.hex to mbed-cloud-client-example/tools directory.

To build mbed-cloud-client-example, I run:
mbed compile -m K64F -t GCC_ARM

Then I combine mbed-bootloader.hex and mbed-cloud-client-example and meet error:

$ python tools/combine_bootloader_with_app.py -m K64F -a BUILD/K64F/GCC_ARM/mbed-cloud-client-example_application.hex -o combined.hex
Using bootloader C:\ccli8\iot\mbed\mbed-os\mbed-cloud-client-example\tools\mbed-bootloader-k64f-block_device-sotp-v3_3_0.hex
Loading bootloader from hex file.
imageSize:    352748
imageHash:    0d38da35ae43c35e564185308fd933952ba0849e16c6d0a521a681687084a75e
imageversion: 1526361824
Writing header to address 0x0000a000.
Loading application from hex file
Traceback (most recent call last):
  File "tools/combine_bootloader_with_app.py", line 318, in <module>
    output_fn, args.set_version, args.no_bootloader)
  File "tools/combine_bootloader_with_app.py", line 171, in combine
    ih.fromfile(app_fn, format=app_format)
  File "C:\Python27\lib\site-packages\intelhex\__init__.py", line 246, in loadfile
    self.loadhex(fobj)
  File "C:\Python27\lib\site-packages\intelhex\__init__.py", line 209, in loadhex
    decode(s, line)
  File "C:\Python27\lib\site-packages\intelhex\__init__.py", line 171, in _decode_record
    raise DuplicateStartAddressRecordError(line=line)
intelhex.DuplicateStartAddressRecordError: Start Address Record appears twice at line 22056

K64F + ESP8266 not working

Hi,

This example no longer works for K64F + ESP8266. It used to work no problem just a few weeks ago. I just verified that K64F with ethernet connection works fine. Has anything changed in the past few weeks?

pal-platform.py fails to run

pal-platform.py fails to run with the following errors:

Traceback (most recent call last):
  File "pal-platform/pal-platform.py", line 1029, in <module>
    cli(sys.argv[1:])
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 829, in _call_
    return self.main(*args, **kwargs)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1276, in invoke
    sub_ctx = cmd.make_context(
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 700, in make_context
    self.parse_args(ctx, args)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1048, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1623, in handle_parse_result
    value = self.full_process_value(ctx, value)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1965, in full_process_value
    return Parameter.full_process_value(self, ctx, value)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1589, in full_process_value
    value = self.process_value(ctx, value)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1579, in process_value
    return self.type_cast_value(ctx, value)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1568, in type_cast_value
    return _convert(value, (self.nargs != 1) + bool(self.multiple))
  File "/tmp/python-deps/lib/python3.8/site-packages/click/core.py", line 1565, in _convert
    return self.type(value, self, ctx)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/types.py", line 46, in _call_
    return self.convert(value, param, ctx)
  File "pal-platform/pal-platform.py", line 90, in convert
    return super(DynamicChoice, self).convert(value, param, ctx)
  File "/tmp/python-deps/lib/python3.8/site-packages/click/types.py", line 181, in convert
    if not self.case_sensitive:
AttributeError: 'DynamicChoice' object has no attribute 'case_sensitive'

root cause:
requirements for click are >=6.5, and on version 7.0 the case_sensitive member for click was introduced. Since DynamicChoice doesn't call its parent __init__ function, I believe that it doesn't recognize case_sensitive as its member.
suggested solutions:

  1. call super.__init__ in the child's __init__ function , which will use the inherited attributes (see here)
  2. update the requirements.txt to click>=6.5,<7.0

i would favor of doing both

Meet hard fault after Client Update with ARMC6

Environment


mbed-cloud-client-example
1.3.1.1

mbed-os
mbed-os-5.8.3

Target
K64F

ARMC6
6.10

GCC_ARM
GNU Tools for Arm Embedded Processors 7-2017-q4-major

ARM
5.24

Description


Built with ARMC6 toolchain, I meet hard fault after Client Update:

[BOOT] mbed Bootloader
[BOOT] ARM: 74CE36607E38CD63ECDD72CE2F1262D58BF55448
[BOOT] OEM: 0000000000000000000000000000000000000000
[BOOT] Layout: 0 7188
[BOOT] Active firmware integrity check:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] SHA256: 8E8D9E9E9D979FB31F51C61C2FDD7F2B6C1FA963ABA66527402B4F326C4BBAFD
[BOOT] Version: 1525928708
[BOOT] Slot 0 is empty
[BOOT] Active firmware up-to-date
[BOOT] Application's start address: 0xA400
[BOOT] Application's jump address: 0xAB0D
[BOOT] Application's stack address: 0x20030000
[BOOT] Forwarding to application...

Application ready. Build at: May 10 2018 12:12:13
Mbed OS version 5.8.3
mcc_platform_storage_init() - BlockDevice init OK.
Start simple mbed Cloud Client
Start developer flow
Developer credentials already exists
[EasyConnect] IPv4 mode
[EasyConnect] Using WiFi (ESP8266) 
[EasyConnect] Connecting to WiFi HUAWEI-F2C9
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address a0:20:a6:09:97:6c
[EasyConnect] IP address 192.168.8.100
Network initialized, connecting...

Client registered

Endpoint Name: 016348758e390000000000010010019f
Device Id: 016348758e390000000000010010019f
Firmware download requested
Authorization granted
Downloading: [++++++++++++++++++++++++++++++++++++++++++++++++++] 100 %
Download completed
Firmware install requested
Authorization granted
[BOOT] mbed Bootloader
[BOOT] ARM: 74CE36607E38CD63ECDD72CE2F1262D58BF55448
[BOOT] OEM: 0000000000000000000000000000000000000000
[BOOT] Layout: 0 7188
[BOOT] Active firmware integrity check:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] SHA256: 8E8D9E9E9D979FB31F51C61C2FDD7F2B6C1FA963ABA66527402B4F326C4BBAFD
[BOOT] Version: 1525928708
[BOOT] Slot 0 firmware integrity check:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] SHA256: 8E8D9E9E9D979FB31F51C61C2FDD7F2B6C1FA963ABA66527402B4F326C4BBAFD
[BOOT] Version: 1525929596
[BOOT] Update active firmware using slot 0:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] Verify new active firmware:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] New active firmware is valid
[BOOT] Application's start address: 0xA400
[BOOT] Application's jump address: 0xAB0D
[BOOT] Application's stack address: 0x20030000
[BOOT] Forwarding to application...

Application ready. Build at: May 10 2018 12:12:13
Mbed OS version 5.8.3
mcc_platform_storage_init() - BlockDevice init OK.
Start simple mbed Cloud Client
Start developer flow
Developer credentials already exists
[EasyConnect] IPv4 mode
[EasyConnect] Using WiFi (ESP8266) 
[EasyConnect] Connecting to WiFi HUAWEI-F2C9
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address a0:20:a6:09:97:6c
[EasyConnect] IP address 192.168.8.100
Network initialized, connecting...

++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0   : 00000515
R1   : 02888000
R2   : 00000000
R3   : 00000000
R4   : 00000000
R5   : 00000509
R6   : 00000509
R7   : FFFFFFFF
R8   : 00000509
R9   : 00000000
R10  : 20002368
R11  : 00000000
R12  : 80000000
SP   : 20001FC0
LR   : 0000BB23
PC   : 0000D6E6
xPSR : 01000000
PSP  : 20001F58
MSP  : 2002FFD8
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000004
UFSR : 00000000
DFSR : 00000000
AFSR : 00000000
SHCSR: 00000000
Mode : Thread
Priv : Privileged
Stack: PSP

Thread Info:
Current:
State: 00000002 EntryFn: 00047E1D Stack Size: 00001200 Mem: 20001418 SP: 200020B0
Next:
State: 00000002 EntryFn: 00047E1D Stack Size: 00001200 Mem: 20001418 SP: 200020B0
Wait Threads:
State: 00000083 EntryFn: 000439D3 Stack Size: 00000300 Mem: 20005EE0 SP: 20006170
Delay Threads:
Idle Thread:
State: 00000001 EntryFn: 00042F39 Stack Size: 00000200 Mem: 20005CE0 SP: 20005E90

-- MbedOS Fault Handler --

But if built with GCC_ARM (or ARM) toolchain, it is OK:

[BOOT] mbed Bootloader
[BOOT] ARM: 74CE36607E38CD63ECDD72CE2F1262D58BF55448
[BOOT] OEM: 0000000000000000000000000000000000000000
[BOOT] Layout: 0 7188
[BOOT] Active firmware integrity check:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] SHA256: 7047A6EFD00277CD77C024A0EC73740485F7E64103E3853CDA5965F7CFA4E532
[BOOT] Version: 1525932770
[BOOT] Slot 0 is empty
[BOOT] Active firmware up-to-date
[BOOT] Application's start address: 0xA400
[BOOT] Application's jump address: 0xAA5D
[BOOT] Application's stack address: 0x20030000
[BOOT] Forwarding to application...

Application ready. Build at: May 10 2018 14:04:25
Mbed OS version 5.8.3
mcc_platform_storage_init() - BlockDevice init OK.
Start simple mbed Cloud Client
Start developer flow
[EasyConnect] IPv4 mode
[EasyConnect] Using WiFi (ESP8266) 
[EasyConnect] Connecting to WiFi HUAWEI-F2C9
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address a0:20:a6:09:97:6c
[EasyConnect] IP address 192.168.8.100
Network initialized, connecting...

Client registered

Endpoint Name: 016348af44de00000000000100100150
Device Id: 016348af44de00000000000100100150
Firmware download requested
Authorization granted
Downloading: [++++++++++++++++++++++++++++++++++++++++++++++++++] 100 %
Download completed
Firmware install requested
Authorization granted
[BOOT] mbed Bootloader
[BOOT] ARM: 74CE36607E38CD63ECDD72CE2F1262D58BF55448
[BOOT] OEM: 0000000000000000000000000000000000000000
[BOOT] Layout: 0 7188
[BOOT] Active firmware integrity check:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] SHA256: 7047A6EFD00277CD77C024A0EC73740485F7E64103E3853CDA5965F7CFA4E532
[BOOT] Version: 1525932770
[BOOT] Slot 0 firmware integrity check:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] SHA256: 7047A6EFD00277CD77C024A0EC73740485F7E64103E3853CDA5965F7CFA4E532
[BOOT] Version: 1525932891
[BOOT] Update active firmware using slot 0:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] Verify new active firmware:
[BOOT] [++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++]
[BOOT] New active firmware is valid
[BOOT] Application's start address: 0xA400
[BOOT] Application's jump address: 0xAA5D
[BOOT] Application's stack address: 0x20030000
[BOOT] Forwarding to application...

Application ready. Build at: May 10 2018 14:04:25
Mbed OS version 5.8.3
mcc_platform_storage_init() - BlockDevice init OK.
Start simple mbed Cloud Client
Start developer flow
Developer credentials already exists
[EasyConnect] IPv4 mode
[EasyConnect] Using WiFi (ESP8266) 
[EasyConnect] Connecting to WiFi HUAWEI-F2C9
[EasyConnect] Connected to Network successfully
[EasyConnect] MAC address a0:20:a6:09:97:6c
[EasyConnect] IP address 192.168.8.100
Network initialized, connecting...

Client registered

Endpoint Name: 016348af44de00000000000100100150
Device Id: 016348af44de00000000000100100150

On both K64F and NUMAKER_PFM_M487 targets, the issue can re-produce.

Build problem: inadequate handling of cyclic dependencies

This recipe for reproducing the problem isn't ideal because it's a bit
over-complicated and Bullseye is not yet released so may change
significantly, but perhaps it will continue working for long enough to
be useful:

docker run -it debian:bullseye /bin/bash

apt-get update
apt-get install --no-install-recommends -y \
  ca-certificates cargo cmake g++ git libclang-dev make \
  mercurial python3-click python3-pip

python3 -m pip install mbed-cli

cd
git clone https://github.com/ARMmbed/mbed-cloud-client-example
cd mbed-cloud-client-example
mbed deploy
perl -i -pe 's/^/# / if !/^#/ && /DEVELOPER_MODE/;' define.txt
python3 pal-platform/pal-platform.py deploy \
  --target=x86_x64_NativeLinux_mbedtls generate
cd __x86_x64_NativeLinux_mbedtls
cmake -G "Unix Makefiles" \
  -DPARSEC_TPM_SE_SUPPORT=ON -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_TOOLCHAIN_FILE=../pal-platform/Toolchain/GCC/GCC.cmake \
  -DEXTERNAL_DEFINE_FILE=../define_linux_psa.txt
make -j8
make VERBOSE=1

The error I see is:

storage_psa.cpp:(.text+0x153d): undefined reference to `g_fcc_bootstrap_device_private_key_name'

It comes from the -Wl,--start-group and the -Wl,--end-group not being in the right places: there are a lot of libraries listed after the -Wl,--end-group. If you take the g++ command that is shown by VERBOSE=1 and move the -Wl,--end-group to the end then the command works.

The -Wl,--start-group and the -Wl,--end-group come from
pal-platform/mbedCloudClientCmake.txt, where they are inserted using
TARGET_LINK_LIBRARIES. This is an ugly hack because those arguments
are not libraries. There's plenty of discussion of this problem on
cmake.org and stackoverflow.com. But it's not clear what the
correct solution is.

Probably it ought to be possible to link without those linker options. See:
https://cmake.org/cmake/help/v3.3/command/target_link_libraries.html#cyclic-dependencies-of-static-libraries

In this particular case the undefined symbol is defined in the library
factory-configurator-client and used in fccstorage. So I tried
adding this line in mbed-cloud-client/factory-configurator-client/CMakeLists.txt:

add_dependencies(fccstorage factory-configurator-client)

However I then got the following error from cmake, which confuses me
because it looks like a cyclic dependency of static libraries, which
ought to be allowed according to the documentation linked to above:

CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
  "factory-configurator-client" of type STATIC_LIBRARY
    depends on "fccstorage" (weak)
    depends on "key-config-manager" (weak)
    depends on "pal" (weak)
    depends on "palTLS" (weak)
    depends on "palTime" (weak)
    depends on "key-config-manager" (strong)
    depends on "fccstorage" (strong)
    depends on "pal" (strong)
  "key-config-manager" of type STATIC_LIBRARY
    depends on "fccstorage" (weak)
    depends on "fccstorage" (strong)
  "fccstorage" of type STATIC_LIBRARY
    depends on "key-config-manager" (weak)
    depends on "factory-configurator-client" (strong)
  "palTime" of type STATIC_LIBRARY
    depends on "fccstorage" (weak)
    depends on "key-config-manager" (weak)
    depends on "fccstorage" (strong)
  "pal" of type STATIC_LIBRARY
    depends on "palTLS" (weak)
    depends on "palTime" (weak)
    depends on "fccstorage" (weak)
    depends on "key-config-manager" (weak)

So probably this is something for CMake experts.

Wi-SUN TLS cert check fail - Pelion

Description of defect

Following the Wi-SUN tutorial below, we had an issue with the EAP-TLS handshake, which is probably caused by a certification check problem. Link:
https://www.pelion.com/docs/device-management/current/connecting/wi-sun-tutorial.html

Target(s) affected by this defect ?

  • NXP K64F with I-NUCLEO-S2868A1 RF shield
  • NXP K64F with I-NUCLEO-S2868A1 RF shield + QUECTEL EC25-AU

Toolchain(s) (name and version) displaying this defect ?

GCC-ARM - gcc-arm-none-eabi-9-2019-q4-major

What version of Mbed-os are you using (tag or sha) ?

Mbed OS 5.15

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

Mbed CLI 1.10.2

How is this defect reproduced ?

The issue is detected after following the tutorial procedure. The border router board seems to be working and acquiring its IPV6 address. We also tested with the minimal mesh example project and it worked without any issues. We followed the procedure to erase the SD card as it had another certificate on it.

Thanks for your help, attached are the log files for the nanostack-border-router and mbed-cloud-client-example.

mbed-cloud-client-example-log.txt
nanostack-border-router-log.txt

How to build the LITE configuration ?

I'm not sure if the public repo here is supposed to build with ARM_UC_PROFILE_MBED_CLIENT_LITE set ? I've tried both 1.5 and 2.0 releases and it seems that the codepath for lite client couldn't even be compiled because it's using some outdated APIs.

I made a test repo here that builds cloud-client on Travis for both 1.5 and 2.0 versions

https://github.com/iconservo/mbed-testbuild/

It builds K64F, K64F-Wifi, Odin and F411 just fine and publishes binary build releases. For a good measure i added in two different armgcc compiler versions as well

Trying to build Lite branch here isn't going well though. I added ARM_UC_PROFILE_MBED_CLIENT_LITE=1 in the config, but the build fails:
https://travis-ci.com/iconservo/mbed-testbuild/jobs/159359486

[Warning] arm_uc_pre_shared_key.c@66,35: implicit declaration of function 'get_config_parameter' [-Wimplicit-function-declaration]
[Error] arm_uc_pre_shared_key.c@66,56: 'UPDATE_PSK_SECRET' undeclared (first use in this function)
[ERROR] ./mbed-cloud-client/update-client-hub/modules/control-center/source/arm_uc_pre_shared_key.c: In function 'ARM_UC_PreSharedKey_GetSecret':
./mbed-cloud-client/update-client-hub/modules/control-center/source/arm_uc_pre_shared_key.c:66:35: warning: implicit declaration of function 'get_config_parameter' [-Wimplicit-function-declaration]
         ccs_status_e ccs_status = get_config_parameter(UPDATE_PSK_SECRET,
                                   ^~~~~~~~~~~~~~~~~~~~
./mbed-cloud-client/update-client-hub/modules/control-center/source/arm_uc_pre_shared_key.c:66:56: error: 'UPDATE_PSK_SECRET' undeclared (first use in this function)
         ccs_status_e ccs_status = get_config_parameter(UPDATE_PSK_SECRET,
                                                        ^~~~~~~~~~~~~~~~~
./mbed-cloud-client/update-client-hub/modules/control-center/source/arm_uc_pre_shared_key.c:66:56: note: each undeclared identifier is reported only once for each function it appears in

Looks like get_config_parameter and a few other related APIs have been removed a while ago. Trying to stub them out gets messy real fast, too. Am i going about this wrong ?

Build error on Raspbian OS

I'm trying to build on Raspbian Stretch OS. I know its not supported, but would still give it a try for setting up my development device.

Is this error familiar to anyone?

(pi@raspberrypi:~/mbed-cloud-client-example $ sudo python pal-platform/pal-platform.py fullbuild --target x86_x64_NativeLinux_mbedtls --toolchain GCC --external ./../define.txt --name mbedCloudClientExample.elf
2018-05-04 13:20:23,869 - pal-platform - INFO - fullBuild running for target = x86_x64_NativeLinux_mbedtls with toolchain = GCC
2018-05-04 13:20:23,870 - pal-platform - INFO - Getting mbedtls from git
2018-05-04 13:20:23,871 - pal-platform - INFO - /home/pi/mbed-cloud-client-example/pal-platform/Middleware/mbedtls/mbedtls already exists, updating from https://github.com/ARMmbed/mbedtls.git
2018-05-04 13:20:30,272 - pal-platform - INFO - Checking out from https://github.com/ARMmbed/mbedtls.git at mbedtls-2.4.2
Deployment for x86_x64_NativeLinux_mbedtls is successful.
Deployment instructions are in /home/pi/mbed-cloud-client-example/pal-platform/x86_x64_NativeLinux_mbedtls.txt.
2018-05-04 13:20:30,317 - pal-platform - INFO - Generated /home/pi/mbed-cloud-client-example/__x86_x64_NativeLinux_mbedtls/autogen.cmake
Generation for x86_x64_NativeLinux_mbedtls is successful, please run cmake & make from /home/pi/mbed-cloud-client-example/__x86_x64_NativeLinux_mbedtls
2018-05-04 13:20:30,319 - pal-platform - INFO - Checking Environment for Toolchain - GCC
2018-05-04 13:20:30,328 - pal-platform - INFO - running cmake
2018-05-04 13:20:30,329 - pal-platform - INFO - setting environment: GCC_DIR = /usr
Traceback (most recent call last):
  File "pal-platform/pal-platform.py", line 1020, in <module>
    cli(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1086, in invoke
    rv.append(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "pal-platform/pal-platform.py", line 1007, in fullbuild
    runCmakeAndMake(out_dir, isDebug, toolchain, output, envPair, external, name, numOfBuildThreads)  # CMAKE + build debug version
  File "pal-platform/pal-platform.py", line 858, in runCmakeAndMake
    p = subprocess.Popen([command, argument1,argument2, argument3, argument4, argument5], cwd=folder)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
)

Build error for LPC55S69_NS target

Version

mbed-cloud-client-example (#6eb5211a1d14, tag: 3.2.0)
|- drivers/wifi-x-nucleo-idw01m1 (#a00282000178, tag: v1.2.0)
|- mbed-cloud-client (#4f4a8463dd06, tag: 3.2.0)
`- mbed-os (#73f096399b4c, tags: latest, mbed-os-5.12.4)

Step to reproduce

$ mbed import https://github.com/ARMmbed/mbed-cloud-client-example
$ cd mbed-cloud-client-example
$ mbed dm init -d "arm.com" --model-name "test" -q --force
$ mbed compile -m LPC55S69_NS -t arm --app-config configs-psa/wifi_esp8266_v4.json 

Build log

$ mbed compile -m LPC55S69_NS -t arm --app-config configs-psa/wifi_esp8266_v4.json 
[mbed] Working path "/Users/toywat01/test/nxp/mbed-cloud-client-example" (program)
[mbed] WARNING: Could not find mbed program in current path "/Users/toywat01/test/nxp/mbed-cloud-client-example".
       You can fix this by calling "mbed new ." in the root of your program.
---
[mbed] WARNING: Missing Python modules were not auto-installed.
       The Mbed OS tools in this program require the following Python modules: pywin32
       You can install all missing modules by running "pip install -r requirements.txt" in "/Users/toywat01/test/nxp/mbed-cloud-client-example/mbed-os"
       On Mac you might have to install packages as your user by adding the "--user" flag
---
Building project mbed-cloud-client-example (LPC55S69_NS, ARMC6)
Scan: mbed-cloud-client-example
Compile [  0.1%]: SPWFSA04.cpp

(snip)

Compile [ 14.5%]: arm_uc_pal_delta_paal_original_reader.c
[Error] arm_uc_pal_delta_paal_original_reader.c@67,25: use of undeclared identifier 'APPLICATION_ADDR'
[ERROR] ./mbed-cloud-client/update-client-hub/modules/delta-paal/source/arm_uc_pal_delta_paal_original_reader.c:67:25: error: use of undeclared identifier 'APPLICATION_ADDR'
    uint32_t appStart = MBED_CONF_APP_APPLICATION_START_ADDRESS;
                        ^
./mbed-cloud-client/update-client-hub/modules/delta-paal/source/arm_uc_pal_delta_paal_original_reader.c:29:49: note: expanded from macro 'MBED_CONF_APP_APPLICATION_START_ADDRESS'
#define MBED_CONF_APP_APPLICATION_START_ADDRESS APPLICATION_ADDR
                                                ^
1 error generated.

[mbed] ERROR: "/Users/toywat01/mbed-venv/bin/python" returned error.
       Code: 1
       Path: "/Users/toywat01/test/nxp/mbed-cloud-client-example"
       Command: "/Users/toywat01/mbed-venv/bin/python -u /Users/toywat01/test/nxp/mbed-cloud-client-example/mbed-os/tools/make.py -t arm -m LPC55S69_NS --source . --build ./BUILD/LPC55S69_NS/ARM --app-config configs-psa/wifi_esp8266_v4.json"
       Tip: You could retry the last command with "-v" flag for verbose output
---

Replace the Server

Hello!
I want to ask if I replace the lwm2m server to others(like Leshan or local server),does the client still work? and how to solve the Security credentials problem?

DeviceKey was not declared for RZ_A1H target

Hello!
I'm building the cloud-client-example for the rz_a1h target, I'm on the Release candidate for mbed-os-5.12.4(commit id 618297fac2e3057de8b1a7b0b4147093de8fe03e).
The error I'm getting when building on Ubuntu is:

Compile [  8.4%]: pal_plat_rot.cpp
Compile: /home/george/Downloads/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-g++ -std=gnu++98 -fno-rtti -Wvla -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -Os -g1 -DMBED_TRAP_ERRORS_ENABLED=1 -mcpu=cortex-a9 -mthumb-interwork -marm -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -mno-unaligned-access -DTARGET_RZA1H -DTARGET_MBRZA1H -D__FPU_PRESENT -DDEVICE_I2C=1 -DDEVICE_EMAC=1 -D__MBED__=1 -DDEVICE_USBDEVICE=1 -DTARGET_LIKE_MBED -DDEVICE_PORTINOUT=1 -DDEVICE_PORTIN=1 -DDEVICE_RTC=1 -DDEVICE_SERIAL_ASYNCH=1 -D__CMSIS_RTOS -DDEVICE_ETHERNET=1 -DCOMPONENT_SD=1 -D__EVAL -DTOOLCHAIN_GCC -DFEATURE_BOOTLOADER=1 -DTARGET_CORTEX_A -DDEVICE_CAN=1 -DARM_MATH_CA9 -DDEVICE_I2C_ASYNCH=1 -DCOMPONENT_PSA_SRV_EMUL=1 -D__MBED_CMSIS_RTOS_CA9 -DCOMPONENT_PSA_SRV_IMPL=1 -DTARGET_LIKE_CORTEX_A9 -DDEVICE_LPTICKER=1 -DDEVICE_PWMOUT=1 -DTARGET_RZ_A1_EMAC -DTARGET_CORTEX -DDEVICE_I2CSLAVE=1 -DDEVICE_PORTOUT=1 -DMBED_BUILD_TIMESTAMP=1560956233.19 -DTARGET_NAME=RZ_A1H -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_SPI_ASYNCH=1 -DTARGET_RENESAS -DTARGET_FF_ARDUINO -DTARGET_RELEASE -DCOMPONENT_NSPE=1 -DDEVICE_SERIAL_FC=1 -DFEATURE_STORAGE=1 -DTARGET_A9 -D__CORTEX_A9 -DTARGET_RZ_A1H -DTARGET_RZ_A1XX -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DDEVICE_USTICKER=1 -DDEVICE_SPI=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_SERIAL=1 -DDEVICE_FLASH=1 @../BUILD/RZ_A1H/GCC_ARM/.includes_1f243d49f4034147d31a375b733f3129.txt -include ../BUILD/RZ_A1H/GCC_ARM/mbed_config.h -MD -MF ../BUILD/RZ_A1H/GCC_ARM/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.d -o ../BUILD/RZ_A1H/GCC_ARM/mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.o ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp
[Error] pal_plat_rot.cpp@67,5: 'DeviceKey' was not declared in this scope
[Error] pal_plat_rot.cpp@67,16: 'devkey' was not declared in this scope
[Error] pal_plat_rot.cpp@67,25: 'DeviceKey' is not a class or namespace
[Error] pal_plat_rot.cpp@81,22: 'DEVICEKEY_ALREADY_EXIST' was not declared in this scope
[DEBUG] Return: 1
[DEBUG] Output: ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp: In function 'palStatus_t pal_plat_osSetRoT(uint8_t*, size_t)':
[DEBUG] Output: ../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
[DEBUG] Output:      DeviceKey &devkey = DeviceKey::get_instance();
[DEBUG] Output:      ^~~~~~~~~
[DEBUG] Output: ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:16: error: 'devkey' was not declared in this scope
[DEBUG] Output:      DeviceKey &devkey = DeviceKey::get_instance();
[DEBUG] Output:                 ^~~~~~
[DEBUG] Output: ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:16: note: suggested alternative: 'key'
[DEBUG] Output:      DeviceKey &devkey = DeviceKey::get_instance();
[DEBUG] Output:                 ^~~~~~
[DEBUG] Output:                 key
[DEBUG] Output: ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:25: error: 'DeviceKey' is not a class or namespace
[DEBUG] Output:      DeviceKey &devkey = DeviceKey::get_instance();
[DEBUG] Output:                          ^~~~~~~~~
[DEBUG] Output: ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:81:22: error: 'DEVICEKEY_ALREADY_EXIST' was not declared in this scope
[DEBUG] Output:          if (error == DEVICEKEY_ALREADY_EXIST) {
[DEBUG] Output:                       ^~~~~~~~~~~~~~~~~~~~~~~
[DEBUG] Output: ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:81:22: note: suggested alternative: 'DEVICEKEY_ENABLED'
[DEBUG] Output:          if (error == DEVICEKEY_ALREADY_EXIST) {
[DEBUG] Output:                       ^~~~~~~~~~~~~~~~~~~~~~~
[DEBUG] Output:                       DEVICEKEY_ENABLED
Traceback (most recent call last):
  File "/home/george/repo/mbed-cloud-client-example/mbed-os/tools/make.py", line 78, in wrapped_build_project
    *args, **kwargs
  File "/home/george/repo/mbed-cloud-client-example/mbed-os/tools/build_api.py", line 598, in build_project
    objects = toolchain.compile_sources(resources, sorted(resources.get_file_paths(FileType.INC_DIR)))
  File "/home/george/repo/mbed-cloud-client-example/mbed-os/tools/toolchains/mbed_toolchain.py", line 458, in compile_sources
    return self.compile_queue(queue, objects)
  File "/home/george/repo/mbed-cloud-client-example/mbed-os/tools/toolchains/mbed_toolchain.py", line 531, in compile_queue
    raise ToolException(err)
ToolException: ../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp: In function 'palStatus_t pal_plat_osSetRoT(uint8_t*, size_t)':
../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
     DeviceKey &devkey = DeviceKey::get_instance();
     ^~~~~~~~~
../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:16: error: 'devkey' was not declared in this scope
     DeviceKey &devkey = DeviceKey::get_instance();
                ^~~~~~
../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:16: note: suggested alternative: 'key'
     DeviceKey &devkey = DeviceKey::get_instance();
                ^~~~~~
                key
../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:25: error: 'DeviceKey' is not a class or namespace
     DeviceKey &devkey = DeviceKey::get_instance();
                         ^~~~~~~~~
../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:81:22: error: 'DEVICEKEY_ALREADY_EXIST' was not declared in this scope
         if (error == DEVICEKEY_ALREADY_EXIST) {
                      ^~~~~~~~~~~~~~~~~~~~~~~
../mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:81:22: note: suggested alternative: 'DEVICEKEY_ENABLED'
         if (error == DEVICEKEY_ALREADY_EXIST) {
                      ^~~~~~~~~~~~~~~~~~~~~~~
                      DEVICEKEY_ENABLED

[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/home/george/repo/mbed-cloud-client-example/mbed-os"
       Command: "/usr/bin/python -u /home/george/repo/mbed-cloud-client-example/mbed-os/tools/make.py -t GCC_ARM -m rz_a1h --source .. --build ../BUILD/RZ_A1H/GCC_ARM -v"

Note also that TLS has been disabled.

Do you have suggestions how to fix this problem?

Many thanks!
George

Porting from mbed-cloud-client-example-restricted

Is there a porting guide for moving from the restricted version of this repo to this version? Or can someone summarize the differences here? It looks like some things were changed around the pal layer?

can't build on CLI for target nRF_52840

Error Logs:

Compile [ 37.9%]: GenericGap.cpp
[Warning] BLE.h@1049,39: 'virtual ble_error_t Gap::disconnect(Gap::DisconnectionReason_t)' is deprecated: Use disconnect(Handle_t, DisconnectionReason_t) instead. [-Wdeprecated-declarations]
Compile [ 38.1%]: GenericSecurityManager.cpp
[Warning] BLE.h@1049,39: 'virtual ble_error_t Gap::disconnect(Gap::DisconnectionReason_t)' is deprecated: Use disconnect(Handle_t, DisconnectionReason_t) instead. [-Wdeprecated-declarations]
[Error] GenericSecurityManager.h@357,15: 'public_key_t' does not name a type; did you mean 'public_key_coord_t'?
[Error] GenericSecurityManager.h@358,15: 'public_key_t' does not name a type; did you mean 'public_key_coord_t'?
[Error] GenericSecurityManager.cpp@722,6: no matching function for call to 'ble::generic::GenericSecurityManager::crypto_toolbox_f4(const public_key_coord_t&, const public_key_coord_t&, ble::oob_lesc_value_t&, ble::oob_confirm_t&)'
[Error] GenericSecurityManager.cpp@756,6: prototype for 'bool ble::generic::GenericSecurityManager::crypto_toolbox_f4(const public_key_coord_t&, const public_key_coord_t&, const oob_lesc_value_t&, ble::oob_confirm_t&)' does not match any in class 'ble::generic::GenericSecurityManager'
[Error] GenericSecurityManager.h@356,17: candidate is: static bool ble::generic::GenericSecurityManager::crypto_toolbox_f4(const int&, const int&, const oob_lesc_value_t&, ble::oob_confirm_t&)
[Error] GenericSecurityManager.cpp@1049,5: no matching function for call to 'ble::generic::GenericSecurityManager::crypto_toolbox_f4(const public_key_coord_t&, const public_key_coord_t&, ble::oob_lesc_value_t&, ble::oob_confirm_t&)'
[ERROR] In file included from ./mbed-os/features/FEATURE_BLE/ble/generic/GenericGap.h:22:0,
from ./mbed-os/features/FEATURE_BLE/ble/generic/GenericSecurityManager.h:25,
from .\mbed-os\features\FEATURE_BLE\source\generic\GenericSecurityManager.cpp:19:
./mbed-os/features/FEATURE_BLE/ble/BLE.h: In member function 'ble_error_t BLE::disconnect(Gap::DisconnectionReason_t)':
./mbed-os/features/FEATURE_BLE/ble/BLE.h:1049:39: warning: 'virtual ble_error_t Gap::disconnect(Gap::DisconnectionReason_t)' is deprecated: Use disconnect(Handle_t, DisconnectionReason_t) instead. [-Wdeprecated-declarations]
return gap().disconnect(reason);
^
I

Some issues with storage on Mbed Cloud 1.3

I am evaluating Mbed Cloud 1.3 on NUMAKER_PFM_M487 target and meet some issues with storage. Most issues are related to mbed-cloud-client-example/source/platform/mbed-os/common_setup.cpp:

  1. There's #if (MBED_CONF_STORAGE_SELECTOR_STORAGE == SD_CARD) in this file, but I find no SD_CARD, SPI_FLASH, etc. are defined.
  2. It seems this file requires SD_CARD to be partitioned (MBR). And no-MBR SD_CARD, SPI_FLASH, etc. are not supported. How to support storage without MBR?
  3. When I choose external storage for firmware update candidates, I find these candidates are stored directly in SD_CARD, not through filesystem. Clash for filesystem use and raw access in the same SD card?

Mbed OS
mbed-os-5.8.3

mbed-cloud-client-example
1.3.1.1

mbed-cloud-client
1.3.1

Request to update the MbedTLS to 2.19

When compile the mbed-cloud-client-example for ARM9 platform, we meet the following error. And it should be fixed in Mbed TLS 2.19 and Mbed Crypto 2.0.0. Would you please update them?

make[5]: Entering directory '/home/yangweipeng/only_complie/r3000_3.0/3.0/build_dir/target-r3000/mbed-cloud-client-example/__ARM_Ros_mbedtls'
[ 3%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aes.c.obj
[ 5%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj
[ 5%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/arc4.c.obj
[ 5%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aria.c.obj
[ 5%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1parse.c.obj
[ 5%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1write.c.obj
[ 6%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/base64.c.obj
[ 6%] Building C object mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/bignum.c.obj
/tmp/cc9TmODR.s: Assembler messages:
/tmp/cc9TmODR.s:80: Error: selected processor does not support ARM mode `umaal r1,lr,r3,r0'
/tmp/cc9TmODR.s:84: Error: selected processor does not support ARM mode `umaal r1,lr,r3,r0'
/tmp/cc9TmODR.s:88: Error: selected processor does not support ARM mode `umaal r1,lr,r3,r0'
/tmp/cc9TmODR.s:92: Error: selected processor does not support ARM mode `umaal r1,lr,r3,r0'
/tmp/cc9TmODR.s:96: Error: selected processor does not support ARM mode `umaal r1,lr,r3,r0'

Can't connect Pelion Device Management with a ATECC608A Secure element

Hi,

I have tried connecting to Pelion Device Management with a ATECC608A Secure element following this documentation.

https://www.pelion.com/docs/device-management/current/connecting/connecting-to-device-management-with-a-pre-provisioned-secure-element.html

I followed procedures of this document with compliant prerequisites, but my board(K64F) showed several error log and can't connect Pelion Device Management.

I got a serial log by enablling mbed-trace and I noticed a difference of logs between first try and second try(with rebuild).

And while printf debugging(I'm not familier with mbed OS), I guess cause of this problem might be a difference the template_id(value of DM320118 that I used and mbed-cloud-client-example expected value).

Could you teach me a procedure to solve this problem, or could you fix your artifact(code/document)?

[Additional condition]

mbed-cloud-client-example: 4.5.0(4f75846)
Build envioronment: mbed-cli(1.10.2) and Mbed Studio(1.0.0) in ubuntu 18.04
DM320118 SN: 18000001654

[Serial log with first try]


Mbed Bootloader
No Update image
[DBG ] Active firmware up-to-date
booting...

lfs error:493: Corrupted dir pair at 0 1
lfs error:2222: Invalid superblock at 0 1
[INFO][FSST]: KV Dir: kvstore, doesnt exist - creating new..
[DBG ][mClt]: M2MInterfaceFactory::create_security
[DBG ][mClt]: M2MInterfaceFactory::create_interface - IN
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters endpoint name : endpoint
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters endpoint type : default
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters life time(in secs): 86400
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters Listen Port : 0
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters Binding Mode : 9
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters NetworkStack : 1
[DBG ][mClt]: M2MInterfaceFactory::create_interface - Creating M2MInterfaceImpl
[DBG ][mClt]: M2MNsdlInterface::M2MNsdlInterface()
[DBG ][mClt]: M2MConnectionHandlerPimpl::eventloop_event_handler 0
[DBG ][mClt]: M2MObject::create_object_instance - id: 0
[DBG ][mClt]: M2MObject::object_instance(inst_id 0)
[DBG ][mClt]: M2MBase::M2Mbase resource name is EMPTY ===========
[DBG ][mClt]: M2MObject::object_instance(inst_id 0)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 0)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 1)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 6)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 7)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 8)
[DBG ][mClt]: M2MNsdlInterface::initialize()
[DBG ][mClt]: M2MNsdlInterface::add_object_to_list this=0x1fff24e8 object=0x1fff2b30
[DBG ][mClt]: M2MObject::set_observation_handler - handler: 0x0x1fff24ec
[DBG ][mClt]: M2MInterfaceImpl::M2MInterfaceImpl() -IN
[INFO][mClt]: M2MNsdlInterface::create_endpoint( name endpoint type default lifetime 86400, domain , mode 9)
[INFO][mClt]: M2MNsdlInterface::set_endpoint_lifetime_buffer - 86400
[DBG ][mClt]: M2MResourceBase::set_value()
[DBG ][mClt]: M2MResourceBase::report() - level 0
[DBG ][mClt]: M2MResourceBase::report() - combined level 0
[DBG ][mClt]: M2MResourceBase::report() - resource 1/0/1 is observable but not yet subscribed!
[DBG ][mClt]: M2MResourceBase::report() - mode = 1, is_observable = 1
[DBG ][mClt]: M2MNsdlInterface::registration_time - value (in seconds) 85500
[DBG ][mClt]: M2MNsdlInterface::set_retransmission_parameters() - total resend time 112
[INFO][mClt]: M2MNsdlInterface::set_retransmission_parameters() - setting max resend count to 3 with total time: 112
[DBG ][mClt]: M2MResourceBase::set_value()
[DBG ][mClt]: M2MResourceBase::report() - level 0
[DBG ][mClt]: M2MResourceBase::report() - combined level 0
[DBG ][mClt]: M2MResourceBase::report() - resource 1/0/7 is observable but not yet subscribed!
[DBG ][mClt]: M2MResourceBase::report() - mode = 1, is_observable = 1
[DBG ][mClt]: M2MInterfaceImpl::M2MInterfaceImpl() -OUT
[DBG ][mClt]: M2MInterfaceFactory::create_interface - OUT
[DBG ][mClt]: CloudClientStorage::initialize_storage
[INFO][fcc ]: key_config_manager.c:34:kcm_init:===>
[DBG ][fcc ]: storage_psa.c:965:storage_init:===>
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = FR_ON item_type = 4
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:206:get_active_entry_of_existing_item:===>
[DBG ][fcc ]: item_name: :60:09:09:57:59:3a:24:f8:e5:ba:72:9c:d4:aa:ed:74:30:64:64:c5:75:9a:2f:e2:9e๐Ÿ‡ฉ๐Ÿ‡ช60:25:fc:67:e1:f6:00:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:214:get_active_entry_of_existing_item:<=== Failed to get_ksa_item_entry
[DBG ][fcc ]: key_slot_allocator.c:706:ksa_init:===>
[DBG ][fcc ]: psa_driver_crypto.c:231:psa_drv_crypto_init:===>
[DBG ][fcc ]: psa_driver_crypto.c:241:psa_drv_crypto_init:<===
[DBG ][fcc ]: psa_driver_ps.c:220:psa_drv_ps_init_reserved_data:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:237:psa_drv_ps_init_reserved_data:<===
[DBG ][fcc ]: key_slot_allocator.c:531:init_ksa_tables:===>
[DBG ][fcc ]: psa_driver_ps.c:146:psa_drv_ps_get_data:===>
[DBG ][fcc ]: psa_driver_ps.c:165:psa_drv_ps_get_data:<===
[DBG ][fcc ]: key_slot_allocator.c:552:init_ksa_tables:KSA table at id 0x2803 is not loaded, performing initialization
[DBG ][fcc ]: psa_driver_ps.c:177:psa_drv_ps_get_data_size:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:189:psa_drv_ps_get_data_size:<=== Item not found
[DBG ][fcc ]: psa_driver_common.c:48:psa_drv_translate_to_kcm_error:psa_status: -140, kcm_status: 0x5
[DBG ][fcc ]: key_slot_allocator.c:561:init_ksa_tables:KSA table at id 0x2803 is not found in the storage, creating a new file
[DBG ][fcc ]: psa_driver_ps.c:247:psa_drv_ps_set_data_direct:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:260:psa_drv_ps_set_data_direct:<===
[DBG ][fcc ]: key_slot_allocator.c:552:init_ksa_tables:KSA table at id 0x2804 is not loaded, performing initialization
[DBG ][fcc ]: psa_driver_ps.c:177:psa_drv_ps_get_data_size:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:189:psa_drv_ps_get_data_size:<=== Item not found
[DBG ][fcc ]: psa_driver_common.c:48:psa_drv_translate_to_kcm_error:psa_status: -140, kcm_status: 0x5
[DBG ][fcc ]: key_slot_allocator.c:561:init_ksa_tables:KSA table at id 0x2804 is not found in the storage, creating a new file
[DBG ][fcc ]: psa_driver_ps.c:247:psa_drv_ps_set_data_direct:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:260:psa_drv_ps_set_data_direct:<===
[DBG ][fcc ]: key_slot_allocator.c:552:init_ksa_tables:KSA table at id 0x2805 is not loaded, performing initialization
[DBG ][fcc ]: psa_driver_ps.c:177:psa_drv_ps_get_data_size:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:189:psa_drv_ps_get_data_size:<=== Item not found
[DBG ][fcc ]: psa_driver_common.c:48:psa_drv_translate_to_kcm_error:psa_status: -140, kcm_status: 0x5
[DBG ][fcc ]: key_slot_allocator.c:561:init_ksa_tables:KSA table at id 0x2805 is not found in the storage, creating a new file
[DBG ][fcc ]: psa_driver_ps.c:247:psa_drv_ps_set_data_direct:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:260:psa_drv_ps_set_data_direct:<===
[DBG ][fcc ]: key_slot_allocator.c:552:init_ksa_tables:KSA table at id 0x2806 is not loaded, performing initialization
[DBG ][fcc ]: psa_driver_ps.c:177:psa_drv_ps_get_data_size:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:189:psa_drv_ps_get_data_size:<=== Item not found
[DBG ][fcc ]: psa_driver_common.c:48:psa_drv_translate_to_kcm_error:psa_status: -140, kcm_status: 0x5
[DBG ][fcc ]: key_slot_allocator.c:561:init_ksa_tables:KSA table at id 0x2806 is not found in the storage, creating a new file
[DBG ][fcc ]: psa_driver_ps.c:247:psa_drv_ps_set_data_direct:===>
[DBG ][FSST]: File Verification failed, status: -2130771705
[DBG ][fcc ]: psa_driver_ps.c:260:psa_drv_ps_set_data_direct:<===
[DBG ][fcc ]: key_slot_allocator.c:611:init_ksa_tables:<===
[DBG ][fcc ]: key_slot_allocator.c:728:ksa_init:<===
[DBG ][fcc ]: storage_psa.c:45:register_preprovisioned_items:===>
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = mbed.BootstrapDevicePrivateKey item_type = 0
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:1277:ksa_register_se_item:===> item_type =0 slot_number =0
[DBG ][fcc ]: key_slot_allocator.c:231:get_active_entry_for_new_item:===>
[DBG ][fcc ]: item_name:3f:6d:89:34:23:3f:c3:f5:69:f3:49:ba:dd:05:87:93:3f:98:44:97:96:46:4c:da:38:26:5e:f7:e9:7d:df:04:00:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:267:get_active_entry_for_new_item:<===
[DBG ][fcc ]: psa_driver_crypto.c:257:psa_drv_crypto_register:===> slot_number = 0
[DBG ][fcc ]: psa_driver_crypto.c:282:psa_drv_crypto_register:<=== ksa_id = 9984
[DBG ][fcc ]: key_slot_allocator.c:285:store_table:===>
[DBG ][fcc ]: psa_driver_ps.c:247:psa_drv_ps_set_data_direct:===>
[DBG ][fcc ]: psa_driver_ps.c:260:psa_drv_ps_set_data_direct:<===
[DBG ][fcc ]: key_slot_allocator.c:292:store_table:<===
[DBG ][fcc ]: key_slot_allocator.c:1315:ksa_register_se_item:<===
[DBG ][fcc ]: storage_psa.c:69:register_preprovisioned_items:<===
[DBG ][fcc ]: storage_psa.c:997:storage_init:<===
[INFO][fcc ]: storage_psa.c:511:storage_rbp_read:===> item name = saved_time
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = saved_time item_type = 4
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:206:get_active_entry_of_existing_item:===>
[DBG ][fcc ]: item_name: :37:55:03:3e:6e:0e:5a:1f:3f:bc:52:f3:62:3c:bf:95:33:f5:6b:9c:47:7d:09:5c:52:48:3e:0f:56:17:66:50:00:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:214:get_active_entry_of_existing_item:<=== Failed to get_ksa_item_entry
[DBG ][fcc ]: storage_psa.c:521:storage_rbp_read:<=== Item not found
[INFO][fcc ]: storage_psa.c:511:storage_rbp_read:===> item name = last_time_back
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = last_time_back item_type = 4
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:206:get_active_entry_of_existing_item:===>
[DBG ][fcc ]: item_name: :8d:49:26:32:e2:9a:b4:90:32:aa:f7:a9:c1:f0:1e:b7:e6:c2:c4:58:2c:7d:b4:70:9a:7f:60:ca:02:7e:17:34:00:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:214:get_active_entry_of_existing_item:<=== Failed to get_ksa_item_entry
[DBG ][fcc ]: storage_psa.c:521:storage_rbp_read:<=== Item not found
[INFO][fcc ]: key_config_manager.c:61:kcm_init:<===
Start Device Management Client
[INFO][fcc ]: factory_configurator_client.c:81:fcc_init:===>
[INFO][fcc ]: fcc_output_info_handler.c:472:fcc_init_output_info_handler:===>
[INFO][fcc ]: fcc_output_info_handler.c:479:fcc_init_output_info_handler:<===
[INFO][fcc ]: factory_configurator_client.c:97:fcc_init:<===
[INFO][fcc ]: factory_configurator_client.c:238:fcc_rot_set:===> buf_size = 16
[ERR ][fcc ]: factory_configurator_client.c:245:fcc_rot_set:<=== RoT already exist in storage
Using hardcoded Root of Trust, not suitable for production use.
[INFO][fcc ]: storage_common.c:260:storage_cert_chain_create:===> chain name = mbed.BootstrapDeviceCert, chain len = 2, is_factory = 1
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = mbed.BootstrapDeviceCert item_type = 3
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:206:get_active_entry_of_existing_item:===>
[DBG ][fcc ]: item_name: :b6:50:8a:0c:c3:b5:37:f8:0e:ad:e2:7b:4b:ba:27:7a:1f:25:0f:57:71:f8:87:6f:d7:a3:86:0f:b6:80:a2:65:05:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:214:get_active_entry_of_existing_item:<=== Failed to get_ksa_item_entry
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = mbed.BootstrapDeviceCert item_type = 3
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:206:get_active_entry_of_existing_item:===>
[DBG ][fcc ]: item_name: :b6:50:8a:0c:c3:b5:37:f8:0e:ad:e2:7b:4b:ba:27:7a:1f:25:0f:57:71:f8:87:6f:d7:a3:86:0f:b6:80:a2:65:04:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:214:get_active_entry_of_existing_item:<=== Failed to get_ksa_item_entry
[INFO][fcc ]: storage_common.c:297:storage_cert_chain_create:<===
[DBG ][atml]: certificate size is (536953360)
[DBG ][atml]: certificate size is (536953364)
[DBG ][atml]: Read of signer certificate finished
[ERR ][atml]: atcacert_read_cert error (11)
[ERR ][atml]: mcc_atca_read_device_cert failed
[INFO][fcc ]: storage_common.c:372:storage_cert_chain_close:===>
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = mbed.BootstrapDeviceCert item_type = 3
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:908:ksa_item_delete:===>
[DBG ][fcc ]: key_slot_allocator.c:206:get_active_entry_of_existing_item:===>
[DBG ][fcc ]: item_name: :b6:50:8a:0c:c3:b5:37:f8:0e:ad:e2:7b:4b:ba:27:7a:1f:25:0f:57:71:f8:87:6f:d7:a3:86:0f:b6:80:a2:65:04:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:214:get_active_entry_of_existing_item:<=== Failed to get_ksa_item_entry
[DBG ][fcc ]: key_slot_allocator.c:921:ksa_item_delete:<=== Failed to get item entry
[ERR ][fcc ]: storage_common.c:390:storage_cert_chain_close:Closing incomplete kcm chain
[INFO][fcc ]: storage_common.c:398:storage_cert_chain_close:<===
[ERR ][atml]: Failed closing certificate chain error (19)
[ERR ][atml]: mcc_decompress_device_cert_chain failed
[ERR ][secm]: mcc_atca_credentials_init failed
Failed to initialize secure element
Failed initializing FCC
Initialization failed, exiting application!
[ERR ][UC ]: [HUB ] update_client_hub.c:455: Update Client not initialized
[DBG ][mClt]: CloudClientStorage::uninitialize_storage
[INFO][fcc ]: key_config_manager.c:70:kcm_finalize:===>
[DBG ][fcc ]: storage_psa.c:1006:storage_finalize:===>
[DBG ][fcc ]: key_slot_allocator.c:741:ksa_fini:===>
[DBG ][fcc ]: key_slot_allocator.c:299:destroy_ksa_tables:===>
[DBG ][fcc ]: key_slot_allocator.c:313:destroy_ksa_tables:<===
[DBG ][fcc ]: psa_driver_crypto.c:528:psa_drv_crypto_fini:===>
[DBG ][fcc ]: psa_driver_crypto.c:532:psa_drv_crypto_fini:<===
[DBG ][fcc ]: key_slot_allocator.c:756:ksa_fini:<===
[DBG ][fcc ]: storage_psa.c:1015:storage_finalize:<===
[INFO][fcc ]: key_config_manager.c:87:kcm_finalize:<===
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff23b0
[DBG ][mClt]: M2MInterfaceImpl::~M2MInterfaceImpl() - IN
[DBG ][mClt]: M2MInterfaceImpl::~M2MInterfaceImpl() - OUT
[DBG ][mClt]: M2MNsdlInterface::~M2MNsdlInterface() - IN
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MNsdlInterface::resource_to_be_deleted() 0x1fff2c98
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff2c98
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MNsdlInterface::resource_to_be_deleted() 0x1fff2d48
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff2d48
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MNsdlInterface::resource_to_be_deleted() 0x1fff2df8
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff2df8
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MNsdlInterface::resource_to_be_deleted() 0x1fff2ea8
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff2ea8
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MNsdlInterface::resource_to_be_deleted() 0x1fff2f68
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff2f68
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MNsdlInterface::resource_to_be_deleted() 0x1fff2bf8
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff2bf8
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MNsdlInterface::resource_to_be_deleted() 0x1fff2b30
[DBG ][mClt]: M2MNsdlInterface::remove_object() 0x1fff2b30
[DBG ][mClt]: M2MBase::free_resources()
[DBG ][mClt]: M2MBase::~M2MBase() 0x1fff2b30
[DBG ][mClt]: M2MNsdlInterface::~M2MNsdlInterface() - OUT
[DBG ][mClt]: ~M2MConnectionHandlerPimpl()
[DBG ][mClt]: ~M2MConnectionHandlerPimpl() - OUT

In second try with several change in mbed_app.json, board showed following message.

[Serial log with second try]

Mbed Bootloader
No Update image
[DBG ] Active firmware up-to-date
booting...

[INFO][FSST]: KV Dir: kvstore, exists(verified) - now closing it
[DBG ][mClt]: M2MInterfaceFactory::create_security
[DBG ][mClt]: M2MInterfaceFactory::create_interface - IN
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters endpoint name : endpoint
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters endpoint type : default
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters life time(in secs): 86400
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters Listen Port : 0
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters Binding Mode : 9
[INFO][mClt]: M2MInterfaceFactory::create_interface - parameters NetworkStack : 1
[DBG ][mClt]: M2MInterfaceFactory::create_interface - Creating M2MInterfaceImpl
[DBG ][mClt]: M2MNsdlInterface::M2MNsdlInterface()
[DBG ][mClt]: M2MConnectionHandlerPimpl::eventloop_event_handler 0
[DBG ][mClt]: M2MObject::create_object_instance - id: 0
[DBG ][mClt]: M2MObject::object_instance(inst_id 0)
[DBG ][mClt]: M2MBase::M2Mbase resource name is EMPTY ===========
[DBG ][mClt]: M2MObject::object_instance(inst_id 0)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 0)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 1)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 6)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 7)
[DBG ][mClt]: M2MObjectInstance::create_dynamic_resource(resource_name 8)
[DBG ][mClt]: M2MNsdlInterface::initialize()
[DBG ][mClt]: M2MNsdlInterface::add_object_to_list this=0x1fff24e8 object=0x1fff2b30
[DBG ][mClt]: M2MObject::set_observation_handler - handler: 0x0x1fff24ec
[DBG ][mClt]: M2MInterfaceImpl::M2MInterfaceImpl() -IN
[INFO][mClt]: M2MNsdlInterface::create_endpoint( name endpoint type default lifetime 86400, domain , mode 9)
[INFO][mClt]: M2MNsdlInterface::set_endpoint_lifetime_buffer - 86400
[DBG ][mClt]: M2MResourceBase::set_value()
[DBG ][mClt]: M2MResourceBase::report() - level 0
[DBG ][mClt]: M2MResourceBase::report() - combined level 0
[DBG ][mClt]: M2MResourceBase::report() - resource 1/0/1 is observable but not yet subscribed!
[DBG ][mClt]: M2MResourceBase::report() - mode = 1, is_observable = 1
[DBG ][mClt]: M2MNsdlInterface::registration_time - value (in seconds) 85500
[DBG ][mClt]: M2MNsdlInterface::set_retransmission_parameters() - total resend time 112
[INFO][mClt]: M2MNsdlInterface::set_retransmission_parameters() - setting max resend count to 3 with total time: 112
[DBG ][mClt]: M2MResourceBase::set_value()
[DBG ][mClt]: M2MResourceBase::report() - level 0
[DBG ][mClt]: M2MResourceBase::report() - combined level 0
[DBG ][mClt]: M2MResourceBase::report() - resource 1/0/7 is observable but not yet subscribed!
[DBG ][mClt]: M2MResourceBase::report() - mode = 1, is_observable = 1
[DBG ][mClt]: M2MInterfaceImpl::M2MInterfaceImpl() -OUT
[DBG ][mClt]: M2MInterfaceFactory::create_interface - OUT
[DBG ][mClt]: CloudClientStorage::initialize_storage
[INFO][fcc ]: key_config_manager.c:34:kcm_init:===>
[DBG ][fcc ]: storage_psa.c:965:storage_init:===>
[DBG ][fcc ]: storage_psa.c:228:storage_build_item_name:===> kcm_item_name = FR_ON item_type = 4
[INFO][fcc ]: storage_psa.c:247:storage_build_item_name:<===
[DBG ][fcc ]: key_slot_allocator.c:206:get_active_entry_of_existing_item:===>
[DBG ][fcc ]: item_name: :60:09:09:57:59:3a:24:f8:e5:ba:72:9c:d4:aa:ed:74:30:64:64:c5:75:9a:2f:e2:9e๐Ÿ‡ฉ๐Ÿ‡ช60:25:fc:67:e1:f6:00:00
[DBG ][fcc ]: key_slot_allocator.c:142:get_ksa_item_entry:===>
[DBG ][fcc ]: key_slot_allocator.c:193:get_ksa_item_entry:<=== result = 0, is_new_entry = 1
[DBG ][fcc ]: key_slot_allocator.c:214:get_active_entry_of_existing_item:<=== Failed to get_ksa_item_entry
[DBG ][fcc ]: key_slot_allocator.c:706:ksa_init:===>
[DBG ][fcc ]: psa_driver_crypto.c:231:psa_drv_crypto_init:===>
[DBG ][fcc ]: psa_driver_crypto.c:241:psa_drv_crypto_init:<===
[DBG ][fcc ]: psa_driver_ps.c:220:psa_drv_ps_init_reserved_data:===>

++ MbedOS Error Info ++
Error Status: 0x80FF0100 Code: 256 Module: 255
Error Message: Fatal Run-time error
Location: 0x3F55F
Error Value: 0xFFFFFFFE
Current Thread: lwip_tcpip Id: 0x20003E2C Entry: 0x40C15 StackSize: 0x4B0 StackMem: 0x1FFF1AA8 SP: 0x1FFF1ED8
For more info, visit: https://mbed.com/s/error?error=0x8003010D&tgt=K64F
-- MbedOS Error Info --
Could not read PSA storage version data

Failed to update firmware on Renesas EK-RA6M3 target

Firmware update failed on Renesas EK-RA6M3 target using manifest-tool v2.0.0.

Step to reproduce

$ cd mbed-cloud-client-example
$ manifest-dev-tool init -a <API Key> -f
  • Build example code
  • Inject signature using imgtool.py script
  • Flash seure bootloader and firmware
  • Touch and re-build example code
  • Inject signature using imgtool.py script
  • Apply the command below:
$ manifest-dev-tool update-v1 -p .\mbedCloudClientExample_signed.bin -i <Device ID> -s -w

Logs

[Manifest-tool log]

(.venv366) PS C:\work\mbed-cloud-client-example> manifest-dev-tool update-v1 -p .\mbedCloudClientExample_signed.bin -i 0173bc91f8d5000000000001001033ae -s -w
2020-08-05 12:04:45,703 INFO FW version: 1596596685
2020-08-05 12:04:45,709 INFO Uploading FW payload mbedCloudClientExample_signed.bin
2020-08-05 12:04:49,344 INFO Uploaded FW payload http://firmware-catalog-media-ca57.s3.dualstack.us-east-1.amazonaws.com/mbedCloudClientExample_signed_d0c938bbc1a649d689e7a07e4376cc12.bin
2020-08-05 12:04:49,348 INFO Vendor-ID: 99f002b9a15e458aa543d0e10c34e17c
2020-08-05 12:04:49,349 INFO Class-ID: 41aaa1faa52d4a06a37f55dd3d9df35e
2020-08-05 12:04:49,783 INFO Uploaded Manifest ID: 0173bc9417a100000000000100100048
2020-08-05 12:04:50,100 INFO Campaign successfully created ID: 0173bc9418db00000000000100100237
2020-08-05 12:04:50,100 INFO Current state: draft
2020-08-05 12:04:50,422 INFO Started Campaign ID: 0173bc9418db00000000000100100237
2020-08-05 12:04:50,679 INFO Campaign state: checkedmanifest
2020-08-05 12:04:50,937 INFO Campaign state: publishing
2020-08-05 12:04:52,194 INFO Campaign state: autostopped
2020-08-05 12:04:52,195 INFO Campaign is finished in state: autostopped
2020-08-05 12:04:52,198 INFO Cleaning up resources.
2020-08-05 12:04:52,198 INFO Deleting campaign 0173bc9418db00000000000100100237
2020-08-05 12:04:52,455 INFO Deleting FW manifest 0173bc9417a100000000000100100048
2020-08-05 12:04:52,797 INFO Deleting FW image 0173bc9415d400000000000100100047
(.venv366) PS C:\work\mbed-cloud-client-example>

[Device log]

00> Setting VTOR: 0x10400
00> Start Device Management Client
00> Using hardcoded Root of Trust, not suitable for production use.
00> Starting developer flow
00> Application ready. Build at: Aug  5 2020 11:53:41
00> Initializing network.
00> TCP/IP initialized.
00> Started DCHP request ()
00> Current DHCP State : (6)
00> Current DHCP State : (6)
00> Current DHCP State : (6)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Interface is up : 10
00> IP 192.168.11.22
00> NM 255.255.255.0
00> GW 192.168.11.1
00> DHCP state, activating interface (10)
00> Network initialized, registering...
00> Client registered
00> Endpoint Name: 0173bc91f8d5000000000001001033ae
00> Device ID: 0173bc91f8d5000000000001001033ae
00> Button resource automatically updated. Value 1

(snip)

00> Button resource manually updated. Value 33
00> 
00> Error occurred : UNKNOWN
00> Error code : 1053
00> Error details : Update has failed, check MbedCloudClient::Error
00> Button resource automatically updated. Value 34
00> Button resource automatically updated. Value 35

[Device event log from portal]

id,date_time,device_id,event_type,event_type_description,event_type_category,state_change,description,changes,data.campaign_id,data.campaign_name,object,etag,created_at,highlighted,data.manifest_hash,data.manifest_version,data
0173bc9420f0000000000001001033cf,2020-08-05T03:04:51.157475Z,0173bc91f8d5000000000001001033ae,SYS_111,FAIL,FAIL_SERVICE,FALSE,Device failed to reach desired state,,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:51.157475Z,2020-08-05T03:04:51.157475Z,FALSE,,,
0173bc9420f6000000000001001033d0,2020-08-05T03:04:51.112064Z,0173bc91f8d5000000000001001033ae,UPD4_FAIL_218,FAIL,FAIL_REJECTED,FALSE,"Manifest rejected, invalid manifest format (DER format)",,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:51.112064Z,2020-08-05T03:04:51.112064Z,FALSE,,,
0173bc9420b9000000000001001033ce,2020-08-05T03:04:51.059714Z,0173bc91f8d5000000000001001033ae,UPD2_STATE_1,INFO,STATE_IDLE,FALSE,Idle,,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:51.059714Z,2020-08-05T03:04:51.059714Z,FALSE,,,
0173bc941b67000000000001001033cd,2020-08-05T03:04:49.752000Z,0173bc91f8d5000000000001001033ae,SYS_108,INFO,CAM_DEVICE_ADD,FALSE,Device added to campaign,,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:49.752000Z,2020-08-05T03:04:49.752000Z,FALSE,,,
0173bc921572000000000001001033b6,2020-08-05T03:02:37.113007Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_HASH,INFO,STATE_HASH_1,FALSE,Asset hash reported,,,,device-event,2020-08-05T03:02:37.113007Z,2020-08-05T03:02:37.113007Z,FALSE,9bb989a1131d6a6f2b6d34f2c0be3fed553b29574681f719ba00ec106194052a,,
0173bc92154b000000000001001033b5,2020-08-05T03:02:37.075254Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_VERSION,INFO,STATE_VERSION_1,FALSE,Manifest version reported,,,,device-event,2020-08-05T03:02:37.075254Z,2020-08-05T03:02:37.075254Z,FALSE,,0,
0173bc9213dc000000000001001033b4,2020-08-05T03:02:36.710411Z,0173bc91f8d5000000000001001033ae,UPD2_STATE_1,INFO,STATE_IDLE,FALSE,Idle,,,,device-event,2020-08-05T03:02:36.710411Z,2020-08-05T03:02:36.710411Z,FALSE,,,
0173bc921279000000000001001033b1,2020-08-05T03:02:36.363000Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_VERSION,INFO,STATE_VERSION_1,FALSE,Manifest version reported,,,,device-event,2020-08-05T03:02:36.363000Z,2020-08-05T03:02:36.363000Z,FALSE,,0,
0173bc921279000000000001001033b2,2020-08-05T03:02:36.363000Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_HASH,INFO,STATE_HASH_1,FALSE,Asset hash reported,,,,device-event,2020-08-05T03:02:36.363000Z,2020-08-05T03:02:36.363000Z,FALSE,9bb989a1131d6a6f2b6d34f2c0be3fed553b29574681f719ba00ec106194052a,,
0173bc921279000000000001001033b3,2020-08-05T03:02:36.363000Z,0173bc91f8d5000000000001001033ae,UPD2_STATE_1,INFO,STATE_IDLE,FALSE,Idle,,,,device-event,2020-08-05T03:02:36.363000Z,2020-08-05T03:02:36.363000Z,FALSE,9bb989a1131d6a6f2b6d34f2c0be3fed553b29574681f719ba00ec106194052a,,
0173bc92126d000000000001001033b0,2020-08-05T03:02:36.282000Z,0173bc91f8d5000000000001001033ae,SYS_106,INFO,DD_DEVICE_REGISTERED,FALSE,Device registered,,,,device-event,2020-08-05T03:02:36.282000Z,2020-08-05T03:02:36.282000Z,FALSE,,,
0173bc91f8ed000000000001001033af,2020-08-05T03:02:29.851540Z,0173bc91f8d5000000000001001033ae,SYS_107,INFO,DD_DEVICE_BOOTSTRAPPED,FALSE,Device bootstrapped,,,,device-event,2020-08-05T03:02:29.851540Z,2020-08-05T03:02:29.851540Z,FALSE,,,

device_0173bc91f8d5000000000001001033ae-events-2020-08-05-12-17-48.zip

Tool version

Python 3.6.6

(.venv366) PS C:\work\mbed-cloud-client-example> pip list
Package            Version
------------------ -------------
appdirs            1.4.4
asn1ate            0.6.0
asn1crypto         1.3.0
beautifulsoup4     4.6.3
cbor               1.0.0
certifi            2020.6.20
cffi               1.14.0
chardet            3.0.4
Click              7.0
cmsis-pack-manager 0.2.10
colorama           0.3.9
cryptography       2.9.2
ecdsa              0.15
fasteners          0.15
future             0.16.0
hidapi             0.7.99.post21
icetea             1.2.4
idna               2.7
intelhex           2.2.1
Jinja2             2.10.3
jsonmerge          1.7.0
jsonschema         2.6.0
junit-xml          1.8
lockfile           0.12.2
manifest-tool      2.0.0
MarkupSafe         1.1.1
mbed-cli           1.10.4
mbed-cloud-sdk     2.0.8
mbed-flasher       0.10.1
mbed-greentea      1.7.4
mbed-host-tests    1.5.10
mbed-ls            1.7.12
mbed-os-tools      0.0.15
milksnake          0.1.5
monotonic          1.5
pip                20.1.1
prettytable        0.7.2
protobuf           3.5.2.post1
psutil             5.6.6
pyasn1             0.3.1
pycparser          2.20
pycryptodome       3.9.8
pyelftools         0.25
pyparsing          2.4.7
pyserial           3.4
python-dateutil    2.8.1
python-dotenv      0.14.0
pyusb              1.0.2
pywin32            224
PyYAML             4.2b1
requests           2.20.1
semver             2.10.2
setuptools         39.0.1
six                1.12.0
soupsieve          2.0.1
urllib3            1.24.2
WMI                1.4.9
yattag             1.13.2

Other info

I could not see any error with other target such as FRDM-K64F (Fimrware update successful by manifest-tool v2.0.0).
Previous version (manifest-tool v1.5.2) works fine with Renesas EK-RA6M3 target.

Space for event loop is allocated twice for mesh configurations

The cloud client calls ns_hal_init to initialize the event loop and allocate memory for it.
Mbed OS is also doing similar thing, but defaults allocating the memory statically.

Since cloud client's call to ns_hal_init has already allocated memory and initialized the event loop, the call from Mbed OS returns immediately because event loop is initted already.

This results as statically allocated memory that is never used.

There are 2 different places in cloud client where the event loop may be initialized:

https://github.com/ARMmbed/mbed-cloud-client/blob/master/mbed-client/source/m2mnsdlinterface.cpp#L191

https://github.com/ARMmbed/mbed-cloud-client/blob/master/source/ConnectorClient.cpp#L238

Call from mbed-os:

https://github.com/ARMmbed/mbed-os/blob/master/features/nanostack/mbed-mesh-api/source/mesh_system.c#L60

This issue is valid for all mesh configurations.

Cannot build on Ubuntu 16.04

I'm following all the steps in the docs, but building fails: https://cloud.mbed.com/docs/current/connecting/connecting.html

-- Generating done
-- Build files have been written to: /home/janjon01/mbed-cloud-client-example/__x86_x64_NativeLinux_mbedtls
Scanning dependencies of target platformCommon
[  1%] Building C object mbed-cloud-client-example/source/platform/CMakeFiles/platformCommon.dir/Linux/common_setup.c.obj
/home/janjon01/mbed-cloud-client-example/source/platform/Linux/common_setup.c:28:17: fatal error: pal.h: No such file or directory
compilation terminated.
mbed-cloud-client-example/source/platform/CMakeFiles/platformCommon.dir/build.make:62: recipe for target 'mbed-cloud-client-example/source/platform/CMakeFiles/platformCommon.dir/Linux/common_setup.c.obj' failed
make[3]: *** [mbed-cloud-client-example/source/platform/CMakeFiles/platformCommon.dir/Linux/common_setup.c.obj] Error 1
CMakeFiles/Makefile2:424: recipe for target 'mbed-cloud-client-example/source/platform/CMakeFiles/platformCommon.dir/all' failed
make[2]: *** [mbed-cloud-client-example/source/platform/CMakeFiles/platformCommon.dir/all] Error 2
CMakeFiles/Makefile2:83: recipe for target 'CMakeFiles/mbedCloudClientExample.elf.dir/rule' failed
make[1]: *** [CMakeFiles/mbedCloudClientExample.elf.dir/rule] Error 2
Makefile:162: recipe for target 'mbedCloudClientExample.elf' failed
make: *** [mbedCloudClientExample.elf] Error 2
2018-05-16 08:32:29,411 - pal-platform - ERROR - ** build failed **
2018-05-16 08:32:29,411 - pal-platform - INFO - 
Completed fullBuild running for target = x86_x64_NativeLinux_mbedtls
With toolchain = GCC.
Output directory: /home/janjon01/mbed-cloud-client-example/out

Contributing: the license

I believe this example should follow inbound - outbound license . We shall add to the Readme a new section License and contributions.

Good example is in Mbed OS repository:

### License and contributions

The software is provided under Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more info.

This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.

Linux build broken

Following the instructions on https://cloud.mbed.com/docs/current/connecting/connecting.html, I get this error:

ubuntu@ip-172-31-25-20:~/mbed-cloud-client-example$ python pal-platform/pal-platform.py fullbuild --target x86_x64_NativeLinux_mbedtls --toolchain GCC --external ./../define.txt --name mbedCloudClientExample.elf
Traceback (most recent call last):
File "pal-platform/pal-platform.py", line 29, in
import click
ImportError: No module named click

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.