AnsweredAssumed Answered

Flash Config section

Question asked by Pietro di Castri on Apr 19, 2018
Latest reply on Apr 23, 2018 by Pietro di Castri

Good morning

I have an ugly issue with the compiler.

I want to define the configuration words in the source code. That's what I do

 

static __attribute__ ((section (".FlashConfig"))) const cfm_t _cfm =
{
.backkey[ 0 ] = 0x01,
.backkey[ 1 ] = 0x02,
.backkey[ 2 ] = 0x03,

......

 

The fields are expanded..

If in the startup file .s I use the original declaration

 

.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF7DFE

 

The linking process advices the FlashConfig section is too small to guest both data .That's what I expect.

Bit if I comment the assembly declaration, the C declared data _cfm  disappears. Simply it does not exist in the map file.

I don't find a reason why.

 

Suggestions??

 

Thank You

 

Pietro

Outcomes