I saw several posts on this issue, but no complete example that works
If there is one that works - it would be great
I saw several posts on this issue, but no complete example that works
If there is one that works - it would be great
No, the link you provided doesn't have much information. I am looking at this link:
https://www.hackster.io/taifur/wearable-pulse-oximeter-a1361e
It is using nrf4340 and not 52840dk and Zephyr instead of the Segger
So I need some help on how to modify this example
Or if there is another example which will have complete code?
I also tried to compile the the Max30101 example under Zyphyr 1.9
There is an error if I build in VS Code, but it compiles under Segger with Run_Cmake (as described in:
Here is another example that doesn't work:
https://devzone.nordicsemi.com/f/nordic-q-a/42526/trying-to-start-developing-driver-for-max30105
Hi,
Avi said:So I need some help on how to modify this example
Or if there is another example which will have complete code?
I also tried to compile the the Max30101 example under Zyphyr 1.9
There is an error if I build in VS Code, but it compiles under Segger with Run_Cmake (as described in:
If you get an error, please share more details in the future.
What you need to do is to define your board overlay in the "boards/nrf52840dk_nrf52840.overlay" (assuming you're using the DK) and then compile and run the sample.
The change that was introduced last year is the change from "max" to "maxim":
https://github.com/zephyrproject-rtos/zephyr/commit/98f43ba0be94d010207235b19e0cbb2ed059c46e
Here's an example overlay that shall work for newer NCS versions:
&i2c0 { compatible = "nordic,nrf-twim"; status = "okay"; sda-pin = <3>; scl-pin = <4>; clock-frequency = <I2C_BITRATE_FAST>; max30101@57 { status = "okay"; compatible = "maxim,max30101"; reg = <0x57>; label = "MAX30101"; }; };
Kind regards,
Håkon
Building max30101 west build --build-dir c:\Users\avipa\Nordic\max30101\build c:\Users\avipa\Nordic\max30101 --pristine --board nrf52840dk_nrf52840 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING="c:/Users/avipa/Nordic/max30101" -- west build: generating a build system Including boilerplate (Zephyr base): C:/Users/avipa/ncs/v1.9.0/zephyr/cmake/app/boilerplate.cmake -- Application: C:/Users/avipa/Nordic/max30101 -- Zephyr version: 2.7.99 (C:/Users/avipa/ncs/v1.9.0/zephyr), build: v2.7.99-ncs1 -- Found Python3: C:/Users/avipa/ncs/v1.9.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter -- Found west (found suitable version "0.12.0", minimum required is "0.7.1") -- Board: nrf52840dk_nrf52840 -- Cache files will be written to: C:/Users/avipa/ncs/v1.9.0/zephyr/.cache -- Found dtc: C:/Users/avipa/ncs/v1.9.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") -- Found toolchain: gnuarmemb (c:/Users/avipa/ncs/v1.9.0/toolchain/opt) -- Found BOARD.dts: C:/Users/avipa/ncs/v1.9.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts -- Generated zephyr.dts: C:/Users/avipa/Nordic/max30101/build/zephyr/zephyr.dts -- Generated devicetree_unfixed.h: C:/Users/avipa/Nordic/max30101/build/zephyr/include/generated/devicetree_unfixed.h -- Generated device_extern.h: C:/Users/avipa/Nordic/max30101/build/zephyr/include/generated/device_extern.h -- Including generated dts.cmake file: C:/Users/avipa/Nordic/max30101/build/zephyr/dts.cmake Parsing C:/Users/avipa/ncs/v1.9.0/zephyr/Kconfig Loaded configuration 'C:/Users/avipa/ncs/v1.9.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig' Merged configuration 'C:/Users/avipa/Nordic/max30101/prj.conf' Merged configuration 'C:/Users/avipa/Nordic/max30101/build/zephyr/misc/generated/extra_kconfig_options.conf' Configuration saved to 'C:/Users/avipa/Nordic/max30101/build/zephyr/.config' Kconfig header saved to 'C:/Users/avipa/Nordic/max30101/build/zephyr/include/generated/autoconf.h' -- The C compiler identification is GNU 9.2.1 -- The CXX compiler identification is GNU 9.2.1 -- The ASM compiler identification is GNU -- Found assembler: C:/Users/avipa/ncs/v1.9.0/toolchain/opt/bin/arm-none-eabi-gcc.exe -- Configuring done -- Generating done -- Build files have been written to: C:/Users/avipa/Nordic/max30101/build -- west build: building application [1/177] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json [2/177] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h [3/177] Generating include/generated/driver-validation.h [4/177] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h [5/177] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj [6/177] Generating include/generated/offsets.h [7/177] Building C object CMakeFiles/app.dir/src/main.c.obj [8/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj [9/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj [10/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj [11/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj [12/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj [13/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj [14/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj [15/177] Linking C static library app\libapp.a [16/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj [17/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj [18/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj [19/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj [20/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj [21/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj [22/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj [23/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj [24/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj [25/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj [26/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj [27/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj [28/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_complete.c.obj [29/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj [30/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj [31/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/mpsc_pbuf.c.obj [32/177] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj [33/177] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj [34/177] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj [35/177] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj [36/177] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj [37/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/debug/thread_info.c.obj [38/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_mgmt.c.obj [39/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_list.c.obj [40/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_output.c.obj [41/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_core.c.obj [42/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_msg.c.obj [43/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_backend_uart.c.obj [44/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/pm/pm.c.obj [45/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_backend_rtt.c.obj [46/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj [47/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/pm/constraint.c.obj [48/177] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/pm/policy/residency.c.obj [49/177] Building C object zephyr/CMakeFiles/zephyr.dir/C_/Users/avipa/ncs/v1.9.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj [50/177] Building C object zephyr/CMakeFiles/zephyr.dir/C_/Users/avipa/ncs/v1.9.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_mutex_zephyr.c.obj [51/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj [52/177] Generating linker_zephyr_pre1.cmd [53/177] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj [54/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj [55/177] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj [56/177] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj [57/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj [58/177] Linking C static library zephyr\libzephyr.a [59/177] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj [60/177] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj [61/177] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj [62/177] Generating linker_zephyr_pre0.cmd [63/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj [64/177] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj [65/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj [66/177] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj [67/177] Building C object zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj [68/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj [69/177] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj [70/177] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj [71/177] Linking C static library zephyr\arch\common\libisr_tables.a [72/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj [73/177] Linking C static library zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a [74/177] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj [75/177] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj [76/177] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj [77/177] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj [78/177] Linking C static library zephyr\arch\common\libarch__common.a [79/177] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj [80/177] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj [81/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj [82/177] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj [83/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj [84/177] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj [85/177] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a [86/177] Linking C static library zephyr\arch\arch\arm\core\aarch32\mpu\libarch__arm__core__aarch32__mpu.a [87/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj [88/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj [89/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj [90/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj [91/177] Linking C static library zephyr\lib\posix\liblib__posix.a [92/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj [93/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj [94/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj [95/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj [96/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj [97/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj [98/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj [99/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj [100/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj [101/177] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj [102/177] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj [103/177] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj [104/177] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/power.c.obj [105/177] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj [106/177] Building C object zephyr/drivers/console/CMakeFiles/drivers__console.dir/uart_console.c.obj [107/177] Linking C static library zephyr\lib\libc\minimal\liblib__libc__minimal.a [108/177] Linking C static library zephyr\soc\arm\common\cortex_m\libsoc__arm__common__cortex_m.a [109/177] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj [110/177] Linking C static library zephyr\soc\arm\nordic_nrf\nrf52\libsoc__arm__nordic_nrf__nrf52.a [111/177] Linking C static library zephyr\drivers\clock_control\libdrivers__clock_control.a [112/177] Building C object zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_common.c.obj [113/177] Linking C static library zephyr\drivers\console\libdrivers__console.a [114/177] Building C object zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_nrfx_twi.c.obj [115/177] Linking C static library zephyr\drivers\gpio\libdrivers__gpio.a [116/177] Building C object zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj FAILED: zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj C:\Users\avipa\ncs\v1.9.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.7.99-ncs1 -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/Users/avipa/ncs/v1.9.0/zephyr/include -Izephyr/include/generated -IC:/Users/avipa/ncs/v1.9.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/avipa/ncs/v1.9.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/avipa/ncs/v1.9.0/nrf/include -IC:/Users/avipa/ncs/v1.9.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx -IC:/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/drivers/include -IC:/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/mdk -IC:/Users/avipa/ncs/v1.9.0/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/avipa/ncs/v1.9.0/modules/debug/segger/SEGGER -IC:/Users/avipa/ncs/v1.9.0/modules/debug/segger/Config -IC:/Users/avipa/ncs/v1.9.0/zephyr/modules/segger/. -isystem C:/Users/avipa/ncs/v1.9.0/zephyr/lib/libc/minimal/include -isystem c:/users/avipa/ncs/v1.9.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -isystem c:/users/avipa/ncs/v1.9.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -isystem C:/Users/avipa/ncs/v1.9.0/nrfxlib/crypto/nrf_cc310_platform/include -Og -imacros C:/Users/avipa/Nordic/max30101/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/Users/avipa/ncs/v1.9.0/zephyr/include/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/avipa/Nordic/max30101=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/avipa/ncs/v1.9.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/avipa/ncs/v1.9.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj -MF zephyr\drivers\sensor\max30101\CMakeFiles\drivers__sensor__max30101.dir\max30101.c.obj.d -o zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj -c C:/Users/avipa/ncs/v1.9.0/zephyr/drivers/sensor/max30101/max30101.c In file included from C:\Users\avipa\ncs\v1.9.0\zephyr\include\arch\arm\aarch32\arch.h:20, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\arch\cpu.h:19, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\kernel_includes.h:33, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\kernel.h:17, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\init.h:11, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:29, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\drivers\sensor.h:23, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.h:7, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:11: C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_maxim_max30101_BUS_P_label' undeclared here (not in a function) 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:3022:24: note: in definition of macro 'DT_CAT' 3022 | #define DT_CAT(a1, a2) a1 ## a2 | ^~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2390:31: note: in expansion of macro 'DT_PROP' 2390 | #define DT_BUS_LABEL(node_id) DT_PROP(DT_BUS(node_id), label) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2383:25: note: in expansion of macro 'DT_CAT' 2383 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS) | ^~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2390:39: note: in expansion of macro 'DT_BUS' 2390 | #define DT_BUS_LABEL(node_id) DT_PROP(DT_BUS(node_id), label) | ^~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2771:33: note: in expansion of macro 'DT_BUS_LABEL' 2771 | #define DT_INST_BUS_LABEL(inst) DT_BUS_LABEL(DT_DRV_INST(inst)) | ^~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' 98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT' 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2434:27: note: in expansion of macro 'DT_INST' 2434 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2771:46: note: in expansion of macro 'DT_DRV_INST' 2771 | #define DT_INST_BUS_LABEL(inst) DT_BUS_LABEL(DT_DRV_INST(inst)) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:211:15: note: in expansion of macro 'DT_INST_BUS_LABEL' 211 | .i2c_label = DT_INST_BUS_LABEL(0), | ^~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_maxim_max30101_REG_IDX_0_VAL_ADDRESS' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_radio_40001000_REG_IDX_0_VAL_ADDRESS'? 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:3022:24: note: in definition of macro 'DT_CAT' 3022 | #define DT_CAT(a1, a2) a1 ## a2 | ^~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2681:44: note: in expansion of macro 'DT_REG_ADDR_BY_IDX' 2681 | #define DT_INST_REG_ADDR_BY_IDX(inst, idx) DT_REG_ADDR_BY_IDX(DT_DRV_INST(inst), idx) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' 98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT' 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2434:27: note: in expansion of macro 'DT_INST' 2434 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2681:63: note: in expansion of macro 'DT_DRV_INST' 2681 | #define DT_INST_REG_ADDR_BY_IDX(inst, idx) DT_REG_ADDR_BY_IDX(DT_DRV_INST(inst), idx) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2715:32: note: in expansion of macro 'DT_INST_REG_ADDR_BY_IDX' 2715 | #define DT_INST_REG_ADDR(inst) DT_INST_REG_ADDR_BY_IDX(inst, 0) | ^~~~~~~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:212:14: note: in expansion of macro 'DT_INST_REG_ADDR' 212 | .i2c_addr = DT_INST_REG_ADDR(0), | ^~~~~~~~~~~~~~~~ In file included from C:\Users\avipa\ncs\v1.9.0\zephyr\include\drivers\sensor.h:23, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.h:7, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:11: C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_maxim_max30101_FULL_NAME' undeclared here (not in a function) 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:903:11: note: in definition of macro 'Z_DEVICE_DEFINE' 903 | .name = drv_name, \ | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:64:53: note: in expansion of macro '__DEBRACKET' 64 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET' 59 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code) | ^~~~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:54:2: note: in expansion of macro '__COND_CODE' 54 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_macro.h:157:2: note: in expansion of macro 'Z_COND_CODE_1' 157 | Z_COND_CODE_1(_flag, _if_1_code, _else_code) | ^~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:649:2: note: in expansion of macro 'COND_CODE_1' 649 | COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \ | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:203:2: note: in expansion of macro 'DT_PROP_OR' 203 | DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) | ^~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:475:36: note: in expansion of macro 'DT_CAT' 475 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME) | ^~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:203:29: note: in expansion of macro 'DT_NODE_FULL_NAME' 203 | DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) | ^~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:253:4: note: in expansion of macro 'DEVICE_DT_NAME' 253 | DEVICE_DT_NAME(node_id), init_fn, \ | ^~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:272:2: note: in expansion of macro 'DEVICE_DT_DEFINE' 272 | DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) | ^~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' 98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT' 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2434:27: note: in expansion of macro 'DT_INST' 2434 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:272:19: note: in expansion of macro 'DT_DRV_INST' 272 | DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:251:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE' 251 | DEVICE_DT_INST_DEFINE(0, max30101_init, NULL, | ^~~~~~~~~~~~~~~~~~~~~ [117/177] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj [118/177] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj [119/177] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj [120/177] Linking C static library zephyr\drivers\i2c\libdrivers__i2c.a [121/177] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'c:\Users\avipa\ncs\v1.9.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\avipa\Nordic\max30101\build' The terminal process terminated with exit code: 1. Terminal will be reused by tasks, press any key to close it. > Executing task: nRF Connect: Build max30101/build (active) < Building max30101 west build --build-dir c:\Users\avipa\Nordic\max30101\build c:\Users\avipa\Nordic\max30101 [1/57] Linking C static library modules\nrf\lib\fatal_error\lib..__nrf__lib__fatal_error.a [2/57] Linking C static library zephyr\drivers\serial\libdrivers__serial.a [3/57] Linking C static library zephyr\drivers\timer\libdrivers__timer.a [4/57] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/mdk/system_nrf52840.c.obj [5/57] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj [6/57] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/helpers/nrfx_flag32_allocator.c.obj [7/57] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj [8/57] Building C object zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj FAILED: zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj C:\Users\avipa\ncs\v1.9.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.7.99-ncs1 -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/Users/avipa/ncs/v1.9.0/zephyr/include -Izephyr/include/generated -IC:/Users/avipa/ncs/v1.9.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/avipa/ncs/v1.9.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/avipa/ncs/v1.9.0/nrf/include -IC:/Users/avipa/ncs/v1.9.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx -IC:/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/drivers/include -IC:/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/mdk -IC:/Users/avipa/ncs/v1.9.0/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/avipa/ncs/v1.9.0/modules/debug/segger/SEGGER -IC:/Users/avipa/ncs/v1.9.0/modules/debug/segger/Config -IC:/Users/avipa/ncs/v1.9.0/zephyr/modules/segger/. -isystem C:/Users/avipa/ncs/v1.9.0/zephyr/lib/libc/minimal/include -isystem c:/users/avipa/ncs/v1.9.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -isystem c:/users/avipa/ncs/v1.9.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -isystem C:/Users/avipa/ncs/v1.9.0/nrfxlib/crypto/nrf_cc310_platform/include -Og -imacros C:/Users/avipa/Nordic/max30101/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/Users/avipa/ncs/v1.9.0/zephyr/include/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/avipa/Nordic/max30101=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/avipa/ncs/v1.9.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/avipa/ncs/v1.9.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj -MF zephyr\drivers\sensor\max30101\CMakeFiles\drivers__sensor__max30101.dir\max30101.c.obj.d -o zephyr/drivers/sensor/max30101/CMakeFiles/drivers__sensor__max30101.dir/max30101.c.obj -c C:/Users/avipa/ncs/v1.9.0/zephyr/drivers/sensor/max30101/max30101.c In file included from C:\Users\avipa\ncs\v1.9.0\zephyr\include\arch\arm\aarch32\arch.h:20, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\arch\cpu.h:19, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\kernel_includes.h:33, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\kernel.h:17, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\init.h:11, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:29, from C:\Users\avipa\ncs\v1.9.0\zephyr\include\drivers\sensor.h:23, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.h:7, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:11: C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_maxim_max30101_BUS_P_label' undeclared here (not in a function) 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:3022:24: note: in definition of macro 'DT_CAT' 3022 | #define DT_CAT(a1, a2) a1 ## a2 | ^~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2390:31: note: in expansion of macro 'DT_PROP' 2390 | #define DT_BUS_LABEL(node_id) DT_PROP(DT_BUS(node_id), label) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2383:25: note: in expansion of macro 'DT_CAT' 2383 | #define DT_BUS(node_id) DT_CAT(node_id, _BUS) | ^~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2390:39: note: in expansion of macro 'DT_BUS' 2390 | #define DT_BUS_LABEL(node_id) DT_PROP(DT_BUS(node_id), label) | ^~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2771:33: note: in expansion of macro 'DT_BUS_LABEL' 2771 | #define DT_INST_BUS_LABEL(inst) DT_BUS_LABEL(DT_DRV_INST(inst)) | ^~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' 98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT' 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2434:27: note: in expansion of macro 'DT_INST' 2434 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2771:46: note: in expansion of macro 'DT_DRV_INST' 2771 | #define DT_INST_BUS_LABEL(inst) DT_BUS_LABEL(DT_DRV_INST(inst)) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:211:15: note: in expansion of macro 'DT_INST_BUS_LABEL' 211 | .i2c_label = DT_INST_BUS_LABEL(0), | ^~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_maxim_max30101_REG_IDX_0_VAL_ADDRESS' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_radio_40001000_REG_IDX_0_VAL_ADDRESS'? 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:3022:24: note: in definition of macro 'DT_CAT' 3022 | #define DT_CAT(a1, a2) a1 ## a2 | ^~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2681:44: note: in expansion of macro 'DT_REG_ADDR_BY_IDX' 2681 | #define DT_INST_REG_ADDR_BY_IDX(inst, idx) DT_REG_ADDR_BY_IDX(DT_DRV_INST(inst), idx) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' 98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT' 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2434:27: note: in expansion of macro 'DT_INST' 2434 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2681:63: note: in expansion of macro 'DT_DRV_INST' 2681 | #define DT_INST_REG_ADDR_BY_IDX(inst, idx) DT_REG_ADDR_BY_IDX(DT_DRV_INST(inst), idx) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2715:32: note: in expansion of macro 'DT_INST_REG_ADDR_BY_IDX' 2715 | #define DT_INST_REG_ADDR(inst) DT_INST_REG_ADDR_BY_IDX(inst, 0) | ^~~~~~~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:212:14: note: in expansion of macro 'DT_INST_REG_ADDR' 212 | .i2c_addr = DT_INST_REG_ADDR(0), | ^~~~~~~~~~~~~~~~ In file included from C:\Users\avipa\ncs\v1.9.0\zephyr\include\drivers\sensor.h:23, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.h:7, from C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:11: C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:40: error: 'DT_N_INST_0_maxim_max30101_FULL_NAME' undeclared here (not in a function) 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:903:11: note: in definition of macro 'Z_DEVICE_DEFINE' 903 | .name = drv_name, \ | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:64:53: note: in expansion of macro '__DEBRACKET' 64 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET' 59 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code) | ^~~~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:54:2: note: in expansion of macro '__COND_CODE' 54 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_macro.h:157:2: note: in expansion of macro 'Z_COND_CODE_1' 157 | Z_COND_CODE_1(_flag, _if_1_code, _else_code) | ^~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:649:2: note: in expansion of macro 'COND_CODE_1' 649 | COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \ | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:203:2: note: in expansion of macro 'DT_PROP_OR' 203 | DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) | ^~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:475:36: note: in expansion of macro 'DT_CAT' 475 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME) | ^~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:203:29: note: in expansion of macro 'DT_NODE_FULL_NAME' 203 | DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id)) | ^~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:253:4: note: in expansion of macro 'DEVICE_DT_NAME' 253 | DEVICE_DT_NAME(node_id), init_fn, \ | ^~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:272:2: note: in expansion of macro 'DEVICE_DT_DEFINE' 272 | DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) | ^~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\sys\util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT' 98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT' 305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat)) | ^~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\devicetree.h:2434:27: note: in expansion of macro 'DT_INST' 2434 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT) | ^~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\include\device.h:272:19: note: in expansion of macro 'DT_DRV_INST' 272 | DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__) | ^~~~~~~~~~~ C:\Users\avipa\ncs\v1.9.0\zephyr\drivers\sensor\max30101\max30101.c:251:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE' 251 | DEVICE_DT_INST_DEFINE(0, max30101_init, NULL, | ^~~~~~~~~~~~~~~~~~~~~ [9/57] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj [10/57] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj [11/57] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj [12/57] Linking C static library modules\nrf\drivers\hw_cc310\lib..__nrf__drivers__hw_cc310.a [13/57] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/Users/avipa/ncs/v1.9.0/modules/hal/nordic/nrfx/drivers/src/nrfx_twi_twim.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'c:\Users\avipa\ncs\v1.9.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\avipa\Nordic\max30101\build' The terminal process terminated with exit code: 1. Terminal will be reused by tasks, press any key to close it.Attached is the error I get when I tried to compile via VS code in NRF Connect 1.9
I didn't understand your answer about " board overlay in the "boards/nrf52840dk_nrf52840.overlay"
What should I do?
Hi,
Thank you for posting the build log. The log that you provide states that the DT definition is not matching.
Avi said:What should I do?
create the file boards\nrf52840dk_nrf52840.overlay containing the example definition that I posted, then re-import your project and build again.
Feel free to change the pin definition to match your own setup.
Kind regards,
Håkon
Hi,
Thank you for posting the build log. The log that you provide states that the DT definition is not matching.
Avi said:What should I do?
create the file boards\nrf52840dk_nrf52840.overlay containing the example definition that I posted, then re-import your project and build again.
Feel free to change the pin definition to match your own setup.
Kind regards,
Håkon