Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | query.....adsp-218x

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

query.....adsp-218x - Sameer - Sep 6 4:55:00 2003



Hi ,

I have a practical problem of calling the assembly routines from C code.

My C code And Assembly Code are in different files. I am able to execute the

inline assembly statements...but not able to call the assebmly functions of
different file...

i am working for the ADSP-218x series...precisely adsp-2189

kindly guide me asap.....





(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: query.....adsp-218x - Mike Rosing - Sep 6 21:16:00 2003

On Sat, 6 Sep 2003, Sameer wrote:

> I have a practical problem of calling the assembly routines from C code.
>
> My C code And Assembly Code are in different files. I am able to execute the
>
> inline assembly statements...but not able to call the assebmly functions of
> different file...
>
> i am working for the ADSP-218x series...precisely adsp-2189
>
> kindly guide me asap.....

Al Clark can help more than I can on this one, but I bet your problem
has to do with C specifics which you don't normally see. You need to
find out how the compiler passes arguments and make sure your assembler
routines do exactly the same thing. In line assembly is different, there
is no argument passing.

One thing you can do is build your assembler files inside a C called
subroutine and then you don't have to worry about how C works. But for
the 218x series, I think eliminating C altogether makes more sense.
That way you don't have to worry about C overhead at all.

Patience, persistence, truth,
Dr. mike





(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Re: query.....adsp-218x - Al Clark - Sep 6 21:46:00 2003

At 04:16 PM 9/6/2003, Mike Rosing wrote:
>On Sat, 6 Sep 2003, Sameer wrote:
>
> > I have a practical problem of calling the assembly routines from C code.
> >
> > My C code And Assembly Code are in different files. I am able to
> execute the
> >
> > inline assembly statements...but not able to call the assebmly functions of
> > different file...
> >
> > i am working for the ADSP-218x series...precisely adsp-2189
> >
> > kindly guide me asap.....
>
>Al Clark can help more than I can on this one, but I bet your problem
>has to do with C specifics which you don't normally see. You need to
>find out how the compiler passes arguments and make sure your assembler
>routines do exactly the same thing. In line assembly is different, there
>is no argument passing.
>
>One thing you can do is build your assembler files inside a C called
>subroutine and then you don't have to worry about how C works. But for
>the 218x series, I think eliminating C altogether makes more sense.
>That way you don't have to worry about C overhead at all.
>
>Patience, persistence, truth,
>Dr. mike I probably have written as much 218x code as anyone, and I have never
written a single line of C for this family. I agree with Mike, avoid C with
this processor family. The 21xx is not very C friendly and the assembly
language is easy (whicjh you already know since you are trying to call an
assembly function).

I can't add any thing more than Mike
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com




(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: query.....adsp-218x - Leon Heller - Sep 7 0:32:00 2003


>From: "Sameer" <>
>To:
>CC:
>Subject: [adsp] query.....adsp-218x
>Date: Sat, 06 Sep 2003 10:25:23 +0530 (IST)
>
>Hi ,
>
>I have a practical problem of calling the assembly routines from C code.
>
>My C code And Assembly Code are in different files. I am able to execute
>the
>
>inline assembly statements...but not able to call the assebmly functions of
>different file...
>
>i am working for the ADSP-218x series...precisely adsp-2189
>
>kindly guide me asap..... I don't recall having any problems doing this, but it was some time ago. ADI
has details in their documentation. What exactly is going wrong?

Leon
--
Leon Heller, G1HSM Tel: +44 1424 423947
Email:
My web page: http://www.geocities.com/leon_heller

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger




(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: query.....adsp-218x - Sameer - Sep 7 13:37:00 2003


i got the solution for the same....actually the LDF file was creating the
whole problem, now its been sorted out....
thanx alot for the support...

Sameer

Leon Heller wrote: >>From: "Sameer" <>
>>To:
>>CC:
>>Subject: [adsp] query.....adsp-218x
>>Date: Sat, 06 Sep 2003 10:25:23 +0530 (IST)
>>
>>Hi ,
>>
>>I have a practical problem of calling the assembly routines from C code.
>>
>>My C code And Assembly Code are in different files. I am able to execute
>>the
>>
>>inline assembly statements...but not able to call the assebmly functions of
>>different file...
>>
>>i am working for the ADSP-218x series...precisely adsp-2189
>>
>>kindly guide me asap..... >I don't recall having any problems doing this, but it was some time ago.
ADI
>has details in their documentation. What exactly is going wrong?
>
>Leon
>--
>Leon Heller, G1HSM Tel: +44 1424 423947
>Email:
>My web page: http://www.geocities.com/leon_heller
>
>_________________________________________________________________
>It's fast, it's easy and it's free. Get MSN Messenger today!
>http://www.msn.co.uk/messenger >_____________________________________
>/groups.php3





(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )