hello!
I'm currently looking for a way to access the nor flash of the nRF7002DK, does anyone have an example of this?
My goal is to write, read and erase data to the nor flash of the nRF7002DK!
PS: I tried to use the example provided by nor flash, SPI_flash, but I was not able to compile it.
C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:91:41: error: '__device_dts_ord_DT_N_ALIAS_spi_flash0_ORD' undeclared (first use in this function)
Error!
C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:91:41: error: '__device_dts_ord_DT_N_ALIAS_spi_flash0_ORD' undeclared (first use in this function) 91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~~~ C:/ncs/v2.7.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT' 137 | #define _DO_CONCAT(x, y) x ## y | ^ C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:91:33: note: in expansion of macro '_CONCAT' 91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~ C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:228:37: note: in expansion of macro 'DEVICE_NAME_GET' 228 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id)) | ^~~~~~~~~~~~~~~ C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:245:34: note: in expansion of macro 'DEVICE_DT_NAME_GET' 245 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id)) | ^~~~~~~~~~~~~~~~~~ D:/vscode/spi_flash_1/src/main.c:195:42: note: in expansion of macro 'DEVICE_DT_GET' 195 | const struct device *flash_dev = DEVICE_DT_GET(DT_ALIAS(spi_flash0)); | ^~~~~~~~~~~~~ C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:91:41: note: each undeclared identifier is reported only once for each function it appears in 91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~~~ C:/ncs/v2.7.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT' 137 | #define _DO_CONCAT(x, y) x ## y | ^ C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:91:33: note: in expansion of macro '_CONCAT' 91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~ C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:228:37: note: in expansion of macro 'DEVICE_NAME_GET' 228 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id)) | ^~~~~~~~~~~~~~~ C:/ncs/v2.7.0/zephyr/include/zephyr/device.h:245:34: note: in expansion of macro 'DEVICE_DT_NAME_GET' 245 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id)) | ^~~~~~~~~~~~~~~~~~ D:/vscode/spi_flash_1/src/main.c:195:42: note: in expansion of macro 'DEVICE_DT_GET' 195 | const struct device *flash_dev = DEVICE_DT_GET(DT_ALIAS(spi_flash0)); | ^~~~~~~~~~~~~ [15/54] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\ce3b5ff664\opt\bin\cmake.EXE' --build 'd:\vscode\spi_flash_1\build'