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 11common :
22    macros :
3+         - THINGY91 
34        - NRF_SECURE_BOOTLOADER 
5+         - NRF_SECURE_BOOTLOADER_OFFSET=0x12200 
46    sources :
57        board :
68            - source/board/thingy91.c 
Original file line number Diff line number Diff line change 3030#include  "crc.h" 
3131#include  "info.h" 
3232
33+ #if  !defined(DISABLE_FLASH_INTF_CHECKS )
3334// Application start must be aligned to page write 
3435COMPILER_ASSERT (DAPLINK_ROM_APP_START  % DAPLINK_MIN_WRITE_SIZE  ==  0 );
3536// Application size must be a multiple of write size 
@@ -42,6 +43,7 @@ COMPILER_ASSERT(DAPLINK_ROM_APP_START % DAPLINK_SECTOR_SIZE == 0);
4243COMPILER_ASSERT (DAPLINK_ROM_UPDATE_START  % DAPLINK_SECTOR_SIZE  ==  0 );
4344// Update size must be a multiple of sector size 
4445COMPILER_ASSERT (DAPLINK_ROM_UPDATE_SIZE  % DAPLINK_SECTOR_SIZE  ==  0 );
46+ #endif 
4547
4648typedef  enum  {
4749    STATE_CLOSED ,
Original file line number Diff line number Diff line change 2424#define  DAPLINK_ROM_START                0x00000000
2525#define  DAPLINK_ROM_SIZE                 0x00040000 // 256 KiB
2626
27- 
2827#define  DAPLINK_RAM_START                0x20000000
2928#define  DAPLINK_RAM_SIZE                 0x00010000 // 64 KiB
3029
3130/* ROM sizes */ 
3231
33- 
34- 
3532#define  DAPLINK_ROM_BL_START             0x00000000
3633
3734#if  !defined(NRF_SECURE_BOOTLOADER )
5148
5249#else  // NRF_SECURE_BOOTLOADER 
5350
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)
5755
5856#define  NON_CONTIGUOUS_USER_CONFIG 
59- #define  DAPLINK_ROM_CONFIG_USER_START    0x000F7000 
57+ #define  DAPLINK_ROM_CONFIG_USER_START    0x000FE000 
6058#define  DAPLINK_ROM_CONFIG_USER_SIZE     0x00001000
6159
6260#endif 
Original file line number Diff line number Diff line change @@ -197,6 +197,13 @@ Reset_Handler:
197197.L_loop1_done: 
198198#endif 
199199
200+ #ifdef  NRF_SECURE_BOOTLOADER
201+     movs  r3, #0 
202+     msr	CONTROL, r3
203+     msr	PSP, r3
204+     msr	PRIMASK, r3
205+ #endif 
206+ 
200207/* This part of work usually is done in C library startup code. Otherwise, 
201208 * define __STARTUP_CLEAR_BSS to enable it in this startup. This section 
202209 * clears the RAM where BSS data is located. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments