-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
print_large_symbols: colorize symbols based on ram/flash
- Loading branch information
Showing
1 changed file
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
arm-none-eabi-nm --print-size --size-sort -t d binary.elf | ||
#!/bin/bash | ||
|
||
# highlight flash symbols in green | ||
|
||
F="binary.elf" | ||
if [ "$1" != "" ]; then | ||
F="$1" | ||
fi | ||
|
||
arm-none-eabi-nm --print-size --size-sort -t d "$F" | c++filt | | ||
python /dev/fd/3 3<<EOF | ||
import sys | ||
flashSections = set(['T', 't', 'R', 'r']) | ||
try: | ||
while True: | ||
line = raw_input() | ||
arr = line.split(' ') | ||
prefix = '' | ||
postfix = '' | ||
if len(arr) > 3 and arr[2] in flashSections: | ||
prefix = '\033[92m' | ||
postfix = '\033[0m' | ||
print prefix + line + postfix | ||
except EOFError: pass | ||
EOF |