I am creating a custom board.mk/c/h for my own hardware, starting with the STM32L-DISCOVERY as a template. My board does not use external oscillators, so I have the following in mcuconf.h
Code: Select all
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED TRUE
#define STM32_HSE_ENABLED FALSE
#define STM32_LSE_ENABLED FALSE
...
#define STM32_RTCSEL STM32_RTCSEL_NOCLOCK
That works fine, but then in my board.h, I've changed the following:
Code: Select all
#if !defined(STM32_LSECLK)
#define STM32_LSECLK 0
#endif
#if !defined(STM32_HSECLK)
#define STM32_HSECLK 0
#endif
But when I compile I get:
Code: Select all
In file included from ../os/hal/include/hal.h:43:0,
from ../os/hal/src/hal.c:37:
../os/hal/platforms/STM32L1xx/hal_lld.h:556:2: error: #error "required LSE clock is not enabled"
#error "required LSE clock is not enabled"
^
../os/ports/GCC/ARMCMx/rules.mk:183: recipe for target 'build/obj/hal.o' failed
make: *** [build/obj/hal.o] Error 1
Which makes me think it is ignoring my choice of STM32_RTCSEL. It does the same, if I set it to STM32_RTCSEL_LSI
Any ideas?