@@ -76,7 +76,7 @@ class TockLoader:
7676 # - `start_address`: The absolute address in flash where apps start and
7777 # must be loaded.
7878 # - `order`: How apps should be sorted when flashed onto the board.
79- # Supported values: size_descending, None
79+ # Supported values: size_descending, size_ascending, None
8080 # - `size_constraint`: Valid sizes for the entire application.
8181 # Supported values: powers_of_two, (multiple, value),
8282 # None
@@ -94,7 +94,7 @@ class TockLoader:
9494 },
9595 "arch" : {
9696 "cortex-m" : {
97- "order" : "size_descending " ,
97+ "order" : "size_ascending " ,
9898 "size_constraint" : "powers_of_two" ,
9999 "alignment_constraint" : "size" ,
100100 }
@@ -1560,6 +1560,8 @@ def is_valid(slices):
15601560 # We use the order the apps were given to us.
15611561 pass
15621562 elif self .app_settings ["order" ] == "size_descending" :
1563+ apps .sort (key = lambda app : app .get_size (), reverse = True )
1564+ elif self .app_settings ["order" ] == "size_ascending" :
15631565 apps .sort (key = lambda app : app .get_size ())
15641566 elif self .app_settings ["order" ] == None :
15651567 # Any order is fine.
0 commit comments