Skip to content

Commit 04d2c00

Browse files
committed
#555: add mem.ld for some stm32f7 devices
1 parent a2be38f commit 04d2c00

2 files changed

Lines changed: 178 additions & 0 deletions

File tree

  • plugins/org.eclipse.embedcdt.templates.stm.ui/templates/stm32f7xx_exe_c_project
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* This file is part of the µOS++ distribution.
3+
* (https://github.com/micro-os-plus)
4+
* Copyright (c) 2014 Liviu Ionescu.
5+
*
6+
* Permission is hereby granted, free of charge, to any person
7+
* obtaining a copy of this software and associated documentation
8+
* files (the "Software"), to deal in the Software without
9+
* restriction, including without limitation the rights to use,
10+
* copy, modify, merge, publish, distribute, sublicense, and/or
11+
* sell copies of the Software, and to permit persons to whom
12+
* the Software is furnished to do so, subject to the following
13+
* conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be
16+
* included in all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25+
* OTHER DEALINGS IN THE SOFTWARE.
26+
*/
27+
28+
/*
29+
* Memory Spaces Definitions.
30+
*
31+
* Need modifying for a specific board.
32+
* FLASH.ORIGIN: starting address of flash
33+
* FLASH.LENGTH: length of flash
34+
* RAM.ORIGIN: starting address of RAM bank 0
35+
* RAM.LENGTH: length of RAM bank 0
36+
*
37+
* The values below can be addressed in further linker scripts
38+
* using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
39+
*/
40+
41+
MEMORY
42+
{
43+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
44+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0K
45+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = $(STM32F7flashSize)K
46+
FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
47+
EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
48+
EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
49+
EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
50+
EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
51+
}
52+
53+
/*
54+
* For external ram use something like:
55+
56+
RAM (xrw) : ORIGIN = 0x64000000, LENGTH = 2048K
57+
58+
*/

plugins/org.eclipse.embedcdt.templates.stm.ui/templates/stm32f7xx_exe_c_project/template.xml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,106 @@
15951595
<!-- ================================================================== -->
15961596

15971597
<!-- Linker files -->
1598+
<if condition="$(STM32F7chipFamilyCube)==STM32F722xx">
1599+
<process type="org.eclipse.cdt.core.AddFiles">
1600+
<simple
1601+
name="projectName"
1602+
value="$(projectName)" />
1603+
<complex-array name="files">
1604+
<element>
1605+
<simple
1606+
name="source"
1607+
value="ldscripts/mem256.ld" />
1608+
<simple
1609+
name="target"
1610+
value="$(ldscriptsDir)/mem.ld" />
1611+
<simple
1612+
name="replaceable"
1613+
value="true" />
1614+
</element>
1615+
</complex-array>
1616+
</process>
1617+
</if>
1618+
<if condition="$(STM32F7chipFamilyCube)==STM32F723xx">
1619+
<process type="org.eclipse.cdt.core.AddFiles">
1620+
<simple
1621+
name="projectName"
1622+
value="$(projectName)" />
1623+
<complex-array name="files">
1624+
<element>
1625+
<simple
1626+
name="source"
1627+
value="ldscripts/mem256.ld" />
1628+
<simple
1629+
name="target"
1630+
value="$(ldscriptsDir)/mem.ld" />
1631+
<simple
1632+
name="replaceable"
1633+
value="true" />
1634+
</element>
1635+
</complex-array>
1636+
</process>
1637+
</if>
1638+
<if condition="$(STM32F7chipFamilyCube)==STM32F730xx">
1639+
<process type="org.eclipse.cdt.core.AddFiles">
1640+
<simple
1641+
name="projectName"
1642+
value="$(projectName)" />
1643+
<complex-array name="files">
1644+
<element>
1645+
<simple
1646+
name="source"
1647+
value="ldscripts/mem256.ld" />
1648+
<simple
1649+
name="target"
1650+
value="$(ldscriptsDir)/mem.ld" />
1651+
<simple
1652+
name="replaceable"
1653+
value="true" />
1654+
</element>
1655+
</complex-array>
1656+
</process>
1657+
</if>
1658+
<if condition="$(STM32F7chipFamilyCube)==STM32F732xx">
1659+
<process type="org.eclipse.cdt.core.AddFiles">
1660+
<simple
1661+
name="projectName"
1662+
value="$(projectName)" />
1663+
<complex-array name="files">
1664+
<element>
1665+
<simple
1666+
name="source"
1667+
value="ldscripts/mem256.ld" />
1668+
<simple
1669+
name="target"
1670+
value="$(ldscriptsDir)/mem.ld" />
1671+
<simple
1672+
name="replaceable"
1673+
value="true" />
1674+
</element>
1675+
</complex-array>
1676+
</process>
1677+
</if>
1678+
<if condition="$(STM32F7chipFamilyCube)==STM32F733xx">
1679+
<process type="org.eclipse.cdt.core.AddFiles">
1680+
<simple
1681+
name="projectName"
1682+
value="$(projectName)" />
1683+
<complex-array name="files">
1684+
<element>
1685+
<simple
1686+
name="source"
1687+
value="ldscripts/mem256.ld" />
1688+
<simple
1689+
name="target"
1690+
value="$(ldscriptsDir)/mem.ld" />
1691+
<simple
1692+
name="replaceable"
1693+
value="true" />
1694+
</element>
1695+
</complex-array>
1696+
</process>
1697+
</if>
15981698
<if condition="$(STM32F7chipFamilyCube)==STM32F745xx">
15991699
<process type="org.eclipse.cdt.core.AddFiles">
16001700
<simple
@@ -1635,6 +1735,26 @@
16351735
</complex-array>
16361736
</process>
16371737
</if>
1738+
<if condition="$(STM32F7chipFamilyCube)==STM32F750xx">
1739+
<process type="org.eclipse.cdt.core.AddFiles">
1740+
<simple
1741+
name="projectName"
1742+
value="$(projectName)" />
1743+
<complex-array name="files">
1744+
<element>
1745+
<simple
1746+
name="source"
1747+
value="ldscripts/mem320.ld" />
1748+
<simple
1749+
name="target"
1750+
value="$(ldscriptsDir)/mem.ld" />
1751+
<simple
1752+
name="replaceable"
1753+
value="true" />
1754+
</element>
1755+
</complex-array>
1756+
</process>
1757+
</if>
16381758
<if condition="$(STM32F7chipFamilyCube)==STM32F756xx">
16391759
<process type="org.eclipse.cdt.core.AddFiles">
16401760
<simple

0 commit comments

Comments
 (0)