File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,20 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
4343 (DT_GPARENT(DT_NODELABEL(label))))))
4444
4545#ifdef CONFIG_USE_DT_CODE_PARTITION
46- #define FLASH_LOAD_OFFSET DT_REG_ADDR(DT_CHOSEN(zephyr_code_partition))
46+ #define FLASH_LOAD_ADDRESS \
47+ (DT_REG_ADDR(DT_CHOSEN(zephyr_code_partition)) + \
48+ DT_REG_ADDR(COND_CODE_1(DT_FIXED_SUBPARTITION_EXISTS(DT_CHOSEN(zephyr_code_partition)), \
49+ (DT_GPARENT(DT_PARENT(DT_CHOSEN(zephyr_code_partition)))), \
50+ (DT_GPARENT(DT_CHOSEN(zephyr_code_partition))))))
51+ #define PARTITION_IS_RUNNING_APP_PARTITION (label ) \
52+ (FIXED_PARTITION_ADDRESS(label) <= FLASH_LOAD_ADDRESS && \
53+ FIXED_PARTITION_ADDRESS(label) + DT_REG_SIZE(DT_NODELABEL(label)) > FLASH_LOAD_ADDRESS)
4754#elif defined(CONFIG_FLASH_LOAD_OFFSET )
4855#define FLASH_LOAD_OFFSET CONFIG_FLASH_LOAD_OFFSET
49- #endif
50-
5156#define PARTITION_IS_RUNNING_APP_PARTITION (label ) \
5257 (DT_REG_ADDR(DT_NODELABEL(label)) <= FLASH_LOAD_OFFSET && \
5358 DT_REG_ADDR(DT_NODELABEL(label)) + DT_REG_SIZE(DT_NODELABEL(label)) > FLASH_LOAD_OFFSET)
59+ #endif
5460
5561sys_snode_t soc_node ;
5662
You can’t perform that action at this time.
0 commit comments