The solution to this problem is to use the offsetof, review this single line in the fsl_clock.h that needs propagated for both enums that use the CCM macro and all their entries.
/*! @brief ccm root name used to get clock frequency. */
typedef enum _clock_root_control
{
kCLOCK_RootM4 = (uint32_t)CCM_BASE+offsetof(CCM_Type,ROOT[1].TARGET_ROOT), /*!< ARM Cortex-M4 Clock control name.*/
Hello Thomas,
Do you know if this suggestion will be incorporated into SDK? I also have the same problem while I'm compiling with c++ compiler.
I'm compiling with g++ version 8.3 and offsetof doesn't solve the issue. Does it work it for you?
Best regards,
Anton
Can you paste the error messages into this thread? offsetof is definitely a solution and if its recognized by your compiler it should solve your problem.
Hello Tom,
Sorry for the delay. Everything is fine, it was an error because of cmake cache. It works now. Thank you!
But it's interesting if there is a plan to include it into SDK.
Best regards,
Anton