Jonathan Eggins

Illegal Pragma Warnings - DATA_SEG

Discussion created by Jonathan Eggins on May 5, 2011
Latest reply on May 9, 2011 by CrasyCat

Hi all,

 

We are porting a legacy Motorola code base to the ColdFire platform (5235) and are having issues with declaring variables in external memory. 

 

For example, when we use the following directives:

 

#pragma DATA_SEG sram_data /* this causes an illegal pragma warning */

 

The precompiler throws a warning "illegal pragma" and puts the variables in internal RAM. Other more benign pramgas are OK:

 

#pragma suppress_warnings off /* this does not cause an illegal pragma warning */
#pragma aligncode off /* this does not cause an illegal pragma warning */

 

It has got us confused, as this should be dead simple, and should just work? Is it possible that our lcf file memory segment definitions have issues, or our project setup has issues?

 

Any help or clues or workarounds would be greatly appreaciated. Thanks.

 

Cheers,

Jon

Outcomes