Merge remote-tracking branch 'public/pr/2849' into baremetal

This commit is contained in:
Simon Butcher 2019-09-24 15:29:55 +01:00
commit bf77960368

View file

@ -67,6 +67,18 @@ fi
date=$( date +%Y-%m-%d-%H-%M-%S )
print_rom_report()
{
echo "ROM statistics written to:"
echo "* $ROM_OUT_FILE"
echo "* $ROM_OUT_SYMS"
<$ROM_OUT_FILE awk '$4 ~ /libmbedcrypto/ {printf("%15s: %5s Bytes\n", $4, $5)}'
<$ROM_OUT_FILE awk '$4 ~ /libmbedx509/ {printf("%15s: %5s Bytes\n", $4, $5)}'
<$ROM_OUT_FILE awk '$4 ~ /libmbedtls/ {printf("%15s: %5s Bytes\n", $4, $5)}'
<$ROM_OUT_FILE awk '$4 ~ /libmbed/ {sum += $5} END {printf("%15s: %5d Bytes\n", "total", sum)}'
}
baremetal_build_gcc()
{
echo "Cleanup..."
@ -102,14 +114,7 @@ baremetal_build_gcc()
echo "Generate symbol statistics..."
./scripts/extract_codesize_stats.sh --info "gcc_${gcc_ver}" --name $NAME --syms > $ROM_OUT_SYMS
echo "ROM statistics written to:"
echo "* $ROM_OUT_FILE"
echo "* $ROM_OUT_SYMS"
# Print summary
cat $ROM_OUT_FILE | grep "libmbedtls.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
cat $ROM_OUT_FILE | grep "libmbedcrypto.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
cat $ROM_OUT_FILE | grep "libmbedx509.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
print_rom_report
}
baremetal_build_armc5()
@ -149,14 +154,7 @@ baremetal_build_armc5()
echo "Generate symbol statistics..."
./scripts/extract_codesize_stats.sh --info "armc5_${armc5_ver}" --name $NAME --syms > $ROM_OUT_SYMS
echo "ROM statistics written to:"
echo "* $ROM_OUT_FILE"
echo "* $ROM_OUT_SYMS"
# Print summary
cat $ROM_OUT_FILE | grep "libmbedtls.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
cat $ROM_OUT_FILE | grep "libmbedcrypto.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
cat $ROM_OUT_FILE | grep "libmbedx509.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
print_rom_report
}
baremetal_build_armc6()
@ -194,14 +192,7 @@ baremetal_build_armc6()
echo "Generate symbol statistics..."
./scripts/extract_codesize_stats.sh --info "armc6_${armc6_ver}" --name $NAME --syms > $ROM_OUT_SYMS
echo "ROM statistics written to:"
echo "* $ROM_OUT_FILE"
echo "* $ROM_OUT_SYMS"
# Print summary
cat $ROM_OUT_FILE | grep "libmbedtls.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
cat $ROM_OUT_FILE | grep "libmbedcrypto.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
cat $ROM_OUT_FILE | grep "libmbedx509.a" | awk '{printf( "%15s: %s Bytes\n", $4, $5)}'
print_rom_report
}
# 32-bit host-build of library, tests and example programs,