Keil Logo

ARM: How can I view the assembly and code for the entire application?


Information in this knowledgebase article applies to:

  • MDK-ARM
  • fromelf v6.9.0.8

QUESTION

I want to compare the generated assembly of one entire project to another. I already know that I can view this type of information in the Disassembly window, in a debug session. Is there a way to view both the code and the corresponding assembly of an image, inside a text file?

Answer

Yes, use the fromelf utility, with the "--interleave" option.

To set this up in a Target in your project:

  1. In Options for Target => User tab, enable a Run checkbox.
  2. Underneath the After Build/Re-build section. Enter the following command:
    fromelf $PObjects\%L --disassemble --interleave=source  --text -c --output=outfile.lst
    
            *
            This term specifies the *.axf file and its path, using µVision key sequences
    

Then try to build the project. After the build and link stages are successful, then the User command will be executed. Review the file "outfile.lst" in the main project folder.

Notes:

  • The "Objects" folder is a child folder, in your projects root folder (i.e. where the *.uvproj(x) file resides). The name of the output folder in the MDK-ARM project can be overriden, but it is usually still in the same location. If unknown, look in Options for Target => Output tab => "Select Folder for Objects".
  • The generated assembly in the output is in ARM assembly syntax.
  • In this writing (March 2018), the "--disassemble" option requires an ARM license.

MORE INFORMATION

  • Learn more about the fromelf utility.

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, March 27, 2018


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.