Tool/software: TI C/C++ Compiler
I am trying to call DSPLIB's DSPF_sp_fir_gen() function from C++. Per DSPLIB documentation, function arguments need to be double-word aligned. I tried using DATA_ALIGN() in the .cpp file as follows:
#pragma DATA_ALIGN(m_fFirLpfCoeff, 8);
static float m_fFirLpfCoeff[FIR_LPF_ORDER] = {***};
However, I get a compiler error for the pragma statement:
>> Compilation failure
subdir_rules.mk:9: recipe for target 'DsplibTest.obj' failed
"../DsplibTest.cpp", line 91: error #2772: this constant expression has type "float *" instead of the required integral or enum type
1 error detected in the compilation of "../DsplibTest.cpp".
If I change the file to *.c type then the anomaly goes away. Please let me know how to fixed DATA_ALIGN for C++ *.cpp files.
Thanks,
Dave