Using flash_img.h in Zephyr boot

I want to include  #include <zephyr/dfu/flash_img.h> in boot/zephyr/main.c  (path: C:\ncs\v2.4.0\bootloader\mcuboot\boot\zephyr\main.c)
And header file path (C:\ncs\v2.4.0\zephyr\include\zephyr\dfu\flash_img.h).

But after adding flash_img.h I get a linker error: collect2.exe: error: ld returned 1 exit status

Also tried by adding path in CmakeList.txt file as "zephyr_include_directories(${ZEPHYR_BASE}/include/zephyr/dfu)"
Still does not solve the issue.

Please can you suggest what else needs to be done in order to use this header?

PS: using nRF52840dk

Thankyou

Parents Reply Children
Related