hard fault error occur
I use the STM32F100RB and make a bootloader.
The PC is connected to the STM32F100RB via UART, and the program to be executed is sent from the PC and extracted to the internal RAM. However, when the program is executed in the RAM, hard fault error occurs.
The function I want to execute is located at 0x20001364, and I want to shift the execution as follows.
#define MAIN_ADDR (0x20001364)
…
f = (int(*)(void))(MAIN_ADDR);
f();
…When stopped at 「f();�?, step execution will cause hard fault error to occur.
The value of CFSR is as follows.
I tried setting 0x20001364 directly to the PC register from the debugger, and it works as expected.
Is there a problem with the above method of shifting the execution?
