Skip to content

Commit 020c840

Browse files
Apply suggestions from code review
Co-Authored-By: Cypress-OpenOCD <[email protected]>
1 parent 6f584cd commit 020c840

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/export/cdt/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_target_config(self, ctx, configuration):
4747

4848
target_specific = _CONFIGS_OPTIONS['targets']
4949
if tgt.name in target_specific:
50-
target_info = target_specific[tgt.name]['generic']
50+
eclipse_config.update(target_specific[tgt.name]['generic'])
5151
if configuration in target_specific[tgt.name]:
5252
target_info.update(target_specific[tgt.name][configuration])
5353

@@ -75,17 +75,17 @@ def generate(self):
7575

7676
launch_cfgs = {}
7777
for launch_name in supported_launches:
78-
launch = dict(ctx.items())
79-
launch.update({'device': self.get_target_config(ctx, launch_name)}.items())
80-
launch_cfgs.update({launch_name: launch})
78+
launch = deepcopy(ctx)
79+
launch.update({'device': self.get_target_config(ctx, launch_name)})
80+
launch_cfgs[launch_name] = launch
8181

8282
if not exists(join(self.export_dir,'eclipse-extras')):
8383
makedirs(join(self.export_dir,'eclipse-extras'))
8484

8585
for launch_name, ctx in launch_cfgs.items():
8686
# Generate launch configurations for former GNU ARM Eclipse plug-in
8787
self.gen_file('cdt/%s' % 'pyocd_settings_gnu_arm.tmpl', ctx, join('eclipse-extras',
88-
'{target}_{project}_{conf}_{launch}.launch'.format(
88+
'{target}_{project}_{conf}_pyocd_settings.launch'.format(
8989
target=self.target,
9090
project=self.project_name,
9191
conf=launch_name,

0 commit comments

Comments
 (0)