As you can see in the STM32Duino repo you referenced it says
So, they all use the same
build.variant=DEMO_F030F4, but a different
build.board value. This results in a different macro being created.
As you can then see in the
This file has been truncated.
WEAK void SystemClock_Config(void)
/* Initializes the CPU, AHB and APB busses clocks */
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
/* Internal HSI, 48MHz system clock */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI14 | RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.HSI14State = RCC_HSI14_ON;
RCC_OscInitStruct.HSI14CalibrationValue = 16;
Depending on the set Macros (
ARDUINO_DEMO_F030F4_HSI and ARDUINO_DEMO_F030F4_16M`), a different oscillator initialization is done.
Thus you can just adapt the macros in your custom board.json or add them via