Skip to content

Commit aaede9c

Browse files
committed
[DISCO_F051R8] exporter to coide and a naming correction
In PeripheralNames.h the PWM timer name was wrong. Changed from TIMxx to PWMxx.
1 parent d9ae036 commit aaede9c

File tree

3 files changed

+174
-5
lines changed

3 files changed

+174
-5
lines changed

libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/PeripheralNames.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ typedef enum {
6565
} I2CName;
6666

6767
typedef enum {
68-
TIM_3 = (int)TIM3_BASE,
69-
TIM_14 = (int)TIM14_BASE,
70-
TIM_15 = (int)TIM15_BASE,
71-
TIM_16 = (int)TIM16_BASE,
72-
TIM_17 = (int)TIM17_BASE
68+
PWM_3 = (int)TIM3_BASE,
69+
PWM_14 = (int)TIM14_BASE,
70+
PWM_15 = (int)TIM15_BASE,
71+
PWM_16 = (int)TIM16_BASE,
72+
PWM_17 = (int)TIM17_BASE
7373
} PWMName;
7474

7575
#ifdef __cplusplus

workspace_tools/export/coide.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class CoIDE(Exporter):
3939
'NUCLEO_F401RE',
4040
'NUCLEO_F411RE',
4141
'DISCO_L053C8',
42+
'DISCO_F051R8',
4243
'DISCO_F100RB',
4344
'DISCO_F429ZI',
4445
'DISCO_F334C8',
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<Project version="2G - 1.7.5" name="{{name}}">
3+
<Target name="Release" isCurrent="1">
4+
<Device manufacturerId="9" manufacturerName="ST" chipId="249" chipName="STM32F051R8" boardId="" boardName=""/>
5+
<BuildOption>
6+
<Compile>
7+
<Option name="OptimizationLevel" value="4"/>
8+
<Option name="UseFPU" value="0"/>
9+
<Option name="UserEditCompiler" value="-fno-common; -fmessage-length=0; -Wall; -fno-strict-aliasing; -fno-rtti; -fno-exceptions; -ffunction-sections; -fdata-sections; -std=gnu++98"/>
10+
<Option name="FPU" value="1"/>
11+
<Option name="SupportCPlusplus" value="1"/>
12+
<Includepaths>
13+
{% for path in include_paths %} <Includepath path="{{path}}"/> {% endfor %}
14+
</Includepaths>
15+
<DefinedSymbols>
16+
{% for s in symbols %} <Define name="{{s}}"/> {% endfor %}
17+
</DefinedSymbols>
18+
</Compile>
19+
<Link useDefault="0">
20+
<Option name="DiscardUnusedSection" value="1"/>
21+
<Option name="UserEditLinkder" value=""/>
22+
<Option name="UseMemoryLayout" value="0"/>
23+
<Option name="LTO" value="0"/>
24+
<Option name="IsNewStartupCode" value="1"/>
25+
<Option name="Library" value="Not use C Library"/>
26+
<Option name="nostartfiles" value="0"/>
27+
<Option name="UserEditLinker" value="-Wl,--wrap,main; --specs=nano.specs; -u _printf_float; -u _scanf_float; {% for file in object_files %}
28+
${project.path}/{{file}}; {% endfor %} {% for p in library_paths %}-L${project.path}/{{p}}; {% endfor %}"/>
29+
<LinkedLibraries>
30+
{% for lib in libraries %}
31+
<Libset dir="" libs="{{lib}}"/>
32+
{% endfor %}
33+
<Libset dir="" libs="stdc++"/>
34+
<Libset dir="" libs="supc++"/>
35+
<Libset dir="" libs="m"/>
36+
<Libset dir="" libs="gcc"/>
37+
<Libset dir="" libs="c"/>
38+
<Libset dir="" libs="nosys"/>
39+
</LinkedLibraries>
40+
<MemoryAreas debugInFlashNotRAM="1">
41+
<Memory name="IROM1" type="ReadOnly" size="0x00010000" startValue="0x08000000"/>
42+
<Memory name="IRAM1" type="ReadWrite" size="0x00001F40" startValue="0x200000C0"/>
43+
<Memory name="IROM2" type="ReadOnly" size="" startValue=""/>
44+
<Memory name="IRAM2" type="ReadWrite" size="" startValue=""/>
45+
</MemoryAreas>
46+
<LocateLinkFile path="{{scatter_file}}" type="0"/>
47+
</Link>
48+
<Output>
49+
<Option name="OutputFileType" value="0"/>
50+
<Option name="Path" value="./"/>
51+
<Option name="Name" value="{{name}}"/>
52+
<Option name="HEX" value="1"/>
53+
<Option name="BIN" value="1"/>
54+
</Output>
55+
<User>
56+
<UserRun name="Run#1" type="Before" checked="0" value=""/>
57+
<UserRun name="Run#1" type="After" checked="0" value=""/>
58+
</User>
59+
</BuildOption>
60+
<DebugOption>
61+
<Option name="org.coocox.codebugger.gdbjtag.core.adapter" value="ST-Link"/>
62+
<Option name="org.coocox.codebugger.gdbjtag.core.debugMode" value="SWD"/>
63+
<Option name="org.coocox.codebugger.gdbjtag.core.clockDiv" value="1M"/>
64+
<Option name="org.coocox.codebugger.gdbjtag.corerunToMain" value="1"/>
65+
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkgdbserver" value=""/>
66+
<Option name="org.coocox.codebugger.gdbjtag.core.userDefineGDBScript" value=""/>
67+
<Option name="org.coocox.codebugger.gdbjtag.core.targetEndianess" value="0"/>
68+
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkResetMode" value="Type 0: Normal"/>
69+
<Option name="org.coocox.codebugger.gdbjtag.core.resetMode" value="SYSRESETREQ"/>
70+
<Option name="org.coocox.codebugger.gdbjtag.core.ifSemihost" value="0"/>
71+
<Option name="org.coocox.codebugger.gdbjtag.core.ifCacheRom" value="1"/>
72+
<Option name="org.coocox.codebugger.gdbjtag.core.ipAddress" value="127.0.0.1"/>
73+
<Option name="org.coocox.codebugger.gdbjtag.core.portNumber" value="2009"/>
74+
<Option name="org.coocox.codebugger.gdbjtag.core.autoDownload" value="1"/>
75+
<Option name="org.coocox.codebugger.gdbjtag.core.verify" value="1"/>
76+
<Option name="org.coocox.codebugger.gdbjtag.core.downloadFuction" value="Erase Effected"/>
77+
<Option name="org.coocox.codebugger.gdbjtag.core.defaultAlgorithm" value="./STM32F05xx_64.elf"/>
78+
</DebugOption>
79+
<ExcludeFile/>
80+
</Target>
81+
<Target name="Debug" isCurrent="0">
82+
<Device manufacturerId="9" manufacturerName="ST" chipId="249" chipName="STM32F051R8" boardId="" boardName=""/>
83+
<BuildOption>
84+
<Compile>
85+
<Option name="OptimizationLevel" value="0"/>
86+
<Option name="UseFPU" value="0"/>
87+
<Option name="UserEditCompiler" value="-fno-common; -fmessage-length=0; -Wall; -fno-strict-aliasing; -fno-rtti; -fno-exceptions; -ffunction-sections; -fdata-sections; -std=gnu++98"/>
88+
<Option name="FPU" value="1"/>
89+
<Option name="SupportCPlusplus" value="1"/>
90+
<Includepaths>
91+
{% for path in include_paths %} <Includepath path="{{path}}"/> {% endfor %}
92+
</Includepaths>
93+
<DefinedSymbols>
94+
{% for s in symbols %} <Define name="{{s}}"/> {% endfor %}
95+
</DefinedSymbols>
96+
</Compile>
97+
<Link useDefault="0">
98+
<Option name="DiscardUnusedSection" value="1"/>
99+
<Option name="UserEditLinkder" value=""/>
100+
<Option name="UseMemoryLayout" value="0"/>
101+
<Option name="LTO" value="0"/>
102+
<Option name="IsNewStartupCode" value="1"/>
103+
<Option name="Library" value="Not use C Library"/>
104+
<Option name="nostartfiles" value="0"/>
105+
<Option name="UserEditLinker" value="-Wl,--wrap,main; --specs=nano.specs; -u _printf_float; -u _scanf_float; {% for file in object_files %}
106+
${project.path}/{{file}}; {% endfor %} {% for p in library_paths %}-L${project.path}/{{p}}; {% endfor %}"/>
107+
<LinkedLibraries>
108+
{% for lib in libraries %}
109+
<Libset dir="" libs="{{lib}}"/>
110+
{% endfor %}
111+
<Libset dir="" libs="stdc++"/>
112+
<Libset dir="" libs="supc++"/>
113+
<Libset dir="" libs="m"/>
114+
<Libset dir="" libs="gcc"/>
115+
<Libset dir="" libs="c"/>
116+
<Libset dir="" libs="nosys"/>
117+
</LinkedLibraries>
118+
<MemoryAreas debugInFlashNotRAM="1">
119+
<Memory name="IROM1" type="ReadOnly" size="0x00010000" startValue="0x08000000"/>
120+
<Memory name="IRAM1" type="ReadWrite" size="0x00001F40" startValue="0x200000C0"/>
121+
<Memory name="IROM2" type="ReadOnly" size="" startValue=""/>
122+
<Memory name="IRAM2" type="ReadWrite" size="" startValue=""/>
123+
</MemoryAreas>
124+
<LocateLinkFile path="{{scatter_file}}" type="0"/>
125+
</Link>
126+
<Output>
127+
<Option name="OutputFileType" value="0"/>
128+
<Option name="Path" value="./"/>
129+
<Option name="Name" value="{{name}}"/>
130+
<Option name="HEX" value="1"/>
131+
<Option name="BIN" value="1"/>
132+
</Output>
133+
<User>
134+
<UserRun name="Run#1" type="Before" checked="0" value=""/>
135+
<UserRun name="Run#1" type="After" checked="0" value=""/>
136+
</User>
137+
</BuildOption>
138+
<DebugOption>
139+
<Option name="org.coocox.codebugger.gdbjtag.core.adapter" value="ST-Link"/>
140+
<Option name="org.coocox.codebugger.gdbjtag.core.debugMode" value="SWD"/>
141+
<Option name="org.coocox.codebugger.gdbjtag.core.clockDiv" value="1M"/>
142+
<Option name="org.coocox.codebugger.gdbjtag.corerunToMain" value="1"/>
143+
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkgdbserver" value=""/>
144+
<Option name="org.coocox.codebugger.gdbjtag.core.userDefineGDBScript" value=""/>
145+
<Option name="org.coocox.codebugger.gdbjtag.core.targetEndianess" value="0"/>
146+
<Option name="org.coocox.codebugger.gdbjtag.core.jlinkResetMode" value="Type 0: Normal"/>
147+
<Option name="org.coocox.codebugger.gdbjtag.core.resetMode" value="SYSRESETREQ"/>
148+
<Option name="org.coocox.codebugger.gdbjtag.core.ifSemihost" value="0"/>
149+
<Option name="org.coocox.codebugger.gdbjtag.core.ifCacheRom" value="1"/>
150+
<Option name="org.coocox.codebugger.gdbjtag.core.ipAddress" value="127.0.0.1"/>
151+
<Option name="org.coocox.codebugger.gdbjtag.core.portNumber" value="2009"/>
152+
<Option name="org.coocox.codebugger.gdbjtag.core.autoDownload" value="1"/>
153+
<Option name="org.coocox.codebugger.gdbjtag.core.verify" value="1"/>
154+
<Option name="org.coocox.codebugger.gdbjtag.core.downloadFuction" value="Erase Effected"/>
155+
<Option name="org.coocox.codebugger.gdbjtag.core.defaultAlgorithm" value="./STM32F05xx_64.elf"/>
156+
</DebugOption>
157+
<ExcludeFile/>
158+
</Target>
159+
<Components path="./"/>
160+
<Files>
161+
{% for file in source_files %}
162+
<File name="sources/{{file.path}}" path="{{file.path}}" type="{{file.type}}"/>
163+
{% endfor %}
164+
{% for file in header_files %}
165+
<File name="headers/{{file.path}}" path="{{file.path}}" type="{{file.type}}"/>
166+
{% endfor %}
167+
</Files>
168+
</Project>

0 commit comments

Comments
 (0)