-
Notifications
You must be signed in to change notification settings - Fork 68
/
memory_2048_368.x
35 lines (31 loc) · 1014 Bytes
/
memory_2048_368.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
/* For STM32F765,767,768,769,777,778,779 devices */
MEMORY
{
/* NOTE K = KiBi = 1024 bytes */
FLASH : ORIGIN = 0x08000000, LENGTH = 2M
RAM : ORIGIN = 0x20020000, LENGTH = 368K + 16K
ITCM : ORIGIN = 0x00000000, LENGTH = 16K /* Instruction Tighly Coupled Memory */
DTCM : ORIGIN = 0x20000000, LENGTH = 128K /* Data Tighly Coupled Memory */
}
SECTIONS
{
.itcm : ALIGN(4)
{
*(.itcm .itcm.*);
. = ALIGN(4);
} > ITCM
.dtcm : ALIGN(4)
{
*(.dtcm .dtcm.*);
. = ALIGN(4);
} > DTCM
}
/* You can then use something like this to place a variable into a specific section of memory:
* #[link_section = ".dtcm.BUFFER"]
* static mut BUF: [u8; 1024] = [3u8; 1024];
* Verifiable with: cargo size --release --example hello_world -- -A
*/
/* This is where the call stack will be allocated. */
/* The stack is of the full descending type. */
/* NOTE Do NOT modify `_stack_start` unless you know what you are doing */
_stack_start = ORIGIN(RAM) + LENGTH(RAM);