Adding files to MCUXpresso project

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding files to MCUXpresso project

Jump to solution
499 Views
GaryOlmstead
Contributor V

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?

0 Kudos
1 Solution
294 Views
GaryOlmstead
Contributor V

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.

View solution in original post

0 Kudos
10 Replies
294 Views
ErichS
Senior Contributor II

Could it be that the function in question (TwelveVTest()) is defined as static?

Erich

0 Kudos
294 Views
GaryOlmstead
Contributor V

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?

0 Kudos
294 Views
GaryOlmstead
Contributor V

I installed the new version of code; it doesn't make any difference.

0 Kudos
294 Views
converse
Senior Contributor IV

Can you show us the source code? Difficult to know what’s wrong without it

0 Kudos
295 Views
GaryOlmstead
Contributor V

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.

View solution in original post

0 Kudos
294 Views
GaryOlmstead
Contributor V

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.

0 Kudos
294 Views
ErichS
Senior Contributor II

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):

pastedImage_1.png

See Exclude Source Files from Build in Eclipse | MCU on Eclipse 

I hope this helps,

Erich

0 Kudos
294 Views
GaryOlmstead
Contributor V

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.

MCUXpresso Screen Shot BPv4.png

0 Kudos
294 Views
GaryOlmstead
Contributor V

Here's a better one that also shows the error message in the Problems window.MCUXpresso Screen Shot BPv4 better.png

0 Kudos
294 Views
converse
Senior Contributor IV

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.

0 Kudos