From 9d51b1afa88eecd363a5e3733bf54af856c7ad30 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Wed, 6 Sep 2017 16:58:40 -0500 Subject: [PATCH] Add imports for build --- tools/export/mcuxpresso/__init__.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/export/mcuxpresso/__init__.py b/tools/export/mcuxpresso/__init__.py index 6fed27e34f..a8e111d2a7 100644 --- a/tools/export/mcuxpresso/__init__.py +++ b/tools/export/mcuxpresso/__init__.py @@ -24,7 +24,11 @@ modified for MCUXpresso by Johannes Stratmann """ import copy +import tempfile +import shutil +from subprocess import Popen, PIPE +from os import getcwd, remove from os.path import splitext, basename, exists from random import randint @@ -258,12 +262,12 @@ class MCUXpresso(GNUARMEclipse): tmp_folder = tempfile.mkdtemp() cmd = [ - 'mcuxpressoidec', + 'mcuxpressoide', '--launcher.suppressErrors', '-nosplash', '-application org.eclipse.cdt.managedbuilder.core.headlessbuild', '-data', tmp_folder, - '-import', os.getcwd(), + '-import', getcwd(), '-cleanBuild', project_name ] @@ -291,15 +295,15 @@ class MCUXpresso(GNUARMEclipse): # Cleanup the exported and built files if cleanup: if exists(log_name): - os.remove(log_name) - os.remove('.project') - os.remove('.cproject') + remove(log_name) + remove('.project') + remove('.cproject') if exists('Debug'): shutil.rmtree('Debug') if exists('Release'): shutil.rmtree('Release') if exists('makefile.targets'): - os.remove('makefile.targets') + remove('makefile.targets') # Always remove the temporary folder. if exists(tmp_folder):