AS 6.2 creates invalid ELF file

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

Happy that 6.2 now supports saving an ELF file, but it doesn't seem to work, it creates an ELF file that does not work. Has anyone else tried saving to an ELF?

I created an ELF from both AS 6.2 and AVR Studio 4. Attached are the files.

Attachment(s): 

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

AS6.x have always created an .elf output file. You don't need to save anything specifically, just build your project and .elf file will appear in the project directory. Deep inside the file tree, but it will.

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

No, I want to use the new feature added in 6.2. It creates an ELF file from different files (Flash, EEPROM, Signature...)

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

Ah, ok. Then I don't know, have not installed 6.2 yet.

Does it work when you save as 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

Yes, saving HEX files works ok.

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

Sounds like a bug report is in order.

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

One obvious error in the AS 6.2 ELF file is its size. It was created from a HEX file that contained the entire flash (256KB), but the ELF file is only 66KB. Another error is that opening the ELF file with a HEX editor reveals mostly 0xFF.

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

alexru wrote:
Sounds like a bug report is in order.
Will do.

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

I also think I saw something about this internally. Something with sectioned hex files. Will need to check into it on Monday.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

From our internal bugtracker:

Quote:
The hex read from the device contains more that one sections, which is not supported by Studio Backend.

As you have tried, this issue is even reproducible if you read the .hex file from the device, and flash the same .hex.
In other words, it is not specific to the production file, it about the handling of .hex file in general by Studio.

Workaround:
Use the .hex and .eep file generated as part of building the project.

Internal reference is TSD-3020 and AVRSV-5115

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Ok, is it ever going work?
It does work on AVR Studio 4.

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

Grad to hear that Studio had production file like AVR Sutdio 4. Look like it still not working for Studio 6.2 Beta

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

It should work if you provide hex and eep files to the dialog. The issue is when you try to read some section from the chip itself.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

But I had try both. AVR Studio 4 is recording the process of programming, then save it to the ELF. Studio 6.2 Beta is setting. Actually how Studio 6.2 Beta set the LockBit?
:) :)
-------------------
CS

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

I'm finding this same issue is still present with AS v6.2 sp2. Is the issue going to be addressed?

 

We have several projects which are built under AS 6.2 and we need to create production files. The flash map for the products have a boot loader, main code, and audio files all loaded into the flash in separate sections. At the moment we have to use a separate machine with AS4 loaded onto it to create production files but this isn't an ideal solution.

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

I am having the same issue with my ELF file. It seems the flash part is getting currupted.

 

I am using  AS studio for a boot loader, my main application was created using mikro C compiler.

 

I combined both Hex files to one, that file works well.

 

But issue is with the ELF file which comprise of my HEX and fuse.

 

I am using the ATxmega256A3BU ,but my ELF files for ATMEGA1284P works correctly

 

I will try downloading updates to AS to see if that helps. 

 

Thanks

Regards

DJ

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

I am using the ATxmega256A3BU ,but my ELF files for ATMEGA1284P works correctly

Rubbish - not possible.

But issue is with the ELF file which comprise of my HEX and fuse.

What "issue"?

 

If you are saying "how do I get the MikroC hex data into the AS generated ELF that already has b/l hex and fuses" the answer is generally "you don't". Why not just ELF program the AS file and then use the bootloader to deliver the other hex?

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

Just released the issue is in relation to sizes being above 64K.

My app on the ATMEGA1284p is far less, maybe that is why it worked

 

What I have done for for the XMEGA, is

 

1.Program the bootloader created using AS.

2.Then convert the Mikro C generated HEX into  a binary file.

3.Then program that binary file using the bootloader.

4.Then read out the entire flash using JTAGICE 3, this produces a hex file with both the APP and Bootlaoder.

 

Now i am trying to create a ELF file using that Hex file.

 

Thanks

Regards

DJ

Last Edited: Mon. Jul 6, 2015 - 09:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mikro C compiler....oh dear.

Maybe worth considering another compiler...just my 2 cents worth

 

Paul

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

Wish I could, but using Visual TFT.

 

I have just downloaded latest copy of the Atmel Studio 6 (Version: 6.2.1563 - Service Pack 2)

 

It seems that the problem is solved, but will be doing more test to confirm this,

Thanks

Regards

DJ