XMEGA fuses in source code or project settings

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

Everytime I debug my XMEGA project, I get a message:
"The device's EESAVE fuse is currently programmed, but the project settings does not specify that EEPROM should be preserved. Would you like to preserve the device's EEPROM during programming?"

I hit yes, then I get this message:
"The object file indicates initialized EEPROM data. Do you want to load this data?"

I want to skip both theses messages. How do I set the fuses in the project settings? I tried setting the fuses in the source code:

FUSES = {
    .byte[5] = FUSE_EESAVE,
};

And didn't work, by the way, is that the correct way of setting the fuses in the code?

Thanks.

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

Quote:
How do I set the fuses in the project settings
In the JTAG options. At least that's the case with other AVRs.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Are you referring to this window?

I tried unchecking the "Enable fuse warnings", no difference.
I tried checking the "Program EEPROM", no difference.

How do I set the fuses in the code?

Attachment(s): 

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

No that's the programming window, it has nothing to do with debug. You need to start a debug session then go to Debug > JTAG MK2 options

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Ok!, I found it. I checked on "Preserve EEPROM contents when reprogramming" chekcbox. That took care of the first warning. I am still getting the second warning:

Quote:
"The object file indicates initialized EEPROM data. Do you want to load this data?"

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

Well you are 50% there. :) May have to live with that, I haven't played with the Xmega that much yet.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I would guess that if you don't declare initale values for any of your eeprom data in your code then the second warning is likely to go...

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

Well, but I need the EEPROM with initialized data. You may say that if I want to preserve the EEPROM then the data is already initialized. But I need to have the default EEPROM values present in the source code.

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

Fetch them on initialization.

Bill