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.

cannot open .out file

Other Parts Discussed in Thread: MSP430G2231

I am new to CCS, and I tried to write a simple hello world 

#include <stdio.h>


void main(void) {
printf("Hello World!\n");
}

but when I start debugging it , an error appears. It said "Encountered a problem loading file: D:\test\helloworld\debug\helloworld.out Could not open file.

I figured out if I didn't write printf in main there was a .out file in debug folder and I also tried that if I used functions like fprintf and fopen, the .out file will disappear.

how to deal with this problem?

  • Hi Xiaoxia,

    what target and version of CCS do you use?   With little information one of the only things I can suggest would be to ensure youre compiler options has printf support turned on.  If you go to project->properties you will likely find the printf settings in build->_____ Compiler->Advanced options->Library Function Assumptions  (as an example).

    Best Regards,
    Lisa

  • Hi Lisa,

    Thank you for replying, I am using CCS V5. I went to project->properties you will likely find the printf settings in build->_____ Compiler->Advanced options->Library Function Assumptions and changed level of printf support required to full but it still gives me the same error. Do I need to click other options such as File contains an RTS Library function?

  • Hi Xiaoxia,

    printf support varies for different devices.  What specific target and specific ccs version are you using?  Have you tried the "hello world" example for your target?

    Best Regards,
    Lisa

  • Hi Lisa,

    Eventually,I want to learn programming  msp430g2231 and I new to CCS so I tried to example project "hello world". I am using CCS 5.1 now and create CCS project with the example hello world code and got the error.

  • HI Xiaoxia,

    first of all my comment would be the value line parts are not large/powerful enough to handle printf functionality.   I think this is a large part of the issue.  Have you tried a blink LED?   Also I would strongly recommend the latest ccs version which is v5.3.

    Best Regards,
    Lisa