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.

TMS320C28x Simulator User's Guide (literature number SPRU003)

Other Parts Discussed in Thread: TMS320F2812, TMS320F2809, CONTROLSUITE, TEST2, CCSTUDIO

 

 

              Does this User's Guide exist or any reference manual similar to it exist.  I need to configure the simulator properly to run and debug some

 

               TMS320F2812 C code.

 

                                                                      Thank you

 

 

  • Thomas,

    Is this what you are looking for: http://focus.tij.co.jp/jp/lit/ug/spru608a/spru608a.pdf

     

    Regards,

    John

     

  • Hi, 

    The document SPRU608a makes reference to the "TMS320C28x Simulator User’s Guide (literature number SPRU003)", as noted by Thomas above.

    However I cannot find this SPRU003 document. Could you help me with this concern?

    Thank you for your help,

    Yann

  • Yann,

    This document is no longer available.  In general the C28x simulators are not something we recommend to users at this time.  For C28x there are a number of super low cost development kits available.

    John

  • John (apparently from Texas Instruments) wrote:

    "...the C28x simulators are not something we recommend to users at this time"

    I have been counting on using the simulator for development work off-site from the hardware.

    Questions:

    1. Did this simulator ever work?

    2. Why would you promote using the simulator in all your other documentation and then recommend not using it when asked for the User Guide for it?

    3. Where can I purchase a "super low cost development kit" for the TMS320F2809 DSP?

    4. What does the acronym TMS stand for?

    5. What does the SPR prefix in all your document file names stand for?

     

     

  • Hi Timothy,

    A quick word on forum usage: it is better to start a new thread (and cite the existing thread URL in the text) rather than post to an old thread (in particular, this thread was started two years ago, and should have been closed then - it wasn't because I'm sure it was just overlooked).  Once a thread has responses or gets old, it becomes less likely that someone will notice it and answer you.  Anyway, to your questions:

    Timothy Ball said:

    1. Did this simulator ever work?

    2. Why would you promote using the simulator in all your other documentation and then recommend not using it when asked for the User Guide for it?

    Yes, it works.  It has always worked.  I think John was referring to the limitations of the simulator for C2000 devices.  The simulator is (and always has been) just an instruction set simulator (which is true pretty much of all the TI processor simulators).  There is no peripheral support.  Since the C2000 is so peripheral intensive, the simulator doesn't cut it for most users.  People think they will be able to run their whole application (e.g., PWM, ADC, etc.) on the simulator.  You can't.  The simulator is most useful for working on non-peripheral code (e.g., a math algorithm) when you're, say, on an airplane or something.  But even then, we have tiny USB development boards for the some of the newer C2000 devices that are the size of a flash thumb drive that you could use on your laptop on an airplane (for example).

    Timothy Ball said:

    3. Where can I purchase a "super low cost development kit" for the TMS320F2809 DSP?

    There are no development boards specifically for F2809.  But, F2808 is basically the same thing except less flash.  I would suggest F2808 Experimenter's Kit, http://www.ti.com/tool/tmdsdock2808.

    Timothy Ball said:

    4. What does the acronym TMS stand for?

    TMS is not an acronym.  Rather, the part pre-fix 'TMS320' was originally used to show that the device was from TI's DSP product group.  That started 30 years ago.  C2000 lineage dates back about 18 years ago, and it took the TMS320 part pre-fix then.  TI processor families whose origins are more recent (maybe the past 8 years) no longer use the TMS320 designation.

    Another thing 'TMS' means is production silicon, as opposed to 'TMX' which means engineering samples (X for experimental I guess).

    Timothy Ball said:

    5. What does the SPR prefix in all your document file names stand for?

    Beats me.  It is just a prefix on a literature number.  I don't think it stands for anything.  Maybe it originally came from something.  I don't know.

     

    Regards,

    David

  •  Hello David:

    Thank you very much for your swift response.
    It is highly appreciated.
     
    I planned to use the C2000 Simulator mainly to confirm the operation of assembly code instructions and to determine which instructions produce the swiftest results. For example, I see that much of the assembly code that TI employs is for indirect addressing instead of simply direct.
     
    I downloaded the TI free Control SUITE software. However, the Code Composer Studio (CCS) selection (from English/CCS 'Getting Started with CCS for C2000') does not mention how to execute the compiler.
    Is the CCS and C2000 Simulator executed from within the Control SUITE?
    Are there simple 'Hello World' type examples available?
     
    If I purchase the F2808 Experimenter's Kit will that give me total, unlimited, and royalty-free use of the full version of the Code Composer Studio Compiler with IDE v5 at no additional cost(s) forever?
     
    TI should consider indicating what TMS and SPR stands for.
    Just a few examples of what others claim that TMS stands for follows:
        TI Mixed Signal
        TI Manufactured Semiconductors
        TI Manufacturing Services
     
    Thank you for your time and efforts,
    Tim Ball
    TDB Consulting
  • Tim,

    Timothy Ball said:

    I downloaded the TI free Control SUITE software. However, the Code Composer Studio (CCS) selection (from English/CCS 'Getting Started with CCS for C2000') does not mention how to execute the compiler.

    Is the CCS and C2000 Simulator executed from within the Control SUITE

    ControlSuite really has nothing to do with CCS.  ControlSuite is a collection of code libraries, example CCS projects, and other C2000 device stuff that is provided by the C2000 team.  CCS is the debugger provided by the TI tools team.  I encourage you to install ControlSuite and take advantage of the stuff it provides, but you still need CCS for code development and debugging.  The compilers, emulation, and simulators are part of CCS, and again, CCS is completely seperate from ControlSuite.

    Timothy Ball said:

    Are there simple 'Hello World' type examples available?

     

    ControlSuite has a lot of simple examples, although probably not 'Hello World'!  Also, you can use the code that comes with application report SPRA958.  This is complete and simple starter code for most of the C2000 device families.

    http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=spra958k&docCategoryId=1&familyId=916

    Timothy Ball said:
    If I purchase the F2808 Experimenter's Kit will that give me total, unlimited, and royalty-free use of the full version of the Code Composer Studio Compiler with IDE v5 at no additional cost(s) forever?

    You need a license to use CCS v5.  The experimenter's kit will come with a free license that allows you to use the eval kits, XDS100 class emulators, and the simulators.  See: http://processors.wiki.ti.com/index.php/Licensing_-_CCS.  XDS100 class emulators are cheap (about $80, http://www.ti.com/tool/xds100, get the TMDSEMU100V2U-14T version).  They are slower than XDS510 class emulators, but quit acceptable for C2000 development.

    You can actually download CCS from the TI web, and install this same free license yourself (I think instructions come up when you install CCS).  You could try the simulator right away without having to buy anything.  Always use the latest one (v5.3.0 as of now):

    http://processors.wiki.ti.com/index.php/Download_CCS

    If it looks good, you can then get an eval board or design your own board.  Up to you.  The free license is good to go, just limited to XDS100 emulators and the simulators.  No royalties.  Can use for production code.

    Good luck,

    David

  • Timothy Ball said:
     
    TI should consider indicating what TMS and SPR stands for.
    Just a few examples of what others claim that TMS stands for follows:
        TI Mixed Signal
        TI Manufactured Semiconductors
        TI Manufacturing Services
     

     
    I forgot to ask you, why does it matter?  They may very well not stand for anything.  If they do, it wouldn't surprise me if there is nobody at the company anymore who remembers where they did come from.  It was decades ago that these were coined.  It's not like TI is keeping it secret!
     
    - David
  • Hi David:
     
    I suppose it matters because people are now under the wrong impression that TMS stands for something like: TI Mixed Signal, TI Manufactured Semiconductors, or TI Manufacturing Services.
    Normally, when one sees a few letters used consistently, especially when all are capitalized, those letters actually mean something.
    For example, GPS for Global Positioning System, RTOS for Real Time Operating System, IBM for International Business Machines, .doc for Document, or even F for Flash in TMS320F2809.
    Does the letter C in C2000 stand for something?
     
    To produce even more confusion though, we have those who choose to use words to identify something that has no relationship whatsoever to the word chosen.
    For example, the word 'cookies' used to identify data that a web browser reads from a website and stores on a PC (i.e. Personal Computer) for later retrieval.
     
    Speaking of PC, I wonder what percentage of people who use a PC every day don't realize that PC stands for Personal Computer?
    That might be a great question for Jay Leno to ask people on the street.
    Maybe he could also ask them to spell PC.
    I suppose he would get spellings such as: peecee
     
    Many years ago, I took a class about Windows NT.
    One of the students asked the Instructor what NT stood for.
    The Instructor did not know...
     
    Thanks for writing,
    Tim
  • >>Does the letter C in C2000 stand for something?

    The 'C' stands for CMOS.  Prior to CMOS, there was NMOS.  The original TI DSP was the TMS32010 in NMOS technology (notice, no 'C'), which dates to somewhere around 1981.  It was followed soon after by the TMS320C1x family in CMOS.  'F' stands for flash CMOS.  Next there were some 'LC' and 'LF' devices where the L stood for low-voltage CMOS.  These were 3.3V, as opposed to the previously used 5V technology.  The "L" has long since been dropped since everything became 3.3V eventually (and now we are well beyond that).  There were also some 'V' devices thrown in, for very low voltage.  So you see, these naming conventions date way back, and aren't religiously followed anymore.  Don't try to decipher them.  TI makes many different processors today.  Most no longer carry the TMS320 moniker.

    It is really not important enough to spend time on, but you've got me curious.  I know a couple of people at TI who may know where TMS320 came from.  I will ask them and reply back here.  Just for curiosity's sake.

    - David

  • Timothy,

    You can sleep well tonight.  TMS stands for T=Texas Instruments,  M= Metal Gate Oxide,  S=Standard.

    This trivia answer comes from someone who has been with the TI processor group for 30 years.

    Regards,

    David

  • Hi David:
     
    Thank you for the informative information.
    I am sure that others will also appreciate knowing that TMS really does stand for something (i.e. Texas instruments Metal gate oxide Standard).
     
    Did the person who has been with the TI processor group for 30 years also happen to know what the SPR prefixed to all the TI document file names stands for?
    There is a Surface Plasmon Resonance (SPR) sensor developed by Texas Instruments but I doubt that the SPR file name prefixes stand for that.
    At first, it appeared that the SPRA files were for Application reports, SPRS files for Specifications, and SPRU files for User guides.

    I hope that you and everyone at TI (Texas Instruments) have a Safe and Happy New Year,
    Tim Ball
    TDB Consulting
  • I'm afraid the origin of the 'SPR' will remain a mystery.

    - David
  • Hello David:

    I was approved for downloading the CCS software.
    After clicking on download, a Download screen appeared with the following information:

       - Please monitor the download process to completion.
       - Please close this window when download is complete.
     
       Having trouble downloading? Try www.ti.com/software-help
     

    However, no dowload process began, even after waiting several minutes.
    I reviewed the FAQ (Frequently Asked Questions) for suggestions and tried to download after turning off the Firewall etcetera.

    Do you have any suggestions on what I need to do to download the CCS (Code Composer Studio) software?

    Thank you,
    Tim Ball
    TDB Consulting

  • Tim,

    I just tried it myself, and had no problem.  The issue must be on your side.

    After clicking download, I get a pop-up window (using IE9) asking if I want to Open, Save, or Save As.  I chose Save As, and the download started.

    You can also click the download link in the email that the system sent to you when you did the Export Control registration.

     

  • Hi Dave:

    I had also tried the link in the email message.

    I will keep working on it and report back.

    If it won't download, is it possible to get it on DVD?

    Thank you for your time and efforts,

    Tim

  • Hello Dave:

    I was able to download CCS on another computer. I do not know why this computer would not download it; I had even reformated it just a few days ago.

    Now that CCS is running, I have not been able to determine how to run the CCS Simulator. I watched several videos and (even on youtube.com), reviewed the Help, and reviewed comments by others who could not get the simulator to execute.

    It appears that the problem may be related to employing the proper CCS Project selections for, for example, Output type and/or Device Variant (or Family?) and/or a setting in the Advanced Settings.

    Any assistance would be greatly appreciated. I had hoped that it would only take a few hours to get the CCS Simulator to work.

    Appreciatively,

    Tim Ball

    TDB Consulting

    P.S. How do you get this Forum Editor to only do single spacing instead of double?

  • Tim,

    The simulator is like any other target.  In CCS, go to View->Target_Configurations.  Click the 'new' icon at the top of the target configuration window that just opened.  Select the 'F283x CPU Cycle Accurate Simulator'.  Then, right-click the resulting target configuration and select 'Set as Default'.  When you launch the debugger (e.g., using the green bug icon), the simulator will launch.

    This simulator applies to all C28x devices even though it is called 'F283x.'  That just means it has FPU (floating point) support as well.

    - David

  • Hi Dave:

    I am a bit confused. It appears that I was able to get the Simulator to "launch", but when and where is the source code file specified that I can single step through?

    Is there just a simple 'Hello World" example?

    Thank you,

    Tim

  • Tim,

    CCS is a debugger.  The code is up to you.  You can grab an example project from ControlSuite, use code from a different appnote such as SPRA958 (on TI web), or write your own.  I quickly wrote a Hello World example that runs on the simulator for you.  It is attached to this post.  This project is very simple, and does not even use the peripheral header files which includes various C28x specific typedefs and peripheral register definitions.  Personally, I'd grab a project from SPRA958 and use that.

    Remember the simulator has NO peripheral support.  That means no interrupts too.  It is just a CPU code simulator.

    - David

     

    C28x_HelloWorld.zip
  • Hi Dave:

    I tried that but get the following errors during the eventual compile:

     

  • Dave:

    Been trying to get the New Target Configuration of: Connection: Texas Instruments Simulator and Device: F283x CPU Cycle Accurate Simulator to save in the Target Configuration window User Defined directory as required. It will not save after either clicking on Save, Save Configuration, or a right click to save.

    Any idea why it fails to save the configuration as required to run the Simulator?

    Thank you,

    Tim

  • Timothy Ball said:
    I tried that but get the following errors during the eventual compile:

    Hi Timothy,

    printf can be fairly memory costly for targets with small amounts of available memory. Your error below is telling you that the .text section of your application (basically your code, which includes printf stuff) is too big for the range of memory that the linker is trying to allocate it to. The linker uses something called a linker command file to determine the ranges of memory that are available on the target to allocate. You can learn more details about this in section 7.5 of the Assembly Language User's Guide (http://www.ti.com/lit/ug/spru513e/spru513e.pdf). CCS provides a linker command file (*.cmd) for you depending on the the choice you selected for the device variant. It looks like you chose a 2808. However you are using a simulator it sounds like. Since there is only one 28x simulator that comes with CCSv5, I assume you are using the F283x CPU simulator. The benefit of using this simulator is the fact that it assumes flat memory with tons of free memory (pretty much the entire program address range). Hence I suggest that instead of choosing 2808 for the device variant when you create a project, choose "Generic 28x Device". Because you chose a generic option, it not pull in a default cmd file but instead the linker will just allocate memory using default values which assume there is a lot of available memory... everywhere I think. Again this works because you are using a CPU simulator. When you switch back to real hardware, it is important to specify the correct device variant to pull in the correct cmd file because you will not be able to get away without having a cmd file anymore.

    Hope this helps

    ki

  • Timothy Ball said:
    save in the Target Configuration window User Defined directory as required. It will not save after either clicking on Save, Save Configuration, or a right click to save.

    Sounds like you are doing it right, assuming the "Use shared location" option is enabled when you created the file. Can you provide a screenshot? Those are always helpful

    ki

  • Hi Ki:

    Thank you very much for your response and the important information.

    Yes, I am setting the Target (i.e. Emulator Connection and Device) for: Connection: Texas Instruments Simulator and Device: F283x CPU Cycle Accurate Simulator and saving that as the default Target Configuration for all projects of the workspace.

    I will review the document you suggested.

    I employed the Generic 28x Device in the Project as you suggested but get the following errors (without a printf) upon compile:

    **** Build of configuration Debug for project Test2 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all

    'Building file: ../main.c'

    'Invoking: C2000 Compiler'

    "C:/ti/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -g --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.1.0/include" --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp"  "../main.c"

    'Finished building: ../main.c'

    ' '

    'Building target: Test2.out'

    'Invoking: C2000 Linker'

    "C:/ti/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -g --diag_warning=225 --display_error_number --diag_wrap=off -z -m"Test2.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/include" --reread_libs --display_error_number --diag_wrap=off --rom_model -o "Test2.out"  "./main.obj" -l"libc.a"

    <Linking>

    warning #10247-D: creating output section ".ebss" without a SECTIONS specification

    warning #10247-D: creating output section ".reset" without a SECTIONS specification

    warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size

    'Finished building target: Test2.out'

    ' '

    **** Build Finished ****

     

    Thank you,

    Tim

     

  • Timothy Ball said:
    I employed the Generic 28x Device in the Project as you suggested but get the following errors (without a printf) upon compile:

    Timothy Ball said:

    warning #10247-D: creating output section ".ebss" without a SECTIONS specification

    warning #10247-D: creating output section ".reset" without a SECTIONS specification

    warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size

    Actually these are not errors but warnings (which tends to occur more when not using a cmd file). It is telling you that some sections were not explicitly specified. Hence the linker will use default setting for them. And the last warning is telling you that you did not explicitly set your stack size so it will use the default size of 0x400.

    Since CCS used default settings for the warnings and you did not have any errors, your build was actually successful:

    Timothy Ball said:
    'Finished building target: Test2.out'

    That indicates that your executable was successfully generated.

    Thanks

    ki

  • Hi Ki:

    I had assumed that I should save the Target Configuration in the Workspace directory being used.

    Evidently, as I learned through trial and error, that is not possible and, apparently, one MUST use the Use shared location.

    If the Use shared location is required, why is there an option not use (i.e. check) it?

    Thanks,

    Tim

  • Hi Ki:

    I noticed that it (so far) appears that only when a new Workspace with a newly created Target Configuration is made (for the Simulator) with a new Project will the file 2808_RAM_lnk.cmd be created in the Workspace Project directory.

    More discoveries and details to follow,

    Tim

  • Hi Ki:

    Unfortunately, even after creating a new Workspace, a new Target Configuration (for Simulator), and new Project, a .cmd file was not created in the Workspace Project directory.

    So, I copied the 2808_RAM_lnk.cmd file that had been mysteriously created in a previous episode but the following compile errors result:

    **** Build of configuration Debug for project Test1 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all

    'Building file: ../main.c'

    'Invoking: C2000 Compiler'

    "C:/ti/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -g --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.1.0/include" --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp"  "../main.c"

    'Finished building: ../main.c'

    ' '

    'Building target: Test1.out'

    'Invoking: C2000 Linker'

    "C:/ti/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -g --diag_warning=225 --display_error_number --diag_wrap=off -z -m"Test1.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/include" --reread_libs --display_error_number --diag_wrap=off --rom_model -o "Test1.out"  "./main.obj" -l"libc.a" "../2808_RAM_lnk.cmd"

    <Linking>

    warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size

    "../2808_RAM_lnk.cmd", line 117: error #10099-D: program will not fit into available memory.  run placement with alignment/blocking fails for section ".stack" size 0x400 page 1.  Available memory ranges:

       RAMM1        size: 0x380        unused: 0x380        max hole: 0x380    

    error #10010: errors encountered during linking; "Test1.out" not built

    >> Compilation failure

    gmake: *** [Test1.out] Error 1

    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Hi Ki:

    Below are precisely the steps performed in a failed attempt to run the CCS Simulator:

    1. Execute CCStudio.exe (i.e. click on cube icon)

    2. Workspace Launcher window appears   

       a. Select Workspace (e.g.): C:\ti_Workspace   

       b. Click: OK

    3. Create Target Configuration for Target (i.e. Emulator Connection and Device)   

       a. Click menu item: View -> Target Configurations   

       b. Target Configurations window appears      

          1. Click button (upper right side): New Target Configuration File      

          2. New Target Configuration window appears         

             a. Set File name (default): NewTargetConfiguration.ccxml         

             b. MUST leave checked: Use shared location         

             c. Click: Finish         

             d. NewTargetConfiguration.ccxml Basic General Setup window appears            

                1. Set Connection: Texas Instruments Simulator            

                2. Check Device: F283x CPU Cycle Accurate Simulator            

                3. Click: Save         

             e. Close NewTargetConfiguration.ccxml window      

          3. In Target Configurations window         

             a. Expand directory: User Defined         

             b. Right-click: NewTargetConfiguration.ccxml         

             c. Click: Set as Default   

       c. Close Target Configurations window

    4. Create Project and Build   

       a. Click menu item: Project -> New CCS Project   

       b. CCS Project window appears      

          1. Set Project name (e.g.): Test      

          2. Set Device Family: C2000      

          3. Set Variant: Generic 28xx Device      

          4. Set Project templates and examples:         

             a. For C language: Empty Project (with main.c)         

             b. For Assembly: Empty Assembly-only Project      

          5. Click: Finish      

          6. Main.c window appears   

       c. Build Project      

          1. Click menu item: Project -> Build All      

          2. Console CDT Build Console window appears

    FAILS TO COMPILE with the following (and no 2808_RAM_lnk.cmd file was produced):

    **** Build of configuration Debug for project Test **** "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all 'Building file: ../main.c' 'Invoking: C2000 Compiler' "C:/ti/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -g --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.1.0/include" --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp"  "../main.c" 'Finished building: ../main.c' ' ' 'Building target: Test.out' 'Invoking: C2000 Linker' "C:/ti/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -g --diag_warning=225 --display_error_number --diag_wrap=off -z -m"Test.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/include" --reread_libs --display_error_number --diag_wrap=off --rom_model -o "Test.out"  "./main.obj" -l"libc.a" <Linking> warning #10247-D: creating output section ".ebss" without a SECTIONS specification warning #10247-D: creating output section ".reset" without a SECTIONS specification warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size 'Finished building target: Test.out' ' ' **** Build Finished ****

    Thank you for your time and efforts in resolving this issue,

    Tim

  • If I remember correctly, the SPR prefix originated around 1980.  It was used with all of the literature and documentation for our new TMS320 Digital Signal Processing family.  The TMS32010 was the first device in a series of commercially available parts from TI, and it was implemented in N-MOS technology.  The TMS320C10 shortly followed as a replacement, and it was implemented in C-MOS technology.  SPR stood for Signal Processing Resource and it was always followed by another letter – U for user’s guide, A for application report, B for brochure, etc.  Later we added C for CD-ROM.  Any letters after the documentation number represented the revision.

    I hope this helps.

    - Ken

  • Ken:

    Thank you for the informative information.

    The Texas Instruments DSP (Digital Signal Processor) file names make complete sense now and will be easier to remember and differentiate. That is, that SPR stands for Signal Processing Resource followed by U for user’s guide, A for application report, B for brochure, etc.

    Appreciatively,

    Tim

  • Hi Ki:

    In the previous episode, I meant to write FAILS TO COMPILE without WARNINGS.

    I am now attempting to single step the simulation of the compiled code (with warnings reported during compilation).

    However, after clicking on View -> Debug, the debug buttons are not active.

    How does one go about single stepping through the code (which had compiler warnings reported) with the debugger during simulation?

    Thank you again,

    Tim

  • Hi TI:

    Continued from the previous episode (after: 4. Create Project and Build):

    5. Execute Debugger using compiled Project code while utilizing the Simulator (as set as default User Defined Target Configuration)   

       a. Click menue item: Run -> Debug (or click Debug icon)      

          NOTE: The Debugger will not execute by opening the Debug window by clicking menu item: View -> Debug   

       b. Step through the code using the Debug window icons (or function keys)

    QUESTIONS:

    1. Why does the following information pop up in a window after stepping past the return in main.c?   

       Can't find a source file at "/tmp/TI_MKLIBPOmcDc/SRC/args_main.c"   

       Locate the file or edit the source lookup path to include its location.

    2. Why does the followig information pop up in a window after clicking on the Debug icon Reset CPU?   

       No source available for "0x0"

    That message does not appear when clicking on the Debug icon Restart.

    Thank you all,

    Tim Ball

    TDB Consulting

  • Hello TI:

    Texas Instruments might consider making simple and effective Tutorial Videos similar to the one at the Youtube.com link below:

       http://www.youtube.com/watch?v=TIsiRmGVgUI

    That individual, Paul in Pittsburgh, has produced a long series of excellent Tutorial Videos for the hugely popular MicroChip Peripheral Interface Controllers (PIC), which are sometimes referred to (erroneously?) as Programmable Intelligent Computers.

    Many of those Tutorial Videos are given in a set as at the link below:

       http://www.youtube.com/watch?v=ksYe_FFAlEM&list=PL41A6079DC06BB313

    We all understand that "a picture is worth a thousand words". Imagine how many words a video, which consists of thousands of pictures, is worth...

    Thank you all for your time and efforts in providing the details needed to execute the Code Composer Studio (CCS) Software Simulator for C2000 devices (e.g. the TMS320F2809 DSP) (excluding the peripherals),

    Timothy D. Ball

    TDB Consulting

    Web Site: http://TDBConsulting.org/

  • Hello World:

    The Texas Instruments Code Composer Studio Help documentation states the following in regard to the asm statement used for inline assembly code in C code:

    "The inserted code must be a legal assembly language statement. Like all assembly language statements, the line of code inside the quotes must begin with a label, a blank, a tab, or a comment (asterisk or semicolon)."

    When the following code is compiled:   

       asm("MOV ACC,#0");

    the following error is reported:   

        [E0002]   

       Invalid mnemonic specification   

       MOV ACC,#0

    However, when the following code is compiled, no error is reported and the code executes (and the accumulator is loaded with zero):   

       asm(" MOV ACC,#0");

    The reason for that error will be "left as an excersize for the reader".

     

  • In assembly language programming – labels (which if used are optional) MUST begin in column 1.  The mnemonic field follows the label field and it CANNOT start in column 1, or else it will be interpreted as a LABEL.  Therefore, the "SPACE" in column 1 in the inline assembly instruction.

  • Unless I am mistaken, the C/C++ inline assembly instructions for other compilers I have used previously did not require the space in the asm statement. I will explore previous code and take note of future code.

    Thank you,

    Tim

  • As you stated in your earlier post from the C-Compiler User's Guide:

    The inserted code must be a legal assembly language statement. Like all assembly language statements, the line of code inside the quotes must begin with a label, a blank, a tab, or a comment (asterisk or semicolon). The compiler performs no checking on the string; if there is an error, the assembler detects it.

    That is - if column 1 is not the start of a label or comment, then it should be a blank or tab.

    For more information about the assembly language statements, see the TMS320C28x Assembly Language Tools User's Guide

    .

  • Hello Ken (or Ki):

    In assembly code, I would like to simply create a RAM variable (i.e. a .bss uninitialized variable) and then set that variable to a value.

    Evidently, there is something wrong with the assembly code and with the two the debug expressions variables (in red) below:

    Note that the additional .bss options are included that are supposedly required to include debug information.

    Questions:

    1. In the assembly program above, why is the value of 5 in the accumulator not being written to the ptr variable location by: MOVL @ptr, ACC?

    2. Why does the debugger only accept the ptr variable name (i.e. ptr) but refuses to give the value at ptr (i.e. @ptr) or the address of ptr (i.e. as &ptr).

    3. I also noticed that the compiler reports an "Illegal operand combination for the code: MOVL ACC, #5. Why is that MOVL instruction not accepted when the accumulator is a 32 bit register?

    I have reviewed all available C2000 Texas Instruments assembler manuals, the Code Composer Help, many of the TI forums, and other sources on the Internet but have not been able to determine how to simply set the value of a .bss (i.e. RAM) variable.

    Thank you.

     

  • Timothy Ball said:

    1. In the assembly program above, why is the value of 5 in the accumulator not being written to the ptr variable location by: MOVL @ptr, ACC?

    You are using direct addressing (MOV @ptr, ACC).  You therefore need to set the datapage first.  See section 5.4 of SPRU430e.  Also, .bss allocates 16-bit words, not bytes.  Everything on C28x is words.  So, you have allocated 4 16-bit words for 'ptr'.  I don't think that is what you want.  I think you want two words, unless ptr is supposed to be an array.

    .bss ptr, 2, 1, 0 long
    MOV AL, #5
    MOVW DP, #ptr
    MOV @ptr, AL

    or you could use indirect addressing, for example:

    .bss ptr, 2, 1, 0, long
    MOV AL, #5
    MOVL XAR0, #ptr
    MOV *XAR0, AL

    Timothy Ball said:

    2. Why does the debugger only accept the ptr variable name (i.e. ptr) but refuses to give the value at ptr (i.e. @ptr) or the address of ptr (i.e. as &ptr).

    You need to make 'ptr' global so the debugger can see it.

       .global ptr

    Timothy Ball said:

    3. I also noticed that the compiler reports an "Illegal operand combination for the code: MOVL ACC, #5. Why is that MOVL instruction not accepted when the accumulator is a 32 bit register?

    #5 is an immediate value (a number).  The largest immediate value the instruction set supports is 16 bits wide (well, 23 bits for addresses, but that is a different matter).  A 32-bit immediate would require an opcode larger than 32 bits because the immediate value would occupy 32 bits and you'd need more bits to hold the rest of the opcode.  The CPU architecture allows only 16- and 32-bit instructions.  So, there is no MOVL for an immediate value.

    -----

    There is limited need for assembly language on the C28x, and most people just use C.  I assume you are handwriting some time critical function and want to use assembly.  My suggestion would be to code it in C first.  Then you can cheat and look at the compiler generated assembly code to see what the compiler did.  It can also be instructive to write very simple C code that does one particular thing, for example, creating a global variable and then loading a value to it, to see what the compiler does.  Then you can copy it.

    - David

  • Hi Tim,

    This in response to some of your earlier posts. I'm not sure if you resolved them yet or not:

    Timothy Ball said:
    (and no 2808_RAM_lnk.cmd file was produced):

    Since you chose 'Generic 28x device", it will not copy in a cmd file. A cmd file only gets pulled in when you specify a specific device. So this is expected behavior

    Timothy Ball said:
    FAILS TO COMPILE without WARNINGS.

    The warnings, for the most part, can be ignored. Since you did not explicitly set a stack size, the linker will do it for you, using a default value. This is the last warning. The first two are warning that you did not explicitly have a section specification for .ebss and .reset sections. So the linker will use defaults for those also. This should not be a problem since you are on simulator and it should not affect debug in any way

    Timothy Ball said:

    However, after clicking on View -> Debug, the debug buttons are not active.

    How does one go about single stepping through the code (which had compiler warnings reported) with the debugger during simulation?

    Sounds like you did not start a debug session. But I see in your latter posts that it sounds like you have this figured out.

    Thanks

    ki

  • Timothy Ball said:
    NOTE: The Debugger will not execute by opening the Debug window by clicking menu item: View -> Debug  

    That action simply opens the Debug view window. Nothing more. As you found out, you need to still start the debugger and load your code, etc

    Timothy Ball said:

    1. Why does the following information pop up in a window after stepping past the return in main.c?   

       Can't find a source file at "/tmp/TI_MKLIBPOmcDc/SRC/args_main.c"   

       Locate the file or edit the source lookup path to include its location.

    It means that the debugger could not find that source file. The reasons can vary. Among them:

    - The location of the source files have changed since the program was built

    - debug source search paths are incorrect

    Basically make sure the debugger knows where to look. Check out slides 49-53 of the below presentation:

    http://downloads.ti.com/dsps/dsps_public_sw/sdo_ccstudio/presentations/CCSv5_Tips_&_Tricks.pdf

    Timothy Ball said:

    2. Why does the followig information pop up in a window after clicking on the Debug icon Reset CPU?   

       No source available for "0x0"

    Because there is no code at that address. Resetting the CPU will set the PC to 0x0 in your case and there is no source or code there

    Timothy Ball said:
    That message does not appear when clicking on the Debug icon Restart.

    Restart will set the PC to the entry point of your application. There is code and source associated there.

    Thanks

    ki

  • Hi Tim,

    Note that we recommend people start a different thread for each different question. It makes it easier to follow and for people to find answers. For example, the headline for this thread is not really applicable for the majority of the discussion in the thread.

    Thanks

    ki

  • Hi Dave and Ki:

    Yes, I eventually figured those out.

    I had also previously used the .global ptr and also previously (and currently) loaded DP.

    I tried the code Dave provided but it did not compile because the 0 value was required in the .bss statement as in the code I used.

    Could the reason the Debugger is not showing the variables properly have anything to  do with the fact that I am using the "Simulator" as the Target and not an actual Emulator?

    I will dig down deeper into the manuals.

  • Hello Dave, Ken, and Ki:

    The original assembly code program above works just fine as shown below. I just had to view the .bss (i.e. RAM) memory using the Memory Browser as shown below:

    I don't know why the Expressions window won't display the .bss data. I also don't know why the Expressions window displays the Accumulator (ACC) register properly but not the Data Pointer (DP).

    I would like to write the software in C but the existing system employs all assembly code only, and there is lots of it.

    Now that this post has been answered, how do I "close the thread by selecting the post with the "answer" and using the green "Verify Answer "option" to then get the "This question is answered" to display?

    Thank you all for your time and efforts,

    Tim Ball

    TDB Consulting

    P.S. I never did figure out how to get this Forum editor to single space.

  • Tim,

    Your original code is not correct.  It just happens to be working because you have the .bss section linked to M0SARAM around address 0x0000, and that is the default data page (DP) setting.  The code has to set the DP as I showed previously.

    I will close this thread.

    - David

  • Hi Dave:

    I understand that DP is needed to change between 64 byte pages and that the default is zero upon startup as used in the original code.

    Thank you,

    Tim

  • Tim,

    Be careful.  There are no byte quantities on C28x.  Everything is 16-bit words.  The data pages are 64 word pages.

    - David

  • Dave:

    Thank you for the correction about the 16 bit word and not 8 bit byte quantities.

    Appreciatively,

    Tim