Creating a memory section not loadable

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

Hell all,
I have created an external EXEEPROM section as shown below

#define EXEEPROM _attribute__((section(".exeeprom")))

and in makefile

LDFLAGS += -Wl,--section-start=.exeeprom=0x820000

In the program I have a structure of about 8K

This is creating a huge .hex file. I do not want the above section to be part of the main hex file. How can I do that. Thank you very much for your help.

Parthasaradhi Nayani

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

Use the -R option to avr-objcopy to remove the .exeeprom section.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Thanks a lot. It works.

Parthasaradhi Nayani

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

Don't use 0x820000 it's used for .fuse these days. 0x830000 is used for .lock and 0x840000 for .signature

I guess you could use 0x850000 but I'd use something well out of range like 0xA00000 perhaps?

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

Thanks for your advice Clawson. I will use, as suggested, 0xA00000.

Parthasaradhi Nayani