SPI Flash - Parition Manager - QSPI config causing build errors

Hello! My starting point for this issue is a custom board using an nrf52832 and a SPI flash chip (MX25R1635F).

So far I have been able to initialize the SPI flash (the JEDEC ID is read and verified successfully), but I want to use it with the FCB system (currently working fine on internal flash).

I followed the instructions here  (or at least I tried to) to set up a partition in external flash that I can then reference when initializing the FCB. When I build, I'm getting hundreds of lines of errors, most along these lines:

Fullscreen
1
2
3
4
error: unknown type name 'NRF_QSPI_Type'; did you mean 'NRF_SPI_Type'?
967 | NRF_STATIC_INLINE void nrf_qspi_cinstr_long_transfer_start(NRF_QSPI_Type * p_reg,
| ^~~~~~~~~~~~~
| NRF_SPI_Type
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Along with

Fullscreen
1
2
zephyr/drivers/flash/nrf_qspi_nor.c:69:2: error: #error "No size specified. 'size' or 'size-in-bytes' must be set"
69 | #error "No size specified. 'size' or 'size-in-bytes' must be set"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This led me to try setting `CONFIG_NORDIC_QSPI_NOR=n` explicitly in my proj.conf, but it's still showing the same errors (even with PM_OVERRIDE_EXTERNAL_DRIVER_CHECK). When I look in the .config file in the build folder (snippet below), it's getting set back to `y`, but I can't find any clue as to why.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# Nordic nRF Connect
#
CONFIG_BOOT_BANNER_STRING="Booting nRF Connect SDK"
CONFIG_MBEDTLS_LIBRARY_NRF_SECURITY=y
CONFIG_WARN_EXPERIMENTAL=y
CONFIG_PRIVILEGED_STACK_SIZE=1024
CONFIG_MCUMGR_TRANSPORT_NETBUF_SIZE=2475
CONFIG_BT_BUF_CMD_TX_COUNT=2
CONFIG_ENTROPY_GENERATOR=y
CONFIG_INIT_ARCH_HW_AT_BOOT=y
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
# CONFIG_GETOPT is not set
# CONFIG_NCS_SAMPLES_DEFAULTS is not set
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Here are the rest of the relevant config snippets:

The flash device is configured in my overlay as below

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/ {
chosen {
nordic,pm-ext-flash = &mx25r1635;
};
zephyr,user {
io-channels = <&adc 0>, <&adc 1>;
tc-bias-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
};
aliases {
mx25r16 = &mx25r1635;
};
};
/* other configs */
&spi0 {
status = "okay";
compatible = "nordic,nrf-spi";
clock-frequency = <8000000>;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I have the following pm_static.yml

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
nvs_storage:
address: 0x7B000
end_address: 0x7D000
region: flash_primary
size: 0x2000
internal_fcb:
address: 0x7D000
end_address: 0x80000
region: flash_primary
size: 0x3000
external_fcb:
address: 0x000000
device: MX25R16
end_address: 0x1000000
region: external_flash
size: 0x1000000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The following is a snippet from my prj.conf

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Internal Flash/NVS
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_FLASH=y
CONFIG_IMG_MANAGER=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
CONFIG_MPU=y
CONFIG_SOC_FLASH_NRF_UICR=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y
# SPI Flash
CONFIG_SPI=y
# CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58=y
CONFIG_SPI_NOR=y
CONFIG_NORDIC_QSPI_NOR=n
CONFIG_PPI_TRACE=y
CONFIG_FCB=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

A handful of items in there were gleaned from various support tickets, but many of them may have been out of date. Anyway, I appreciate any guidance you can provide.

Thank you!