Skip to content

Commit ca35560

Browse files
committed
add proper size formatting to travis reports
1 parent 7a68cef commit ca35560

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tools/common.sh

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function print_size_info()
55
elf_file=$1
66

77
if [ -z "$elf_file" ]; then
8-
#printf "sketch data rodata bss text irom0.text dram flash\n"
8+
printf "sketch iram0.text flash.text flash.rodata irom0.text dram0.data dram0.bss dram flash\n"
99
return 0
1010
fi
1111

@@ -20,17 +20,14 @@ function print_size_info()
2020
addr=${tokens[2]}
2121
if [ "$addr" -eq "$addr" -a "$addr" -ne "0" ] 2>/dev/null; then
2222
segments[$seg]=$size
23-
echo "segment[$seg]=$size"
2423
fi
2524
done < <(xtensa-esp32-elf-size --format=sysv $elf_file)
2625

27-
#total_ram=$((${segments[data]} + ${segments[bss]}))
28-
#total_flash=$((${segments[data]} + ${segments[rodata]} + ${segments[text]}))
29-
#printf "%-28s %-8d %-8d %-8d %-8d %-8d %-8d %-8d\n" $sketch_name ${segments[data]} ${segments[rodata]} ${segments[bss]} ${segments[text]} $total_ram $total_flash
26+
total_ram=$((${segments[dram0data]} + ${segments[dram0bss]}))
27+
total_flash=$((${segments[iram0text]} + ${segments[flashtext]} + ${segments[dram0data]} + ${segments[flashrodata]}))
28+
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
3029
return 0
3130
}
32-
#recipe.size.regex=^(?:\.iram0\.text|\.dram0\.text|\.flash\.text|\.dram0\.data|\.flash\.rodata|)\s+([0-9]+).*
33-
#recipe.size.regex.data=^(?:\.dram0\.data|\.dram0\.bss)\s+([0-9]+).*
3431

3532
function build_sketches()
3633
{

0 commit comments

Comments
 (0)