2025-08-13 7:23 AM - last edited on 2025-08-13 7:56 AM by TDK
Look at this beauty.
In touchgfx\framework\include\touchgfx\hal\Types.hpp:
static const float PI = 3.14159265358979323846f; ///< PI
In CMSIS-DSP\Include\dsp\fast_math_functions.h
#ifndef PI
#define PI 3.14159265358979f
#endif
Fortunately, the conflict is caught at compile time.
It’s an exceptionally rare situation when you might need something from TouchGFX (e.g., instrumentation) and CMSIS-DSP at the same time — but when it happens, you get this delightful collision.
Just in case anyone is compiling a list of tricky interview questions.