-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
area: FlashbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Milestone
Description
Describe the bug
I add spi-nor flash for nrf52832 board, want to the external spi flash & nrf52832 internal flash work same times. but build error:
zephyr/drivers/flash/spi_nor.c:388:47: error: 'DT_JEDEC_SPI_NOR_0_ERASE_BLOCK_SIZE' undeclared here (not in a function)
zephyr/drivers/flash/spi_nor.c:409:22: error: 'DT_JEDEC_SPI_NOR_0_WRITE_BLOCK_SIZE' undeclared here (not in a function);
To Reproduce
Steps to reproduce the behavior:
- modify my board dts, add spi-nor flash tree:
&spi2 {
status = "ok";
sck-pin = <4>;
mosi-pin = <5>;
miso-pin = <13>;
cs-gpios = <&gpio0 15 0>;
w25x16vsi0: w25x16vsi@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <2000000>;
label = "W25X16VSI";
jedec-id = <0xEF 0x80 0x3a>;
size = <0x1000000>;
erase-block-size = <0x10000>;
write-block-size = <1>;
hold-gpios = <&gpio0 9 0>;
};
};
- modify my board default conf,add spi-nor flash config
CONFIG_SPI_2=y
CONFIG_SPI_2_NRF_SPI=y
CONFIG_FLASH=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_CS_WAIT_DELAY=5
CONFIG_SPI_NOR_PAGE_SIZE=256
CONFIG_SPI_NOR_SECTOR_SIZE=4096
CONFIG_FLASH_HAS_PAGE_LAYOUT=y
CONFIG_FLASH_PAGE_LAYOUT=y
- make, you can find undeclared DT_JEDEC_SPI_NOR_0_ERASE_BLOCK_SIZE & DT_JEDEC_SPI_NOR_0_WRITE_BLOCK_SIZE
Expected behavior
Build Pass & Spi-nor work well
Additional context
If the spi-flash be put in chosen, the DT_JEDEC_SPI_NOR_0_ERASE_BLOCK_SIZE & DT_JEDEC_SPI_NOR_0_WRITE_BLOCK_SIZE will be create
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &w25x16vsi0;
//zephyr,flash = &flash0;
};
but, remove the internal flash0 will cause other build error
Metadata
Metadata
Assignees
Labels
area: FlashbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug