Skip to main content
raunaque
Associate III
November 7, 2004
Question

#pragma DATA_SEG : what does it do

  • November 7, 2004
  • 2 replies
  • 1142 views
Posted on November 08, 2004 at 00:37

#pragma DATA_SEG : what does it do

This topic has been closed for replies.

2 replies

raunaque
raunaqueAuthor
Associate III
November 3, 2004
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
November 7, 2004
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