Jump to content
43oh

Recommended Posts

  • 4 months later...

Update to this answer -

In Energia 0101E0013 there is a new option which you must be sure is checked in order to get the source code included in the listing.

Go to the File menu, select Preferences, be sure there is a check mark next to "Include debug information in the output ELF file"

 

Without this the listing will just be assembly language.

 

@@energia perhaps an answer to the question about how to get a listing might be worth including in the FAQ?

 

 

As an asside: be aware that the optimization level changed a lot between Energia 0012 (-Os, i.e. optimize for size) and Energia 0013 (-O0, i.e., don't optimize).  So the code you get will depend a lot on which version of Energia you use.

[Edit: the change in optimization was unintentional, it has been reported and a fix is available.]

Link to post
Share on other sites
  • 3 weeks later...

I notice that listings generated this way contain source code for libraries, but not for the main sketch.  How do I make it list the source for the main program as well?

 

Would also be convenient if there was a way to get it to list the values of static constant variables (i.e. strings, etc.)

 

Thanks.

Link to post
Share on other sites

arm-none-eabi-objdump -h -S your_file.elf > your_file.lst

 

 

Thanks.  That seems to deal with the listing variables part.  (I had tried various options, but the help on -h did not make it a clear one to try.)

(Energia does not have a command for this, although it would be nice if it did.)

 

Now to figure out how to get the source for the main program included.

Link to post
Share on other sites

What is the fix for optimize for size?

 

Update to this answer -

In Energia 0101E0013 there is a new option which you must be sure is checked in order to get the source code included in the listing.

Go to the File menu, select Preferences, be sure there is a check mark next to "Include debug information in the output ELF file"

 

Without this the listing will just be assembly language.

 

@@energia perhaps an answer to the question about how to get a listing might be worth including in the FAQ?

 

 

As an asside: be aware that the optimization level changed a lot between Energia 0012 (-Os, i.e. optimize for size) and Energia 0013 (-O0, i.e., don't optimize). So the code you get will depend a lot on which version of Energia you use.

[Edit: the change in optimization was unintentional, it has been reported and a fix is available.]

Link to post
Share on other sites

What is the fix for optimize for size?

 

 

See this thread.  There is an interim file you can download which updates Energia with the fix.  (You probably have to create a 43oh account in order to download it.)

http://forum.43oh.com/topic/5876-energia-0101e0013-how-turn-on-optimization-for-tivacc3200/?p=51199

 

A workaround for an individual project is to use the optimization pragma (mentioned in one of my posts in the above thread).

 

Sorry my edit wasn't more informative to start with.  With multiple discussion boards I sometimes forget what has been covered in which forum.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...