Skip to content

Commit df91126

Browse files
de-nordicFrancescoSer
authored andcommitted
tests/bootloader/bl_validataion_neg: PM->DTS port in code
Code changes to make the test run with DTS partition definitions. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
1 parent 808d60f commit df91126

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • tests/subsys/bootloader/bl_validation_neg/src

tests/subsys/bootloader/bl_validation_neg/src/main.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,24 @@
66

77
#include <zephyr/ztest.h>
88
#include <fw_info.h>
9-
#include <pm_config.h>
109
#include <nrfx_nvmc.h>
1110
#include <zephyr/linker/linker-defs.h>
1211
#include <zephyr/sys/reboot.h>
1312
#include <zephyr/sys/util.h>
13+
#include <zephyr/storage/flash_map.h>
14+
#include <zephyr/devicetree.h>
1415
#include <bl_storage.h>
1516

17+
#ifdef CONFIG_PARTITION_MANAGER_ENABLED
18+
#include <pm_config.h>
1619
#define S0_SLOT_ADDRESS PARTITION_ADDRESS(s0_image)
1720
#define S0_SLOT_SIZE PARTITION_SIZE(s0_image)
1821
#define S1_SLOT_ADDRESS PARTITION_ADDRESS(s1_image)
22+
#else
23+
#define S0_SLOT_ADDRESS PARTITION_ADDRESS(s0_partition)
24+
#define S0_SLOT_SIZE PARTITION_SIZE(s0_partition)
25+
#define S1_SLOT_ADDRESS PARTITION_ADDRESS(s1_partition)
26+
#endif
1927

2028
/* These symbols are defined in linker scripts. */
2129
extern const uint32_t _ext_apis_size[];

0 commit comments

Comments
 (0)