From d916081b94fa07b993f39f308f10b64f0780e58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Heikkil=C3=A4?= Date: Thu, 7 Sep 2017 14:09:14 +0300 Subject: [PATCH] export: Add debug configuration to Sw4STM32 --- tools/export/sw4stm32/__init__.py | 5 ++- tools/export/sw4stm32/launch.tmpl | 63 +++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 tools/export/sw4stm32/launch.tmpl diff --git a/tools/export/sw4stm32/__init__.py b/tools/export/sw4stm32/__init__.py index da7c8cca35..4d6ebe6738 100644 --- a/tools/export/sw4stm32/__init__.py +++ b/tools/export/sw4stm32/__init__.py @@ -20,7 +20,7 @@ from tools.utils import mkdir from tools.export.gnuarmeclipse import GNUARMEclipse from tools.export.gnuarmeclipse import UID from tools.build_api import prepare_toolchain -from sys import flags +from sys import flags, platform # Global random number generator instance. u = UID() @@ -447,6 +447,7 @@ class Sw4STM32(GNUARMEclipse): ctx = { 'name': self.project_name, + 'platform': platform, 'include_paths': self.include_path, 'config_header': config_header, 'exclude_paths': '|'.join(self.excluded_folders), @@ -470,3 +471,5 @@ class Sw4STM32(GNUARMEclipse): self.gen_file('sw4stm32/cproject_common.tmpl', ctx, '.cproject') self.gen_file('sw4stm32/makefile.targets.tmpl', ctx, 'makefile.targets', trim_blocks=True, lstrip_blocks=True) + self.gen_file('sw4stm32/launch.tmpl', ctx, self.project_name + + ' ' + options['debug']['name'] + '.launch') diff --git a/tools/export/sw4stm32/launch.tmpl b/tools/export/sw4stm32/launch.tmpl new file mode 100644 index 0000000000..efba7bdab1 --- /dev/null +++ b/tools/export/sw4stm32/launch.tmpl @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + +{% set cfg_id = 'debug' %} +{% set opts = options[cfg_id] %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +