File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
variants/generic_f407v/ld Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ generic_f407v.upload.maximum_data_size=131072
236236
237237generic_f407v.build.core=maple
238238generic_f407v.build.f_cpu=168000000
239- generic_f407v.build.extra_flags= -DCRYSTAL_FREQ=8 -DLED_BUILTIN=PA6 -DNO_CCMRAM
239+ generic_f407v.build.extra_flags= -DCRYSTAL_FREQ=8 -DLED_BUILTIN=PA6
240240generic_f407v.build.variant=generic_f407v
241241generic_f407v.build.variant_system_lib=lib_f407.a
242242generic_f407v.build.error_led_pin=PA7
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ EXTERN(start_c)
3838/* main entry point */
3939EXTERN(main)
4040
41- /* Initial stack pointer value. Relocated to RAM */
41+ /* Initial stack pointer value. */
4242EXTERN(__msp_init)
4343PROVIDE(__msp_init = ORIGIN(ram) + LENGTH(ram));
4444
@@ -140,6 +140,7 @@ SECTIONS
140140 . = ALIGN (4 );
141141 _lm_rom_img_cfgp = .;
142142 LONG (LOADADDR (.data ));
143+ LONG (LOADADDR (.ccmdata ));
143144 /*
144145 * Heap: Linker scripts may choose a custom heap by overriding
145146 * _lm_heap_start and _lm_heap_end. Otherwise, the heap is in
@@ -168,6 +169,23 @@ SECTIONS
168169 __data_end__ = .;
169170 } > REGION_DATA AT> REGION_RODATA
170171
172+ /* CCM-RAM section
173+ *
174+ * IMPORTANT NOTE!
175+ * The startup code is modified to copy the init-values from flash to ccmram
176+ * at startup
177+ */
178+ .ccmdata :
179+ {
180+ . = ALIGN (4 );
181+ __ccmdata_start__ = .; /* create a global symbol at ccmram start */
182+ *(.ccmdata )
183+ *(.ccmram *)
184+
185+ . = ALIGN (4 );
186+ __ccmdata_end__ = .; /* create a global symbol at ccmram end */
187+ } >REGION_CCMRAM AT> REGION_RODATA
188+
171189 /*
172190 * .bss
173191 */
Original file line number Diff line number Diff line change 11/*
2- * STM32F411 linker script for JTAG (bare metal, no bootloader) builds.
2+ * STM32F4xx high density linker script for
3+ * JTAG (bare metal, no bootloader) builds.
34 */
45
56MEMORY
67{
8+ ccmram (rw) : ORIGIN = 0x10000000 , LENGTH = 64K
79 ram (rwx) : ORIGIN = 0x20000000 , LENGTH = 128K
810 rom (rx) : ORIGIN = 0x08000000 , LENGTH = 512K
911}
@@ -14,6 +16,7 @@ REGION_ALIAS("REGION_TEXT", rom);
1416REGION_ALIAS (" REGION_DATA" , ram);
1517REGION_ALIAS (" REGION_BSS" , ram);
1618REGION_ALIAS (" REGION_RODATA" , rom);
19+ REGION_ALIAS (" REGION_CCMRAM" , ccmram);
1720
1821_FLASH_BUILD = 1 ;
1922INCLUDE common.inc
You can’t perform that action at this time.
0 commit comments