AnsweredAssumed Answered

error: expression .... ->CCM_Type::ROOT[0].CCM_Type::<unnamed struct>::TARGET_ROOT' has side-effects    kCLOCK_RootM4_1 = (uint32_t)(&((CCM_Type*) ... ->ROOT[0].TARGET_ROOT),

Question asked by Thomas Orsi on Sep 3, 2019
Latest reply on Jun 5, 2020 by Anton Glukhov

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.*/

Outcomes