Constant at fixed address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I need a help. I'm trying to solve a problem for weeks.
I have a embeded software that is a boot loader. It puts the boot load version at a specific address.
My memmory starts at 0x400000 with 0x1400 size. My constant version string value must be placed @0x401000 with 8bytes length.
If I place this const value into a section like this:

 const unsigned char Version[8] __attribute__ ((section (".bootversion")))  = "V1.0.1a";

I got this error:

section .bootversion LMA [00401000,00401007] overlaps section .text LMA [00400000,00401013]collect2.exe(0,0): error: ld returned 1 exit status

I have already tried to split flash memmory using linker script but it does not worked.
I wish to find something like "automatic" split.

For example, this code was compiled using ARM Keil. With ARM Keil I have the attribute that makes all the magic :
 const unsigned char Version[8] __attribute__((at(0x0401000))) = "V1.0.1a";

I dont know if is possible to have something as pratical as ARM Keil attribute in GCC.

I really need make this thing work.
If this is not the best channel to ask, please, could you recommend me one?

Thank you very much!



Henrique Coser

Engenharia



TEX Equip.Eletronicos Ind.e Com.Ltda.

Fone: (+5511) 4591-2825

henrique.coser@xxxxxxxxxx<mailto:compras@xxxxxxxxxx>

MEDIR PARA MELHORAR!




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux