Skip to content

Commit fedee49

Browse files
committed
[Disco F407VG] Fix RAM size
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 9d056f2 commit fedee49

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Diff for: boards.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ Disco.menu.pnum.DISCO_F100RB.build.cmsis_lib_gcc=arm_cortexM3l_math
571571
Disco.menu.pnum.DISCO_F407VG=STM32F407G-DISC1
572572
Disco.menu.pnum.DISCO_F407VG.node=DIS_F407VG
573573
Disco.menu.pnum.DISCO_F407VG.upload.maximum_size=1048576
574-
Disco.menu.pnum.DISCO_F407VG.upload.maximum_data_size=196608
574+
Disco.menu.pnum.DISCO_F407VG.upload.maximum_data_size=131072
575575
Disco.menu.pnum.DISCO_F407VG.build.mcu=cortex-m4
576576
Disco.menu.pnum.DISCO_F407VG.build.flags.fp=-mfpu=fpv4-sp-d16 -mfloat-abi=hard
577577
Disco.menu.pnum.DISCO_F407VG.build.board=DISCO_F407VG

Diff for: variants/DISCO_F407VG/ldscript.ld

+11-12
Original file line numberDiff line numberDiff line change
@@ -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
**
@@ -54,15 +53,15 @@ ENTRY(Reset_Handler)
5453
/* Highest address of the user mode stack */
5554
_estack = 0x20020000; /* end of RAM */
5655
/* Generate a link error if heap and stack don't fit into RAM */
57-
_Min_Heap_Size = 0x200;; /* required amount of heap */
58-
_Min_Stack_Size = 0x400;; /* required amount of stack */
56+
_Min_Heap_Size = 0x200; /* required amount of heap */
57+
_Min_Stack_Size = 0x400; /* required amount of stack */
5958

6059
/* Specify the memory areas */
6160
MEMORY
6261
{
63-
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
6462
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
65-
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
63+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
64+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
6665
}
6766

6867
/* Define output sections */
@@ -77,7 +76,7 @@ SECTIONS
7776
} >FLASH
7877

7978
/* The program code and other data goes into FLASH */
80-
.text ALIGN(4):
79+
.text :
8180
{
8281
. = ALIGN(4);
8382
*(.text) /* .text sections (code) */
@@ -94,7 +93,7 @@ SECTIONS
9493
} >FLASH
9594

9695
/* Constant data goes into FLASH */
97-
.rodata ALIGN(4):
96+
.rodata :
9897
{
9998
. = ALIGN(4);
10099
*(.rodata) /* .rodata sections (constants, strings, etc.) */
@@ -184,12 +183,12 @@ SECTIONS
184183
/* User_heap_stack section, used to check that there is enough RAM left */
185184
._user_heap_stack :
186185
{
187-
. = ALIGN(4);
186+
. = ALIGN(8);
188187
PROVIDE ( end = . );
189188
PROVIDE ( _end = . );
190189
. = . + _Min_Heap_Size;
191190
. = . + _Min_Stack_Size;
192-
. = ALIGN(4);
191+
. = ALIGN(8);
193192
} >RAM
194193

195194

0 commit comments

Comments
 (0)