mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Script to print the memory map
This commit is contained in:
22
boot/device/memory_map.awk
Normal file
22
boot/device/memory_map.awk
Normal file
@@ -0,0 +1,22 @@
|
||||
/data_section_start_ram/ { data_start = $1 }
|
||||
/data_section_end_ram/ { data_end = $1 }
|
||||
/bss_section_start_ram/ { bss_start = $1 }
|
||||
/bss_section_end_ram/ { bss_end = $1 }
|
||||
/liba_heap_start/ { heap_start = $1 }
|
||||
/liba_heap_end/ { heap_end = $1 }
|
||||
/framebuffer_start/ { framebuffer_start = $1 }
|
||||
/framebuffer_end/ { framebuffer_end = $1 }
|
||||
/stack_start/ { stack_start = $1 }
|
||||
/stack_end/ { stack_end = $1 }
|
||||
|
||||
function log_section(name, start, end) {
|
||||
printf("%s: 0x%x - 0x%x (0x%x = %d = %dK)\n", name, start, end, end-start, end-start, (end-start)/1024)
|
||||
}
|
||||
|
||||
END {
|
||||
log_section("DATA ", data_start, data_end);
|
||||
log_section("BSS ", bss_start, bss_end);
|
||||
log_section("HEAP ", heap_start, heap_end);
|
||||
log_section("FB ", framebuffer_start, framebuffer_end);
|
||||
log_section("STACK", stack_end, stack_start);
|
||||
}
|
||||
Reference in New Issue
Block a user