Skip to content

Commit 1b46e5f

Browse files
committed
[Generic F4x7Vx] Fix RAM size
Signed-off-by: Frederic Pillon <[email protected]>
1 parent fedee49 commit 1b46e5f

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

Diff for: boards.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1137,15 +1137,15 @@ GenF4.menu.pnum.Generic_F423CH.build.variant=Generic_F4x3Cx
11371137
# Generic F417VG
11381138
GenF4.menu.pnum.Generic_F417VG=Generic F417VG
11391139
GenF4.menu.pnum.Generic_F417VG.upload.maximum_size=1048576
1140-
GenF4.menu.pnum.Generic_F417VG.upload.maximum_data_size=196608
1140+
GenF4.menu.pnum.Generic_F417VG.upload.maximum_data_size=131072
11411141
GenF4.menu.pnum.Generic_F417VG.build.board=GENERIC_F417VG
11421142
GenF4.menu.pnum.Generic_F417VG.build.product_line=STM32F417xx
11431143
GenF4.menu.pnum.Generic_F417VG.build.variant=Generic_F4x7Vx
11441144

11451145
# Generic F417VE
11461146
GenF4.menu.pnum.Generic_F417VE=Generic F417VE
11471147
GenF4.menu.pnum.Generic_F417VE.upload.maximum_size=524288
1148-
GenF4.menu.pnum.Generic_F417VE.upload.maximum_data_size=196608
1148+
GenF4.menu.pnum.Generic_F417VE.upload.maximum_data_size=131072
11491149
GenF4.menu.pnum.Generic_F417VE.build.board=GENERIC_F417VE
11501150
GenF4.menu.pnum.Generic_F417VE.build.product_line=STM32F417xx
11511151
GenF4.menu.pnum.Generic_F417VE.build.variant=Generic_F4x7Vx
@@ -1289,15 +1289,15 @@ GenF4.menu.pnum.Generic_F410C8.build.variant=Generic_F410Cx
12891289
# Generic F407VG
12901290
GenF4.menu.pnum.Generic_F407VG=Generic F407VG
12911291
GenF4.menu.pnum.Generic_F407VG.upload.maximum_size=1048576
1292-
GenF4.menu.pnum.Generic_F407VG.upload.maximum_data_size=196608
1292+
GenF4.menu.pnum.Generic_F407VG.upload.maximum_data_size=131072
12931293
GenF4.menu.pnum.Generic_F407VG.build.board=GENERIC_F407VG
12941294
GenF4.menu.pnum.Generic_F407VG.build.product_line=STM32F407xx
12951295
GenF4.menu.pnum.Generic_F407VG.build.variant=Generic_F4x7Vx
12961296

12971297
# Generic F407VE
12981298
GenF4.menu.pnum.Generic_F407VE=Generic F407VE
12991299
GenF4.menu.pnum.Generic_F407VE.upload.maximum_size=524288
1300-
GenF4.menu.pnum.Generic_F407VE.upload.maximum_data_size=196608
1300+
GenF4.menu.pnum.Generic_F407VE.upload.maximum_data_size=131072
13011301
GenF4.menu.pnum.Generic_F407VE.build.board=GENERIC_F407VE
13021302
GenF4.menu.pnum.Generic_F407VE.build.product_line=STM32F407xx
13031303
GenF4.menu.pnum.Generic_F407VE.build.variant=Generic_F4x7Vx

Diff for: variants/Generic_F4x7Vx/ldscript.ld

+28-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
*****************************************************************************
2+
******************************************************************************
33
**
44

55
** File : LinkerScript.ld
@@ -14,14 +14,13 @@
1414
**
1515
** Target : STMicroelectronics STM32
1616
**
17-
**
18-
** Distribution: The file is distributed as is, without any warranty
17+
** Distribution: The file is distributed “as is,” without any warranty
1918
** of any kind.
2019
**
2120
*****************************************************************************
2221
** @attention
2322
**
24-
** <h2><center>&copy; COPYRIGHT(c) 2014 Ac6</center></h2>
23+
** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
2524
**
2625
** Redistribution and use in source and binary forms, with or without modification,
2726
** are permitted provided that the following conditions are met:
@@ -30,7 +29,7 @@
3029
** 2. Redistributions in binary form must reproduce the above copyright notice,
3130
** this list of conditions and the following disclaimer in the documentation
3231
** and/or other materials provided with the distribution.
33-
** 3. Neither the name of Ac6 nor the names of its contributors
32+
** 3. Neither the name of STMicroelectronics nor the names of its contributors
3433
** may be used to endorse or promote products derived from this software
3534
** without specific prior written permission.
3635
**
@@ -61,6 +60,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
6160
MEMORY
6261
{
6362
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
63+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
6464
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
6565
}
6666

@@ -76,7 +76,7 @@ SECTIONS
7676
} >FLASH
7777

7878
/* The program code and other data goes into FLASH */
79-
.text ALIGN(4):
79+
.text :
8080
{
8181
. = ALIGN(4);
8282
*(.text) /* .text sections (code) */
@@ -133,7 +133,7 @@ SECTIONS
133133
_sidata = LOADADDR(.data);
134134

135135
/* Initialized data sections goes into RAM, load LMA copy after code */
136-
.data :
136+
.data :
137137
{
138138
. = ALIGN(4);
139139
_sdata = .; /* create a global symbol at data start */
@@ -144,7 +144,26 @@ SECTIONS
144144
_edata = .; /* define a global symbol at data end */
145145
} >RAM AT> FLASH
146146

147-
147+
_siccmram = LOADADDR(.ccmram);
148+
149+
/* CCM-RAM section
150+
*
151+
* IMPORTANT NOTE!
152+
* If initialized variables will be placed in this section,
153+
* the startup code needs to be modified to copy the init-values.
154+
*/
155+
.ccmram :
156+
{
157+
. = ALIGN(4);
158+
_sccmram = .; /* create a global symbol at ccmram start */
159+
*(.ccmram)
160+
*(.ccmram*)
161+
162+
. = ALIGN(4);
163+
_eccmram = .; /* create a global symbol at ccmram end */
164+
} >CCMRAM AT> FLASH
165+
166+
148167
/* Uninitialized data section */
149168
. = ALIGN(4);
150169
.bss :
@@ -172,7 +191,7 @@ SECTIONS
172191
. = ALIGN(8);
173192
} >RAM
174193

175-
194+
176195

177196
/* Remove information from the standard libraries */
178197
/DISCARD/ :

0 commit comments

Comments
 (0)