Skip to content

Commit 6998524

Browse files
sarahmarshybridadan
authored andcommitted
Resolve issues from reorg
1 parent 5a55b39 commit 6998524

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

tools/export/sw4stm32.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from os.path import splitext, basename, join
1919
from random import randint
2020
from tools.utils import mkdir
21-
from targets import Target
2221

2322

2423
class Sw4STM32(Exporter):
@@ -80,7 +79,7 @@ def __generate_uid(self):
8079
def generate(self):
8180
fp_hardware = "no"
8281
fp_abi = "soft"
83-
core = Target.get_target(self.target).core
82+
core = self.target.core
8483
if core == "Cortex-M4F" or core == "Cortex-M7F":
8584
fp_hardware = "fpv4-sp-d16"
8685
fp_abi = "soft-fp"

tools/export/uvision5.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,14 @@ def generate(self):
8383
+ self.flags['c_flags']
8484
+ self.flags['cxx_flags']))
8585
# not compatible with c99 flag set in the template
86-
project_data['misc']['c_flags'].remove("--c99")
86+
try:project_data['misc']['c_flags'].remove("--c99")
87+
except ValueError: pass
8788
# cpp is not required as it's implicit for cpp files
88-
project_data['misc']['c_flags'].remove("--cpp")
89-
# we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it
90-
project_data['misc']['c_flags'].remove("--no_vla")
89+
try:project_data['misc']['c_flags'].remove("--cpp")
90+
except ValueError: pass
91+
# we want no-vla for only cxx, but it's also applied for C in IDE, thus we remove it=
92+
try:project_data['misc']['c_flags'].remove("--no_vla")
93+
except ValueError: pass
9194
project_data['misc']['ld_flags'] = self.flags['ld_flags']
9295

9396
i = 0

tools/project.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
from argparse import ArgumentParser
1111
from os.path import normpath, realpath
1212

13-
from tools.paths import EXPORT_DIR, MBED_BASE, MBED_LIBRARIES
13+
from tools.paths import EXPORT_DIR, MBED_DRIVERS, MBED_PLATFORM, \
14+
MBED_HAL, MBED_TARGETS_PATH, MBED_LIBRARIES
1415
from tools.export import EXPORTERS, mcu_ide_matrix
1516
from tools.tests import TESTS, TEST_MAP
1617
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
5354
# Substitute the mbed library builds with their sources
5455
if MBED_LIBRARIES in test.dependencies:
5556
test.dependencies.remove(MBED_LIBRARIES)
56-
test.dependencies.append(MBED_BASE)
57+
test.dependencies.append(MBED_HAL)
58+
test.dependencies.append(MBED_DRIVERS)
59+
test.dependencies.append(MBED_PLATFORM)
60+
test.dependencies.append(MBED_TARGETS_PATH)
61+
5762

5863
src_paths = [test.source_dir]
5964
lib_paths = test.dependencies

0 commit comments

Comments
 (0)