Dear all,
we want analyze stack usage details when we build TF-A for armclang compiler but we are not able generate stack usage details. sorry for long thread and question please go through and suggest way forward to perform stack analysis with TF-A armclang build.
as per https://trustedfirmware-a.readthedocs.io/en/latest/getting_started/initial-b... (section 2.3) when CC is set to armclang, GCC linker is used default (since the TF-A build system doesn’t currently support Arm Scatter files)
So when we try to generate stack usage details we will not be able to use GCC -fstack-usage and -fdump-ipa-calgraph since CC is set to armclang and these flags will be un-recognized.
Since we are building this for armclang we attempted to use following armlinker flags along with -g compiler flag (refer link:https://developer.arm.com/documentation/100748/0607/writing-optimized-code/e...). --info=stack, --calgrapth, --calgraph_output=text
But we end up with unrecognized options error for --info=stack, --calgrapth, --calgraph_output=text
This error occurs because GCC linker is used default as per above link section 2.3 (since the TF-A build system doesn’t currently support Arm Scatter files) So we end up with not having stack usage details generated.
Q1: Any suggestion to generate stack usage when CC=armclang and GCC linker is used by default.
Q2: if we attempt to change LD with armlink we will end up with "Fatal error: L6031U: Could not open scatter description file." https://trustedfirmware-a.readthedocs.io/en/latest/getting_started/initial-b... section 2.3 suggest that "that the default linker may be manually overridden using the LD variable" can you please let us know how to override LD with armlinker without getting scatter issue.
Using: armclang 6.6.2 version.
Thank you Shivakumar Diggi
tf-a@lists.trustedfirmware.org