Hi, I'm trying the FOTA for nrf52832 board with Zephyr RTOS, I was following " https://medium.com/embedded-systems/zephyr-rtos-with-mcuboot-15850f50113f " . In this build got completed, next used "Ninja" command but I'm getting and error saying:
build>ninja
[1/233] Building C object CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
FAILED: CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
C:\Users\Sachin\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF52832_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/targets -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include/zephyr -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/Sachin/ncs/v2.0.2/nrf/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/SEGGER -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/Config -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/segger/. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/Users/Sachin/ncs/v2.0.2/modules/crypto/mbedtls/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/mbedtls/configs -isystem C:/Users/Sachin/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -Og -imacros C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/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/Sachin/ncs/v2.0.2/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c.obj -MF CMakeFiles\app.dir\C_\Users\Sachin\Desktop\merge\zephyr_v3.1\mcuboot\boot\bootutil\src\bootutil_misc.c.obj.d -o CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c.obj -c C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c
In file included from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c:32:
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c: In function 'boot_status_entries':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:42: warning: implicit declaration of function 'FIXED_PARTITION_ID'; did you mean 'DT_FIXED_PARTITION_ID'? [-Wimplicit-function-declaration]
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c:160:35: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
160 | if (flash_area_get_id(fap) == FLASH_AREA_IMAGE_PRIMARY(image_index) ||
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c:160:35: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
160 | if (flash_area_get_id(fap) == FLASH_AREA_IMAGE_PRIMARY(image_index) ||
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: note: each undeclared identifier is reported only once for each function it appears in
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c:160:35: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
160 | if (flash_area_get_id(fap) == FLASH_AREA_IMAGE_PRIMARY(image_index) ||
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:61: error: 'slot1_partition' undeclared (first use in this function)
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c:161:35: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
161 | flash_area_get_id(fap) == FLASH_AREA_IMAGE_SECONDARY(image_index)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c: In function 'boot_find_status':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_misc.c:217:9: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
217 | FLASH_AREA_IMAGE_PRIMARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~
[3/233] Building C object CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c.obj
FAILED: CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c.obj
C:\Users\Sachin\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF52832_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/targets -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include/zephyr -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/Sachin/ncs/v2.0.2/nrf/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/SEGGER -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/Config -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/segger/. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/Users/Sachin/ncs/v2.0.2/modules/crypto/mbedtls/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/mbedtls/configs -isystem C:/Users/Sachin/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -Og -imacros C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/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/Sachin/ncs/v2.0.2/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c.obj -MF CMakeFiles\app.dir\C_\Users\Sachin\Desktop\merge\zephyr_v3.1\mcuboot\boot\bootutil\src\swap_misc.c.obj.d -o CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c.obj -c C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c
In file included from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c:25:
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c: In function 'swap_status_init':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:42: warning: implicit declaration of function 'FIXED_PARTITION_ID'; did you mean 'DT_FIXED_PARTITION_ID'? [-Wimplicit-function-declaration]
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c:99:37: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
99 | rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SECONDARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:61: error: 'slot1_partition' undeclared (first use in this function)
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c:99:37: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
99 | rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SECONDARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:61: note: each undeclared identifier is reported only once for each function it appears in
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c:99:37: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
99 | rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_SECONDARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c: In function 'swap_read_status':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c:151:19: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
151 | area_id = FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state));
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c: In function 'swap_set_copy_done':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c:194:26: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
194 | rc = flash_area_open(FLASH_AREA_IMAGE_PRIMARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c: In function 'swap_set_image_ok':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/swap_misc.c:212:26: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
212 | rc = flash_area_open(FLASH_AREA_IMAGE_PRIMARY(image_index),
| ^~~~~~~~~~~~~~~~~~~~~~~~
[4/233] Building C object CMakeFiles/app.dir/main.c.obj
FAILED: CMakeFiles/app.dir/main.c.obj
C:\Users\Sachin\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF52832_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/targets -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include/zephyr -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/Sachin/ncs/v2.0.2/nrf/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/SEGGER -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/Config -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/segger/. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/Users/Sachin/ncs/v2.0.2/modules/crypto/mbedtls/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/mbedtls/configs -isystem C:/Users/Sachin/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -Og -imacros C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/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/Sachin/ncs/v2.0.2/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/main.c.obj -MF CMakeFiles\app.dir\main.c.obj.d -o CMakeFiles/app.dir/main.c.obj -c C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/main.c
In file included from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/main.c:36:
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/target.h:37:29: error: missing binary operator before token "("
37 | !(FIXED_PARTITION_EXISTS(slot0_partition)) || \
| ^
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/target.h:43:61: error: missing binary operator before token "("
43 | #if (MCUBOOT_IMAGE_NUMBER == 2) && (!(FIXED_PARTITION_EXISTS(slot2_partition)) || \
| ^
[5/233] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
FAILED: CMakeFiles/app.dir/flash_map_extended.c.obj
C:\Users\Sachin\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF52832_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/targets -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include/zephyr -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/Sachin/ncs/v2.0.2/nrf/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/SEGGER -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/Config -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/segger/. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/Users/Sachin/ncs/v2.0.2/modules/crypto/mbedtls/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/mbedtls/configs -isystem C:/Users/Sachin/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -Og -imacros C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/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/Sachin/ncs/v2.0.2/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/flash_map_extended.c.obj -MF CMakeFiles\app.dir\flash_map_extended.c.obj.d -o CMakeFiles/app.dir/flash_map_extended.c.obj -c C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c
In file included from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:12:
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/target.h:37:29: error: missing binary operator before token "("
37 | !(FIXED_PARTITION_EXISTS(slot0_partition)) || \
| ^
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/target.h:43:61: error: missing binary operator before token "("
43 | #if (MCUBOOT_IMAGE_NUMBER == 2) && (!(FIXED_PARTITION_EXISTS(slot2_partition)) || \
| ^
In file included from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:15:
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c: In function 'flash_area_id_from_multi_image_slot':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:42: warning: implicit declaration of function 'FIXED_PARTITION_ID'; did you mean 'DT_FIXED_PARTITION_ID'? [-Wimplicit-function-declaration]
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:62:20: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
62 | case 0: return FLASH_AREA_IMAGE_PRIMARY(image_index);
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function); did you mean 'k_mem_partition'?
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:62:20: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
62 | case 0: return FLASH_AREA_IMAGE_PRIMARY(image_index);
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: note: each undeclared identifier is reported only once for each function it appears in
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:62:20: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
62 | case 0: return FLASH_AREA_IMAGE_PRIMARY(image_index);
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:61: error: 'slot1_partition' undeclared (first use in this function); did you mean 'k_mem_partition'?
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:64:20: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
64 | case 1: return FLASH_AREA_IMAGE_SECONDARY(image_index);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c: In function 'flash_area_id_to_multi_image_slot':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function); did you mean 'k_mem_partition'?
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:81:20: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
81 | if (area_id == FLASH_AREA_IMAGE_PRIMARY(image_index)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:61: error: 'slot1_partition' undeclared (first use in this function); did you mean 'k_mem_partition'?
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:85:20: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
85 | if (area_id == FLASH_AREA_IMAGE_SECONDARY(image_index)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c: In function 'flash_area_get_sector':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/flash_map_extended.c:157:41: error: 'const struct flash_area' has no member named 'fa_dev'
157 | rc = flash_get_page_info_by_offs(fap->fa_dev, fap->fa_off + off,
| ^~
[6/233] Building C object CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c.obj
FAILED: CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c.obj
C:\Users\Sachin\ncs\toolchains\v2.0.2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF52832_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/targets -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include/zephyr -IC:/Users/Sachin/ncs/v2.0.2/zephyr/include -IC:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/build/zephyr/include/generated -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/Users/Sachin/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/Users/Sachin/ncs/v2.0.2/nrf/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -IC:/Users/Sachin/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/SEGGER -IC:/Users/Sachin/ncs/v2.0.2/modules/debug/segger/Config -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/segger/. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/Users/Sachin/ncs/v2.0.2/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/Users/Sachin/ncs/v2.0.2/modules/crypto/mbedtls/include -IC:/Users/Sachin/ncs/v2.0.2/zephyr/modules/mbedtls/configs -isystem C:/Users/Sachin/ncs/v2.0.2/zephyr/lib/libc/minimal/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/users/sachin/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -Og -imacros C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/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/Sachin/ncs/v2.0.2/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-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/Sachin/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c.obj -MF CMakeFiles\app.dir\C_\Users\Sachin\Desktop\merge\zephyr_v3.1\mcuboot\boot\bootutil\src\loader.c.obj.d -o CMakeFiles/app.dir/C_/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c.obj -c C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c
In file included from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
from C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:41:
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c: In function 'boot_initialize_area':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:42: warning: implicit declaration of function 'FIXED_PARTITION_ID'; did you mean 'DT_FIXED_PARTITION_ID'? [-Wimplicit-function-declaration]
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:325:23: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
325 | if (flash_area == FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:325:23: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
325 | if (flash_area == FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: note: each undeclared identifier is reported only once for each function it appears in
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:325:23: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
325 | if (flash_area == FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:61: error: 'slot1_partition' undeclared (first use in this function)
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:328:30: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
328 | } else if (flash_area == FLASH_AREA_IMAGE_SECONDARY(BOOT_CURR_IMG(state))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c: In function 'boot_read_sectors':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:367:38: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
367 | rc = boot_initialize_area(state, FLASH_AREA_IMAGE_PRIMARY(image_index));
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:22:61: error: 'slot1_partition' undeclared (first use in this function)
22 | FIXED_PARTITION_ID(slot1_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:372:38: note: in expansion of macro 'FLASH_AREA_IMAGE_SECONDARY'
372 | rc = boot_initialize_area(state, FLASH_AREA_IMAGE_SECONDARY(image_index));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c: In function 'boot_write_status':
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/zephyr/include/sysflash/sysflash.h:19:61: error: 'slot0_partition' undeclared (first use in this function)
19 | FIXED_PARTITION_ID(slot0_partition) : \
| ^~~~~~~~~~~~~~~
C:/Users/Sachin/Desktop/merge/zephyr_v3.1/mcuboot/boot/bootutil/src/loader.c:450:19: note: in expansion of macro 'FLASH_AREA_IMAGE_PRIMARY'
450 | area_id = FLASH_AREA_IMAGE_PRIMARY(BOOT_CURR_IMG(state));
| ^~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
Please help me out with this or Suggest some good FOTA Documentation.
Thank you