Reading Thingy:53 sensor data

Hello everyone !

I am following the tutorial "Reading Thingy:53 sensor data using Bluetooth LE".
It doesn't matter if I don't do it myself or if I take the source program from github the project doesn't build.
I have the following error:
FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.3.0\opt\bincmake.EXE' --build 'c:\Users\fduvi\Desktop\stage\Nordic_LTEthingy53_sensor_hub-masterthingy53_sensor_hub-master'

Can someone help me ? 

Kind regards,

Pierre

Here we can see the error with the source program

Parents
  • Hello !

    I put the paths of each library that the compiler could not find which allowed me to move on to the rest of the compilation!

    Now I have the following problem:

    FAILED: CMakeFiles/app.dir/boards/thingy53.c.obj 
    C:\ncs\toolchains\v2.3.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -DZCBOR_ASSERTS -D__PROGRAM_START -D__ZEPHYR__=1 -I../. -IC:/ncs/v2.3.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.3.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.3.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.3.0/zephyr/subsys/bluetooth -IC:/ncs/v2.3.0/zephyr/subsys/mgmt/mcumgr/util/include -IC:/ncs/v2.3.0/zephyr/subsys/mgmt/mcumgr/transport/include -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.3.0/zephyr/subsys/usb/device -IC:/ncs/v2.3.0/nrf/include -IC:/ncs/v2.3.0/nrf/include/tfm -IC:/ncs/v2.3.0/nrf/tests/include -Itfm/generated/interface/include -IC:/ncs/v2.3.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.3.0/modules/hal/nordic/nrfx -IC:/ncs/v2.3.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.3.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.3.0/zephyr/modules/hal_nordic/nrfx/. -Imodules/libmetal/libmetal/lib/include -IC:/ncs/v2.3.0/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.3.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.3.0/modules/lib/zcbor/include -Itfm/install/interface/include -IC:/ncs/v2.3.0/nrfxlib/softdevice_controller/include -Imodules/nrfxlib/nrfxlib/nrf_security/src/include/generated -IC:/ncs/v2.3.0/nrfxlib/nrf_security/include -IC:/ncs/v2.3.0/nrfxlib/nrf_security/include/mbedtls -IC:/ncs/v2.3.0/modules/crypto/mbedtls/include -IC:/ncs/v2.3.0/modules/crypto/mbedtls/include/mbedtls -IC:/ncs/v2.3.0/modules/crypto/mbedtls/include/psa -IC:/ncs/v2.3.0/modules/crypto/mbedtls/library -IC:/ncs/v2.3.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.3.0/nrfxlib/crypto/nrf_oberon/include -isystem C:/ncs/v2.3.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem c:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -fno-strict-aliasing -Os -imacros C:/thingy53_sensor_hub-master/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.3.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/thingy53_sensor_hub-master=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.3.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.3.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/boards/thingy53.c.obj -MF CMakeFiles\app.dir\boards\thingy53.c.obj.d -o CMakeFiles/app.dir/boards/thingy53.c.obj -c ../boards/thingy53.c
    In file included from c:\thingy53_sensor_hub-master\boards\thingy53.c:9:
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:33:43: warning: implicit declaration of function 'BIT' [-Wimplicit-function-declaration]
       33 |         OS_MGMT_INFO_FORMAT_KERNEL_NAME = BIT(0),
          |                                           ^~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:33:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_KERNEL_NAME' is not an integer constant
       33 |         OS_MGMT_INFO_FORMAT_KERNEL_NAME = BIT(0),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:34:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_NODE_NAME' is not an integer constant
       34 |         OS_MGMT_INFO_FORMAT_NODE_NAME = BIT(1),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:35:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_KERNEL_RELEASE' is not an integer constant
       35 |         OS_MGMT_INFO_FORMAT_KERNEL_RELEASE = BIT(2),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:36:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_KERNEL_VERSION' is not an integer constant
       36 |         OS_MGMT_INFO_FORMAT_KERNEL_VERSION = BIT(3),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:37:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_BUILD_DATE_TIME' is not an integer constant
       37 |         OS_MGMT_INFO_FORMAT_BUILD_DATE_TIME = BIT(4),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:38:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_MACHINE' is not an integer constant
       38 |         OS_MGMT_INFO_FORMAT_MACHINE = BIT(5),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:39:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_PROCESSOR' is not an integer constant
       39 |         OS_MGMT_INFO_FORMAT_PROCESSOR = BIT(6),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:40:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_HARDWARE_PLATFORM' is not an integer constant
       40 |         OS_MGMT_INFO_FORMAT_HARDWARE_PLATFORM = BIT(7),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:41:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_OPERATING_SYSTEM' is not an integer constant
       41 |         OS_MGMT_INFO_FORMAT_OPERATING_SYSTEM = BIT(8),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\zephyr\include\zephyr\mgmt\mcumgr\grp\os_mgmt\os_mgmt.h:43:9: error: enumerator value for 'OS_MGMT_INFO_FORMAT_USER_CUSTOM_START' is not an integer constant
       43 |         OS_MGMT_INFO_FORMAT_USER_CUSTOM_START = BIT(9),
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../boards/thingy53.c: In function 'bt_smp_init':
    c:\thingy53_sensor_hub-master\boards\thingy53.c:24:9: warning: implicit declaration of function 'img_mgmt_register_group'; did you mean 'mgmt_register_group'? [-Wimplicit-function-declaration]
       24 |         img_mgmt_register_group();
          |         ^~~~~~~~~~~~~~~~~~~~~~~
          |         mgmt_register_group
    c:\thingy53_sensor_hub-master\boards\thingy53.c:25:9: warning: implicit declaration of function 'os_mgmt_register_group'; did you mean 'mgmt_register_group'? [-Wimplicit-function-declaration]
       25 |         os_mgmt_register_group();
          |         ^~~~~~~~~~~~~~~~~~~~~~
          |         mgmt_register_group
    [181/431] Building C object CMakeFiles/app.dir/services/sensor_hub_service.c.obj
    [182/431] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [183/431] Building C object CMakeFiles/app.dir/src/main.c.obj
    In file included from c:\thingy53_sensor_hub-master\src\main.c:27:
    In function 'adc_raw_to_millivolts',
        inlined from 'sample_and_update_all_sensor_values' at c:\thingy53_sensor_hub-master\src\main.c:320:2,
        inlined from 'main' at c:\thingy53_sensor_hub-master\src\main.c:214:4:
    C:\ncs\v2.3.0\zephyr\include\zephyr\drivers\adc.h:750:26: warning: array subscript 'int32_t {aka int}[0]' is partly outside array bounds of 'int16_t[1]' {aka 'short int[1]'} [-Warray-bounds]
      750 |         int32_t adc_mv = *valp * ref_mv;
          |                          ^~~~~
    ../src/main.c: In function 'main':
    c:\thingy53_sensor_hub-master\src\main.c:235:17: note: object 'batt_volt' of size 2
      235 |         int16_t batt_volt;
          |                 ^~~~~~~~~
    In function 'adc_raw_to_millivolts',
        inlined from 'sample_and_update_all_sensor_values' at c:\thingy53_sensor_hub-master\src\main.c:320:2,
        inlined from 'main' at c:\thingy53_sensor_hub-master\src\main.c:214:4:
    C:\ncs\v2.3.0\zephyr\include\zephyr\drivers\adc.h:754:23: warning: array subscript 'int32_t {aka int}[0]' is partly outside array bounds of 'int16_t[1]' {aka 'short int[1]'} [-Warray-bounds]
      754 |                 *valp = (adc_mv >> resolution);
          |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
    ../src/main.c: In function 'main':
    c:\thingy53_sensor_hub-master\src\main.c:235:17: note: object 'batt_volt' of size 2
      235 |         int16_t batt_volt;
          |                 ^~~~~~~~~
    [184/431] Linking C static library zephyr\subsys\mgmt\mcumgr\grp\img_mgmt\libsubsys__mgmt__mcumgr__grp__img_mgmt.a
    [185/431] Building C object zephyr/subsys/dfu/boot/CMakeFiles/subsys__dfu__boot.dir/mcuboot.c.obj
    [186/431] Linking C static library zephyr\subsys\mgmt\mcumgr\grp\os_mgmt\libsubsys__mgmt__mcumgr__grp__os_mgmt.a
    [187/431] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [188/431] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/conn.c.obj
    [189/431] Building C object zephyr/subsys/mgmt/mcumgr/transport/CMakeFiles/subsys__mgmt__mcumgr__transport.dir/src/smp_bt.c.obj
    [190/431] Building C object zephyr/subsys/net/CMakeFiles/subsys__net.dir/buf.c.obj
    [191/431] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/gatt.c.obj
    [192/431] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/att.c.obj
    [193/431] Building C object zephyr/subsys/bluetooth/host/CMakeFiles/subsys__bluetooth__host.dir/hci_core.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' --build 'c:\thingy53_sensor_hub-master\build'
    How can I make it work?

    regards,

  • Could you upload your project for me?

    Regards

    Runar

  • 3652.thingy53_sensor_hub-master.zip

    Hi sorry for my late answer. I give you my project hoping taht you will find where is the problem...

    Regards

    Pierre

  • Hi, 

    It looks like you are missing the scr folder. 

    Regards

    Runar

Reply Children
Related