This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LS1224: Compiler warning is redefinition of macro __packed when using CMSIS DSP Library

Part Number: TMS570LS1224

Tool/software: Code Composer Studio

There is two definitions of __packed. One is in the Cortex CMSIS DSP Library in type_defs.h. The other is in C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include/sys/cdefs.h. The first is necessary to expand the macro in arm_math.h. How can I correct this issue? Thx.

  • Hello Jon,

    Are you able to identify any differences in the definitions or are they truly redundant. If they are redundant, then it should be possible to simply comment one of the two definitions and to include the updated headers needed in the arm_math.h file.
  • Hi Chuck,
    One is defined on line 256 of the ti arm compiler file cdefs.h and is associated with an attribute __packed__. The other is a define switch enabled by the ifdef CCS on line 49 of type_defs.h in the CMSIS DSP lib. I think it enables line 4632 of arm_math.h which is "acc = __SMLALD(S->A1, (q31_t)__SIMD32(S->state), acc" which is in a PID function. I guess if I don't use this line I can ignore the warning. Thx.
  • Jon,
    Thanks for the additional information. I'll need to check with my associates on this to see if they are aware of a work around or, at least, insure ignoring the warning is not going to lead to another issue.
  • Hello Jon,

    Just to follow-up a bit, this is a somewhat new conflict that seems to have been recently introduced. At least, more recent than the release of the CMSIS library which is quite old. An associate had noted that they had not seen this in prior use of the library but do see it now. They simply commented the definition in type_defs.h but it might worth a question to ARM since this is their library to insure this does not create additional issues and I would encourage you to do this if you have greater concern.