CodeWarrior for StarCore DSPs FAQs

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

CodeWarrior for StarCore DSPs FAQs

14,057 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

1,329 Views
J2MEJediMaster
Specialist I

Q: I create a 8156 wizard project.  I could build it and debug the project.  The first time I launch the debugger the code is flashed onto my board and I could set a breakpoint within the for loop and I can see my variables increment fine, so far, so good.  If I close the debugger by right-clicking on debug on the upper right hand corner and selecting close, it takes me back to the C/C++ perspective.  If I now launch the debugger again by selecting Run > Debug, I get the following error message:

 

 Problem Occured dialog

 

If I now quit the CodeWarrior for Starcore 10.0 and restart it, I can immediately launch the debugger and my code runs correctly again(the first time but only the first time).  I have tried cleaning the project and rebuilding the project, but the debugger still does not work after the first time. Am I closing the debugger improperly or is this a bug?

 

A:  What you did in the first place by right-clicking on debug in the upper right corner and selecting  close was just to close the UI Debug perspective.  The Eclipse perspectives are nothing more but a collection of views. Switching perspectives (Debug, C/C++) doesn’t have any effect on the ongoing debug session.  Please use the toolbar from the Debug view or the Run menu commands for controlling the debugger.

 

0 Kudos

1,329 Views
J2MEJediMaster
Specialist I

Q: When we use a simple single core project, the tools gray out the cache views by saying coherency not enabled so it is not relevant.  How do we change this coherency setting?

 

A: You would enable cache coherency by pressing the cache coherency button.  This will change caching  from fast to slow.  This icon can be found between “refresh all” and “debug” icons.

 

 

0 Kudos

1,329 Views
J2MEJediMaster
Specialist I

Q: How can I create a new hardware launch configuration and make sure that it is part of the project?

 

A:  To make new launch configurations be part of the project follow steps below:

 

1.      Right-click on project name, a context menu appears.

2.      From context menu, select Debug As à Debug Configurations

3.      From the toolbar, select New Debug Configuration.  A new debug configuration appears as project name (1).

4.       In the Main tab, into the C/C++ Application textbox select the binary associated with this configuration.

5.      In the Debugger tab, make the following changes:

a.       In the Debugger pull down, select CodeWarrior Debugger for StarCore DSP.

b.      In the Target Processor pull down, select MSC8156

c.       Check the Initialize Target checkbox and select MSC8156_Init.cfg file located at <Tools_Installation_Directory>\StarCore_Support\Initialization_Files\RegisterConfigFiles\MSC8156_ADS

d.      Check the Use Memory Configuration File checkbox and select MSC8156ADS_Memory_Example.mem file located at <Tools_Installation_Directory>\StarCore_Support\MemoryConfigFiles

6.      Select Common tab. The Common settings pane appears. 

7.      Under Save as, select the shared file radio button. Leave the default folder name as is.  When you select the Save As radio button it will put it into the project.  If the local file radio button is checked it will put it into the .metadata file which will be part of the workspace.

8.      Select Apply.  Now the launch configuration is physically located in the project folder, so it will be of the project when zipped.

9.   Select Debug.

 

 

0 Kudos

1,329 Views
J2MEJediMaster
Specialist I

Q: I have two MSC8156ADS boards(board A and board B) connected to a lab PC which is the server via USBTaps.  I have two users(user A and user B) that want to use the remote CCS Server on their own computer.  User A will download code through remote CCS server to board A and User B will download code through remote CCS Server to board B.  They also want to be able to download at the same time.  Can this be done with the CodeWarrior for StarCore 10.0 tools?  I don’t know to get ccs server to recognize each USBTap?

 

