@@ -255,22 +255,32 @@ def color_entry(values):
255255 print ("</tr>" )
256256 print ("</table>" )
257257
258- print ("<details><summary>Raw data</summary><blockquote>\n " )
259- print ("<table>" )
260- for soc , board in sorted ((ALL_BOARD_DATA [board ]['soc' ], board ) for board in artifact_boards ):
261- print (f"<td><code>{ board } </code></td>" )
262- print (f"<td><code>{ soc } </code></td>" )
263- print (f"<td><pre>" )
264- sorted_regions = ['FLASH' , 'RAM' ] + sorted (r for r in REGIONS_BY_SOC [soc ] if r not in ('FLASH' , 'RAM' ))
258+ print ("<details><summary>SoC-specific data</summary><blockquote>\n " )
259+
260+ for soc in sorted (list (set ([ ALL_BOARD_DATA [board ]['soc' ] for board in artifact_boards ]))):
261+ soc_boards = [ board for board in artifact_boards if ALL_BOARD_DATA [board ]['soc' ] == soc ]
262+ sorted_regions = sorted (r for r in REGIONS_BY_SOC [soc ] if r not in ('FLASH' , 'RAM' ))
263+ if not sorted_regions :
264+ continue
265+
266+ print (f"#### <code>{ soc } </code>\n " )
267+ print ("<table><tr><th><code>Board</code></th>"
265268 for r in sorted_regions :
266- used , total = BOARD_MEM_REPORTS [board ].get (r , ['' ,'' ])
267- print (f"{ r :>25} { used :8} { total :8} " )
268- print
269- for c in ('CONFIG_HEAP_MEM_POOL_SIZE' , 'CONFIG_LLEXT_HEAP_SIZE' , 'CONFIG_MBEDTLS_HEAP_SIZE' ):
270- if c in BOARD_CONFIGS [board ]:
271- print (f"{ c :>25} { BOARD_CONFIGS [board ][c ]:8} " )
272- print ("</pre></td></tr>" )
273- print ("</table></blockquote></details>" )
269+ print ("<th>{r}</th>" )
270+ print ("</tr>" )
271+ for board in sorted (soc_boards ):
272+ print (f"<tr><th><code>{ board } </code></th>" )
273+ for r in sorted_regions :
274+ if r in BOARD_MEM_REPORTS [board ]:
275+ print (f"<td>{ color_entry (BOARD_MEM_REPORTS [board ][r ]} </td>" )
276+ print ("</tr>" )
277+ print ("</table>\n " )
278+ # print()
279+ # for c in ('CONFIG_HEAP_MEM_POOL_SIZE', 'CONFIG_LLEXT_HEAP_SIZE', 'CONFIG_MBEDTLS_HEAP_SIZE'):
280+ # if c in BOARD_CONFIGS[board]:
281+ # print(f"{c:>25} {BOARD_CONFIGS[board][c]:8}")
282+ # print("</pre></td></tr>")
283+ print ("</blockquote></details>" )
274284
275285# --- Main Logic ---
276286
0 commit comments