I tried to compile demo project from ChibiOS 2.6.7 in Keil compiler and have some troubles.
With default settings in mcuconf.h file all is ok. But if I change settings to use intranal RC osc the compiller generate an error:
Code: Select all
..\..\..\os\hal\platforms\STM32F1xx\hal_lld_f100.h(789): error: #35: #error directive: "STM32_PLLCLKOUT outside acceptable range (STM32_PLLOUT_MIN...STM32_PLLOUT_MAX)"
#error "STM32_PLLCLKOUT outside acceptable range (STM32_PLLOUT_MIN...STM32_PLLOUT_MAX)"
The settings are:
Code: Select all
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED FALSE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSI
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
#define STM32_PLLMUL_VALUE 3
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV1
#define STM32_PPRE2 STM32_PPRE2_DIV1
#define STM32_ADCPRE STM32_ADCPRE_DIV2
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
#define STM32_RTCSEL STM32_RTCSEL_NOCLOCK
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
If I disable the #error directive the compilation is ok and the board works fine but freq is 12Mhz (I printed STM32_SYSCLK).
If I change ST32_PLLMUL_VALUE to 4 - the compilation is with no errors but real frequency is set to 16MHz.
When I use IAR compiller all work fine! It seems that is KEIL preprocessor issue or what ?