1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 15:46:14 +01:00

fix objdump.sh

This commit is contained in:
Harald Barth 2020-09-26 22:28:29 +02:00
parent c3e17fcf04
commit 79201a911c

View File

@ -4,9 +4,10 @@
ARDUINOBIN=$(ls -l $(type -p arduino)| awk '{print $NF ; exit 0}') ARDUINOBIN=$(ls -l $(type -p arduino)| awk '{print $NF ; exit 0}')
PATH=$(dirname "$ARDUINOBIN")/hardware/tools/avr/bin:$PATH PATH=$(dirname "$ARDUINOBIN")/hardware/tools/avr/bin:$PATH
avr-objdump --private=mem-usage /tmp/arduino_build_233823/Blinkhabaplus.ino.elf LASTBUILD=$(ls -tr /tmp/arduino_build_*/*.ino.elf | tail -1)
avr-objdump --private=mem-usage "$LASTBUILD"
for segment in .text .data .bss ; do for segment in .text .data .bss ; do
echo '++++++++++++++++++++++++++++++++++' echo '++++++++++++++++++++++++++++++++++'
avr-objdump -x -C /tmp/arduino_build_233823/Blinkhabaplus.ino.elf | awk '$2 == "'$segment'" && $3 != 0 {print $3,$2} ; $4 == "'$segment'" && $5 != 0 { print $5,$6}' | sort -r avr-objdump -x -C "$LASTBUILD" | awk '$2 == "'$segment'" && $3 != 0 {print $3,$2} ; $4 == "'$segment'" && $5 != 0 { print $5,$6}' | sort -r
done done