DSPRelated.com
Forums

Writing Assembly for TMS320C6416

Started by Mostafa Halas November 21, 2007
Dear All,

I wuld like to write a simple project in Assembly for the TMS320C6416 and to be assembled with the code composer v3.1.

But actually I don't find any template project for assembly or any document that tells you how to start an assembly project with code composer studio.
Please if any one know how to start an assembly project?? reply to me soon !

Thanks

Thanks,
Mostafa Halas
Electrical Engineering Department
High Institute of Technology
Benha University
Zip Code: 13512-Benha
Kalubia
Egypt
Tel. :+2-013-323 0297 [Work]
Fax. :+2-013-323 0297
Mostafa,

On Nov 21, 2007 6:14 AM, Mostafa Halas wrote:
> Dear All,
>
> I wuld like to write a simple project in Assembly for the TMS320C6416 and
> to be assembled with the code composer v3.1.
>
> But actually I don't find any template project for assembly or any document
> that tells you how to start an assembly project with code composer studio.

Try:
1. TMS320C6000 Programmer's Guide [spru198]

2. Also write a simple program [NOT 'hello world' - do not use any
I/O] that adds 2 variables and exits. Setup the project to save the
'asm' file - it might give some insight.

3. There are [or were] some asm examples shipped with some versions of
CCS. There are also some hand coded benchmarks at ti.com.

mikedunn
> Please if any one know how to start an assembly project?? reply to me soon
> !
>
> Thanks
>
> Thanks,
> Mostafa Halas
> Electrical Engineering Department
> High Institute of Technology
> Benha University
> Zip Code: 13512-Benha
> Kalubia
> Egypt
> Tel. :+2-013-323 0297 [Work]
> Fax. :+2-013-323 0297
>
>

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Mostafa,

On 11/26/07, Mostafa Halas wrote:
> Michael,
>
> Thanks for your reply. I did make an assembly code file with simple instructions and add this file to a blank project then I added the .cmd file.
> Here is the assembley code
> .text

An easy way to lose the warning is...
Instead of just '.text', you can add the following to the top of your asm file:

.def _c_int00 ;make symbol external
.text
_c_int00: ;use as entry point to make
compiler happy

This warning is a bit stupid for an embedded compiler error to
generate [it is harmless]. 'c_int00' is the default entry point used
by the C compiler [anytime that you generate a C program and load it,
CCS will be pointing to this label].

mikedunn
> mvk 5,A1
> loop:
> nop
> || add A15,3,A15
> || nop
> || nop
> || nop
> || nop
> || nop
> || nop
> add -1,A1,A1
> [A1] b loop
> nop 5
> .end
>
> And her is the .cmd file content
> MEMORY
> {
> ISRAM : origin = 0x00, len = 0x00100000
> }
>
> SECTIONS
> {
> .text > ISRAM
> }
>
> I build the project and it have no errors but it gives me one warning as follow:
> "warning: entry point symbol _c_int00 undefined"
> Please if you know what is the reason of that warning tell me.
> Michael Dunn wrote:
>
> Mostafa,
>
> On Nov 21, 2007 6:14 AM, Mostafa Halas wrote:
> > Dear All,
> >
> > I wuld like to write a simple project in Assembly for the TMS320C6416 and
> > to be assembled with the code composer v3.1.
> >
> > But actually I don't find any template project for assembly or any document
> > that tells you how to start an assembly project with code composer studio.
>
> Try:
> 1. TMS320C6000 Programmer's Guide [spru198]
>
> 2. Also write a simple program [NOT 'hello world' - do not use any
> I/O] that adds 2 variables and exits. Setup the project to save the
> 'asm' file - it might give some insight.
>
> 3. There are [or were] some asm examples shipped with some versions of
> CCS. There are also some hand coded benchmarks at ti.com.
>
> mikedunn
> > Please if any one know how to start an assembly project?? reply to me soon
> > !
> >
> > Thanks
> >
> > Thanks,
> > Mostafa Halas
> > Electrical Engineering Department
> > High Institute of Technology
> > Benha University
> > Zip Code: 13512-Benha
> > Kalubia
> > Egypt
> > Tel. :+2-013-323 0297 [Work]
> > Fax. :+2-013-323 0297
> >
> > --
> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>
> Thanks,
> Mostafa Halas
> Electrical Engineering Department
> High Institute of Technology
> Benha University
> Zip Code: 13512-Benha
> Kalubia
> Egypt
> Tel. :+2-013-323 0297 [Work]
> Fax. :+2-013-323 0297
> ________________________________
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Mostafa,

