Skip to content

Commit ec0d170

Browse files
committed
Fixed bug in do_boot: Don't use stack if we are moving SP
1 parent d3e3e52 commit ec0d170

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/wolfboot.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@ void isr_empty(void)
7676
* - Call the application entry point
7777
*
7878
*/
79+
static void *app_entry;
80+
static uint32_t app_end_stack;
81+
7982
void do_boot(const uint32_t *app_offset)
8083
{
81-
const uint32_t * const app_IV = (const uint32_t *)app_offset;
82-
void *app_entry;
83-
uint32_t app_end_stack;
8484

8585
#ifndef NO_VTOR
8686
/* Disable interrupts */
8787
asm volatile("cpsid i");
8888
/* Update IV */
89-
VTOR = ((uint32_t)app_IV);
89+
VTOR = ((uint32_t)app_offset);
9090
#endif
9191

9292
/* Get stack pointer, entry point */

0 commit comments

Comments
 (0)