cancel
Showing results for 
Search instead for 
Did you mean: 

#pragma DATA_SEG : what does it do

raunaque
Associate II
Posted on November 08, 2004 at 00:37

#pragma DATA_SEG : what does it do

2 REPLIES 2
raunaque
Associate II
Posted on November 04, 2004 at 00:13

Hi

i am new to the field of firmware writing . I was just going through code and i came across the following statment

#pragma CONST_SEG

#pragma DATA_SEG

can anybody please explain what does these statement does.

Thanks

Ronnie
chander
Associate II
Posted on November 08, 2004 at 00:37

Hello Ronnie,

Any statement starting with pragma is a compiler directive. Hence in this case it depends upon compiler to compiler. It seems that you are using Metrowerks compiler, pragma DATA_SEG *** means that the variables of the below code are going to be placed in the RAM segment ***.

For detailes refer to the Metrowerks (Hiware) compiler manual.

Hope it helps