2020-02-25 11:33 PM
Hi all, Thanks for the sharing the experience and support.
My application Info: I required to develop two independent program (Bootloader,Application )
Bootloader Address range - 0x08000000 - 0x08007FFF (Sector 0,Sector 1)
Application Address range - 0x08008000 - 0x080FFFFF (Sector 2 - Sector 11)
Implementation Plan :
Bootloader -
Application -
Application code Info:
Now I am developing the application in the independent project (Bootloader project is not used to start the application). Application project Settings and flow are below
Interrupt vector table address(.intvec start) - 0x08000000
ROM address (Start - End Address) - (0x08008000 - 0x080FFFFF)
RAM address (Start - End Address) - (0x20000000 - 0x20020000)
Observation :
Code snap :
#define APPLICATION_ADDRESS (uint32_t)0x08008000
int main(void)
{
JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4); /* execute the new program */
JumpToApplication = (pFunction) JumpAddress; /* Jump to user application */
__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS); /* Initialize user application's Stack Pointer */
JumpToApplication();
HAL_Init(); /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
SystemClock_Config(); /* Configure the system clock */
< Instance to Initialize all configured peripherals >
HAL_TIM_Base_Start_IT(&htim10); < start the basic time in interrupt>
< Instance to Add the application code- LED blinking>
}
Need help for the bootloader project to avoid similar failure
2020-02-25 11:41 PM
You need to change SCB->VTOR to the application's vector table address (i.e. 0x08008000) before you jump into the application (and enable interrupts there).
JW
2020-02-26 12:36 AM
Implement much better and simpler approach described in my comment there:
2020-02-26 01:10 AM
Find out the address of the reset handler function of the application. Look into the map file, or try to generate it if it isn't there.
Verify the value of JumpToApplication.
Set a breakpoint on JumpToApplication(); and step into it in disassembler/instruction debug mode. Observe where it lands, compare the address with the address from the map file, and the instructions there with the application reset handler.
2. LED blinking application is not running
Is it the expected behaviour, or do you expect it to run? If you expect it to run, can you explain why?