A: On the PC in the lab you will have to do the following operations: 

  1. Execute ccs.exe from <Tools_Installation_Directory>/SC_10.0/ccs/bin directory.  The CodeWarrior Connection Server window appears in the system tray.
  2. In the CodeWarrior Connection Server window, type config port 41475
  3. Select Enter.  The Server Listening on port: 41475 messages appear.
  4. In the CodeWarrior Connection Server window, type delete all.
  5. Select Enter.
  6. In the CodeWarrior Connection Server window, type config cc utap:aaaaaaaa where <aaaaaaaa> is the serial number of the USBTap for Board A.
  7. Start a new instance of ccs.exe from <Tools_Installation_Directory>/SC_10.0/ccs/bin directory.  The CodeWarrior Connection Server window appears in the system tray.
  8. In the CodeWarrior Connection Server window, type config port 41476
  9. Select Enter.  The Server Listening on port: 41476 messages appear.
  10.   In the CodeWarrior Connection Server window, type delete all.
  11.   Select Enter.
  12.   In the CodeWarrior Connection Server window, type config cc utap:bbbbbbbb where <bbbbbbbb> is the serial number of the USBTap for Board B.
  13.   Right-click on project name, select Debug As à Debug Configurations.  The Debug window appears.
  14.   In the Debug window, select binary name
  15.   Select Debugger tab. 
  16.   Select Connection tab. 
  17.   In the Connection pull-down, select Generic.
  18.   Select Advanced.  The CCS Advanced Settings window appears.
  19.   Check the Use Remote CCS Server checkbox. 
  20.   In the Hostname/IP Address textbox, insert IP Address of the PC in the lab and set the IP accordingly.  In the Port # textbox, insert 41475 if connecting to Board A or 41476 if connecting to Board B. 

 

0 Kudos

1,329 Views
Irene
NXP Pro Support
NXP Pro Support

Q: How do I enable 64-bit data type support?

 

A: To enable 64-bit data type support:

          1.  In CodeWarrior Project window, right-click on project name. A context menu appears.

          2.  From the context menu, select Properties.  The Properties window appears.

          3.  From Properties window, expand C/C++ Build.

          4.  Underneath C/C++ Build folder, select Settings.  The Settings window appears.

          5.  Select Tools Settings tab.

          6.  Expand StarCore C/C++ Compiler folder. 

          7.  Underneath StarCore C/C++ Compiler, select C/C++ Language. The C/C++ Language settings appear. 

          8.  Check the 64-bit Data Type Support (‘long long’ and ‘double’) checkbox. 

          9.  Select Apply.

        10.  Select OK.

0 Kudos

1,329 Views
Irene
NXP Pro Support
NXP Pro Support

Q:  Where do I define the optimization level?

 

A:  To define or change optimization level follow steps below: 

        1.  In the CodeWarrior Projects view, right-click on project name.  A context menu appears.

        2.  From context menu, select Properties.  The Properties window appears.

        3.  From the left hand side, expand C/C++ Build folder.

        4.  Underneath C/C++ Build folder, select Settings.  The Settings appear on the right hand side.

        5.  Under StarCore C/C++ Compiler folder, select Optimization.  The Optimization Setting panel appears.

        6.  Select pull-down next to Optimization Level to change optimization level from 0 to 3.

        7.  Select Apply.

        8.  Select OK.

 

0 Kudos

1,329 Views
Irene
NXP Pro Support
NXP Pro Support

Q:  Why is it when compiling my project I am not seeing the errors message appear in the Problems window?

 

A:  The reason that this is happening is that there is an option inside of the tools that needs to be disabled.  To disable this option follow steps below:

         1.  In the CodeWarrior project view, right-click on project name.  A context menu appears.

         2.  From context menu, select Properties.  The Properties window appears.

         3.  On the left-hand side of Properties window, expand C/C++ Build folder.

         4.  Under C/C++ Build, select Settings.  The Settings view appears.

         5.  In the Tool Setting window, expand StarCore C/C++ Compiler folder.

         6.  Under StarCore C/C++ Compiler, expand Compiler folder.

         7.  Under Compiler Folder, select Output Listing.  The Output Listing settings appear.

         8.  Uncheck the Create File with Error Output checkbox.

         9.  Click Apply.

       10.  Click Ok

0 Kudos

1,329 Views
Irene
NXP Pro Support
NXP Pro Support

Q:  When I compile my project, where can I see the commands that are being executed?

 

A:  The commands that are being executed from the compiler or linker can be viewed in the console window. From the

     CodeWarrior toolbar, select Window > Show View > Console.  The Console window appears docked to the lower part of

     the screen.    

0 Kudos

1,329 Views
Irene
NXP Pro Support
NXP Pro Support

Q:  When I compile my project, where do I see the warning and error messages?

 

A:  The warning and errors messages appear in the Problems view.  To display the Problems views select Window > Show

      View >  Problems.  The Problems view appears docked to the lower part of the screen. Double click on error message in

      Problems window to navigate to the offending source code.  The Problems window shows problems for all open projects.  If

      there is more than one open project, the window may show problems not associated with the project you are building. 

      Compiler and linker error message are also shown in the Problems window. 

0 Kudos

1,329 Views
Irene
NXP Pro Support
NXP Pro Support

Q: How do I compile my project?

 

A:  In order to compile the project follow steps below:

           1.  From CodeWarrior Projects, right-click on project name.  A context menu appears. 

           2.  From context menu, select Clean Project

 

      Note:  If Build Automatically is checked then Clean Project will execute and create a StarCore C Debug folder that contains

      the *.eld file that will be used for debugging.  If Build Automatically is unchecked, then Clean Project will remove any

      previously-built binaries, including the *.eld file.  Once the files are removed, select Project  > Build Project to compile. 

0 Kudos

1,329 Views
J2MEJediMaster
Specialist I

Q: What is the difference between breakpoint and line breakpoint?

 

A: They are practically the same thing.  Eclipse introduced Method Breakpoints which we don’t have in

the classic CodeWarrior tools, hence the need for a distinction.  The online documentation state that regular breakpoints suspend the execution of a thread before a line of code or method is executed.  Regular breakpoints include:

  • Line Breakpoint suspends thread execution when the line of code it is applied to is executed.
  • Method Breakpoint suspends thread execution when the method that it was applied to is entered or exited (or both).
  • Address Breakpoint will break when the core executes code at the given address. 

 

0 Kudos

1,329 Views
Irene
NXP Pro Support
NXP Pro Support

Q: When I open the debugger configurations window with Run > Open Debug Dialog I do not see a selection for each of the cores for the MSC8156ADS board?  Why?

 

A:  You don’t see the launch configurations for each of the cores because of the way that the project was created.  When you create an MSC8156ISS Wizard Project you have to select the Generate Launch Configurations for all cores option.  To enable this options follow steps below:

          1.  From the CodeWarrior toolbar, select File > New > StarCore Project.  The Create a StarCore Project - Step 1 of 7

               window appears.

          2.  In the New Project name textbox, insert project name.

          3.  Select Next. The Devices - Step 2 of 7 window appears.

          4.  Under Device Family Group, expand the MSC815x Family folder.

          5.  Select MSC8156

          6.  Select Next.  The Building Settings - Step 3 of 7 window appears.

          7.  Select Next.  The SmartDSP OS - Step 4 of 7 window appears.

          8.  Select Next.  The Lauch Configurations - Step 5 of 7 window appears.

          9.  Select Next.   The Hardware - Step 6 of 7 window appears.

        10.  Select Finish.  This will create a project in the CodeWarrior projects view docked to the left hand side of the C/C++  perspective. 

        11.  In the CodeWarrior project window, right-click on project name. A context menu appears.

        12.  From context menu, select Build Project.  The Build Project window appears and the binary file will be created.

        13.  In the CodeWarrior project window, right-click on project name.  A context menu appears.

        14.  From context menu, select Debug As > Debug Configurations.  The Debug window appears. 

        15.  Expand CodeWarrior Download folder.    Underneath this folder you will see a launch configuration for each core. 

