Skip to content

Commit a072866

Browse files
authored
Merge pull request #11756 from JammuKekkonen/add_ccmram_section_for_f303re
Add option to use CCMRAM on F303xE.
2 parents f1392d6 + 4dc4bff commit a072866

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/device/TOOLCHAIN_ARM_STD/stm32f303xe.sct

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
#define Stack_Size MBED_BOOT_STACK_SIZE
4444

45-
; STM32F303RE: 512KB FLASH (0x80000) + 64KB SRAM (0x10000)
45+
; STM32F303RE: 512KB FLASH (0x80000) + 64KB SRAM (0x10000) + 16KB CCMRAM (0x4000)
4646
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4747

4848
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
@@ -58,5 +58,9 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
5858

5959
ARM_LIB_STACK (0x20000000+0x10000) EMPTY -Stack_Size { ; stack
6060
}
61+
62+
CCMRAM (0x10000000) (0x4000) {
63+
.ANY (CCMRAM)
64+
}
6165
}
6266

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/device/TOOLCHAIN_GCC_ARM/STM32F303XE.ld

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,12 @@ SECTIONS
168168

169169
/* Check if data + heap + stack exceeds RAM limit */
170170
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
171+
172+
.CCMRAM (NOLOAD):
173+
{
174+
Image$$RW_IRAM2$$Base = . ;
175+
*(CCMRAM)
176+
Image$$RW_IRAM2$$ZI$$Limit = .;
177+
} > CCM
171178
}
172179

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/device/TOOLCHAIN_IAR/stm32f303xe.icf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ define block STACKHEAP with fixed order { block HEAP, block CSTACK };
3333

3434
initialize by copy with packing = zeros { readwrite };
3535
do not initialize { section .noinit };
36+
do not initialize { section CCMRAM };
3637

3738
place at address mem:__intvec_start__ { readonly section .intvec };
3839

3940
place in ROM_region { readonly };
4041
place in RAM_region { readwrite, block STACKHEAP };
42+
place in CCMRAM_region { section CCMRAM };

0 commit comments

Comments
 (0)