Skip to content

Commit 7f2caac

Browse files
author
Andriy.Lishchynskyi
committed
Added GNU MCU Eclipse plug-in support
1 parent 7a85ae7 commit 7f2caac

File tree

4 files changed

+79
-4
lines changed

4 files changed

+79
-4
lines changed

tools/export/cdt/__init__.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def get_target_config(self, ctx, configuration):
4646

4747
def generate(self):
4848
"""Generate Makefile, .cproject & .project Eclipse project file,
49-
py_ocd_settings launch file, and software link .p2f file
49+
pyocd_settings launch files for both GNU ARM Eclipse and
50+
GNU MCU Eclipse plug-ins, and software link .p2f file
5051
"""
5152
super(Eclipse, self).generate()
5253
starting_dot = re.compile(r'(^[.]/|^[.]$)')
@@ -69,12 +70,19 @@ def generate(self):
6970
makedirs(join(self.export_dir,'eclipse-extras'))
7071

7172
for launch_name, ctx in launch_cfgs.items():
72-
self.gen_file('cdt/%s' % 'pyocd_settings.tmpl', ctx, join('eclipse-extras',
73+
# Generate launch configurations for former GNU ARM Eclipse plug-in
74+
self.gen_file('cdt/%s' % 'pyocd_settings_gnu_arm.tmpl', ctx, join('eclipse-extras',
7375
'{target}_{project}_{conf}_{launch}.launch'.format(
7476
target=self.target,
7577
project=self.project_name,
7678
conf=launch_name,
7779
launch='pyocd_settings')))
80+
# Generate launch configurations for GNU MCU Eclipse plug-in
81+
self.gen_file('cdt/%s' % 'pyocd_settings_gnu_mcu.tmpl', ctx, join('eclipse-extras',
82+
'{target}_{project}_{conf}.launch'.format(
83+
target=self.target,
84+
project=self.project_name,
85+
conf=launch_name)))
7886

7987
self.gen_file('cdt/necessary_software.tmpl', ctx,
8088
join('eclipse-extras','necessary_software.p2f'))

tools/export/cdt/cdt_definitions.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@
4242
"doFirstReset": "false",
4343
"doGdbServerAllocateSemihostingConsole": "false",
4444
"enableSemihosting": "false",
45-
"firstResetType": "",
4645
"gdbServerEnableSemihosting": "false",
4746
"gdbServerFlashMode": 2,
4847
"gdbServerGdbPortNumber": 3334,
4948
"gdbServerHaltAtHardFault": "false",
5049
"gdbServerOther": "-p 3333
--no-deprecation-warning",
51-
"secondResetType": "",
5250
"corePortNumber": 3334
5351
},
5452

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.pyocd.launchConfigurationType">
3+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.doContinue" value="{{device.doContinue}}"/>
4+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.doDebugInRam" value="false"/>
5+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.doFirstReset" value="{{device.doFirstReset}}"/>
6+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.doGdbServerAllocateConsole" value="true"/>
7+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.doGdbServerAllocateSemihostingConsole" value="{{device.doGdbServerAllocateSemihostingConsole}}"/>
8+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.doSecondReset" value="{{device.doSecondReset}}"/>
9+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.doStartGdbServer" value="true"/>
10+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.enableSemihosting" value="{{device.enableSemihosting}}"/>
11+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.firstResetType" value="{{device.firstResetType}}"/>
12+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbClientOtherCommands" value="{{device.gdbClientOtherCommands}}"/>
13+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbClientOtherOptions" value="{{device.gdbClientOtherOptions}}"/>
14+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerBoardId" value=""/>
15+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerBoardName" value=""/>
16+
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerBusSpeed" value="{{device.gdbServerBusSpeed}}"/>
17+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerConnectionAddress" value=""/>
18+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerEnableSemihosting" value="{{device.gdbServerEnableSemihosting}}"/>
19+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerExecutable" value="${pyocd_path}/${pyocd_executable}"/>
20+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerFlashFastVerify" value="false"/>
21+
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerFlashMode" value="{{device.gdbServerFlashMode}}"/>
22+
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerGdbPortNumber" value="{{device.gdbServerGdbPortNumber}}"/>
23+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerHaltAtHardFault" value="{{device.gdbServerHaltAtHardFault}}"/>
24+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerLog" value=""/>
25+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerOther" value="{{device.gdbServerOther}}"/>
26+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerOverrideTarget" value="false"/>
27+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerStepIntoInterrutps" value="false"/>
28+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerTargetName" value=""/>
29+
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerTelnetPortNumber" value="4444"/>
30+
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerUseGdbSyscalls" value="false"/>
31+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.otherInitCommands" value=""/>
32+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.otherRunCommands" value=""/>
33+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.secondResetType" value="{{device.secondResetType}}"/>
34+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value=""/>
35+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
36+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
37+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
38+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU MCU PyOCD"/>
39+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="{% if load_exe == device.coreLoadImage %}{{load_exe}}{% else %}{{device.coreLoadImage}}{% endif %}"/>
40+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="{% if load_exe == device.coreLoadSymbols %}{{load_exe}}{% else %}{{device.coreLoadSymbols}}{% endif %}"/>
41+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
42+
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="{{device.corePortNumber}}"/>
43+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
44+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
45+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="{{device.setStopAt}}"/>
46+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
47+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
48+
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
49+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
50+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
51+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
52+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
53+
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
54+
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
55+
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
56+
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
57+
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
58+
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
59+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="{{elf_location}}"/>
60+
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="{{name}}"/>
61+
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
62+
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
63+
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
64+
<listEntry value="/{{name}}"/>
65+
</listAttribute>
66+
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
67+
<listEntry value="4"/>
68+
</listAttribute>
69+
</launchConfiguration>

0 commit comments

Comments
 (0)