Skip to content

Commit 2d7f242

Browse files
authored
device ram size is 40 kb, not 48 kB (#128)
* device ram size is 40 kb, not 48 kB in total RAM+RAM1 it has 48 kB, but the regions are not continous. This error is also arm-pack index.json * add section for CCM
1 parent 2359487 commit 2d7f242

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/TOOLCHAIN_GCC_ARM/STM32F303XC.ld

+12-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737

3838
MEMORY
3939
{
40-
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
41-
RAM (rwx) : ORIGIN = MBED_RAM_START + VECTORS_SIZE, LENGTH = MBED_RAM_SIZE - VECTORS_SIZE
40+
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
41+
RAM (rwx) : ORIGIN = MBED_RAM_START + VECTORS_SIZE, LENGTH = MBED_RAM_SIZE - VECTORS_SIZE
42+
RAM_CCM (rwx) : ORIGIN = MBED_RAM1_START, LENGTH = MBED_RAM1_SIZE
4243
}
4344

4445
/* Linker script to place sections and symbol values. Should be used together
@@ -183,6 +184,15 @@ SECTIONS
183184
__HeapLimit = .;
184185
} > RAM
185186

187+
.ram_ccm_section (NOLOAD):
188+
{
189+
__ram_ccm_start__ = .;
190+
*(.RAM_CCM_section)
191+
. = ORIGIN(RAM_CCM) + LENGTH(RAM_CCM);
192+
__ram_ccm_end__ = .;
193+
} >RAM_CCM
194+
195+
186196
/* .stack_dummy section doesn't contains any symbols. It is only
187197
* used for linker to calculate size of stack sections, and assign
188198
* values to stack symbols later */

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/cmsis_nvic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#endif
3131

3232
#if !defined(MBED_RAM_SIZE)
33-
#define MBED_RAM_SIZE 0xc000 // 48 KB
33+
#define MBED_RAM_SIZE 0xa000 // 40 KB
3434
#endif
3535

3636
#if !defined(MBED_RAM1_START)

0 commit comments

Comments
 (0)