CodeWarrior for StarCore DSPs FAQs

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

CodeWarrior for StarCore DSPs FAQs

24,916 Views
J2MEJediMaster
Specialist I

This thread contains the Frequently Asked Questions (FAQs) for the StarCore for CodeWarrior DSPs development tools.

Labels (1)
Tags (1)
129 Replies

3,331 Views
J2MEJediMaster
Specialist I

Q: In CodeWarrior for StarCore, is there any way of checking the profiling results during a debug session?

 

A: Yes, there is. Normally the TRACE data is collected only after the debug session has terminated. This means the user may have to wait for a long period of time, depending upon the size and complexity of the application.

CodeWarrior for StarCore offers the ability to check the DPU (Debugging and Profiling Unit) results at run-time, via the DPU Analyzer view. To activate this view, select Window > Show view> Other > Analysis > DPU Analizer.
The DPU Analizer shows data only when the program is halted. This can be use to trace the code's performance, line by line.

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

Q: In CodeWarrior for StarCore 10, what is the meaning of physical, data and program memory? 

 

A: Physical memory represents the memory used before memory management unit (MMU) translation. This is the actual memory that exists on the hardware, in parts such as RAM and DDR.

Data and program memory are both virtual memory types that are a result of MMU translation from physical addresses to virtual ones. When the DSP is running, data is fetched from the data memory and code is fetched from program memory.

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

Q: How can I check if the linker is using the Flexible Segment Model (FSM)? 

 

A: The user can check the project map file to see if the linker has used FSM to place the segments in the file.

In the .att_mmu section, there is a column named Other. Bit 5 of this numeric value shows what linker was used for placing the segment. If the bit is set, then the FSM was used. Otherwise, the ASM (Aligned Segment Model) was used.

For example:

;*********************************************************************************
;.att_mmu section:
;---------------------------------------------------------------------------------
; * _address_translation_table_mmu[] (address: 0x30000000)
; -----------------------------------------------------------------------
; Index Base Address Physical Address Size Attribute Shndx Other
; ----- ------------ ---------------- ---------- ---------- ------ ------
; 0x0000 0x30000000 0x35000000 0x00008000 0x004E003E 0x0001 0x0011
; 0x0001 0x30008000 0x35008000 0x00004000 0x004E003E 0x0000 0x0021

For the first segment, the value assigned to the field Other is 0x0011, which means bit 5 = 0, and therefore ASM was used.

For the second segment, the value assigned to the field Other is 0x0021, which means bit 5 = 1, and FSM was used.

 

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

Q: What are the conditions that must be met by a segment so that it can be placed using FSM (Flexible Segment Mode)? 

 

A: First the segment size MUST be smaller than 8MB.

Second, in accord with the LINKER's internal strategy, there are two conditions that MUST be fulfilled before FSM can place the segment:

1) Alignment condition – The base address of the segment must align to one of the 256B, 1KB, 16KB or 64KB boundaries. Its size must be a multiple of 256B, 1KB, 16KB, or 64KB.
2) Boundary condition – The segment MUST NOT cross multiple boundaries of 64KB, 256KB, 4MB, or 16MB.


 

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

Q: How many types of breakpoints are supported by CodeWarrior for StarCore v 10 and what is the difference between them?

 

A: Currently there are three types of breakpoints supported by CodeWarrior.

1) Hardware breakpoints - These breakpoints are implemented by the hardware (DSP). The number of hardware breakpoints is limited to six because on the MSC8156 DSP there are only six EDCA channels for OCE.

2) Software breakpoints - These breakpoints are implemented by replacing some code in the program with a special instruction that, once executed, stops the core. The only restriction is that in order to set software breakpoints, the program need to be run from RAM. The software breakpoints are special because once the breakpoint is hit, the breakpoint instruction is replaced with the original code.

3) Regular breakpoints - These are similar to software breakpoints with the main difference being that the user should not care where the code is loaded. For regular breakpoints, the debbuger first tests if the software breakpoint can be placed in memory. If not, then the debugger tires to place a hardware breakpoint. In case of a failure, the debugger issues an warning.
 

0 Kudos
Reply

3,331 Views
IuliaDiaconescu
NXP Employee
NXP Employee

Q:  Can I export the launch configurations settings and then import them back into the project?

 

A:   This is not possible to do because the launch configurations are part of the workspace and not part of the project.  The launch configurations for each workspace are located under the \.metadata\.plugins\org.eclipse.debug.core\.launches folder. 

0 Kudos
Reply

3,331 Views
IuliaDiaconescu
NXP Employee
NXP Employee

Q:  Why isn’t the DE.exe closing after the debugger session is finished?

 

A:  The reason that this is happening is that you might want to do another debug session.  It takes some time every time the DE.exe launches, so because of this it is left open.  The DE.exe will close once the cwide.exe is closed. 

0 Kudos
Reply

3,331 Views
IuliaDiaconescu
NXP Employee
NXP Employee

