organize memory layout options for debug/release

This commit is contained in:
Conor Patrick
2018-12-04 21:12:21 -05:00
parent 173b8833ce
commit 5ee91048e2
12 changed files with 449 additions and 18 deletions

View File

@@ -31,6 +31,7 @@
#include "log.h"
#include "ctap.h"
#include "app.h"
#include "memory_layout.h"
#include "stm32l4xx_ll_rcc.h"
#include "stm32l4xx.h"
@@ -42,10 +43,10 @@ void BOOT_boot(void)
{
typedef void (*pFunction)(void);
uint32_t *bootAddress = (uint32_t *)(APPLICATION_JUMP_ADDR);
uint32_t *bootAddress = (uint32_t *)(APPLICATION_START_ADDR);
/* Set new vector table */
SCB->VTOR = APPLICATION_JUMP_ADDR;
SCB->VTOR = APPLICATION_START_ADDR;
/* Read new SP and PC from vector table */
__set_MSP(bootAddress[0]);