This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unrecognized #pragma Build error

Hi,

I am porting IAR Embedded workbench project source code to Code composer studio.5.5.0

The source code is building fine with IAR Embedded workbench IDE.MCU is msp430f2410.

I have below warning in CCS.

#163-D unrecognized #pragma misc.h line 41

=====================================

Source code in security.c line 41 to line 43

#pragma segment="CSTART"
#define CODE_START       ((WORD)(__segment_begin("CSTART"))) // Code start location
#define CAP_SETTING      (XCAP_0)                            // 0pF XIN/XOUT cap             

How to make this IAR compiling code compatible with CCS?

 

  • While pragmas are part of the C language, they are intentionally not portable.  Thus It is not surprising that you have these pragma porting issues.

    I repeat my earlier recommendation that you read the section titled Pragma Directives in the MSP430 compiler manual.

    I'm not an expert on the IAR compiler.  In this case it appears that you can achieve a similar effect with either the DATA_SECTION or SET_DATA_SECTION pragmas in the TI compiler.

    Thanks and regards,

    -George