Q : Is there a way to display the expressions always in Hexadecimal format?

 

A: Yes.  There is a way to display the variables always in Hexadecimal instead of the default decimal format.  In order to accomplish this follow steps below in C/C++ perspective:

  1. From toolbar, select Window -> Preferences.  The Preferences window appears.
  2. Expand C/C++ folder.
  3. Under C/C++, select Debug.  The Debug settings pane appears.
  4. On the right hand side under Debug, change Default expression format to Hexadecimal.  By default, it is set to Natural.

expressions in hex format

 

  5. Select Apply.

  6. Select OK

 

Note: When you bring up the debugger, the expressions will be set to Hexadecimal format. This setting is a global setting so it applies to all projects that will be debugged.  In order for these changes to take effect, you need to restart the CodeWarrior Development Studio tools.

 

 

0 Kudos
Reply

3,331 Views
IuliaDiaconescu
NXP Employee
NXP Employee

Q: How do I add hardware breakpoints? Can I add them through the UI? 

 

A:  You can add hardware breakpoints through the GUI.  To add them through the GUI follow steps below:

  1. Right-click on the left hand side of source file. A context menu appears. 
  2. From context menu, select Set Special Breakpoint > Hardware.  The Hardware breakpoint appears next to source line.    
0 Kudos
Reply

3,331 Views
leon_xie
NXP Employee
NXP Employee

Q: Where do I set the change history length for the C source editor?

 

A: To change the history length for the C source editor follow steps below:

  1. From the CodeWarrior toolbar, select Window à Preferences.  The Preferences window appears.
  2. Expand General folder. 
  3. Expand Workspace folder.
  4. Under Workspace, select Local History.  The Local History settings appear. 
  5. In the Days to Keep Files textbox, change the days to keep files value.  
  6. Select Apply.
  7. Select OK.
0 Kudos
Reply

3,331 Views
leon_xie
NXP Employee
NXP Employee

Q:    How do I add a folder with multiple source files to an existing project when the folder is located outside the workspace?

 

A:    To add files to an existing project follow steps below:

  1. In CodeWarrior Project window, right-click on project name.  A context menu appears.
  2. From context menu, select New à Folder.  The New Folder window appears.
  3. Select Advanced.   The Advanced settings appear. 

 1

 

4. Check the Link to folder in the file system checkbox.

 

2

 

5. Select Browse. The Browse for Folder window appears. 

6. Select the folder that you want to add to the project.

7. Select OK

 

3

 

8. Select Finish.  This will put the new folder into the project under CodeWarrior projects.  When the new folder is expanded it will point to the location where the folder was linked from.  If you delete the whole folder from the project it will delete it from the project only.  If you try to delete a file from underneath this folder it will delete the file from that location as well with no way to recover it.

 

0 Kudos
Reply

3,331 Views
leon_xie
NXP Employee
NXP Employee

Q: How do I compare two source files?

 

A :   In order to compare two source files follow steps below:

  1. In the CodeWarrior Projects folder, click on source file.  The source file is highlighted. 
  2. Select Ctrl button. 
  3. In the CodeWarrior Projects folder, click on second source file. The source file is highlighted. 
  4. Right-click on source file.  A context menu appears.
  5. From context menu, select Compare With > Each Other.  The Compare window appears.
0 Kudos
Reply

3,331 Views
leon_xie
NXP Employee
NXP Employee

Q:    How do I Export a project that could be sent to someone else?

 

A:     To export a project follow steps below:

  1. In CodeWarrior Project window, right-click on project name.  A context menu appears. 
  2. From context menu, select Export.  The Export window appears.
  3. Expand General Folder.
  4. Select Archive File
  5. Select Next. The Archive File window appears.

             

Note: By default, the project that you select will be exported along with their children. Optionally, use the checkboxes in the left and right panes to select the set of resources to export.  Also use push buttons such as Select Types to filter the types of files that you want to export. 

  1. In the To Archive File textbox, insert the archive file which you want to export the selected resources to.
  2. Select Finish.   A zip file will be created in the Eclipse folder within the Tools Installation Directory. 
0 Kudos
Reply

3,331 Views
leon_xie
NXP Employee
NXP Employee

Q : How do I add a specific file to an existing project when the file is located outside the workspace?

 

A  :    To add a specific file to an existing project just drag the file that you would like to be added

        from Windows Explorer. 

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

 

Q: For the Eclipse-based CodeWarrior for StarCore tools, how do I redirect stdout to a file?

 

A: You should be able to redirect stdout to a file from the Launch Configuration settings.

   1) Right-click on the project name in the CodeWarrior Project view.
   2) Select Properties
   3) Choose Run/Debug Settings.
   4) Select the Launch Configuration and click on Edit.
   5) Switch to the Common tab.
   6) Check File and specify the name of a log file.
   7) Check Append to ensure that the log file contains results obtained from multiple debug sessions.

0 Kudos
Reply

3,331 Views
Irene
NXP Pro Support
NXP Pro Support

