AnsweredAssumed Answered

Confusion between Data_seg and code_seg

Question asked by Vihaan Kumar on Jan 19, 2015
Latest reply on Jan 19, 2015 by Vihaan Kumar

Hi,

 

I have seen the following code and i have doubts

 

the prm file is having the following statements

 

test.prm

 

/*  commands */

PARAMETERS     INTO  PAGE_E0

/*end of prm file */

 

where the PARAMETERS is a sections having some constants and placed into the flash memory page_e0.

 

i have seen the PARAMETERS in the test.c file as

 

#pragma DATA_SEG __GPAGE_SEG    PARAMETERS    

/* PARAMETERS CONSTANTS */

#Pragma DATA_SEG DEFAULT

 

my doubt is PARAMETERS is a constant and located in the flash memory. What is th meaning of declaring it as DATA_SEG? Am i correct in assuming that the statement is not required. (May be the idea is to copy the variables from flash to ram but the statement is not required).

 

Thanks and regards,

VIhaan

Outcomes