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.

MSP430FR2433: How to include a .c source file?

Part Number: MSP430FR2433

I am trying to include a custom source file (.c) in my CCS project, for me to write out all of my function definitions.

Whenever I try to build the project I am getting this error:


#10056 symbol "init_GPIOs" redefined: first defined in "./init.obj"; redefined in "./main.obj" Actuator_Control C/C++ Problem

I only have the function defined once in the init.c file - why am I getting this error?

Actuator_Control.zip

  • If you #include the init.c file and have an init.obj object, that is your problem. You told the IDE about the .c file and it compiled it.

    Include it or compile separately, one or the other. Separate compilation is usually better.

  • CCS won't ask you about init.c, it will automatically add it (separately) to the build list. Right-click on the file name and "Exclude from build".

    [Edit: More generally, I agree with David -- unless there's a strong reason, don't #include it just build it separately.]

**Attention** This is a public forum