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,7 +4,9 @@
#define DEBUG_UART USART1
#define DEBUG_LEVEL 1
#ifndef DEBUG_LEVEL
#define DEBUG_LEVEL 0
#endif
#define NON_BLOCK_PRINTING 0

View File

@@ -20,14 +20,17 @@
#define RK_END_PAGE (PAGES - 14 + RK_NUM_PAGES)
// Start of application code
#define APPLICATION_START_PAGE (16)
#define APPLICATION_START_ADDR flash_addr(APPLICATION_START_PAGE)
#ifndef APPLICATION_START_PAGE
#define APPLICATION_START_PAGE (7)
#endif
#define APPLICATION_START_ADDR (0x08000000 + ((APPLICATION_START_PAGE)*PAGE_SIZE))
// End of application code. Leave some extra room for future data storage.
#define APPLICATION_END_PAGE ((PAGES - 19)) // 119 is NOT included in application
#define APPLICATION_END_ADDR (flash_addr(APPLICATION_END_PAGE)-8) // NOT included in application
// NOT included in application
#define APPLICATION_END_PAGE ((PAGES - 19))
#define APPLICATION_END_ADDR ((0x08000000 + ((APPLICATION_END_PAGE)*PAGE_SIZE))-8)
// Bootloader state.
#define AUTH_WORD_ADDR (flash_addr(APPLICATION_END_PAGE)-8)
#define AUTH_WORD_ADDR ((0x08000000 + ((APPLICATION_END_PAGE)*PAGE_SIZE))-8)
#endif