RA4M1: How to properly configure SystemCoreClock and PLL in system.c using PlatformIO?

I was trying to change the system clock on my Renesas RA MCU. While inspecting the CMSIS/FSP startup code (system_RA.c), I noticed the following in SystemInit():

/* Initialize SystemCoreClock variable. */
//SystemCoreClockUpdate();
  • The SystemCoreClockUpdate() call is commented out.

  • Directly calling SystemCoreClockUpdate() does not reconfigure the hardware; it only updates the variable.

  • Actual clock setup is done in the BSP/FSP initialization code.

I want to understand:

  1. How can I correctly update SystemCoreClock so it reflects the current MCU frequency?

  2. Can this be done without modifying FSP-generated clock configuration, or do I need to adjust the BSP settings directly?