9 years, 8 months ago.

Compiler Errors when using arm_math.h, missing "}"

Hi Everyone,

I am currently building a project using code generated with Simulink, which requires the use of the arm_math.h library. During the building process I get this error message:

Error: At end of source: #67: expected a "}" in source/SimulinkS/SCSController.cpp", Line: 979, Col: 2

The source file SCSController.cpp calls on several header files, and I have narrowed the problem down to arm_math.h. arm_math.h is part of the CMSIS_DSP_401 library, provided (I think) by ARM.

My question is: am I using this library properly and is there something I am missing? Has anyone else tried to generate C++ code for ARM Cortex M4 using Simulink? If so, what settings did you use?

One interesting behaviour I am seeing is that if I include the missing "}" at the end of the SCSController.cpp file, the code compiles with 13 warning messages of the kind:

Warning: Invalid attribute for variable "vstate" in "CMSIS_DSP_401/arm_math.h", Line: 5037, Col: 5

Warning: Attributes ignored here in "CMSIS_DSP_401/arm_math.h", Line: 5045, Col: 14

Warning: Invalid attribute for variable "vstate" in "CMSIS_DSP_401/arm_math.h", Line: 5037, Col: 5

Warning: Attributes ignored here in "CMSIS_DSP_401/arm_math.h", Line: 5045, Col: 14

Thanks,

Damien

Be the first to answer this question.