Smart Remote 3 nRF52 v1.2
Copy URL
Source
Bootloader
bootloader
nrf_bootloader_info.h
1
/*$$$LICENCE_NORDIC_STANDARD<2016>$$$*/
9
#ifndef NRF_BOOTLOADER_INFO_H__
10
#define NRF_BOOTLOADER_INFO_H__
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
16
#include "nrf.h"
17
#include "nrf_mbr.h"
18
19
#if defined(SOFTDEVICE_PRESENT)
20
#include "nrf_sdm.h"
21
#else
22
#include "nrf_mbr.h"
23
#endif
24
27
#if (__LINT__ == 1)
28
// No implementation
29
#elif defined ( __CC_ARM )
30
extern
uint32_t* Image$$ER_IROM1$$Base __attribute__((used));
31
#elif defined (__SES_ARM) && defined (__GNUC__)
32
extern
uint32_t * _vectors;
33
#elif defined ( __GNUC__ )
34
extern
uint32_t * __isr_vector;
35
#elif defined ( __ICCARM__ )
36
extern
void
* __vector_table;
37
#else
38
#error Not a valid compiler/linker for application image symbols.
39
#endif
40
41
49
#if (__LINT__ == 1)
50
#define BOOTLOADER_START_ADDR (0x3AC00)
51
#elif BOOTLOADER_START_ADDR
52
// Bootloader start address is defined at project level
53
#elif defined (__CC_ARM)
54
#define BOOTLOADER_START_ADDR (uint32_t)&Image$$ER_IROM1$$Base
55
#elif defined (__SES_ARM) && defined (__GNUC__)
56
#define BOOTLOADER_START_ADDR (uint32_t)&_vectors
57
#elif defined (__GNUC__)
58
#define BOOTLOADER_START_ADDR (uint32_t)&__isr_vector
59
#elif defined (__ICCARM__)
60
#define BOOTLOADER_START_ADDR (uint32_t)&__vector_table
61
#else
62
#error Not a valid compiler/linker for BOOTLOADER_START_ADDR.
63
#endif
64
65
73
#define NRF_UICR_BOOTLOADER_START_ADDRESS (NRF_UICR_BASE + 0x14)
74
75
76
#ifndef MAIN_APPLICATION_START_ADDR
77
78
79
#if defined(SOFTDEVICE_PRESENT)
80
85
#define MAIN_APPLICATION_START_ADDR (SD_SIZE_GET(MBR_SIZE))
86
87
#else
88
#define MAIN_APPLICATION_START_ADDR MBR_SIZE
89
#endif // #ifdef SOFTDEVICE_PRESENT
90
#endif // #ifndef MAIN_APPLICATION_START_ADDR
91
92
93
#ifdef __cplusplus
94
}
95
#endif
96
97
#endif // #ifndef NRF_BOOTLOADER_INFO_H__
98