global variables in relocated sections

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

A while ago I asked a question about why I was getting a section type conflict when I relocated my boot section. It appears the problem has to do with trying to put global variables in the boot section. For example, the following statement will cause this error:
int a_global_variable; __attribute__ ((section (".bootloader")))

So,is it possible to have global variables in relocated sections by some other means?

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

Not easily, you gotta hack your custom loader script. This has been
discussed recently in the avr-gcc list.