File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ static int bs_custom_storage_erase(zcbor_state_t *cs)
2828
2929 const struct flash_area * fa ;
3030
31- rc = flash_area_open (FLASH_AREA_ID ( storage ), & fa );
31+ rc = flash_area_open (FIXED_PARTITION_ID ( storage_partition ), & fa );
3232
3333 if (rc < 0 ) {
3434 BOOT_LOG_ERR ("failed to open flash area" );
3535 } else {
36- rc = flash_area_erase (fa , 0 , FLASH_AREA_SIZE ( storage ));
36+ rc = flash_area_erase (fa , 0 , flash_area_get_size ( fa ));
3737 if (rc < 0 ) {
3838 BOOT_LOG_ERR ("failed to erase flash area" );
3939 }
Original file line number Diff line number Diff line change @@ -94,18 +94,18 @@ int flash_area_id_from_direct_image(int image_id)
9494 switch (image_id ) {
9595 case 0 :
9696 case 1 :
97- return FLASH_AREA_ID ( image_0 );
98- #if DT_HAS_FIXED_PARTITION_LABEL ( image_1 )
97+ return FIXED_PARTITION_ID ( slot0_partition );
98+ #if FIXED_PARTITION_EXISTS ( slot1_partition )
9999 case 2 :
100- return FLASH_AREA_ID ( image_1 );
100+ return FIXED_PARTITION_ID ( slot1_partition );
101101#endif
102- #if DT_HAS_FIXED_PARTITION_LABEL ( image_2 )
102+ #if FIXED_PARTITION_EXISTS ( slot2_partition )
103103 case 3 :
104- return FLASH_AREA_ID ( image_2 );
104+ return FIXED_PARTITION_ID ( slot2_partition );
105105#endif
106- #if DT_HAS_FIXED_PARTITION_LABEL ( image_3 )
106+ #if FIXED_PARTITION_EXISTS ( slot3_partition )
107107 case 4 :
108- return FLASH_AREA_ID ( image_3 );
108+ return FIXED_PARTITION_ID ( slot3_partition );
109109#endif
110110 }
111111 return - EINVAL ;
You can’t perform that action at this time.
0 commit comments