Hi,
So my project builds as is when I comment out the config option CONFIG_BOOTLOADER_MCUBOOT, or if I leave it enabled and then comment out the external flash memory decleration in the device tree file. When the build fails I get the following error:
[184/194] Linking C executable zephyr/zephyr_pre0.elf FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map : && ccache /home/cmabon/ncs/toolchains/1f9b40e71a/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf -fuse-ld=bfd -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/home/cmabon/Documents/Projects/SG-Firmware/build_1/mcuboot/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/libarch__arm__core__aarch32__cortex_m__cmse.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/boards/boards/arm/actinius_icarus/actinius_common/libboards__common__actinius.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/zcbor/libmodules__zcbor.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -L"/home/cmabon/ncs/toolchains/1f9b40e71a/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v8-m.main+fp/hard" -L/home/cmabon/Documents/Projects/SG-Firmware/build_1/mcuboot/zephyr -lgcc zephyr/arch/common/libisr_tables.a -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,-no-pie /home/cmabon/ncs/v2.4.2/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc310_platform_0.9.17.a /home/cmabon/ncs/v2.4.2/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a && cd /home/cmabon/Documents/Projects/SG-Firmware/build_1/mcuboot/zephyr && /home/cmabon/ncs/toolchains/1f9b40e71a/usr/local/bin/cmake -E echo /home/cmabon/ncs/toolchains/1f9b40e71a/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/flash/libdrivers__flash.a(spi_nor.c.obj):(.rodata.spi_nor_config_0+0x0): undefined reference to `__device_dts_ord_113' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed
My config file:
#MCUBoot CONFIG_BOOTLOADER_MCUBOOT=y #C++ Support Stuff CONFIG_CPP=y CONFIG_STD_CPP11=y CONFIG_GLIBCXX_LIBCPP=y CONFIG_CPP_MAIN=y #Other Stuff so far CONFIG_PM_DEVICE=y #Shell Stuff CONFIG_SHELL=y CONFIG_DEVICE_SHELL=y CONFIG_KERNEL_SHELL=y CONFIG_PRINTK=y #I2C Stuff CONFIG_I2C=y CONFIG_RTC=y CONFIG_RTC_PCF8523=y #SPI Stuff CONFIG_SPI=y CONFIG_SPI_NOR=y CONFIG_FLASH=y
And my SPI and flash device definitions:
&spi3 { compatible = "nordic,nrf-spim"; status = "okay"; cs-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; pinctrl-0 = <&spi3_default>; pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; w25q64: w25q64jv@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <80000000>; jedec-id = [ef 40 17]; size = <0x4000000>; has-dpd; t-enter-dpd = <3500>; t-exit-dpd = <3500>; status = "okay"; }; };
Currently there isn't any parition definitions of the space on the external flash, however they will be added later when I add a filesystem for storage later in the project.
I've done a fair amount of searching and havn't been able to find anything that has fixed this issue. Any help would be very appreciated.
Thank you.