DSPRelated.com
Forums

VisualDSP with non-standard source file extensions

Started by Ken June 17, 1999
I'm porting some code from another platform to SHARC.

I have some C source that's generated by passing a data file through a
preprocessor. The compiler for the other platform is happy to treat a
file with a .tbl extension as C, but the VDSP compiler can't understand
it unless it ends in .c.

Is there some magic switch that will force it to treat the file as C?

I'd prefer to use the non-standard extension so that I can quickly clean
out generated C files with "del *.tbl".

--
Ken
mailto:
http://www.sewingwitch.com/ken/
http://www.StopTheWarNow.com/
http://www.215Now.com/



On Thu, 17 Jun 1999 19:27:01 +0200 (MET DST), Michael Haertl wrote:

>You might take a look at the file
>"\Program Files\Analog Devices\VisualDSP\default.ini"

That controls syntax highlighting in the visual editor, which is not
what I'm after. My concern is with the actual compiler, which I run
from the command line via a Make utility.

I did a little research and found that Gnu gcc/g++ uses the -x option
to select the language to use for a source file, overriding the
extension. (An example would be "gcc -x c foo.tbl".) I could find no
equivalent option for cc21k. I guess I'll have to temporarily rename my
source file to .c in my build rule.

(My sources are heavily-parameterized with #ifdefs, so the visual
environment is not useful to me for the compile/link phase. It's easier
just to redefine the compiler macros in my makefiles to use the ADI
command line tools.)

Kenneth Porter
Kensington Laboratories, Inc.
mailto:
http://www.kensingtonlabs.com




On Thu, 17 Jun 1999, Ken wrote:

> I'm porting some code from another platform to SHARC.
>
> I have some C source that's generated by passing a data file through a
> preprocessor. The compiler for the other platform is happy to treat a
> file with a .tbl extension as C, but the VDSP compiler can't understand
> it unless it ends in .c.
>
> Is there some magic switch that will force it to treat the file as C?

You might take a look at the file
"\Program Files\Analog Devices\VisualDSP\default.ini"

If you compare it with the other ini-files in that directory, maybe you
can get what you want. haven't tried it myself.

The color for these keywords is set in the menu
Tools-->Options-->editor tab-->highlighting. > I'd prefer to use the non-standard extension so that I can quickly clean
> out generated C files with "del *.tbl".

Michael

--
Michael Haertl