I am using MCUXpresso v11.1.0 build 3209 with a Kinetis K60 with an SDK for chip only, no development board. I can create a Hello World project and run it with semihosting. So far, so good.
But when I try to add a new file (using File > New > Other... > Source File) it adds the file to the Project window, but not to the make file. Every bit of code I add to the file is ignored.
So, how do I add files to make?
Solved! Go to Solution.
Well, the problem went away. I closed MCUXpresspo, reopened it, and it compiled without errors. I didn't do anything else to it.
Thanks for your help.
Could it be that the function in question (TwelveVTest()) is defined as static?
Erich
Well, I didn't do anything different for these files, and I don't see where to set that option. The help file, as usual, isn't much help. Nothing in the file is defined as "static".
How do I find out whether it is static?
I installed the new version of code; it doesn't make any difference.
Can you show us the source code? Difficult to know what’s wrong without it
Well, the problem went away. I closed MCUXpresspo, reopened it, and it compiled without errors. I didn't do anything else to it.
Thanks for your help.
The above solution only worked one time. What seems to be working more consistently is: always use Peripherals, AND Pins, AND Clocks. Save it, then click on Update Code, which is an icon that I can't find at the moment. Then choose Build from the Quick Start menu.
Make sure the file (or the folder) is not 'excluded'. The folder should have a 'C' on it and the source file shall have normal file extension (.c):
See Exclude Source Files from Build in Eclipse | MCU on Eclipse
I hope this helps,
Erich
The file has a ".C" extension, and a "C" on the icon. The file in question is TwelveVoltTest.C. It contains TwelveVTest(), which is called from the while loop below the "Hello World". The file "CANTest.C" behaves the same way when I call it, which I am not in this version for simplicity.
Here's a better one that also shows the error message in the Problems window.
What is the file extension? It needs to be .c . If that Does not help , take a screenshot of your project window and post it.
Yes, ".c" - not ".C" !
Just in case: here is where the file mapping is done:
Related to this: https://mcuoneclipse.com/2016/05/05/assembly-files-in-eclipse-cdt-projects/
I hope this helps,
Erich