1
- /*
2
- ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http ://www.apache.org /licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- */
16
-
17
- /*
18
- * STM32F091xC memory setup.
19
- */
1
+ /* STM32F091xC memory setup. It has 256k flash (128 2k pages) and 32k SRAM */
20
2
MEMORY
21
3
{
22
4
flash0 (rx) : org = 0x08000000, len = 40k /* Bootloader */
23
- flash1 (rx) : org = 0x0800A400 , len = 199k /* Application */
24
- flash2 (rx) : org = 0x00000000 , len = 0
5
+ flash1 (rx) : org = 0x0800A000 , len = 2k /* Metadata */
6
+ flash2 (rx) : org = 0x0800A800 , len = 214k /* Application */
25
7
flash3 (rx) : org = 0x00000000, len = 0
26
8
flash4 (rx) : org = 0x00000000, len = 0
27
9
flash5 (rx) : org = 0x00000000, len = 0
28
10
flash6 (rx) : org = 0x00000000, len = 0
29
11
flash7 (rx) : org = 0x00000000, len = 0
30
- ram0 (wx) : org = 0x20000000, len = 32k
31
- ram1 (wx) : org = 0x20000400, len = 31k
12
+ ram0 (wx) : org = 0x20000000, len = 32708 /* 32k - 4 (bootloader magic) */
13
+ ram1 (wx) : org = 0x20000400, len = 31k /* 32k - 1k (fw vector table) */
32
14
ram2 (wx) : org = 0x00000000, len = 0
33
15
ram3 (wx) : org = 0x00000000, len = 0
34
16
ram4 (wx) : org = 0x00000000, len = 0
@@ -41,27 +23,27 @@ MEMORY
41
23
and a load region (_LMA suffix).*/
42
24
43
25
/* Flash region to be used for exception vectors.*/
44
- REGION_ALIAS("VECTORS_FLASH", flash1 );
45
- REGION_ALIAS("VECTORS_FLASH_LMA", flash1 );
26
+ REGION_ALIAS("VECTORS_FLASH", flash2 );
27
+ REGION_ALIAS("VECTORS_FLASH_LMA", flash2 );
46
28
47
29
/* Flash region to be used for constructors and destructors.*/
48
- REGION_ALIAS("XTORS_FLASH", flash1 );
49
- REGION_ALIAS("XTORS_FLASH_LMA", flash1 );
30
+ REGION_ALIAS("XTORS_FLASH", flash2 );
31
+ REGION_ALIAS("XTORS_FLASH_LMA", flash2 );
50
32
51
33
/* Flash region to be used for code text.*/
52
- REGION_ALIAS("TEXT_FLASH", flash1 );
53
- REGION_ALIAS("TEXT_FLASH_LMA", flash1 );
34
+ REGION_ALIAS("TEXT_FLASH", flash2 );
35
+ REGION_ALIAS("TEXT_FLASH_LMA", flash2 );
54
36
55
37
/* Flash region to be used for read only data.*/
56
- REGION_ALIAS("RODATA_FLASH", flash1 );
57
- REGION_ALIAS("RODATA_FLASH_LMA", flash1 );
38
+ REGION_ALIAS("RODATA_FLASH", flash2 );
39
+ REGION_ALIAS("RODATA_FLASH_LMA", flash2 );
58
40
59
41
/* Flash region to be used for various.*/
60
- REGION_ALIAS("VARIOUS_FLASH", flash1 );
61
- REGION_ALIAS("VARIOUS_FLASH_LMA", flash1 );
42
+ REGION_ALIAS("VARIOUS_FLASH", flash2 );
43
+ REGION_ALIAS("VARIOUS_FLASH_LMA", flash2 );
62
44
63
45
/* Flash region to be used for RAM(n) initialization data.*/
64
- REGION_ALIAS("RAM_INIT_FLASH_LMA", flash1 );
46
+ REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2 );
65
47
66
48
/* RAM region to be used for Main stack. This stack accommodates the processing
67
49
of all exceptions and interrupts.*/
@@ -73,7 +55,7 @@ REGION_ALIAS("PROCESS_STACK_RAM", ram1);
73
55
74
56
/* RAM region to be used for data segment.*/
75
57
REGION_ALIAS("DATA_RAM", ram1);
76
- REGION_ALIAS("DATA_RAM_LMA", flash1 );
58
+ REGION_ALIAS("DATA_RAM_LMA", flash2 );
77
59
78
60
/* RAM region to be used for BSS segment.*/
79
61
REGION_ALIAS("BSS_RAM", ram1);
0 commit comments