From 6998524c00ed5b534566947f640436b787973641 Mon Sep 17 00:00:00 2001 From: Sarah Marsh Date: Mon, 3 Oct 2016 13:04:35 -0500 Subject: [PATCH] Resolve issues from reorg --- tools/export/sw4stm32.py | 3 +-- tools/export/uvision5.py | 11 +++++++---- tools/project.py | 9 +++++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/export/sw4stm32.py b/tools/export/sw4stm32.py index 3b52cafbe9..fa38f53abe 100644 --- a/tools/export/sw4stm32.py +++ b/tools/export/sw4stm32.py @@ -18,7 +18,6 @@ from exporters import Exporter from os.path import splitext, basename, join from random import randint from tools.utils import mkdir -from targets import Target class Sw4STM32(Exporter): @@ -80,7 +79,7 @@ class Sw4STM32(Exporter): def generate(self): fp_hardware = "no" fp_abi = "soft" - core = Target.get_target(self.target).core + core = self.target.core if core == "Cortex-M4F" or core == "Cortex-M7F": fp_hardware = "fpv4-sp-d16" fp_abi = "soft-fp" diff --git a/tools/export/uvision5.py b/tools/export/uvision5.py index 5eb08a5803..ab04ffd9dd 100644 --- a/tools/export/uvision5.py +++ b/tools/export/uvision5.py @@ -83,11 +83,14 @@ class Uvision5(Exporter): + self.flags['c_flags'] + self.flags['cxx_flags'])) # not compatible with c99 flag set in the template - project_data['misc']['c_flags'].remove("--c99") + try:project_data['misc']['c_flags'].remove("--c99") + except ValueError: pass # cpp is not required as it's implicit for cpp files - project_data['misc']['c_flags'].remove("--cpp") - # we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it - project_data['misc']['c_flags'].remove("--no_vla") + try:project_data['misc']['c_flags'].remove("--cpp") + except ValueError: pass + # we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it= + try:project_data['misc']['c_flags'].remove("--no_vla") + except ValueError: pass project_data['misc']['ld_flags'] = self.flags['ld_flags'] i = 0 diff --git a/tools/project.py b/tools/project.py index 1b7cd885b8..af7390b478 100644 --- a/tools/project.py +++ b/tools/project.py @@ -10,7 +10,8 @@ from shutil import move, rmtree from argparse import ArgumentParser from os.path import normpath, realpath -from tools.paths import EXPORT_DIR, MBED_BASE, MBED_LIBRARIES +from tools.paths import EXPORT_DIR, MBED_DRIVERS, MBED_PLATFORM, \ + MBED_HAL, MBED_TARGETS_PATH, MBED_LIBRARIES from tools.export import EXPORTERS, mcu_ide_matrix from tools.tests import TESTS, TEST_MAP from tools.tests import test_known, test_name_known, Test @@ -53,7 +54,11 @@ def setup_project(ide, target, program=None, source_dir=None, build=None, export # Substitute the mbed library builds with their sources if MBED_LIBRARIES in test.dependencies: test.dependencies.remove(MBED_LIBRARIES) - test.dependencies.append(MBED_BASE) + test.dependencies.append(MBED_HAL) + test.dependencies.append(MBED_DRIVERS) + test.dependencies.append(MBED_PLATFORM) + test.dependencies.append(MBED_TARGETS_PATH) + src_paths = [test.source_dir] lib_paths = test.dependencies