Fixed bug in do_boot: Don't use stack if we are moving SP

pull/5/head
Daniele Lacamera 2019-02-13 13:06:53 +01:00
parent d3e3e52b61
commit ec0d170176
1 changed files with 4 additions and 4 deletions

View File

@ -76,17 +76,17 @@ void isr_empty(void)
* - Call the application entry point
*
*/
static void *app_entry;
static uint32_t app_end_stack;
void do_boot(const uint32_t *app_offset)
{
const uint32_t * const app_IV = (const uint32_t *)app_offset;
void *app_entry;
uint32_t app_end_stack;
#ifndef NO_VTOR
/* Disable interrupts */
asm volatile("cpsid i");
/* Update IV */
VTOR = ((uint32_t)app_IV);
VTOR = ((uint32_t)app_offset);
#endif
/* Get stack pointer, entry point */