Skip to content

Commit 7819196

Browse files
erwangotpambor
authored andcommitted
tests: flash: Enable test on stm32n6570_dk
Since no internal flash is available, provide the right configuration so the test can run on external flash for stm32n6570_dk. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent e1869ef commit 7819196

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

tests/drivers/flash/common/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ DT_CHOSEN_Z_FLASH := zephyr,flash
88

99
config TEST_DRIVER_FLASH_SIZE
1010
int "Size of flash device under test"
11-
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0) if SOC_FAMILY_STM32
11+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0) \
12+
if (SOC_FAMILY_STM32 && !SOC_SERIES_STM32N6X)
1213
default -1
1314
help
1415
Expected flash device size the test will validate against. If the flash driver does not
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_TEST_DRIVER_FLASH_SIZE=134217728

tests/drivers/flash/common/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
#if defined(CONFIG_NORDIC_QSPI_NOR)
1414
#define TEST_AREA_DEV_NODE DT_INST(0, nordic_qspi_nor)
15+
#elif defined(SOC_SERIES_STM32N6X)
16+
#define TEST_AREA_DEV_NODE DT_INST(0, st_stm32_xspi_nor)
1517
#elif defined(CONFIG_FLASH_RENESAS_RA_OSPI_B)
1618
#define TEST_AREA_DEV_NODE DT_INST(0, renesas_ra_ospi_b_nor)
1719
#elif defined(CONFIG_SPI_NOR)
@@ -26,6 +28,7 @@
2628
* fixed-partition nodes.
2729
*/
2830
#ifdef TEST_AREA
31+
2932
#define TEST_AREA_OFFSET FIXED_PARTITION_OFFSET(TEST_AREA)
3033
#define TEST_AREA_SIZE FIXED_PARTITION_SIZE(TEST_AREA)
3134
#define TEST_AREA_MAX (TEST_AREA_OFFSET + TEST_AREA_SIZE)

0 commit comments

Comments
 (0)