Q:  Can CodeWarrior for StarCore version 3.2 co-exist with the CodeWarrior for StarCore 10.0 tools?

 

A:  Yes you can have both version of the CodeWarrior tools installed on your machine.  When debugging from one version of the tools to another make sure that the Command Converter Server utility is shut down.  To shut down the Command Converter Server, simply right-click on the server icon in the system tray and from the menu select 'Quit'.

 

 

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

Q: I want to call the Eclipse-based CodeWarrior for StarCore IDE from a command line and also have it execute a Tcl script. How do I do that?

 

A: You can start the IDE from the Command Prompt window and have it use a Tcl script
Example:

 

"C:\Program Files\Freescale\CW SC v10.1\eclipse\cwide.exe"   -data D:\workspace_StarCore  –vmargsplus  -Dcw.script=D:\workspace_StarCore\FIR_filter\tcl_test.tcl

 

- The first argument specifies the location of the IDE. The path name to IDE must be enclosed in quotes, because of the space in the path name.


- The second argument specifies the Eclipse workspace for the storage of projects, as well as application configuration and preferences.


-The third argument has the command line arguments passed to the Java VM, which executes the Eclipse tools.


-The fourth argument specifies the Tcl file to use and its directory. NOTE: The extension .tcl must be used with the file name.

 

0 Kudos
Reply

3,331 Views
Irene
NXP Pro Support
NXP Pro Support

Q:  Can I change the default color of my comments across multiple lines in source code?

 

A:  In order to change the default color of my comments across multiple lines in my source code follow steps below:

    1.  From C/C++ perspective toolbar, select Preferences.  The Preferences window appears.

    2.  Expand C/C++ Folder.

    3.  Expand Editor Folder.

    4.  Select Syntax Coloring

    5.  On the right hand side under Elements, expand Comments

    6.  Select Multi-line comment32132 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   7.  Select Color. The color palette window appears. 

    8.  Choose the color that you would like.

    9.  Select OK.  

  10.  Select Apply.

  11.  Select OK

 

Note:   If you want to change the color of a comment that is across a single line, then you would follow steps above except choose Single-line Comment under Comments folder and makes the changes indicated above.

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

Q:  Is it possible in CodeWarrior 10 to display the values of variables in hexadecimal format?

 

A: If you want to see value for some variables only in hexadecimal:

In the Debug perspective's Variable window, right-click on the variable name and
select Format > Hexadecimal.

If you want the values for all variables displayed as hexadecimal:

  1) Select Windows > Preferences.
  2) Go to the C/C++ > Debug panel. There you can change default display format for variables, expressions and registers.
  3) Select Hexadecimal instead of Natural for Variable format to see all variable values displayed as hexadecimal. Click OK

 

0 Kudos
Reply

3,331 Views
J2MEJediMaster
Specialist I

Q: How can I define that a file with a specific extension (for example, .tcl) is to be opened in an edit window when I double-click on it?

 

A: You need to define a file association for this extension.
This is done as follows:
   1) Select Windows > Preferences
   2) Expand the Editors group
   3) Activate the File Associations dialog
   4) Click on the Add ... button next to the File Types list box
   5) Enter .{extension} as file type (in our example .tcl)
   6) Make sure the new extension is selected in the File Types list box
   7) Click on the Add ... button next to the Associated editors list box
   8) Select Text Editor and click OK.

This setting will be active for all projects within the current workspace.

 

 

0 Kudos
Reply

3,331 Views
Irene
NXP Pro Support
NXP Pro Support

Q: Can I change the debugger key bindings to the ones that I used to use in the non-eclipse CodeWarrior tools?

 

A: Yes there is a way to change the debugger key bindings.  In order to do this follow steps below:

  1. In CodeWarrior for StarCore tools toolbar, select Window > Preferences.  The Preferences window appears. 
  2. On the left-hand side, expand General folder.
  3. Select Keys

  

  4.  On the right hand side underneath Command Column, select Step Over.  Under the Command column is a list of    

       available  commands.  The Binding Column contains the keys that can be used to invoke the command.  And the  

       When Column indicates when this command will be executed.  To get the Key Sequence in Alphabetical Order, click

       on the Command column.  For the debugger the keys of importance to change are ‘Step Into’, ‘Step Over’ and ‘Step

       Return’.  By default, these key bindings are set to F5, F6 and F7 respectively. 

  5.  From the Binding textbox, remove F6 by selecting Unbind Command.  The Binding Column is cleared out. 

  6.  In the Binding textbox press F10 on computer keyboard so that F10 will be new key binding.  The user change

       symbol which  is a U will appear in the right-most column to indicate a user binding. 

  7.  Select Apply.  In the Binding column you will have the Binding for Step Over as F10.  Now when you use the   

       debugger and you want to do a Step Over you would select F10.   You will see this new assignment when you bring

       up the debugger and select Run. 

  8.  Select OK.  The Preferences window closes. 

 

0 Kudos
Reply