Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 4ec0db2

Browse files
committed
Update Otto variant
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent 0c97f2c commit 4ec0db2

36 files changed

+2032
-6873
lines changed

variants/otto/PeripheralPins.c

Lines changed: 385 additions & 0 deletions
Large diffs are not rendered by default.

variants/otto/ffconf.h

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
/*-----------------------------------------------------------------------------/
1313
/ Additional user header to be used
1414
/-----------------------------------------------------------------------------*/
15-
#include "stm32f4xx_hal.h"
16-
#include "otto_sd.h"
15+
#include "stm32_def.h"
16+
#include "bsp_sd.h"
1717
/*-----------------------------------------------------------------------------/
1818
/ Functions and Buffer Configurations
1919
/-----------------------------------------------------------------------------*/

variants/otto/ldscript.ld

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
2+
/*
3+
*****************************************************************************
4+
**
5+
6+
** File : LinkerScript.ld
7+
**
8+
** Abstract : Linker script for STM32F469NIHx Device with
9+
** 2048KByte FLASH, 320KByte RAM
10+
**
11+
** Set heap size, stack size and stack location according
12+
** to application requirements.
13+
**
14+
** Set memory bank area and size if external memory is used.
15+
**
16+
** Target : STMicroelectronics STM32
17+
**
18+
**
19+
** Distribution: The file is distributed as is, without any warranty
20+
** of any kind.
21+
**
22+
** (c)Copyright Ac6.
23+
** You may use this file as-is or modify it according to the needs of your
24+
** project. Distribution of this file (unmodified or modified) is not
25+
** permitted. Ac6 permit registered System Workbench for MCU users the
26+
** rights to distribute the assembled, compiled & linked contents of this
27+
** file as part of an application binary file, provided that it is built
28+
** using the System Workbench for MCU toolchain.
29+
**
30+
*****************************************************************************
31+
*/
32+
33+
/* Entry Point */
34+
ENTRY(Reset_Handler)
35+
36+
/* Highest address of the user mode stack */
37+
_estack = 0x20050000; /* end of RAM */
38+
/* Generate a link error if heap and stack don't fit into RAM */
39+
_Min_Heap_Size = 0x200;; /* required amount of heap */
40+
_Min_Stack_Size = 0x400;; /* required amount of stack */
41+
42+
/* Specify the memory areas */
43+
MEMORY
44+
{
45+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
46+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K
47+
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
48+
}
49+
50+
/* Define output sections */
51+
SECTIONS
52+
{
53+
/* The startup code goes first into FLASH */
54+
.isr_vector :
55+
{
56+
. = ALIGN(8);
57+
KEEP(*(.isr_vector)) /* Startup code */
58+
. = ALIGN(8);
59+
} >FLASH
60+
61+
/* The program code and other data goes into FLASH */
62+
.text :
63+
{
64+
. = ALIGN(8);
65+
*(.text) /* .text sections (code) */
66+
*(.text*) /* .text* sections (code) */
67+
*(.glue_7) /* glue arm to thumb code */
68+
*(.glue_7t) /* glue thumb to arm code */
69+
*(.eh_frame)
70+
71+
KEEP (*(.init))
72+
KEEP (*(.fini))
73+
74+
. = ALIGN(8);
75+
_etext = .; /* define a global symbols at end of code */
76+
} >FLASH
77+
78+
/* Constant data goes into FLASH */
79+
.rodata :
80+
{
81+
. = ALIGN(8);
82+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
83+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
84+
. = ALIGN(8);
85+
} >FLASH
86+
87+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
88+
.ARM : {
89+
__exidx_start = .;
90+
*(.ARM.exidx*)
91+
__exidx_end = .;
92+
} >FLASH
93+
94+
.preinit_array :
95+
{
96+
PROVIDE_HIDDEN (__preinit_array_start = .);
97+
KEEP (*(.preinit_array*))
98+
PROVIDE_HIDDEN (__preinit_array_end = .);
99+
} >FLASH
100+
.init_array :
101+
{
102+
PROVIDE_HIDDEN (__init_array_start = .);
103+
KEEP (*(SORT(.init_array.*)))
104+
KEEP (*(.init_array*))
105+
PROVIDE_HIDDEN (__init_array_end = .);
106+
} >FLASH
107+
.fini_array :
108+
{
109+
PROVIDE_HIDDEN (__fini_array_start = .);
110+
KEEP (*(SORT(.fini_array.*)))
111+
KEEP (*(.fini_array*))
112+
PROVIDE_HIDDEN (__fini_array_end = .);
113+
} >FLASH
114+
115+
/* used by the startup to initialize data */
116+
_sidata = LOADADDR(.data);
117+
118+
/* Initialized data sections goes into RAM, load LMA copy after code */
119+
.data :
120+
{
121+
. = ALIGN(8);
122+
_sdata = .; /* create a global symbol at data start */
123+
*(.data) /* .data sections */
124+
*(.data*) /* .data* sections */
125+
126+
. = ALIGN(8);
127+
_edata = .; /* define a global symbol at data end */
128+
} >RAM AT> FLASH
129+
130+
_siccmram = LOADADDR(.ccmram);
131+
132+
/* CCM-RAM section
133+
*
134+
* IMPORTANT NOTE!
135+
* If initialized variables will be placed in this section,
136+
* the startup code needs to be modified to copy the init-values.
137+
*/
138+
.ccmram :
139+
{
140+
. = ALIGN(4);
141+
_sccmram = .; /* create a global symbol at ccmram start */
142+
*(.ccmram)
143+
*(.ccmram*)
144+
145+
. = ALIGN(4);
146+
_eccmram = .; /* create a global symbol at ccmram end */
147+
} >CCMRAM AT> FLASH
148+
149+
150+
/* Uninitialized data section */
151+
. = ALIGN(4);
152+
.bss :
153+
{
154+
/* This is used by the startup in order to initialize the .bss secion */
155+
_sbss = .; /* define a global symbol at bss start */
156+
__bss_start__ = _sbss;
157+
*(.bss)
158+
*(.bss*)
159+
*(COMMON)
160+
161+
. = ALIGN(4);
162+
_ebss = .; /* define a global symbol at bss end */
163+
__bss_end__ = _ebss;
164+
} >RAM
165+
166+
/* User_heap_stack section, used to check that there is enough RAM left */
167+
._user_heap_stack :
168+
{
169+
. = ALIGN(4);
170+
PROVIDE ( end = . );
171+
PROVIDE ( _end = . );
172+
. = . + _Min_Heap_Size;
173+
. = . + _Min_Stack_Size;
174+
. = ALIGN(4);
175+
} >RAM
176+
177+
178+
179+
/* Remove information from the standard libraries */
180+
/DISCARD/ :
181+
{
182+
libc.a ( * )
183+
libm.a ( * )
184+
libgcc.a ( * )
185+
}
186+
187+
.ARM.attributes 0 : { *(.ARM.attributes) }
188+
}
189+
190+

0 commit comments

Comments
 (0)