NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Count Trampolines
To count the number of trampolines that occur in your code, run the following command from a Windows DOS prompt ...
C:\> type file.map | perl -0777 -ne "s/^.*FAR CALL TRAMPOLINES\s*//s; s/\n\s*\n.*$//s; foreach (split/\n/) { ++$cnt if (m/[0-9a-f]{8}/); } print $cnt;"
Or this command from a Unix prompt ...
% cat file.map | perl -0777 -ne 's/^.*FAR CALL TRAMPOLINES\s*//s; s/\n\s*\n.*$//s; foreach (split/\n/) { ++$cnt if (m/[0-9a-f]{8}/); } print $cnt;'
Replace file.map with the name of your linker map file. A linker map file is created with the linker option -m file.
If there are no trampolines in your code, these commands produce no output.