Congradulations!!

On 11/27/07, Mostafa Halas wrote:
> Michael,
>
> Thanks a lot for your helpful reply.
> I did what you told me and it works but with the addition of the following:
> from Project ->Build Option -> Linker -> I changed the Autoinint model from " Load-Time Initialization" to "No Autoinintialization".
> I think that is because I don't add any load-time files or command and we did point to _C_int00 manually in the code.

"No Autoinintialization" is correct - autoinitialization is only for C code.

Good luck on your quest.

mikedunn
>
> Again thanks for your help, I will contact you again if I need more help,
>
> See you ..
> Michael Dunn wrote:
>
> Mostafa,
>
> On 11/26/07, Mostafa Halas wrote:
> > Michael,
> >
> > Thanks for your reply. I did make an assembly code file with simple instructions and add this file to a blank project then I added the .cmd file.
> > Here is the assembley code
> > .text
>
> An easy way to lose the warning is...
> Instead of just '.text', you can add the following to the top of your asm file:
>
> .def _c_int00 ;make symbol external
> .text
> _c_int00: ;use as entry point to make
> compiler happy
>
> This warning is a bit stupid for an embedded compiler error to
> generate [it is harmless]. 'c_int00' is the default entry point used
> by the C compiler [anytime that you generate a C program and load it,
> CCS will be pointing to this label].
>
> mikedunn
>
> > mvk 5,A1
> > loop:
> > nop
> > || add A15,3,A15
> > || nop
> > || nop
> > || nop
> > || nop
> > || nop
> > || nop
> > add -1,A1,A1
> > [A1] b loop
> > nop 5
> > .end
> >
> > And her is the .cmd file content
> > MEMORY
> > {
> > ISRAM : origin = 0x00, len = 0x00100000
> > }
> >
> > SECTIONS
> > {
> > .text > ISRAM
> > }
> >
> > I build the project and it have no errors but it gives me one warning as follow:
> > "warning: entry point symbol _c_int00 undefined"
> > Please if you know what is the reason of that warning tell me.
> >
> >
> > Michael Dunn wrote:
> >
> >
> >
> >
> >
> > Mostafa,
> >
> > On Nov 21, 2007 6:14 AM, Mostafa Halas wrote:
> > > Dear All,
> > >
> > > I wuld like to write a simple project in Assembly for the TMS320C6416 and
> > > to be assembled with the code composer v3.1.
> > >
> > > But actually I don't find any template project for assembly or any document
> > > that tells you how to start an assembly project with code composer studio.
> >
> > Try:
> > 1. TMS320C6000 Programmer's Guide [spru198]
> >
> > 2. Also write a simple program [NOT 'hello world' - do not use any
> > I/O] that adds 2 variables and exits. Setup the project to save the
> > 'asm' file - it might give some insight.
> >
> > 3. There are [or were] some asm examples shipped with some versions of
> > CCS. There are also some hand coded benchmarks at ti.com.
> >
> > mikedunn
> > > Please if any one know how to start an assembly project?? reply to me soon
> > > !
> > >
> > > Thanks
> > >
> > > Thanks,
> > > Mostafa Halas
> > > Electrical Engineering Department
> > > High Institute of Technology
> > > Benha University
> > > Zip Code: 13512-Benha
> > > Kalubia
> > > Egypt
> > > Tel. :+2-013-323 0297 [Work]
> > > Fax. :+2-013-323 0297
> > >
> > >
> >
> > --
> > www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
> >
> >
> >
> >
> >
> > Thanks,
> > Mostafa Halas
> > Electrical Engineering Department
> > High Institute of Technology
> > Benha University
> > Zip Code: 13512-Benha
> > Kalubia
> > Egypt
> > Tel. :+2-013-323 0297 [Work]
> > Fax. :+2-013-323 0297
> >
> >
> > ________________________________
> Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.
> >
> > --
> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>
> Thanks,
> Mostafa Halas
> Electrical Engineering Department
> High Institute of Technology
> Benha University
> Zip Code: 13512-Benha
> Kalubia
> Egypt
> Tel. :+2-013-323 0297 [Work]
> Fax. :+2-013-323 0297
> ________________________________
Never miss a thing. Make Yahoo your homepage.

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php