-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmemory.x
58 lines (49 loc) · 2.11 KB
/
memory.x
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
/**
* See: https://github.com/stm32-rs/stm32h7xx-hal/blob/master/memory.x
* https://www.st.com/resource/en/reference_manual/dm00176879-stm32h745-755-and-stm32h747-757-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf
*/
MEMORY
{
SRAM1 : ORIGIN = 0x30000000, LENGTH = 128K /* 32-bit AHB bus matrix, D2 domain */
SRAM2 : ORIGIN = 0x30020000, LENGTH = 128K /* 32-bit AHB bus matrix, D2 domain */
SRAM3 (RW) : ORIGIN = 0x30040000, LENGTH = 32K /* 32-bit AHB bus matrix, D2 domain */
SRAM4 (RW) : ORIGIN = 0x38000000, LENGTH = 64K /* 32-bit AHB bus matrix, D3 domain */
BSRAM : ORIGIN = 0x38800000, LENGTH = 4K /* 32-bit AHB bus matrix, D3 domain */
AXISRAM (RWX) : ORIGIN = 0x24000000, LENGTH = 512K /* 64-bit AXI bus matrix, D1 domain */
DTCMRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 128K /* 64-bit AXI bus matrix, D1 domain */
FLASH2 (RX) : ORIGIN = 0x08100000, LENGTH = 1M /* 64-bit AXI bus matrix, D1 domain */
FLASH1 (RX) : ORIGIN = 0x08000000, LENGTH = 1M /* 64-bit AXI bus matrix, D1 domain */
ITCMRAM (RWX) : ORIGIN = 0x00000000, LENGTH = 64K /* 64-bit AXI bus matrix, D1 domain */
}
/* stm32h7xx-hal uses a PROVIDE that expects RAM and FLASH symbols to exist */
REGION_ALIAS(RAM, DTCMRAM);
REGION_ALIAS(FLASH, FLASH1);
/* The location of the stack can be overridden using the
`_stack_start` symbol. Place the stack at the end of RAM */
_stack_start = ORIGIN(RAM) + LENGTH(RAM);
SECTIONS
{
.itcmram : ALIGN(4) {
*(.itcmram .itcmram.*);
. = ALIGN(4);
} > ITCMRAM
.dtcmram : ALIGN(4) {
*(.dtcmram .dtcmram.*);
. = ALIGN(4);
} > DTCMRAM
.axisram : ALIGN(8) {
*(.axisram .axisram.*);
. = ALIGN(8);
} > AXISRAM
/* The SRAM1 and SRAM2 section are commonly used as the stack and
heap for the CM4 core in dualcore versions and should thus not
be used in examples */
.sram3 (NOLOAD) : ALIGN(4) {
*(.sram3 .sram3.*);
. = ALIGN(4);
} > SRAM3
.sram4 (NOLOAD) : ALIGN(4) {
*(.sram4 .sram4.*);
. = ALIGN(4);
} > SRAM4
};