Indexer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Indexer

1,209 Views
embeddedcontrac
Contributor II

I am new to CodeWarrior.

 

I would like to be able to open the included header file by clicking on it in the *.c file. But it did not open the header file. My code compiles okay. Any suggestion on how can I navigate to the relevant header file? For example I want to open bsp.h, included in main.c.

 

I even tried the indexer in the IDE. (Windows --> preferences --> Type Indexer in filter box). The indexer is supposed to open the function's definition when you click on it's declaration. But it did not work. I am using codewarrior 10.2 with MQX3.8 on Windows_XP.

Labels (1)
0 Kudos
Reply
5 Replies

763 Views
J2MEJediMaster
Specialist I

There are two ways to open the header file.

 

1) Highlight the header file name, then right-click. Choose Open Declaration and the IDE opens the header file.

 

2) If you have the Outline view open, it should be displaying a list of header files, function names, and symbols. Double-click on the header file in the Outline view and the IDE opens the file. Double-click on the function name in this view to be taken to the function code. (Note: there will be references for both the function prototype declaration and the function itself. The name prefixed with a green dot is the actual function.)

 

Have you built the MQX projects?

 

Hope this helps,

 

---Tom

0 Kudos
Reply

763 Views
embeddedcontrac
Contributor II

Tom,

 

Thanks for your reply. I trried both the suggestions in your post, but none of them worked.

1) When I click "Open declarations" or press "F3", while highlightinig mqx.h, nothing happens.

2) When I look into Outline view, it is all blank.

 

Yes, I have built and debugged 1st MQX application as in app. note 3905. The LED's do not blink, for Tower K60DN. But's that's another issue.

 

0 Kudos
Reply

763 Views
J2MEJediMaster
Specialist I

OK, the lack of information in the Outline view indicates no symbolic information. Are you working with a release build?

 

Also, I wasn't clear on what had to be built. Have you built MQX and its files, not just the example project files?

 

Finally, as far as the LEDs go, have you edited user_config.h to enable the MQX GPIO functions? If not, you need to do that and rebuild MQX.

 

---Tom

0 Kudos
Reply

763 Views
embeddedcontrac
Contributor II

Tom, thanks for looking into this. I am responding to your feedback, inline below.

 

>OK, the lack of information in the Outline view indicates no symbolic information. Are you working with a release build?
ec: My build configruration for my Project is "debug in internal RAM".
     Codewarrior is " Version: 10.2, Build Id:120126"
     MQX directory is "Freescale MQX 3.8 TWRK60D100M". Being from the old school, I do not like blank spaces in a directory name. Could this be the cause?

>Also, I wasn't clear on what had to be built. Have you built MQX and its files, not just the example project files?
ec: Since I am able to compile and debug the blinking LED example (read below about success), shouldn'r my MQX installation be correct? Since I can see "MQX 3.8 Project" as one of the options when I click File--> New in Codewarrior, shouldn't my MQX installation be correct? How to built MQX? Is running the batch files to install MQX in CodeWarrior the way to build MQX?

> Finally, as far as the LEDs go, have you edited user_config.h to enable the MQX GPIO functions? If not, you need to do that and rebuild MQX.
ec: I solved the issue of LEDs not blinking. The problem was repeated calls of InitializeIO() function. I was calling InitializeIO() 5 times, due to confusing instruction 7 in section 4.3 in App. note 3905. InitilaizeIO() should be called only once, since it calls fopen(). And fopen() cannot be called again to open the same port-pins, unless fclose() has been called. fclose() is not used in this example. In fairness to App note 3905, I must state that the source code listing in the appendix of app note 3905 calls InitializeIO() only once.


0 Kudos
Reply

763 Views
J2MEJediMaster
Specialist I

Since you are using the "debug in internal RAM", your project should have debug information.

Glad to hear you got the LEDs blinking.

When you use the wizard to build a MQX project, things get set up properly so that the blanks in the path name should not be an issue. However, I am of the old school myself and avoid blanks in the path names where I can. :smileyhappy: You can build and execute MQX applications generated by the New MQX Project wizard without building MQX, but there is a gotcha here. The MQX components have been built assuming a Windows 7 installation. (In Windows 7, you normally do not have access to the Program Files folder, so the MQX folder is installed outside of it. For Windows XP, the MQX folder lands in the Program Files folder.) Now, this is not usually a problem, unless you want to debug and watch how MQX deals with things. So, for your Windows XP situation, you have to rebuild MQX.

OK, so how do you do that? Here's what I did. It involved uninstalling and reinstalling software, which you might not want to do. I managed to mess up my MQX installation, so I had the opportunity to figure this out. The process is:

1) Uninstall CW for MCUs and MQX

2) Install CW for MCUs v10.2

3) Install the CW for MCUs v10.2 update

 

4) Install MQX 3.8.1

 

The installation order here is important--if you do it wrong both CW and MQX break in mysterious and frustrating ways. :smileysad: Trust me on this one.

5) Drag the file <board>.wsd into the CodeWarrior Projects view, where <board> is your board name. For Windows XP, the path name is C:\Program Files\Freescale\Freescale MQX 3.8\config\<board>\CW10\<board.wsd.

6) You should get a bunch of projects appear in the CodeWarrior Projects view. These projects handle building the MQX kernel, board support libraries, and other MQX software stacks. Some choices should appear in the active working set box in the IDE's tool bar. Now when you click on the build icon adjacent to this box, CW builds all of the MQX projects. If you make a change to the user_config.h file to activate certain services in MQX, all you have to do now is hit the build icon for the working set again.

Further details on building MQX can be found in the the document, FSL_MQX_in_CW_10_x.pdf, which is located in the folder C:\Program Files\Freescale\MQX 3.8\doc\tools\cw. Make sure that it is dated June 2012 or later.

Hope this helps.

---Tom

0 Kudos
Reply