VERY large ELF file for a UC3C0512C project.

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am generating a 57 Megabyte ELF file.  The hex file is only 399 K.

 

Everything seems to work (Atmel Studio 7) but I don't get why the ELF file is so large.  Has anyone seen this before?  I went back and sure enough it was happening under AS 6.2 as well.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Probably debugging information. It can be quite big for projects with large number of source files and long paths.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I changed also from Studio 6.2 to 7.0 and I have the same problem. 

The elf-file in "release" has the same size as in "debug".

Project uc3b256: Release-Size in Studio 6.2 is 270 kByte, Release-Size in Studio 7.0 is 23.629 MByte !!!!

What's going wrong here?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have a look at Project -> xxx Properties -> Toolchain
Select the Release Configuration then look at AVR32/GNU Linker -> General
Tick the Omit all symbol information (-s) item.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you paste the linker map file's contents? I suspect some section got placed at a weird address, and the linker filled the resultant "hole", resulting in a huge ELF.

Regards

Senthil

 

blog | website

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi mikech,

 

thank you for fast answering. You are right! After making the checkmark at "Omit all symbol information (-s) " the elf file has a "programmable size" smiley.

 

Regards,

Willi

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

wschulte wrote:
 the elf file has a "programmable size" smiley

What do you mean by that?

 

Surely, any programmer that accepts ELF files will be able to sort out the programming image from the other data - and won't be fazed by it ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

I had the same question, but then did not send it, since I assumed that 29 MB is just inconvenient to communicate. Obviously programmer that understands ELF files will have no problem with debug information.

 

And if you really want to be sure, convert it to HEX.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:
 if you really want to be sure, convert it to HEX.

Yep - that's the way to do it!

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...