mirror of https://github.com/ARMmbed/mbed-os.git
STM: change rtc irq handler name
Fix for the error caused by lto on armc6 compiler: L6137E: Symbol RTC_IRQHandler was not preserved by the LTO codegen but is needed by the image. lto optimization cause that local symbol RTC_IRQHandler(from rtc_api.c) somehow interferes with global symbol RTC_IRQHandler (from startup_stm32f070xb.S) Changing local RTC_IRQHandler to _RTC_IRQHandler fixes problempull/11874/head
parent
28b1169b7e
commit
8db3b40a7b
|
@ -289,12 +289,12 @@ int rtc_isenabled(void)
|
|||
|
||||
#if DEVICE_LPTICKER && !MBED_CONF_TARGET_LPTICKER_LPTIM
|
||||
|
||||
static void RTC_IRQHandler(void);
|
||||
static void _RTC_IRQHandler(void);
|
||||
static void (*irq_handler)(void);
|
||||
|
||||
volatile uint8_t lp_Fired = 0;
|
||||
|
||||
static void RTC_IRQHandler(void)
|
||||
static void _RTC_IRQHandler(void)
|
||||
{
|
||||
/* Update HAL state */
|
||||
RtcHandle.Instance = RTC;
|
||||
|
@ -428,7 +428,7 @@ void rtc_set_wake_up_timer(timestamp_t timestamp)
|
|||
}
|
||||
#endif /* RTC_WUTR_WUTOCLR */
|
||||
|
||||
NVIC_SetVector(RTC_WKUP_IRQn, (uint32_t)RTC_IRQHandler);
|
||||
NVIC_SetVector(RTC_WKUP_IRQn, (uint32_t)_RTC_IRQHandler);
|
||||
irq_handler = (void (*)(void))lp_ticker_irq_handler;
|
||||
NVIC_EnableIRQ(RTC_WKUP_IRQn);
|
||||
core_util_critical_section_exit();
|
||||
|
@ -437,7 +437,7 @@ void rtc_set_wake_up_timer(timestamp_t timestamp)
|
|||
void rtc_fire_interrupt(void)
|
||||
{
|
||||
lp_Fired = 1;
|
||||
NVIC_SetVector(RTC_WKUP_IRQn, (uint32_t)RTC_IRQHandler);
|
||||
NVIC_SetVector(RTC_WKUP_IRQn, (uint32_t)_RTC_IRQHandler);
|
||||
irq_handler = (void (*)(void))lp_ticker_irq_handler;
|
||||
NVIC_SetPendingIRQ(RTC_WKUP_IRQn);
|
||||
NVIC_EnableIRQ(RTC_WKUP_IRQn);
|
||||
|
|
Loading…
Reference in New Issue