Skip to content

Commit 48dfcd9

Browse files
author
Andriy.Lishchynskyi
committed
Changes:
- added new erase launch configuration - added new kits support - code cleanup
1 parent 55a6ca5 commit 48dfcd9

File tree

4 files changed

+50
-20
lines changed

4 files changed

+50
-20
lines changed

tools/export/cdt/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
with open(_eclipse_defs, 'r') as f:
1616
_CONFIGS_OPTIONS = json.load(f)
1717

18-
supported_launches = ['debug', 'program']
18+
supported_launches = ['debug', 'program', 'erase']
1919

2020
class Eclipse(Makefile):
2121
"""Generic Eclipse project. Intended to be subclassed by classes that
@@ -37,10 +37,6 @@ def get_target_config(self, ctx, configuration):
3737

3838
eclipse_config.update(target_info)
3939

40-
#special case for gdbClientOtherOptions param - in some cases it may contain dynamical values, fill in it here
41-
eclipse_config['gdbClientOtherOptions'] = eclipse_config['gdbClientOtherOptions'].format(
42-
elf_location=ctx['elf_location'])
43-
4440
Eclipsedevice = namedtuple('Eclipsedevice', eclipse_config.keys())
4541
return Eclipsedevice(**eclipse_config)
4642

tools/export/cdt/cdt_definitions.json

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,25 @@
1515
"gdbServerGdbPortNumber": 3333,
1616
"gdbServerHaltAtHardFault": "true",
1717
"gdbServerOther": "",
18+
"otherRunCommands": "",
1819
"secondResetType": "halt",
1920
"coreLoadImage": "true",
2021
"coreLoadSymbols": "true",
2122
"corePortNumber": 3333,
2223
"setStopAt": "true"
2324
},
24-
2525
"debug": {
2626
},
27-
2827
"program": {
28+
"doContinue": "false",
29+
"otherRunCommands": "continue&
quit",
30+
"coreLoadSymbols": "false",
31+
"setStopAt": "false"
32+
},
33+
"erase": {
2934
"doContinue": "false",
3035
"doSecondReset": "false",
31-
"gdbClientOtherCommands": "set mem inaccessible-by-default off
target remote localhost:3333
mon reset halt
load
mon reset
quit",
32-
"gdbClientOtherOptions": "{elf_location}",
36+
"otherRunCommands": "mon erase --chip
quit",
3337
"coreLoadImage": "false",
3438
"coreLoadSymbols": "false",
3539
"setStopAt": "false"
@@ -39,19 +43,49 @@
3943
"targets": {
4044
"CY8CPROTO_062_4343W": {
4145
"generic": {
42-
"doFirstReset": "false",
43-
"doGdbServerAllocateSemihostingConsole": "false",
44-
"enableSemihosting": "false",
45-
"gdbServerEnableSemihosting": "false",
46-
"gdbServerFlashMode": 2,
4746
"gdbServerGdbPortNumber": 3334,
48-
"gdbServerHaltAtHardFault": "false",
4947
"gdbServerOther": "-p 3333
--no-deprecation-warning",
5048
"corePortNumber": 3334
51-
},
49+
}
50+
},
51+
52+
"CY8CMOD_062_4343W": {
53+
"generic": {
54+
"gdbServerGdbPortNumber": 3334,
55+
"gdbServerOther": "-p 3333
--no-deprecation-warning",
56+
"corePortNumber": 3334
57+
}
58+
},
59+
60+
"CYW943012P6EVB_01": {
61+
"generic": {
62+
"gdbServerGdbPortNumber": 3334,
63+
"gdbServerOther": "-p 3333
--no-deprecation-warning",
64+
"corePortNumber": 3334
65+
}
66+
},
67+
68+
"CY8CKIT_062_WIFI_BT": {
69+
"generic": {
70+
"gdbServerGdbPortNumber": 3334,
71+
"gdbServerOther": "-p 3333
--no-deprecation-warning",
72+
"corePortNumber": 3334
73+
}
74+
},
75+
76+
"CY8CKIT_062_BLE": {
77+
"generic": {
78+
"gdbServerGdbPortNumber": 3334,
79+
"gdbServerOther": "-p 3333
--no-deprecation-warning",
80+
"corePortNumber": 3334
81+
}
82+
},
5283

53-
"program": {
54-
"gdbClientOtherCommands": "set mem inaccessible-by-default off
target remote localhost:3334
mon reset halt
load
mon reset
quit"
84+
"CY8CKIT_062_4343W": {
85+
"generic": {
86+
"gdbServerGdbPortNumber": 3334,
87+
"gdbServerOther": "-p 3333
--no-deprecation-warning",
88+
"corePortNumber": 3334
5589
}
5690
}
5791
}

tools/export/cdt/pyocd_settings_gnu_arm.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.pyocd.gdbServerTelnetPortNumber" value="4444"/>
2929
<booleanAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.pyocd.gdbServerUseGdbSyscalls" value="false"/>
3030
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.pyocd.otherInitCommands" value=""/>
31-
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.pyocd.otherRunCommands" value=""/>
31+
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.pyocd.otherRunCommands" value="{{device.otherRunCommands}}"/>
3232
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.pyocd.secondResetType" value="{{device.secondResetType}}"/>
3333
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
3434
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>

tools/export/cdt/pyocd_settings_gnu_mcu.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerTelnetPortNumber" value="4444"/>
3030
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.gdbServerUseGdbSyscalls" value="false"/>
3131
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.otherInitCommands" value=""/>
32-
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.otherRunCommands" value=""/>
32+
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.otherRunCommands" value="{{device.otherRunCommands}}"/>
3333
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.pyocd.secondResetType" value="{{device.secondResetType}}"/>
3434
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value=""/>
3535
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>

0 commit comments

Comments
 (0)