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.

Error[Pe1696]: cannot open source file with IAR

Other Parts Discussed in Thread: CC2530

I am trying to compile sensor demo from ti.

 

The error log is as follows:

 

Building configuration: Access Point - Debug
Updating build tree...
 
11  file(s) deleted.
Updating build tree...
bsp.c 
Fatal Error[Pe1696]: cannot open source file "bsp_board_defs.h" C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\Components\bsp\bsp.h 46
            searched: "C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\Components\bsp\"
            searched: "C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\Components\bsp\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\INC\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\INC\DLIB\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\.\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\..\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\c"
Error while running C/C++ compiler
demo_AP.c 
Fatal Error[Pe1696]: cannot open source file "bsp.h" C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\demo_AP.c 82
            searched: "C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\INC\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\INC\DLIB\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\.\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\..\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\c"
Error while running C/C++ compiler
mrfi.c 
Fatal Error[Pe1696]: cannot open source file "bsp_external/mrfi_board_defs.h" C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\Components\mrfi\mrfi_defs.h 46
            searched: "C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\Components\mrfi\"
            searched: "C:\Documents and Settings\Admin\Desktop\seensor_node_sample_ti\Components\mrfi\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\INC\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\INC\DLIB\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\.\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\..\"
            searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\inc\dlib\c"
Error while running C/C++ compiler
nwk_globals.c 
Fatal Error[Pe035]: #error directive: "<yvals.h>  compiled with wrong (version of IAR) compiler" C:\Program Files\IAR Systems\Embedded Workbench 5.3 Evaluation\430\INC\DLIB\yvals.h 31
Error while running C/C++ compiler
vlo_rand.s43
 
Total number of errors: 4
Total number of warnings: 0

 

 

  • Hi

    This problem can occur if you open the IAR project with a different version that the project was made on. Sometimes the included directories in the project can fall out, and the compiler do not know where to find the files.

    Go to Project -> Options -> C/C++ compiler -> Preprocessor and add the directories where the files can be found.

     

     

  • thks its working now...

  • Hi Martin

     

    Can you as well help with the Error[Pe020]: Identifier Undefined? Please...

     

    Best Regards 

    Harshith

  • Harshith

     

    A  Pe020 error usually means that you refer to some identifier that has not been defined in the code. For instace if you try to write a value to a variable that has not been intialized you will get this kind of error.

  • Dear Martin, Where we can find the additional directories for eZ430-fr2500? Please help me..

  • Hi Jino

    Could you please elaborate. I'm not sure I know which additional directories you are asking about? 

  • Thanks Martin.. I have fixed that error by refering your previous posts.. Now I am trying trying to load the wireless sensor demo program slac139g using IAR but its not working. Can u help me in dis regard? Once again thank u so much for your help.. Can u send me the correct program??

  • Hi Jino

    Could you please elaborate what you mean by not working. Are you able to program the device or do you get any warnings or errors when you compile?

  • Hi Martin,

    I followed your instructions.. it worked for all the directories except the following.. i could not find the header "msp430.h" anywhere in my system. please help me with this.. Thanks in advance

    Building configuration: nbc - Debug
    Updating build tree...
    EZ430 Wireless Mouse (GUI End Module Code).c EZ430-RF2500 Wireless Mouse (Mouse End).c main.c


    Fatal Error[Pe1696]: cannot open source file "msp430.h" C:\Texas Instruments\SimpliciTI-IAR-1.2.0\Components\bsp\mcus\bsp_msp430_defs.h 72
    searched: "C:\Texas Instruments\SimpliciTI-IAR-1.2.0\Components\mrfi\"
    searched: "C:\Texas Instruments\SimpliciTI-IAR-1.2.0\Components\mrfi\radios\family1\"
    searched: "C:\Texas Instruments\SimpliciTI-IAR-1.2.0\Components\bsp\"
    searched: "C:\Texas Instruments\SimpliciTI-IAR-1.2.0\Components\bsp\boards\EZ430RF\"
    searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\inc\"
    searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\inc\c\"
    Error while running C/C++ Compiler

    Total number of errors: 1
    Total number of warnings: 0

  • Hi

    Selvalakshmi Subramanian said:

    searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\inc\"
    searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\inc\c\"

    It looks like you are using the IAR arm version. You need the MSP version to run the sw.

  • Hi!

    I am trying to use the hal adc api and I have the same problem as described. i tried to fix with this solution but I can add file by file.

    How can I add alle the HAL directory?

    Regards,

    Filippo

  • How to add multiple files to a project? Just right click on the the project, select add files and select the files you want to add. Multiple files (in the same directory) can be selected. You cannot select a directory and get all the files in it, though. 

  • I am adding by right click using add files and using the group folder as well.

    I can acces the file in the editor window, but when I'm debugging I get that error.

  • Which error?

  • Fatal Error[Pe1696]: cannot open source file "hal_board_cfg.h" Z:\cc2530\adc\hal_board.h 1
    searched: "Z:\cc2530\adc\"
    searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\8051\inc\"
    searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\8051\inc\clib\"

    If I use directly the Zstack simpe application, it works fine.

    If I make my own worksapce to use the adc api, it does not and i get the above error.

  • Did you remember to update the include paths in the project options? 

    Including header files directly in the project doesn't mean that the compiler will find these files automatically when it encounters a #include <file.h> directive in a c file.

  •  

    Please try add the folder that contains 'hal_board_cfg.h' to the include directories in the IAR project options.  

    Project->Options->C/C++ Compiler, then select the Preprocessor tab and add the folder to the list of include directories.

  • Hi! I tried to input this to preprocessor but still the error is there.


    Fatal Error[Pe1696]: cannot open source file "MSP430_LCD.h" C:\Users\MarkBudz\Documents\MSP430G Projects\final project\main.c 5
    searched: "C:\Users\MarkBudz\Documents\MSP430G Projects\final project\"
    searched: "C:\Users\MarkBudz\Documents\MSP430G Projects\final project/../../../source/Components/utils\"
    searched: "C:\Users\MarkBudz\Documents\MSP430G Projects\final project/../../../source/Components/common\"
    searched: "C:\Users\MarkBudz\Documents\MSP430G Projects\final project/../../../source/Components/basicrf\"
    searched: "C:\Users\MarkBudz\Documents\MSP430G Projects\final project/../../../source/Components/targets/interface\"
    searched: "C:\Users\MarkBudz\Documents\MSP430G Projects\final project/../../../source/Components/assembly\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\inc\dlib\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\inc\"
    searched: "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\inc\dlib\c\"
    Error while running C/C++ Compiler


    Please help me. Thank you so much..