AnsweredAssumed Answered

Error linker script

Question asked by quentin.therond on Nov 3, 2014
Latest reply on Nov 12, 2014 by Clive One
Hello,

I'm working on STM32f with ARM GCC and i'm trying to use linker script as below:

*.c
const TByte Variable[SIZE_OF_VECTOR] __attribute__ (section(".md5"));

*.ld
MEMORY
{
 md5rom (rx)          : ORIGIN = 0x0803FF00, LENGTH = 16   /* 16   Bytes  */
..
}

 .md5 : {
  *(.md5) /* MD5 Value */
  . = ALIGN(4);
 } >md5rom

*.bin
0003FED4   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................................
0003FF00   70 EC 28 8E  A3 84 A2 92  79 1D 33 2D  2B F4 43 DF                                                                                             p.(.....y.3-+.C.
0003FF2C

But when i use GDB with Jtag Link i have just 0xFF 0xFF .... at --0x3FF00 addr.

however when i dump the flash i don't have OxFF :
0003FED4   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................................
0003FF00   70 EC 28 8E  A3 84 A2 92  79 1D 33 2D  2B F4 43 DF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  p.(.....y.3-+.C.............................
0003FF2C   FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF  ............................................
 
Have you an idea of why i have 0xFF in Variable[SIZE_OF_VECTOR]???

Thank you

Outcomes