Hi, I’m currently working on building the firmware code for thingy53 using nRF Connect v2.6.1 in VSCode (GitHub - edgeimpulse/firmware-nordic-thingy53: Official Edge Impulse firmware for Nordic Semiconductor Thingy:53).
I’m encountering the following error message:
“collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.”
[1041/1058] Linking CXX executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/build/zephyr/zephyr_pre0.map
cmd.exe /C “cd . && D:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-g++.exe -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf && cmd.exe /C “cd /D D:\Edge_AI\Nordic_thingy53\firmware-nordic-thingy53-main\build\zephyr && D:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe -E true””
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_inertial_sensor.cpp.obj): in function `ei_fusion_acc_read_data(int)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_inertial_sensor.cpp:105: undefined reference to `__device_dts_ord_147’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_inertial_sensor.cpp.obj): in function `ei_acc_init()':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_inertial_sensor.cpp:57: undefined reference to `__device_dts_ord_147’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_light_sensor.cpp.obj): in function `sensor_channel_get.constprop.0’:
D:/ncs/v2.6.1/zephyr/include/zephyr/drivers/sensor.h:863: undefined reference to `__device_dts_ord_136’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_light_sensor.cpp.obj): in function `ei_fusion_light_read_data(int)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_light_sensor.cpp:91: undefined reference to `__device_dts_ord_136’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_light_sensor.cpp.obj): in function `ei_lightsensor_init()':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_light_sensor.cpp:47: undefined reference to `__device_dts_ord_136’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_mag_sensor.cpp.obj): in function `ei_fusion_mag_read_data(int)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_mag_sensor.cpp:107: undefined reference to `__device_dts_ord_138’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_mag_sensor.cpp.obj): in function `ei_mag_init()':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_mag_sensor.cpp:58: undefined reference to `__device_dts_ord_138’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_microphone.cpp.obj): in function `inference_samples_callback(nrfx_pdm_evt_t const*)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:564: undefined reference to `nrfx_pdm_buffer_set’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_microphone.cpp.obj): in function `setup_nrf_pdm(void ()(nrfx_pdm_evt_t const))':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:658: undefined reference to `nrfx_pdm_init’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_microphone.cpp.obj): in function `ingestion_samples_callback(nrfx_pdm_evt_t const*)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:199: undefined reference to `nrfx_pdm_buffer_set’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_microphone.cpp.obj): in function `ei_microphone_sample_start()':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:307: undefined reference to `nrfx_pdm_uninit’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:316: undefined reference to `nrfx_pdm_start’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:381: undefined reference to `nrfx_pdm_stop’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_microphone.cpp.obj): in function `ei_microphone_inference_start(unsigned int, float)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:604: undefined reference to `nrfx_pdm_uninit’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/sensors/ei_microphone.cpp:609: undefined reference to `nrfx_pdm_start’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_microphone.cpp.obj):(.intList+0x8): undefined reference to `nrfx_pdm_irq_handler’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_device_thingy53.cpp.obj): in function `EiDeviceThingy53::set_state(EiState)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:305: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:306: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:307: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_device_thingy53.cpp.obj): in function `EiDeviceThingy53::EiDeviceThingy53(EiDeviceMemory*)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:196: undefined reference to `dk_leds_init’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_device_thingy53.cpp.obj): in function `led_work_handler(k_work*)':
D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:66: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:97: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:87: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:88: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:94: undefined reference to `dk_set_led’
d:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/…/lib/gcc/arm-zephyr-eabi/12.2.0/…/…/…/…/arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(ei_device_thingy53.cpp.obj):D:/Edge_AI/Nordic_thingy53/firmware-nordic-thingy53-main/src/ei_device_thingy53.cpp:92: more undefined references to `dk_set_led’ follow
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: ‘D:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE’ --build ‘d:\Edge_AI\Nordic_thingy53\firmware-nordic-thingy53-main\build’
Besides, I modified the original proj.conf by commenting out CONFIG_MCUBOOT_IMAGE_VERSION=“2.4.0+0” due to a compilation failure in v2.6.1.
I’d appreciate any suggestions to help me fix this issue.