Skip to content

Commit 598e511

Browse files
author
Cruz Monrreal
authored
Merge pull request #6838 from ajaakko-arm/sw4stm_tmppath_fix
export: Fix invalid config header path in Sw4STM32
2 parents 506f9a8 + 5330fa8 commit 598e511

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tools/export/sw4stm32/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from __future__ import print_function, absolute_import
1818
from builtins import str
1919

20-
from os.path import splitext, basename, join
20+
from os.path import splitext, basename, relpath, join
2121
import shutil
2222
from tools.utils import mkdir
2323
from tools.export.gnuarmeclipse import GNUARMEclipse
@@ -290,7 +290,6 @@ class Sw4STM32(GNUARMEclipse):
290290
},
291291
}
292292

293-
294293
@classmethod
295294
def is_target_supported(cls, target_name):
296295
target = TARGET_MAP[target_name]
@@ -434,7 +433,9 @@ def generate(self):
434433

435434
self.resources.win_to_unix()
436435

437-
config_header = self.filter_dot(self.toolchain.get_config_header())
436+
config_header = self.toolchain.get_config_header()
437+
if config_header:
438+
config_header = relpath(config_header, self.resources.file_basepath[config_header])
438439

439440
libraries = []
440441
for lib in self.resources.libraries:

tools/export/sw4stm32/cproject_common.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.{{u.id}}" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.{{opts['common']['arm.target.fpu.abi']}}" valueType="enumerated"/>
2929
{% endif %}
3030
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.{{u.id}}" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
31-
<builder buildPath="${workspace_loc:/{{name}}}/{{opts['name']}}" id="fr.ac6.managedbuild.builder.gnu.cross.{{u.id}}" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
31+
<builder buildPath="${workspace_loc:/{{name}}}/{{opts['name']}}" id="fr.ac6.managedbuild.builder.gnu.cross.{{u.id}}" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
3232
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.{{opts['uid']['tool_c_compiler']}}" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
3333
{% if cfg_id == 'debug' %}
3434
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.{{u.id}}" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.more" valueType="enumerated"/>

0 commit comments

Comments
 (0)