File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 1
1
common :
2
2
macros :
3
+ - THINGY91
3
4
- NRF_SECURE_BOOTLOADER
5
+ - NRF_SECURE_BOOTLOADER_OFFSET=0x12200
4
6
sources :
5
7
board :
6
8
- source/board/thingy91.c
Original file line number Diff line number Diff line change 30
30
#include "crc.h"
31
31
#include "info.h"
32
32
33
+ #if !defined(DISABLE_FLASH_INTF_CHECKS )
33
34
// Application start must be aligned to page write
34
35
COMPILER_ASSERT (DAPLINK_ROM_APP_START % DAPLINK_MIN_WRITE_SIZE == 0 );
35
36
// Application size must be a multiple of write size
@@ -42,6 +43,7 @@ COMPILER_ASSERT(DAPLINK_ROM_APP_START % DAPLINK_SECTOR_SIZE == 0);
42
43
COMPILER_ASSERT (DAPLINK_ROM_UPDATE_START % DAPLINK_SECTOR_SIZE == 0 );
43
44
// Update size must be a multiple of sector size
44
45
COMPILER_ASSERT (DAPLINK_ROM_UPDATE_SIZE % DAPLINK_SECTOR_SIZE == 0 );
46
+ #endif
45
47
46
48
typedef enum {
47
49
STATE_CLOSED ,
Original file line number Diff line number Diff line change 24
24
#define DAPLINK_ROM_START 0x00000000
25
25
#define DAPLINK_ROM_SIZE 0x00040000 // 256 KiB
26
26
27
-
28
27
#define DAPLINK_RAM_START 0x20000000
29
28
#define DAPLINK_RAM_SIZE 0x00010000 // 64 KiB
30
29
31
30
/* ROM sizes */
32
31
33
-
34
-
35
32
#define DAPLINK_ROM_BL_START 0x00000000
36
33
37
34
#if !defined(NRF_SECURE_BOOTLOADER )
51
48
52
49
#else // NRF_SECURE_BOOTLOADER
53
50
54
- #define DAPLINK_ROM_BL_SIZE 0x00013000 // 76 KiB MCUBOOT
55
- #define DAPLINK_ROM_IF_START 0x00013000
56
- #define DAPLINK_ROM_IF_SIZE 0x0002C000
51
+ #define DISABLE_FLASH_INTF_CHECKS
52
+ #define DAPLINK_ROM_BL_SIZE NRF_SECURE_BOOTLOADER_OFFSET // MCUBOOT
53
+ #define DAPLINK_ROM_IF_START NRF_SECURE_BOOTLOADER_OFFSET
54
+ #define DAPLINK_ROM_IF_SIZE (0x00040000-NRF_SECURE_BOOTLOADER_OFFSET)
57
55
58
56
#define NON_CONTIGUOUS_USER_CONFIG
59
- #define DAPLINK_ROM_CONFIG_USER_START 0x000F7000
57
+ #define DAPLINK_ROM_CONFIG_USER_START 0x000FE000
60
58
#define DAPLINK_ROM_CONFIG_USER_SIZE 0x00001000
61
59
62
60
#endif
Original file line number Diff line number Diff line change @@ -197,6 +197,13 @@ Reset_Handler:
197
197
.L_loop1_done:
198
198
#endif
199
199
200
+ #ifdef NRF_SECURE_BOOTLOADER
201
+ movs r3, #0
202
+ msr CONTROL, r3
203
+ msr PSP, r3
204
+ msr PRIMASK, r3
205
+ #endif
206
+
200
207
/* This part of work usually is done in C library startup code. Otherwise,
201
208
* define __STARTUP_CLEAR_BSS to enable it in this startup. This section
202
209
* clears the RAM where BSS data is located.
You can’t perform that action at this time.
0 commit comments