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.
Part Number: MSP432P401R
Tool/software: Code Composer Studio
Hi All,
I can successfully copy and paste the contents of a C file into my .ino file and everything works, but I cannot figure out how to make functions in different .c files available in the .ino file. I read that the Arduino IDE's build process actually concatenates the files together before building. I would really like separate files. Does anyone have any wisdom for me?
Thanks,
Rob
If you are creating an Energia Sketch in CCS or importing an existing one then it will work with .ino files. The .cpp file will just get generated as part of the build process.
In this capture you can see the .ino in my project. The .cpp gets generated in the \Debug folder. It is shown as excluded so the it doesn't get built and linked twice.
As far as adding C files to your project you can do that as well. In my project you will notice that there is a john.c and john.h. However to use the functions in john.c I have to do this in my .ino file:
You can see the call to john() inside the loop as well.
Regards,
John
No problem. I have been meaning to figure out how to do that anyway.
Regards,
John