0 Kudos

1,329 Views
hdcc001
Contributor I

Q: Is there an easy way to change the name of one variable from one name to another? 

 

A:  The feature that you would use to do this is called Refactor.  You would use this feature if you have a function or variable you want to replace in your project.  Follow steps below to change a variable name:

  1. In the Editor window, right-click on variable name.  A context menu appears.
  2. Select Refactor -> Rename.   The Rename local variable ‘variable name’ appears.

  

 

 3. In the Rename to textbox insert the name of the new variable.

 4. Select Preview. The Replace Text Matches window appears.  This will give you a nice preview of the changes that will be made.

 

 

 

 5. You can now inspect each proposed change and accept or deny them individually.  Select OK.  The changes are made to the source files.

0 Kudos

1,329 Views
hdcc001
Contributor I

Q: What does the asterisk on the editor’s toolbar mean?

 

A: The asterisk on the editor’s toolbar indicates there are unsaved changes.   

0 Kudos

1,329 Views
hdcc001
Contributor I

Q: When I try to open up the IDE I am not able to.  The message that I see in the IDE is A debug or protocol-plugin license for the product expired or was not found.  In my log file I see the following error messages:

           

            "ENTRY org.eclipse.ui.workbench 4 0 2009-02-18 14:06:32.075
            !MESSAGE Widget disposed too early!
            !STACK 0
            java.lang.RuntimeException: Widget disposed too early!
             at        org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:169      )"

 

A: One way to get around this issue is to put the path to the V10.1 license file into the LM_LICENSE_PATH environment variable.  The other thing that could be happening is that the launch config file got corrupted. 

0 Kudos

1,329 Views
hdcc001
Contributor I

Q: Where does the disassembly file get created?

 

A: This file gets created in the temp directory located under:

 

                        <Profiles>\<username>\<LocalSettings>\<Temp>

 

 Under this path you find sourcefilenameSXXXX.txt file.

 

 

 

0 Kudos

1,329 Views
Li
Contributor I

Q: I know that the –DumpUninitializedData option can be set to off so that it will not dump information  about the Uninitialized Data (BSS Sections) into the S-Records.  Is there a way to do this through the linker so that it will decrease the linking times, load times via the debugger, and the ELF size?  Or is the –DumpUninitializedData option the only solution that we have?

 

A: Indeed it is the only solution that we have available to eliminate bss from an S-Record  file and not from an ELF.

0 Kudos

1,329 Views
dumitru-daniel_
NXP Employee
NXP Employee

Q: The MSC8156 has a new Data Segment Descriptor Register which are a set of registers that can use flexible ALIGN Mode unlike the Data Segment Descriptor Register A(M_DSDAx)/Data Segment Descriptor Register B(M_DSDBx).  If I want to use the Flexible segment align mode of the Data Segment Descriptor Register C (M_DSDCx) can this be implemented in the linker command file? 

 

A:  The linker settings will automatically support flexible segmentation mode if the target processor is set to MSC8156.  The standard CodeWarrior LCF files and the bring-up code don’t need any special attribute to be set on the descriptor to use this type of alignment.  The SmartDSP OS code doesn’t require you to set any special indication in the segment  attributes towards this support as SmartDSP OS parts the address translation table generated by the linker.  There are two command-line options that are used to enable or disable the flexible segment mode.  The two command-line options

are:

       1. –enable-flexible-segment-model      <--– This is default for the MSC8156 architecture

       2. –disable-flexible-segment-model

0 Kudos

1,329 Views
dumitru-daniel_
NXP Employee
NXP Employee

Q: I have a quick question on the new linker file syntax.  Suppose you have a couple of buffers and you want to allocation them in M3 first and if M3 is full in DDR. According to my understanding you should be able to use the memory_append_opt in the section block.  So I tried using the following:

 

descriptor__m3__cacheable_wb__sys__private__data {

   .m3__cacheable_wb__sys__private__data

   reserved_crt_tls

   .data

   .m3__cacheable_wb__sys__private__rom

   .bsstab

   .init_table

   .rom_init

   .rom_init_tables

   .exception

   .exception_index

   .staticinit

   .m3__cacheable_wb__sys__private__bss

   .bss

} >> m3_private_data_c_wb, ddr_private_data_c_wb;

 

A: The syntax supports this feature, but there is no support yet in the memory placing algorithm.     

0 Kudos

1,329 Views
dumitru-daniel_
NXP Employee
NXP Employee

Q: Is it possible to set up the user’s own absolute memory address with flexible segment model in the LCF?  Does the user need to program the MMU MATT registers for this purpose without LCF?

 

A: If Flexible Segment Model (FSM) is not disabled using the command line option(-disable-flexible-segment-model), the linker will try to place the descriptors using flexible segment model. If all restraints are respected (size, align, border) FSM will also be used for descriptors which are placed using absolute addresses.  No flag must be used on the descriptor attributes.  In order to place the descriptor using absolute address the user should use the .att_mmu directive:

 

.att_mmu "att_mmu_directive_name",\

                   Virtual_region_start_address,\

                   Virtual_region_end_address,\

                   "descriptor_name",\

                  attribute: MMU_ATTRIBUTES,\

                  base_address: _VIRTUAL_ADDRESS_start, \
                  physical_address: _PHYSICAL_ADDRESS_start  

0 Kudos

1,329 Views
dumitru-daniel_
NXP Employee
NXP Employee

Q: I use the following command to produce a S-record for the MSC8156, but the result seems wrong:

    SET PROJ_ELD_DIR="."
    SET ELF_TO_SREC_SCRIPT="C:\Program Files\Freescale\CodeWarrior_for_StarCore_10.0\SC_10.0\StarCore_Support\compiler\bin\sc100-elf2xx.exe"

%ELF_TO_SREC_SCRIPT% -t srec -DumpUninitializedData=Off -m msc8156 %PROJ_ELD_DIR%\port1_dbg.eld

%PROJ_ELD_DIR%\c1_port1_dbg.eld %PROJ_ELD_DIR%\c2_port1_dbg.eld %PROJ_ELD_DIR%\c3_port1_dbg.eld   

%PROJ_ELD_DIR%\c4_port1_dbg.eld %PROJ_ELD_DIR%\c5_port1_dbg.eld -o %PROJ_ELD_DIR%\output.srec

Can you help me confirm whether there are some problem with the commands that I am using?

 

A: For the MSC8156, the core ID must be specified before the .eld.:

 

    sc100-elf2xx -m msc8156 -#0 app.eld -#1 c1_app.eld -#2 c2_app.eld -#3 c3_app.eld -#4 c4_app.eld -#5 c5_app.eld

 

In your case, the correct commands are:

 

    SET PROJ_ELD_DIR="."
    SET ELF_TO_SREC_SCRIPT="C:\Program Files\Freescale\CodeWarrior_for_StarCore_10.0\SC_10.0\StarCore_Support\compiler\bin\sc100-elf2xx.exe"

%ELF_TO_SREC_SCRIPT% -t srec -DumpUninitializedData=Off -m msc8156 -#0 %PROJ_ELD_DIR%\port1_dbg.eld -#1

%PROJ_ELD_DIR%\c1_port1_dbg.eld -#2 %PROJ_ELD_DIR%\c2_port1_dbg.eld -#3

%PROJ_ELD_DIR%\c3_port1_dbg.eld -#4 %PROJ_ELD_DIR%\c4_port1_dbg.eld -#5

%PROJ_ELD_DIR%\c5_port1_dbg.eld -o %PROJ_ELD_DIR%\output.srec

0 Kudos