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

@@ -4,11 +4,12 @@
#define DEBUG_UART USART1
#define DEBUG_LEVEL 0
#ifndef DEBUG_LEVEL
#define DEBUG_LEVEL 0
#endif
#define NON_BLOCK_PRINTING 0
#define BOOT_TO_DFU 0
@@ -19,8 +20,6 @@
#define ENABLE_U2F_EXTENSIONS
// #define ENABLE_U2F
#define APPLICATION_JUMP_ADDR (0x08000000 + 32 * 1024)
#define DISABLE_CTAPHID_PING
#define DISABLE_CTAPHID_WINK
#define DISABLE_CTAPHID_CBOR

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]);