minor update

This commit is contained in:
Gabriel Wang 2022-11-14 02:51:45 +00:00
parent 1bcadf6ca9
commit 5001f822f0
6 changed files with 68 additions and 50 deletions

View File

@ -1 +0,0 @@
"C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021-07\bin\arm-none-eabi-ar" -M <ArInp.Scr

View File

@ -1,15 +0,0 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x00000000 0x00400000 { ; load region size_region
ER_IROM1 +0 0x00400000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00400000 { ; RW data
* (+RW +ZI)
}
}

View File

@ -30,26 +30,26 @@
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
;</h>
Stack_Size EQU 0x00000400
;Stack_Size EQU 0x00000400
AREA STACK, NOINIT, READWRITE, ALIGN=3
__stack_limit
Stack_Mem SPACE Stack_Size
__initial_sp
; AREA STACK, NOINIT, READWRITE, ALIGN=3
;__stack_limit
;Stack_Mem SPACE Stack_Size
;__initial_sp
;<h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
;</h>
;;<h> Heap Configuration
;; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
;;</h>
Heap_Size EQU 0x00000C00
;Heap_Size EQU 0x00000C00
IF Heap_Size != 0 ; Heap is provided
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
ENDIF
; IF Heap_Size != 0 ; Heap is provided
; AREA HEAP, NOINIT, READWRITE, ALIGN=3
;__heap_base
;Heap_Mem SPACE Heap_Size
;__heap_limit
; ENDIF
PRESERVE8
@ -62,8 +62,9 @@ __heap_limit
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; -14 NMI Handler
DCD HardFault_Handler ; -13 Hard Fault Handler
@ -154,15 +155,15 @@ $Handler_Name PROC
; User setup Stack & Heap
IF :LNOT::DEF:__MICROLIB
IMPORT __use_two_region_memory
ENDIF
; IF :LNOT::DEF:__MICROLIB
; IMPORT __use_two_region_memory
; ENDIF
EXPORT __stack_limit
EXPORT __initial_sp
IF Heap_Size != 0 ; Heap is provided
EXPORT __heap_base
EXPORT __heap_limit
ENDIF
; EXPORT __stack_limit
; EXPORT __initial_sp
; IF Heap_Size != 0 ; Heap is provided
; EXPORT __heap_base
; EXPORT __heap_limit
; ENDIF
END

33
example/example.sct Normal file
View File

@ -0,0 +1,33 @@
#! armclang --target=arm-arm-none-eabi -mcpu=cortex-m0 -E -xc
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
#define RAM1_SIZE 0x00020000
#define RAM1_BASE 0x20000000
#define RAM1_LIMIT (RAM1_BASE + RAM1_SIZE)
#define STACK_SIZE 0x800
#define HEAP_SIZE (RAM1_LIMIT - ImageLimit(RW_IRAM1))
LR_IROM1 0x00000000 0x00040000 { ; load region size_region
ER_IROM1 0x00000000 0x00040000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
ARM_LIB_STACK RAM1_BASE ALIGN 8 EMPTY STACK_SIZE {}
;RW_IRAM1 0x20000000 0x00020000 { ; RW data
RW_IRAM1 +0 { ; RW data
.ANY (+RW +ZI)
}
ARM_LIB_HEAP +0 ALIGN 8 EMPTY HEAP_SIZE {}
ScatterAssert(ImageLimit(ARM_LIB_HEAP) <= RAM1_LIMIT)
}

View File

@ -165,7 +165,7 @@
<Mm>
<WinNumber>1</WinNumber>
<SubType>1</SubType>
<ItemText>0x00</ItemText>
<ItemText>0x20000000</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
@ -741,7 +741,7 @@
<Group>
<GroupName>application</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -785,7 +785,7 @@
<Group>
<GroupName>perf_counter_lib</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -849,7 +849,7 @@
<Group>
<GroupName>::Compiler</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -857,7 +857,7 @@
<Group>
<GroupName>::Device</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>

View File

@ -190,7 +190,7 @@
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
<useUlib>1</useUlib>
<useUlib>0</useUlib>
<EndSel>1</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
@ -371,7 +371,7 @@
<TextAddressRange></TextAddressRange>
<DataAddressRange></DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>Blinky.sct</ScatterFile>
<ScatterFile>example.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
@ -1548,7 +1548,7 @@
<TextAddressRange></TextAddressRange>
<DataAddressRange></DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>Blinky.sct</ScatterFile>
<ScatterFile>.\example.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>