From 4f294832555a2731fbf587b31c0b4b8942f225f0 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 16 Jun 2016 12:54:35 -0500 Subject: [PATCH 01/11] Update exporters to include the generated mbed_conf.h --- tools/export/exporters.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/export/exporters.py b/tools/export/exporters.py index 571cf40e2d9..adec60f8499 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -36,6 +36,7 @@ def __init__(self, target, inputDir, program_name, build_url_resolver, extra_sym self.extra_symbols = extra_symbols self.config_macros = [] self.sources_relative = sources_relative + self.config_header = None def get_toolchain(self): return self.TOOLCHAIN @@ -169,7 +170,10 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False): # And add the configuration macros to the toolchain self.config_macros = config.get_config_data_macros() - + + # Add the configuration file to the target directory + self.config_header = "mbed_conf.h" + cfg.get_config_data_header(join(trg_path, self.config_header)) # Check the existence of a binary build of the mbed library for the desired target # This prevents exporting the mbed libraries from source # if not self.toolchain.mbed_libs: From 5532fb8697e6fafa29739f703c847347b120fb52 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 16 Jun 2016 13:34:02 -0500 Subject: [PATCH 02/11] Export command line for including mbed_conf.h from toolchains --- tools/toolchains/arm.py | 5 ++++- tools/toolchains/gcc.py | 5 ++++- tools/toolchains/iar.py | 8 ++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index 6d8afbfb1aa..5aa7ae51241 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -114,11 +114,14 @@ def get_dep_option(self, object): dep_path = base + '.d' return ["--depend", dep_path] + def get_config_option(self, config_header) : + return ['--preinclude', config_header] + def get_compile_options(self, defines, includes): opts = ['-D%s' % d for d in defines] + ['--via', self.get_inc_file(includes)] config_header = self.get_config_header() if config_header is not None: - opts = opts + ['--preinclude', config_header] + opts = opts + self.get_config_option(config_header) return opts @hook_tool diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py index e41f9dbb9c9..72a1ea9863b 100644 --- a/tools/toolchains/gcc.py +++ b/tools/toolchains/gcc.py @@ -165,11 +165,14 @@ def get_dep_option(self, object): dep_path = base + '.d' return ["-MD", "-MF", dep_path] + def get_config_option(self, config_header): + return ['-include', config_header] + def get_compile_options(self, defines, includes): opts = ['-D%s' % d for d in defines] + ['@%s' % self.get_inc_file(includes)] config_header = self.get_config_header() if config_header is not None: - opts = opts + ['-include', config_header] + opts = opts + self.get_conifg_option(config_header) return opts @hook_tool diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index 605a13350be..a5538b1a016 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -126,8 +126,12 @@ def cc_extra(self, object): base, _ = splitext(object) return ["-l", base + '.s.txt'] + def get_config_option(self, config_header): + return ['--preinclude', config_header] + def get_compile_options(self, defines, includes, for_asm=False): - opts = ['-D%s' % d for d in defines] + ['-f', self.get_inc_file(includes)] + opts = ['-f', self.get_inc_file(includes)] + config_header = self.get_config_header() if for_asm: # The assembler doesn't support '--preinclude', so we need to add # the macros directly @@ -135,7 +139,7 @@ def get_compile_options(self, defines, includes, for_asm=False): else: config_header = self.get_config_header() if config_header is not None: - opts = opts + ['--preinclude', config_header] + opts = opts + self.get_config_option(config_header) return opts @hook_tool From d9b410914346b776f8de091d95603da7cbcdc072 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 16 Jun 2016 13:34:54 -0500 Subject: [PATCH 03/11] Update progen-style flags with the toolchains include mbed_conf.h --- tools/export/exporters.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/export/exporters.py b/tools/export/exporters.py index adec60f8499..86160a51706 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -49,6 +49,9 @@ def flags(self): def progen_flags(self): if not hasattr(self, "_progen_flag_cache") : self._progen_flag_cache = dict([(key + "_flags", value) for key,value in self.flags.iteritems()]) + if self.config_header: + self._progen_flag_cache['c_flags'] += self.toolchain.get_config_option(self.config_header) + self._progen_flag_cache['cxx_flags'] += self.toolchain.get_config_option(self.config_header) return self._progen_flag_cache def __scan_and_copy(self, src_path, trg_path): From 879ae8c6bd169e0ccf2f793f6b33fe308bc4fce7 Mon Sep 17 00:00:00 2001 From: Mihail Stoyanov Date: Thu, 16 Jun 2016 23:58:46 +0100 Subject: [PATCH 04/11] Fixed gcc.py typo get_conifg_option -> get_config_option --- tools/toolchains/gcc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py index 72a1ea9863b..027a956d59a 100644 --- a/tools/toolchains/gcc.py +++ b/tools/toolchains/gcc.py @@ -172,7 +172,7 @@ def get_compile_options(self, defines, includes): opts = ['-D%s' % d for d in defines] + ['@%s' % self.get_inc_file(includes)] config_header = self.get_config_header() if config_header is not None: - opts = opts + self.get_conifg_option(config_header) + opts = opts + self.get_config_option(config_header) return opts @hook_tool From a1b73c9b7e1c74fbb2c1a2006217eec4a0c3e7d1 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Fri, 17 Jun 2016 11:01:22 -0500 Subject: [PATCH 05/11] Fix typo after rebase --- tools/export/exporters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/export/exporters.py b/tools/export/exporters.py index 86160a51706..217b71a97c4 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -176,7 +176,7 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False): # Add the configuration file to the target directory self.config_header = "mbed_conf.h" - cfg.get_config_data_header(join(trg_path, self.config_header)) + config.get_config_data_header(join(trg_path, self.config_header)) # Check the existence of a binary build of the mbed library for the desired target # This prevents exporting the mbed libraries from source # if not self.toolchain.mbed_libs: From c06dad55d9825532cc86a8c9cf6629b76b9302dc Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Fri, 17 Jun 2016 12:26:46 -0500 Subject: [PATCH 06/11] Change uVisoun[45] to get preincludes --- tools/export/uvision4.py | 6 +++--- tools/export/uvision5.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/export/uvision4.py b/tools/export/uvision4.py index b331e433232..abb6920505b 100644 --- a/tools/export/uvision4.py +++ b/tools/export/uvision4.py @@ -69,16 +69,16 @@ def generate(self): # get flags from toolchain and apply project_data['tool_specific']['uvision']['misc'] = {} # asm flags only, common are not valid within uvision project, they are armcc specific - project_data['tool_specific']['uvision']['misc']['asm_flags'] = list(set(self.toolchain.flags['asm'])) + project_data['tool_specific']['uvision']['misc']['asm_flags'] = list(set(self.progen_flags['asm_flags'])) # cxx flags included, as uvision have them all in one tab - project_data['tool_specific']['uvision']['misc']['c_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['c'] + self.toolchain.flags['cxx'])) + project_data['tool_specific']['uvision']['misc']['c_flags'] = list(set(self.progen_flags['common_flags'] + self.progen_flags['c_flags'] + self.progen_flags['cxx_flags'])) # not compatible with c99 flag set in the template project_data['tool_specific']['uvision']['misc']['c_flags'].remove("--c99") # ARM_INC is by default as system inclusion, not required for exported project project_data['tool_specific']['uvision']['misc']['c_flags'].remove("-I \""+ARM_INC+"\"") # cpp is not required as it's implicit for cpp files project_data['tool_specific']['uvision']['misc']['c_flags'].remove("--cpp") - project_data['tool_specific']['uvision']['misc']['ld_flags'] = self.toolchain.flags['ld'] + project_data['tool_specific']['uvision']['misc']['ld_flags'] = self.progen_flags['ld_flags'] i = 0 for macro in project_data['common']['macros']: diff --git a/tools/export/uvision5.py b/tools/export/uvision5.py index e41ad12b7a5..c33e0adea9c 100644 --- a/tools/export/uvision5.py +++ b/tools/export/uvision5.py @@ -69,16 +69,16 @@ def generate(self): # get flags from toolchain and apply project_data['tool_specific']['uvision5']['misc'] = {} # asm flags only, common are not valid within uvision project, they are armcc specific - project_data['tool_specific']['uvision5']['misc']['asm_flags'] = list(set(self.toolchain.flags['asm'])) + project_data['tool_specific']['uvision5']['misc']['asm_flags'] = list(set(self.progen_flags['asm_flags'])) # cxx flags included, as uvision have them all in one tab - project_data['tool_specific']['uvision5']['misc']['c_flags'] = list(set(self.toolchain.flags['common'] + self.toolchain.flags['c'] + self.toolchain.flags['cxx'])) + project_data['tool_specific']['uvision5']['misc']['c_flags'] = list(set(self.progen_flags['common_flags'] + self.progen_flags['c_flags'] + self.progen_flags['cxx_flags'])) # ARM_INC is by default as system inclusion, not required for exported project project_data['tool_specific']['uvision5']['misc']['c_flags'].remove("-I \""+ARM_INC+"\"") # not compatible with c99 flag set in the template project_data['tool_specific']['uvision5']['misc']['c_flags'].remove("--c99") # cpp is not required as it's implicit for cpp files project_data['tool_specific']['uvision5']['misc']['c_flags'].remove("--cpp") - project_data['tool_specific']['uvision5']['misc']['ld_flags'] = self.toolchain.flags['ld'] + project_data['tool_specific']['uvision5']['misc']['ld_flags'] = self.progen_flags['ld_flags'] i = 0 for macro in project_data['common']['macros']: From 3a273f78f2d4a63cef2dc5176f0d781e750057f0 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Mon, 20 Jun 2016 14:28:55 -0500 Subject: [PATCH 07/11] Create and enable exporter flag mbed_conf_active for exporters The mbed_conf_active feature disables configuration macros on the command line and replaces them with a preinclude header file --- tools/export/atmelstudio.py | 2 ++ tools/export/codered.py | 2 ++ tools/export/emblocks.py | 2 ++ tools/export/exporters.py | 13 ++++++++----- tools/export/gccarm.py | 2 ++ tools/export/iar.py | 2 ++ tools/export/simplicityv3.py | 2 ++ tools/export/uvision4.py | 2 ++ tools/export/uvision5.py | 2 ++ 9 files changed, 24 insertions(+), 5 deletions(-) diff --git a/tools/export/atmelstudio.py b/tools/export/atmelstudio.py index 96e713a9cec..895d92ea307 100644 --- a/tools/export/atmelstudio.py +++ b/tools/export/atmelstudio.py @@ -33,6 +33,8 @@ class AtmelStudio(Exporter): DOT_IN_RELATIVE_PATH = True + MBED_CONF_ACTIVE = True + def generate(self): source_files = [] diff --git a/tools/export/codered.py b/tools/export/codered.py index 6685dadc609..374cc2a89b4 100644 --- a/tools/export/codered.py +++ b/tools/export/codered.py @@ -22,6 +22,8 @@ class CodeRed(Exporter): NAME = 'CodeRed' TOOLCHAIN = 'GCC_CR' + MBED_CONF_ACTIVE = True + TARGETS = [ 'LPC1768', 'LPC4088', diff --git a/tools/export/emblocks.py b/tools/export/emblocks.py index 0295775cf4b..94b2ddeb9c7 100644 --- a/tools/export/emblocks.py +++ b/tools/export/emblocks.py @@ -31,6 +31,8 @@ class IntermediateFile(Exporter): # we support all GCC targets (is handled on IDE side) TARGETS = gccTargets + MBED_CONF_ACTIVE = True + FILE_TYPES = { 'headers': 'h', 'c_sources': 'c', diff --git a/tools/export/exporters.py b/tools/export/exporters.py index 217b71a97c4..ce0bceeb970 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -171,12 +171,15 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False): # Loads the resources into the config system which might expand/modify resources based on config data self.resources = config.load_resources(resources) - # And add the configuration macros to the toolchain - self.config_macros = config.get_config_data_macros() - # Add the configuration file to the target directory - self.config_header = "mbed_conf.h" - config.get_config_data_header(join(trg_path, self.config_header)) + if hasattr(self, "MBED_CONF_ACTIVE") and self.MBED_CONF_ACTIVE : + # Add the configuration file to the target directory + self.config_header = "mbed_conf.h" + config.get_config_data_header(join(trg_path, self.config_header)) + self.config_macros = [] + else : + # And add the configuration macros to the toolchain + self.config_macros = config.get_config_data_macros() # Check the existence of a binary build of the mbed library for the desired target # This prevents exporting the mbed libraries from source # if not self.toolchain.mbed_libs: diff --git a/tools/export/gccarm.py b/tools/export/gccarm.py index 0ea1fe269d3..da7ee7d2fd1 100644 --- a/tools/export/gccarm.py +++ b/tools/export/gccarm.py @@ -121,6 +121,8 @@ class GccArm(Exporter): DOT_IN_RELATIVE_PATH = True + MBED_CONF_ACTIVE = True + def generate(self): # "make" wants Unix paths self.resources.win_to_unix() diff --git a/tools/export/iar.py b/tools/export/iar.py index f977933f512..3c7098e0a00 100644 --- a/tools/export/iar.py +++ b/tools/export/iar.py @@ -33,6 +33,8 @@ class IAREmbeddedWorkbench(Exporter): # PROGEN_ACTIVE contains information for exporter scripts that this is using progen PROGEN_ACTIVE = True + MBED_CONF_ACTIVE = True + # backward compatibility with our scripts TARGETS = [] for target in TARGET_NAMES: diff --git a/tools/export/simplicityv3.py b/tools/export/simplicityv3.py index d6d838cccaa..aeda08310f5 100644 --- a/tools/export/simplicityv3.py +++ b/tools/export/simplicityv3.py @@ -101,6 +101,8 @@ class SimplicityV3(Exporter): DOT_IN_RELATIVE_PATH = False + MBED_CONF_ACTIVE = True + orderedPaths = Folder("Root") def check_and_add_path(self, path): diff --git a/tools/export/uvision4.py b/tools/export/uvision4.py index abb6920505b..e2ae9238bb1 100644 --- a/tools/export/uvision4.py +++ b/tools/export/uvision4.py @@ -34,6 +34,8 @@ class Uvision4(Exporter): # PROGEN_ACTIVE contains information for exporter scripts that this is using progen PROGEN_ACTIVE = True + MBED_CONF_ACTIVE = True + # backward compatibility with our scripts TARGETS = [] for target in TARGET_NAMES: diff --git a/tools/export/uvision5.py b/tools/export/uvision5.py index c33e0adea9c..3426b8f4a9e 100644 --- a/tools/export/uvision5.py +++ b/tools/export/uvision5.py @@ -34,6 +34,8 @@ class Uvision5(Exporter): # PROGEN_ACTIVE contains information for exporter scripts that this is using progen PROGEN_ACTIVE = True + MBED_CONF_ACTIVE = True + # backward compatibility with our scripts TARGETS = [] for target in TARGET_NAMES: From f92d3ec9beb0aa1ac9075d299b52db1e0dcfe250 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 23 Jun 2016 12:40:50 -0500 Subject: [PATCH 08/11] Move name of config file to one location --- tools/export/exporters.py | 2 +- tools/toolchains/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/export/exporters.py b/tools/export/exporters.py index ce0bceeb970..84fe16814a7 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -174,7 +174,7 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False): if hasattr(self, "MBED_CONF_ACTIVE") and self.MBED_CONF_ACTIVE : # Add the configuration file to the target directory - self.config_header = "mbed_conf.h" + self.config_header = self.toolchain.MBED_CONFIG_FILE_NAME config.get_config_data_header(join(trg_path, self.config_header)) self.config_macros = [] else : diff --git a/tools/toolchains/__init__.py b/tools/toolchains/__init__.py index 3818f43854c..3da97efe00e 100644 --- a/tools/toolchains/__init__.py +++ b/tools/toolchains/__init__.py @@ -227,6 +227,8 @@ class mbedToolchain: GOANNA_FORMAT = "[Goanna] warning [%FILENAME%:%LINENO%] - [%CHECKNAME%(%SEVERITY%)] %MESSAGE%" GOANNA_DIAGNOSTIC_PATTERN = re.compile(r'"\[Goanna\] (?Pwarning) \[(?P[^:]+):(?P\d+)\] \- (?P.*)"') + MBED_CONFIG_FILE_NAME="mbed_config.h" + def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): self.target = target self.name = self.__class__.__name__ @@ -908,7 +910,7 @@ def set_config_data(self, config_data): def get_config_header(self): if self.config_data is None: return None - config_file = join(self.build_dir, "mbed_config.h") + config_file = join(self.build_dir, self.MBED_CONFIG_FILE_NAME) if not exists(config_file): with open(config_file, "wt") as f: f.write(Config.config_to_header(self.config_data)) From 4746beb25679519e597a4faae4519c198f9591e2 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Fri, 24 Jun 2016 12:24:31 -0500 Subject: [PATCH 09/11] Switch to = style for preincludes relpaces the --preinclude mbed_config.h with --preinclude=mbed_config.h --- tools/toolchains/arm.py | 2 +- tools/toolchains/iar.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index 5aa7ae51241..8ba8426aa41 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -115,7 +115,7 @@ def get_dep_option(self, object): return ["--depend", dep_path] def get_config_option(self, config_header) : - return ['--preinclude', config_header] + return ['--preinclude=' + config_header] def get_compile_options(self, defines, includes): opts = ['-D%s' % d for d in defines] + ['--via', self.get_inc_file(includes)] diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index a5538b1a016..d7ab5018c37 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -127,7 +127,7 @@ def cc_extra(self, object): return ["-l", base + '.s.txt'] def get_config_option(self, config_header): - return ['--preinclude', config_header] + return ['--preinclude=' + config_header] def get_compile_options(self, defines, includes, for_asm=False): opts = ['-f', self.get_inc_file(includes)] From 7b83c30ba18d8c53a22acb527e03b6d69bd46913 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Mon, 27 Jun 2016 10:40:32 -0500 Subject: [PATCH 10/11] for file in `ls tofor file in `ls tools/export`; do sed -i tools/export/$file -e "s/MBED_CONF_ACTIVE/MBED_CONFIG_HEADER_SUPPORTED/"; done --- tools/export/atmelstudio.py | 2 +- tools/export/codered.py | 2 +- tools/export/emblocks.py | 2 +- tools/export/exporters.py | 2 +- tools/export/gccarm.py | 2 +- tools/export/iar.py | 2 +- tools/export/simplicityv3.py | 2 +- tools/export/uvision4.py | 2 +- tools/export/uvision5.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/export/atmelstudio.py b/tools/export/atmelstudio.py index 895d92ea307..f85a047b641 100644 --- a/tools/export/atmelstudio.py +++ b/tools/export/atmelstudio.py @@ -33,7 +33,7 @@ class AtmelStudio(Exporter): DOT_IN_RELATIVE_PATH = True - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True def generate(self): diff --git a/tools/export/codered.py b/tools/export/codered.py index 374cc2a89b4..d7f815a8278 100644 --- a/tools/export/codered.py +++ b/tools/export/codered.py @@ -22,7 +22,7 @@ class CodeRed(Exporter): NAME = 'CodeRed' TOOLCHAIN = 'GCC_CR' - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True TARGETS = [ 'LPC1768', diff --git a/tools/export/emblocks.py b/tools/export/emblocks.py index 94b2ddeb9c7..a5f20d2c9d9 100644 --- a/tools/export/emblocks.py +++ b/tools/export/emblocks.py @@ -31,7 +31,7 @@ class IntermediateFile(Exporter): # we support all GCC targets (is handled on IDE side) TARGETS = gccTargets - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True FILE_TYPES = { 'headers': 'h', diff --git a/tools/export/exporters.py b/tools/export/exporters.py index 84fe16814a7..da060a020dd 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -172,7 +172,7 @@ def scan_and_copy_resources(self, prj_paths, trg_path, relative=False): self.resources = config.load_resources(resources) - if hasattr(self, "MBED_CONF_ACTIVE") and self.MBED_CONF_ACTIVE : + if hasattr(self, "MBED_CONFIG_HEADER_SUPPORTED") and self.MBED_CONFIG_HEADER_SUPPORTED : # Add the configuration file to the target directory self.config_header = self.toolchain.MBED_CONFIG_FILE_NAME config.get_config_data_header(join(trg_path, self.config_header)) diff --git a/tools/export/gccarm.py b/tools/export/gccarm.py index da7ee7d2fd1..b06e6149d5f 100644 --- a/tools/export/gccarm.py +++ b/tools/export/gccarm.py @@ -121,7 +121,7 @@ class GccArm(Exporter): DOT_IN_RELATIVE_PATH = True - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True def generate(self): # "make" wants Unix paths diff --git a/tools/export/iar.py b/tools/export/iar.py index 3c7098e0a00..89ec51351af 100644 --- a/tools/export/iar.py +++ b/tools/export/iar.py @@ -33,7 +33,7 @@ class IAREmbeddedWorkbench(Exporter): # PROGEN_ACTIVE contains information for exporter scripts that this is using progen PROGEN_ACTIVE = True - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True # backward compatibility with our scripts TARGETS = [] diff --git a/tools/export/simplicityv3.py b/tools/export/simplicityv3.py index aeda08310f5..3254152127b 100644 --- a/tools/export/simplicityv3.py +++ b/tools/export/simplicityv3.py @@ -101,7 +101,7 @@ class SimplicityV3(Exporter): DOT_IN_RELATIVE_PATH = False - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True orderedPaths = Folder("Root") diff --git a/tools/export/uvision4.py b/tools/export/uvision4.py index e2ae9238bb1..a1432f7cef7 100644 --- a/tools/export/uvision4.py +++ b/tools/export/uvision4.py @@ -34,7 +34,7 @@ class Uvision4(Exporter): # PROGEN_ACTIVE contains information for exporter scripts that this is using progen PROGEN_ACTIVE = True - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True # backward compatibility with our scripts TARGETS = [] diff --git a/tools/export/uvision5.py b/tools/export/uvision5.py index 3426b8f4a9e..fafbc94ae3b 100644 --- a/tools/export/uvision5.py +++ b/tools/export/uvision5.py @@ -34,7 +34,7 @@ class Uvision5(Exporter): # PROGEN_ACTIVE contains information for exporter scripts that this is using progen PROGEN_ACTIVE = True - MBED_CONF_ACTIVE = True + MBED_CONFIG_HEADER_SUPPORTED = True # backward compatibility with our scripts TARGETS = [] From 8e11fa2071ed9263aeb119a80a0d6a23496122e6 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Mon, 27 Jun 2016 14:36:35 -0500 Subject: [PATCH 11/11] Undelete defines from IAR --- tools/toolchains/iar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index d7ab5018c37..93407798af1 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -130,7 +130,7 @@ def get_config_option(self, config_header): return ['--preinclude=' + config_header] def get_compile_options(self, defines, includes, for_asm=False): - opts = ['-f', self.get_inc_file(includes)] + opts = ['-D%s' % d for d in defines] + ['-f', self.get_inc_file(includes)] config_header = self.get_config_header() if for_asm: # The assembler doesn't support '--preinclude', so we need to add