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.

MSP430i2040 IAR Fatal Error[Pe035]: #error directive

Other Parts Discussed in Thread: EVM430-I2040S, MSP430I2041

Hello,

The example code is from "Example Code" folder of the EVM320-i2040SUBMTR Resources CD disc.

The IAR MSP430 version is  MSP430 6.30.

Open the workspace file ( C:\Users\abc\Desktop\Submeter i2040 8k_DC_THD_AUTO_OSR_IAR5.5_customer\Submeter i2040 8k_DC_THD_AUTO_OSR_IAR5.5\emeters.eww)

Go to the emeter-app-i2041 project and Clean then Rebuild all.

It will compile error then show the error messages as below.

Fatal Error[Pe035]: #error directive: "Failed to match a default include file" C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\430\inc\msp430.h 1807

1)  Projects -> Options -> C/C++ Compiler -> Preprocessor -> Defined symbols and add MSP430. 

     I try to add symbol but it still can't work.     

2)  I also try to use the IAR MSP430 5.5 to build code but it still can't compile successfully.

How can I fix this bug ?

Thanks,

**Attention** This is a public forum