Tool/software:
how to write main() into bootloder, i want custom bootloader
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am working on FOTA without bootloader. I write an Application1 code at 0x0000000. This application1 receive data over UART and write into flash at 0x00002000(which is my application2). Now I want to jump from app1 to app2. what are the steps required.
for jumping I am using following code
Hi Sarawati,
See the recommendation in our SDK example code:
static void start_app(uint32_t *vector_table) { /* The following code resets the SP to the value specified in the * provided vector table, and then the Reset Handler is invoked. * * Per ARM Cortex specification: * * ARM Cortex VTOR * * * Offset Vector * * 0x00000000 ++++++++++++++++++++++++++ * | Initial SP value | * 0x00000004 ++++++++++++++++++++++++++ * | Reset | * 0x00000008 ++++++++++++++++++++++++++ * | NMI | * ++++++++++++++++++++++++++ * | . | * | . | * | . | * * */ /* Reset the SP with the value stored at vector_table[0] */ __asm volatile( "LDR R3,[%[vectab],#0x0] \n" "MOV SP, R3 \n" ::[vectab] "r"(vector_table)); /* Set the Reset Vector to the new vector table (Will be reset to 0x000) */ SCB->VTOR = (uint32_t) vector_table; /* Jump to the Reset Handler address at vector_table[1] */ ((void (*)(void))(*(vector_table + 1)))(); }
B.R.
Sal