Hello,
I'm migrating from NCS v2.1.0 to NCS v2.2.0 and I have some unit tests with Unity and Cmock.
While migrating, I've checked my tests and they don't work anymore.
The problem is that when I try to mock some zephyr drivers files (like led.h, device.h, etc), I have those errors:
/usr/bin/ld: app/libapp.a(cmock_device.c.obj):/home/pi/safehear/applications/louis/twister-out/native_posix_64/unity.ihm/mocks/zephyr/device.h:283: multiple definition of `__device_dts_ord_14'; app/libapp.a(runner_ihm_test.c.obj):/home/pi/safehear/applications/louis/twister-out/native_posix_64/unity.ihm/mocks/zephyr/device.h:283: first defined here /usr/bin/ld: app/libapp.a(cmock_device.c.obj):/home/pi/safehear/applications/louis/twister-out/native_posix_64/unity.ihm/mocks/zephyr/device.h:283: multiple definition of `__device_dts_ord_15'; app/libapp.a(runner_ihm_test.c.obj):/home/pi/safehear/applications/louis/twister-out/native_posix_64/unity.ihm/mocks/zephyr/device.h:283: first defined here /usr/bin/ld: app/libapp.a(cmock_device.c.obj):/home/pi/safehear/applications/louis/twister-out/native_posix_64/unity.ihm/mocks/zephyr/device.h:283: multiple definition of `__device_dts_ord_10'; app/libapp.a(runner_ihm_test.c.obj):/home/pi/safehear/applications/louis/twister-out/native_posix_64/unity.ihm/mocks/zephyr/device.h:283: first defined here
I've tryed multiple things with no results and it was working on NCS v2.1.0...
Is it possible to help me with this problem ?
Kind regards,
Andrew