Reply by Ali Irfan Ahmed January 19, 20032003-01-19
Hi,

I am just adding more to this solution.

Doing so will not make ur variable visible to "C" code. the correct way to do so
will be

asm(".global _d1; .var _d1[10]="coeff.dat");

Now to access this variable in any C file declare it as .extern int d1[]; and
access the array as usual and in assembly file as .extern _d1. and access the
variable as _d1. the leading underscore in the name of the variable is usual way
for ANSI C compiler to mangle the name of global variable. C++ compiler uses a
different type of mangaling. So it will be better if u use the other format

int d1[10] = {
"#include coeff.dat;"
};
with comma delimited file for coeff.dat as this will keep ur code compatible to
C and C++ compiler.

Regards,
Ali Irfan Ahmed.
----- Original Message -----
From: Federico Zandanel
To: ;
Sent: Saturday, January 18, 2003 9:36 PM
Subject: Re: [adsp] help on adsp-2181 needed Try to insert this line in your C code as an Assembly line with the "asm"
command:

asm(".var d1[10]="coeff.dat");

----- Original Message -----
From: <>
To: <>
Sent: Friday, January 17, 2003 9:58 AM
Subject: [adsp] help on adsp-2181 needed > hi,
> Im working on adsp-2181 using VDSP++ 3.0.
> To get data from a file we can use
> .var d1[10]="coeff.dat";
>
> when programming in assembly. I would like to do the same in C.
>
> previous versions used the format
>
> int dm d1[10]={
> #include "coeff.dat"
> };
> but the compiler is giving errors.
>
> ANY ideas? >
>
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all" if
you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/ >
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you want
your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to

To Post: Send an email to

To Leave: Send an email to

Archives: http://groups.yahoo.com/group/adsp

Other Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/


Reply by Federico Zandanel January 18, 20032003-01-18
Try to insert this line in your C code as an Assembly line with the "asm"
command:

asm(".var d1[10]="coeff.dat");

----- Original Message -----
From: <>
To: <>
Sent: Friday, January 17, 2003 9:58 AM
Subject: [adsp] help on adsp-2181 needed > hi,
> Im working on adsp-2181 using VDSP++ 3.0.
> To get data from a file we can use
> .var d1[10]="coeff.dat";
>
> when programming in assembly. I would like to do the same in C.
>
> previous versions used the format
>
> int dm d1[10]={
> #include "coeff.dat"
> };
> but the compiler is giving errors.
>
> ANY ideas? >
>
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all" if
you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/ >


Reply by Ali Irfan Ahmed January 18, 20032003-01-18
Hi,
 
The syntax is the same but u have to make the coeff file in the following format
 
1,2,3,4,5,6,7
 
instead of the usual newline terminated format
 
1
2
3
4
5
6
7
 
Regards,
Ali Irfan Ahmed.
----- Original Message -----
From: ">invictus_4_ever <i...@yahoo.com>
To: a...@yahoogroups.com
Sent: Friday, January 17, 2003 1:58 PM
Subject: [adsp] help on adsp-2181 needed

hi,
   Im working on adsp-2181 using VDSP++ 3.0.
 To get data from a file we can use
.var      d1[10]="coeff.dat";

when programming in assembly. I would like to do the same in C.

previous versions used the format

int dm d1[10]={
               #include "coeff.dat" 
              };
but the compiler is giving errors.

ANY ideas?
 
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  Send an email to a...@yahoogroups.com

To Post:  Send an email to a...@yahoogroups.com

To Leave: Send an email to a...@yahoogroups.com

Archives: http://groups.yahoo.com/group/adsp

Other Groups: http://www.dsprelated.com/groups.php3
 

">http://docs.yahoo.com/info/terms/



Reply by invictus_4_ever January 17, 20032003-01-17
hi,
Im working on adsp-2181 using VDSP++ 3.0.
To get data from a file we can use
.var d1[10]="coeff.dat";

when programming in assembly. I would like to do the same in C.

previous versions used the format

int dm d1[10]={
#include "coeff.dat"
};
but the compiler is giving errors.

ANY ideas?