i'm trying to include a header file with my filter coefficients, but while debuging in visualDSP++ using expression window, it shows me that my array is full of zeros instead of my coefficients does anyone knows how to fix this? this is how i'm including my file in main program float pm acoeffs[NUM_TAPS+1] = { #include "a.h" }; and this is my a.h file -0.21705450402503, 0.75444857321363, -1.61627447577916, 2.01218164151296, -1.00000000000000 thanks |
how to include header files
Started by ●March 24, 2005
Reply by ●March 24, 20052005-03-24
The # means that the line will be read by the C preprocessor, so there shouln't be any spaces to the left of the #. Try it like this: float pm acoeffs[NUM_TAPS+1] = { #include "a.h" }; Artur a rit : > > > i'm trying to include a header file with my filter coefficients, but > while debuging in visualDSP++ using expression window, it shows me > that my array is full of zeros instead of my coefficients > does anyone knows how to fix this? > > this is how i'm including my file in main program > > float pm acoeffs[NUM_TAPS+1] = > { > #include "a.h" > }; > > and this is my a.h file > > -0.21705450402503, > 0.75444857321363, > -1.61627447577916, > 2.01218164151296, > -1.00000000000000 > thanks |
Reply by ●March 25, 20052005-03-25
Hi, What if you have your a.h file like this: #define NUM_TAPS 4 float pm acoeffs[NUM_TAPS+1] = { -0.21705450402503, 0.75444857321363, -1.61627447577916, 2.01218164151296, -1.00000000000000 }; And simply in your C file: #include "a.h" ??? --- Artur <> wrote: > i'm trying to include a header file with my filter > coefficients, but > while debuging in visualDSP++ using expression > window, it shows me > that my array is full of zeros instead of my > coefficients > does anyone knows how to fix this? > > this is how i'm including my file in main program > > float pm acoeffs[NUM_TAPS+1] = > { > #include "a.h" > }; > > and this is my a.h file > > -0.21705450402503, > 0.75444857321363, > -1.61627447577916, > 2.01218164151296, > -1.00000000000000 > thanks Jaime Andr Aranguren Cardona __________________________________ |
Reply by ●March 25, 20052005-03-25
i tried that already,and it didn't help --- In , Jaime Andres Aranguren Cardona <jaime_aranguren@y...> wrote: > Hi, > > What if you have your a.h file like this: > > #define NUM_TAPS 4 > > float pm acoeffs[NUM_TAPS+1] = { > -0.21705450402503, > 0.75444857321363, > -1.61627447577916, > 2.01218164151296, > -1.00000000000000 > }; > > And simply in your C file: > > #include "a.h" > > ??? > > --- Artur <artek_04@y...> wrote: > > > > > > > > i'm trying to include a header file with my filter > > coefficients, but > > while debuging in visualDSP++ using expression > > window, it shows me > > that my array is full of zeros instead of my > > coefficients > > does anyone knows how to fix this? > > > > this is how i'm including my file in main program > > > > float pm acoeffs[NUM_TAPS+1] = > > { > > #include "a.h" > > }; > > > > and this is my a.h file > > > > -0.21705450402503, > > 0.75444857321363, > > -1.61627447577916, > > 2.01218164151296, > > -1.00000000000000 > > > > > > thanks > Jaime Andr Aranguren Cardona > jaime.aranguren@i... > jaime.aranguren@c... > > > __________________________________ > |
Reply by ●March 25, 20052005-03-25
Defining the header with the dat should work. We have a number of filter coefficients defined exactly that way. Do you use the "acoeffs" array anywhere? It might be optimized out if you don't use it. At 09:01 PM 3/24/2005, Artur wrote: >i tried that already,and it didn't help >--- In , Jaime Andres Aranguren Cardona ><jaime_aranguren@y...> wrote: > > Hi, > > > > What if you have your a.h file like this: > > > > #define NUM_TAPS 4 > > > > float pm acoeffs[NUM_TAPS+1] = { > > -0.21705450402503, > > 0.75444857321363, > > -1.61627447577916, > > 2.01218164151296, > > -1.00000000000000 > > }; > > > > And simply in your C file: > > > > #include "a.h" > > > > ??? > > > > --- Artur <artek_04@y...> wrote: > > > > > > > > > > > > i'm trying to include a header file with my filter > > > coefficients, but > > > while debuging in visualDSP++ using expression > > > window, it shows me > > > that my array is full of zeros instead of my > > > coefficients > > > does anyone knows how to fix this? > > > > > > this is how i'm including my file in main program > > > > > > float pm acoeffs[NUM_TAPS+1] = > > > { > > > #include "a.h" > > > }; > > > > > > and this is my a.h file > > > > > > -0.21705450402503, > > > 0.75444857321363, > > > -1.61627447577916, > > > 2.01218164151296, > > > -1.00000000000000 > > > > > > > > > thanks > > > > > > Jaime Andr Aranguren Cardona > > jaime.aranguren@i... > > jaime.aranguren@c... > > > > > > > > > > __________________________________ > > Steve Holle Link Communications, Inc. 1035 Cerise Rd. Billings, MT 59101 |
Reply by ●March 25, 20052005-03-25
i think this has something to do with linker description file I found out by testing on original band pass project that came with EZ-KIT, when i remove their header file with coefficients and add my, LDF reopens with expert linker and every thing works fine, i can see my coefficients. but when i remove their LDF and create a new one or if i create new project and i create new LDF, i can't see my coefficients any more... Is there some kind of special procedure to add my coefficients ? thanks --- In , Steve Holle <sholle@l...> wrote: > Defining the header with the dat should work. We have a number of filter > coefficients defined exactly that way. Do you use the "acoeffs" array > anywhere? It might be optimized out if you don't use it. > At 09:01 PM 3/24/2005, Artur wrote: > > >i tried that already,and it didn't help > > > > > >--- In , Jaime Andres Aranguren Cardona > ><jaime_aranguren@y...> wrote: > > > Hi, > > > > > > What if you have your a.h file like this: > > > > > > #define NUM_TAPS 4 > > > > > > float pm acoeffs[NUM_TAPS+1] = { > > > -0.21705450402503, > > > 0.75444857321363, > > > -1.61627447577916, > > > 2.01218164151296, > > > -1.00000000000000 > > > }; > > > > > > And simply in your C file: > > > > > > #include "a.h" > > > > > > ??? > > > > > > --- Artur <artek_04@y...> wrote: > > > > > > > > > > > > > > > > i'm trying to include a header file with my filter > > > > coefficients, but > > > > while debuging in visualDSP++ using expression > > > > window, it shows me > > > > that my array is full of zeros instead of my > > > > coefficients > > > > does anyone knows how to fix this? > > > > > > > > this is how i'm including my file in main program > > > > > > > > float pm acoeffs[NUM_TAPS+1] = > > > > { > > > > #include "a.h" > > > > }; > > > > > > > > and this is my a.h file > > > > > > > > -0.21705450402503, > > > > 0.75444857321363, > > > > -1.61627447577916, > > > > 2.01218164151296, > > > > -1.00000000000000 > > > > > > > > > > > > thanks > > > > > > > > > Jaime Andr Aranguren Cardona > > > jaime.aranguren@i... > > > jaime.aranguren@c... > > > > > > > > > > > > > > > __________________________________ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Steve Holle > Link Communications, Inc. > 1035 Cerise Rd. > Billings, MT 59101 > sholle@l... |