Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

Assembly language programs on TMS320F2812

Other Parts Discussed in Thread: TMS320F2812

Hi All,

I am looking for some assemblylevel language programs in TMS320F2812.I am trying to execute a very simple assembly program in CCSV4,but to my surprise that simple progarm donot work.I tried options like selecting the option "Test assembly project" while creating a new project and also the option available under the Build properties->Symbol management providing the main as the starting point and also the linker options but unfortunately none of the options work and finally it throws out me errors like unresolved symbol _c_int00 and unresolved main,function main not found.

Hence,it would be great if anyone could provide me some simple assemblylevel language programs for TMS320F2812.Also,it would be great if you could tell me the exact procedure for building the project(which involves options to be included) and linking and executing the project.

Thanks,

Shilpa

 

 

  • Shilpa,

    I'm not sure if this is the best forum to get asm examples for the 2812. I think the C2000 forum is a better starting point.

    ki

  • Shilpa,

    If this is as assembly-only project, did you make sure to check the box in the CCS New Project wizard for "Treat as an Assembly-only project"? This will disable the linking in of the C runtime library which,in turn, should not try to resolve the _c_int00 symbol. Other than this, specifying the entry point to the assembly routine via the Build Properties->Linker->Symbol Management->--entry_point option should be sufficient.

     

  • Hi Aarti,

    I have tried out all those options,despair it does not work :( 

    I think there is some other option which I have grayed out.

    Regards,

    Shilpa

     

     

  • Hi Ki,

    I will post the same question to C2000 forum.

    Thanks,

    Shilpa

     

  • Shilpa,

    Can you zip up your project folder and attach it here? I can try to take a look to see where the linker errors are coming from.

  • Hi Aarti,

    They are the compiler errors and not the linker errors, its disappointing that the first stage of my program development is itself failing.Please find attached a very simple assembly project which has only one NOP instruction.

    Please guide me so that I will be able to execute a assembly code successfully!!

    Regards,

    Shilpa

     

    First_assembly.zip
  • Shilpa,

    If you have a label for the entry point, you need to declare it as a global symbol with the .global directive, for the linker to be able to recognize it when it is specified for the entry point.

    For instance:

      .global label
    label:
       NOP

    Note that the first column in the assembly source file is reserved for the first character of a label or symbol. Please take a look at Page 13 of the C28x Assmbly Language Tools Users Guide, http://www.ti.com/lit/spru513

    When linking, specify "label" as the entry point (--entry_point option).

  • Hi Aarti,

    I just copied and pasted the code that you had written by just replacing the label with main and I got the errors as indicated below:

    **** Build of configuration Debug for project first ****

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake -k all 

    'Building file: ../first.asm'

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c2000/bin/cl2000" --silicon_version=28 -g --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c2000/include" --diag_warning=225 --large_memory_model --unified_memory --preproc_with_compile --preproc_dependency="first.pp"  "../first.asm"

    "../first.asm", ERROR!   at line 1: [E0002] Invalid mnemonic specification

    .global main

    1 Assembly Error, No Assembly Warnings

    Errors in Source - Assembler Aborted

     

    >> Compilation failure

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: *** [first.obj] Error 1

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.

    Build complete for project first

    /************************************************************************************************/
    Please refer to the attached snapshot that indicates the same.
    Thanks,
    Shilpa

    snapshot.doc
  • Shilpa,

    You have .global and NOP specified in the first column of the source file which is reserved for labels. Please see my earlier note about the first column in the assembly source file being reserved for the first character of a label or symbol.

  • Hi Aarti,

    Thanks for the response.Unfortuntaley my free CCS license has got expired.I will try out the options as suggested by you once I install the CCS afresh.However thanks for the inputs & I would be marking this post as verfied answer.

    Thanks,

    Shilpa

  • Thanks Aarti, your suggestion solved my problem too.

    Emanuele