I'm trying to compile a project generated using STM32CubeMX for MDK-ARM but the compiler gives the following error:
port.c(483): error: A1586E: Bad operand types (UnDefOT, Constant) for operator (
everytime I enable the "FreeRTOS" option in CubeMX. Initially, and after generating the code from CubeMX, everything compiles without an issue, but as soon as I start to add some source files to the project, the compiler starts to complain about that error in port.c file. Removing the newly added sources with their include paths doesn't help solve the issue. It's just like if something corrupts the FreeRTOS port sources and it won't go away until I disable the "FreeRTOS" option then re-enable it and generate the code again.
Upgrading to the latest STM32CubeMx with the latest firmware packages for my device did not help, as well!