WXK
2025-01-16 13e0fafc140c16539691d26afafaca417e7e2fbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#! armcc -E
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
 
#include ".\configuration\sdk_config.h"
 
#define SIZE_BOOTLOADER                    0xA000
#define SIZE_FIXED_APP_IMAGE            0x37000
#define SIZE_FIXED_USER_FLASH            (CONFIG_SETTINGS_SECTOR_NUM * 4096)
 
 
#if (CONFIG_OTA_IN_APP == 1 && CONFIG_FLASH_MAP_SIZE <= 0x3F000)
#error do not support ota back-up within 256K flash
#endif
    
/* bare program which means it can work without bootloader
 * note image start at 0 address,and user can modify CONFIG_USER_FLASH_EXTENDED_SIZE size
 */
#if (!CONFIG_BOOT_ENABLE)
#define SIZE_IMAGE_HEADER                 0
#define APP_IMAGE_START 0x00000000
#define APP_IMAGE_SIZE    (CONFIG_FLASH_MAP_SIZE - SIZE_FIXED_USER_FLASH)
 
/* ota in bootloader and there are have no backup area. so it can expand image size user can use
 * note it does not support ble ota
 */
#elif (!CONFIG_OTA_IN_APP)
#define SIZE_IMAGE_HEADER                 512
#define APP_IMAGE_START 0x0000A000
#define APP_IMAGE_SIZE    (CONFIG_FLASH_MAP_SIZE - SIZE_FIXED_USER_FLASH - SIZE_BOOTLOADER)
 
 
/* ota in bootloader and there are have a backup area. 
 * note it is used to adapt to condition that use want to ota in ble ways
 */
#else
#define SIZE_IMAGE_HEADER                 512
#define CONFIG_USER_FLASH_EXTENDED_SIZE (0)        /* user can change the value */
#define APP_IMAGE_START 0x0000A000
#define APP_IMAGE_SIZE    (SIZE_FIXED_APP_IMAGE - CONFIG_USER_FLASH_EXTENDED_SIZE)
#endif
 
 
LR_IROM1 APP_IMAGE_START APP_IMAGE_SIZE  {    ; load region size_region
  #if SIZE_IMAGE_HEADER
    ER_IROM0 APP_IMAGE_START SIZE_IMAGE_HEADER  {  ; load address = execution address
   *app_version.o
  }
  #endif
  ER_IROM1 (APP_IMAGE_START + SIZE_IMAGE_HEADER) APP_IMAGE_SIZE  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
   .ANY (+XO)
  }
  RW_IRAM1 0x20000000 0x0000C000  {  ; RW data
   .ANY (+RW +ZI)
   *.o (.ramfunc)
  }
}