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.

CCS/EK-TM4C1294XL: New Project Based on enet_io. Modified file driver/pinout.c in new project. File was modified in enet_io.

Part Number: EK-TM4C1294XL

Tool/software: Code Composer Studio

I am working on CCS7.  I have a EK-TM4C1294XL.

I made a new project by copying enet_io and renaming it.

To this project I wanted to add an LED on PF1. Looking at the code I concluded I needed to configure the pin as an output similar to how a port N pint was confired as output in the file drivers/pinout.c.

Right after the existing code on line 170  as follows:

    // Default the LEDs to OFF.
    //
    ROM_GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0 | GPIO_PIN_1, 0);

I made the following change to add new code to the file and saved it.

//
     // Set PF1 for GIPO Output and high.
     //

     //GPIODirModeSet(uint32_t ui32Port,uint8_t ui8Pins,uint32_t ui32PinIO)
     //GPIODirModeSet(GPIO_PORTF_BASE,GPIO_PIN_1,GPIO_DIR_MODE_OUT)

     // Wait for the GPIO F to come out of reset.
       //
     while(!MAP_SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOF))
     {
     }
 //    MAP_GPIODirModeSet(GPIO_PORTF_BASE,GPIO_PIN_1,GPIO_DIR_MODE_OUT);
 //    GPIOPinConfigure(GPIO_PF1_EN0LED2); // FLE on 20180626
     ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1);
     MAP_GPIOPadConfigSet(GPIO_PORTF_BASE, GPIO_PIN_1,GPIO_STRENGTH_12MA, GPIO_PIN_TYPE_STD);

     //Lets send it high.
     ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, GPIO_PIN_1 );
     //Lets send it low.
     ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, 5);
     //Lets send it high.
     ROM_GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, GPIO_PIN_1 );


When I open the pinout.c file in the original enot_io project my changes are in it too.

How was I to know this would happen?  What is this file behavior called and where should I read about it.
Is there documentation to tell me how I should go about writing code that does not have unexpected shared files with outer projects and for example mess up the examples?

  • Oops, I should have been more clear. I edited the file /driver/pinout.c in the new project.
  • Hi Forrest,

    That is a good question. When that project was originally created, the file "pinout.c" was included as a link instead of being copied into the project directory. When you copied that project, it copied the link. There is a subtle indication when you view the file list in "Project Explorer". Notice in the snippet below that the icon for the file "pinout.c" has a small arrow in the lower right corner. That means this is a link. Compare that to the icon for the file cgifuncs.c. No small arrow means a copy of this file exists in the project.

  • You can right-click on the link and select properties. Here you can see that actual file location.

    You can delete the link and then paste a copy of the same file in your projects. Now edits will be to only the copy in your new project.

  • Wow Bob - this was 'unexpected.'          And - if encountered by one Bartholomew Simpson - would surely warrant an, 'Ay Caramba!'

    Very well explained (although that tiny arrow is (very) hard to detect - an 'altered color' would have been FAR better noted - don't you agree?

    Poster's most reasonable - & excellently detected request - leads to these points:

    • is such a 'high detail' listed w/in CCS documentation - and in a well 'notable' format?
    • what other 'surprises' - similar & unexpected (as was this one) await your client users?    (Surely there is (some) listing... should not that be shared?)
    • why does (only) 'pinout.c' - and not the armada of  '.h files' - appear under 'drivers'?      (as 'utils' lists a .h file - for consistency - should not 'drivers' do so - as well?)

    Your mastery of such 'insider info' is acknowledged - yet one cannot help believing that 'better presentation & promotion' of such 'gotchas' - would reduce the demands upon vendor staff...    And that's a valid vendor goal (or should be) don't you think?

    BTW - kudos to poster/user 'Forrest' - for (both) detecting this issue - and then, 'effectively presenting it'  here - for 'insider' resolution...

  • Hello Bob,

    Very nice explanation of the root cause of the problem I had. Once I knew what to call the problem, Linking instead of Copying, it was easy to learn more.

    I found a nice youtube at:  youtube.com/watch?v=ngp3b6ZhT8U

    Using your method to find the path to the file I copied it.  I then selected the project. Right clicked and selected too add a file.
    I got this dialog and selected to Copy file.



    Bingo the file is now in my project.

    Then I deleted the linked file.

    Got this warning

    Selected OK.

    I hammered the project (Build ...) and ran in Debug.
    It worked.

    1000 Thanks,

  • My issue is resolved.

    Thanks everyone.

  • Those participating are glad that your issue has been resolved.     That said - this thread has (already) started to 'Rotate into Forum Oblivion' - rarely (if ever) to be seen again.

    It is doubtful that the issue you encountered stands alone - thus the request for some 'satisfactory' (i.e. notable/findable) 'LISTING' of such 'unexpected' (and troubling - and KNOWN) IDE mechanisms.   (aka 'gotchas')

    It is 'good' that you were served - yet are not others doomed - to fall from that same high (and unmarked) cliff?      

    The proposed 'Known IDE issue listing'  will serve MANY - saving them from (unnecessary) frustration & delay.        

    Saving 'many'  trumps 'saving one' - it's unfortunate that the 'list request' (benefiting many) has now been (somewhat) obscured...