Solved
Calling a function by it's address not working
Using a STM32F0 discovery board, I have this function:
void BlinkBlue(void)
{
for (int i=0; i<20; i++)
{
HAL_GPIO_WritePin(LD4_GPIO_Port, LD4_Pin, GPIO_PIN_SET);
HAL_Delay(50);
HAL_GPIO_WritePin(LD4_GPIO_Port, LD4_Pin, GPIO_PIN_RESET);
HAL_Delay(50);
}
}
and I can call it in code by using:
BlinkBlue();All good.
The .map file says it's location at address 0x8000a9c . But it doesn't work if I instead call it using:
((void (*)(void))0x8000A9C)();Any idea why this wouldn't work? Thanks.
