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.

F3 Go declaration

I´m doing first contact with CCS 4 2 1 .

I don´t  unsertand how work F3 go declaration

F3 does not always jump to the declaration and it is hard to read and follow the soft

For example

in file TI_CC_hardware_board.h there are next defines

#define TI_CC_CSn_PxOUT         P3OUT
#define TI_CC_CSn_PxDIR          P3DIR
#define TI_CC_CSn_PIN              0x01

in file TI_CC_spi.c is the next function

void TI_CC_PowerupResetCCxxxx(void)
{
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;                WHEN I USE F3 OVER TI_CC_CSn_PxOUT, ccs jump to file TI_CC_hardware_board.h
                                                                                            BUT WHEN I USE F3 OVER TI_CC_CSn_PIN, ccs not jump to file TI_CC_hardware_board.h

                                                                                            IT IS STRANGE BECAUSE   TI_CC_CSn_PxOUT and TI_CC_CSn_PIN are both in the same file !!!!!

TI_CC_Wait(30);
  TI_CC_CSn_PxOUT &= ~TI_CC_CSn_PIN;
  TI_CC_Wait(30);
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;
  TI_CC_Wait(45);

  TI_CC_CSn_PxOUT &= ~TI_CC_CSn_PIN;        // /CS enable
  while (TI_CC_SPI_USCIB0_PxIN&TI_CC_SPI_USCIB0_SOMI);// Wait for CCxxxx ready
  UCB0TXBUF = TI_CCxxx0_SRES;               // Send strobe
  // Strobe addr is now being TX'ed
  IFG2 &= ~UCB0RXIFG;                       // Clear flag
  while (!(IFG2&UCB0RXIFG));                // Wait for end of addr TX
  while (TI_CC_SPI_USCIB0_PxIN&TI_CC_SPI_USCIB0_SOMI);
  TI_CC_CSn_PxOUT |= TI_CC_CSn_PIN;         // /CS disable
  TI_CC_Wait(20000);   //45
}

  • Eugenio,

    I created a sample project using your code and it works ok for me.  If I put the cursor on TI_CC_SCn_PxOUT in the C file and hit F3 it goes to the header file.  Same thing for TI_CC_CSn_PIN.  Here is exactly what I am doing:

    1. Place the cursor on TI_CC_SCn_PxOUT in the C file.
    2. Press F3
    3. Goes to the #define in the header file
    4. Hit the back button on the tool bar to go back to the C file.
    5. Place the cursor on TI_CC_CSn_PIN in the C file.
    6. Press F3
    7. Goes to the #define in the header file

    It could be something else in the code that is messing things up in your case.  There are a number of issues with the indexer in CCSv4.  There are a lot of improvements in that area coming in CCSv5.

    My header file looks like this:

     

    #ifndef JOHN_H_

    #define JOHN_H_

     

    #define TI_CC_CSn_PxOUT         P3OUT

    #define TI_CC_CSn_PxDIR          P3DIR

    #define TI_CC_CSn_PIN              0x01

     

    #endif /*JOHN_H_*/

     

     

    My header file is also physically in my project.  I.e. It is not just referred to by the build options also shows up in my project view as it is added directly to the project.  I have seen this make a difference to the reliability of F3.

     

     

    Regards,

    John