add proper size formatting to travis reports
This commit is contained in:
parent
7a68cefaa0
commit
ca35560413
@ -5,7 +5,7 @@ function print_size_info()
|
|||||||
elf_file=$1
|
elf_file=$1
|
||||||
|
|
||||||
if [ -z "$elf_file" ]; then
|
if [ -z "$elf_file" ]; then
|
||||||
#printf "sketch data rodata bss text irom0.text dram flash\n"
|
printf "sketch iram0.text flash.text flash.rodata irom0.text dram0.data dram0.bss dram flash\n"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -20,17 +20,14 @@ function print_size_info()
|
|||||||
addr=${tokens[2]}
|
addr=${tokens[2]}
|
||||||
if [ "$addr" -eq "$addr" -a "$addr" -ne "0" ] 2>/dev/null; then
|
if [ "$addr" -eq "$addr" -a "$addr" -ne "0" ] 2>/dev/null; then
|
||||||
segments[$seg]=$size
|
segments[$seg]=$size
|
||||||
echo "segment[$seg]=$size"
|
|
||||||
fi
|
fi
|
||||||
done < <(xtensa-esp32-elf-size --format=sysv $elf_file)
|
done < <(xtensa-esp32-elf-size --format=sysv $elf_file)
|
||||||
|
|
||||||
#total_ram=$((${segments[data]} + ${segments[bss]}))
|
total_ram=$((${segments[dram0data]} + ${segments[dram0bss]}))
|
||||||
#total_flash=$((${segments[data]} + ${segments[rodata]} + ${segments[text]}))
|
total_flash=$((${segments[iram0text]} + ${segments[flashtext]} + ${segments[dram0data]} + ${segments[flashrodata]}))
|
||||||
#printf "%-28s %-8d %-8d %-8d %-8d %-8d %-8d %-8d\n" $sketch_name ${segments[data]} ${segments[rodata]} ${segments[bss]} ${segments[text]} $total_ram $total_flash
|
printf "%-28s %-8d %-8d %-8d %-8d %-8d %-8d %-8d %-8d\n" $sketch_name ${segments[iram0text]} ${segments[flashtext]} ${segments[flashrodata]} ${segments[dram0data]} ${segments[dram0bss]} $total_ram $total_flash
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
#recipe.size.regex=^(?:\.iram0\.text|\.dram0\.text|\.flash\.text|\.dram0\.data|\.flash\.rodata|)\s+([0-9]+).*
|
|
||||||
#recipe.size.regex.data=^(?:\.dram0\.data|\.dram0\.bss)\s+([0-9]+).*
|
|
||||||
|
|
||||||
function build_sketches()
|
function build_sketches()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user