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.

New User: Assembler snippets.

Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28377D

Hi Guys, I'm new here. I've migrated from Atmel to TI microcontrollers.

I've ordered the TMDXDOCK28377D from TI and should be receiving it in  a few days. YAY So happy :)

Anyway, I am an assembler programmer and have been studying the TMS320C28x assembly instructions

manual and absolutely LOVE the assembler instructions. Specially the LOOPNZ instruction. :)

So what I'm asking is what do I need to start programming in assembler when I receive my kit in a few days.

Is their a site with assembly snippets for the TMS320C28x ?

The kit says that CCS is included in the package So I can't wait to start programming in Assembler.

It also comes with a USB cable, is this how I download the code to flash?

So any pointers to help me get going in assembler.

Thanks guys and I really can't wait to start assembler programming and getting my project off the ground.

Pete

  • Hi Peter,

    Welcome to the TI family and TIE2E community; also to the C2000 forum!

    So what I'm asking is what do I need to start programming in assembler when I receive my kit in a few days.

    Peter, Delfino's F28377D being one of the most advanced MCU in C2000 family; I'm not sure whether asm coding would help you much. Especially controlSuite is the suite that contains all the peripheral header files and example codes for all C2000 mcus. You can download the same and go through the files. All the example codes are in C and none in asm.

    Is their a site with assembly snippets for the TMS320C28x ?

    Nope, the manual SPRU513G TMS320C28x Assembly Language Tools is the only reference guide for asm users.

    It also comes with a USB cable, is this how I download the code to flash?

    Once programming is done in CCS, all you've to do is build the program and then debug it. Debugging the code itself will first dump the code into the kit and then let you continue the debug process.

    So any pointers to help me get going in assembler.

    Asm.... I would like you to explore C/C++ for this kit as support for ASM here (in this forum) would be very limited (if you have any doubts in future)!

    Regards,

    Gautam

  • Hi Gautam, thanks for the warm welcome.

    WOW !  No assembler support?  Is that from TI as well?

    My project is a VGA controller and I need to count every cycle for the correct video timing and you can't do that in C.

    I wrote the program on 32bit Atmel RISC chips in assembler but the chip was too slow for the resolution I need.

    Sometimes if I needed assembler info I would build a C program that uses the peripherals I needed and then view the disassembly. That helped. Can you do the same within CCS?

    I guess I'm on my own when it comes to Assembler.

    Does TI have a specific support dept for assembler?

    Pete

  • WOW !  No assembler support?  Is that from TI as well?

    Peter, you'll get help on asm but it would be limited (that's what I said).

    Sometimes if I needed assembler info I would build a C program that uses the peripherals I needed and then view the dis-assembly. That helped. Can you do the same within CCS?

    I'm not sure about that but yes during my engineering years I'd done the same for 8051 mcu :)

    Also, you can use time critical code in asm within C codes; usually we do this to save cpu cycles. Other than that, whole code using ASM... I personally wouldn't prefer :)

    I would like you to wait for few hours when my dear pals at TI would be at work and help you close all your queries. At the same time, I'm forwarding your query to a TIer.

    Goodluck & Regards,

    Gautam

  • Hi Pete,

    If you have questions regarding assembly code, you can always post to this forum. In addition to the assembler guide (SPRU513) we also have the C28 instruction set guide (SPRU430E), the FPU instruction guides (SPRUEO2A, SPRAAN9A) and the extended instruction guide (SPRUHS1) for the accelerators. 

    Now there aren't any tutorials on assembly coding for the C28 but you can always use the compiler generated assembly as a starting point. In the project properties under Build->C2000 Compiler->Advanced Options->Assembler Options you can turn on the --keep_asm and --src_interlist options. The compiler will generate the assembly code and show the corresponding C code in comments. 

    Also under Advanced Options->Advanced Debug Options you can turn off the debug information with --symdebug:none . You will see the difference in the assembly files with and without this option. This is the way i usually write assembly - start with C code and then hand tweak.

    Under controlSUITE -> libs -> dsp/math, you will find a bunch of libraries; most of the routines in these libs are assembly and the source is provided. You might find some useful snippets there as well.

  • Hi Vishal, thank you for your support in Assembler.

    I've downloaded most of the Guides you mentioned and reading as I learn about the C28.

    I've written a small assembler program in CCS6 and when I build It says NO Entry point. Setting to 0.

    It sound like I have to set an entry point for the assembler code is that correct?  I tried .ORG but that didn't work.

    Could you post some basic startup code for the TMS320F28377D. Once I have the correct startup code I can then begin my project.

    Again, thank you for the support.

    Pete

  • Ok im at a bit of a loss here. Are you modifying an existing project and adding in your assembly routine or did you start a project out from scratch?. It seems like the run time support library is missing from this project...usually the entry point is the _cinit00_ (or something like that) routine in the RTS lib. I would take an existing project from controlSUITE (from the device_support folder) and then add the asm routine in there.