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 problem
pull/11874/head
Maciej Bocianski 2019-11-27 08:40:56 +01:00
parent 28b1169b7e
commit 8db3b40a7b
1 changed files with 4 additions and 4 deletions

View File

@ -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);