Skip to content

Commit 7173cad

Browse files
committed
Merge branch 'master' of https://github.com/mbedmicro/mbed
2 parents 5af36d1 + d1b1a93 commit 7173cad

File tree

4 files changed

+36
-22
lines changed

4 files changed

+36
-22
lines changed

libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_object.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ static inline int gpio_read(gpio_t *obj)
6464
return ((*obj->reg_in & obj->mask) ? 1 : 0);
6565
}
6666

67+
static inline int gpio_is_connected(const gpio_t *obj) {
68+
return obj->pin != (PinName)NC;
69+
}
70+
6771
#ifdef __cplusplus
6872
}
6973
#endif

workspace_tools/export/gcc_arm_hrm1017.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %}
99
LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %}
1010
LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %}
1111
LINKER_SCRIPT = {{linker_script}}
12-
SOFTDEVICE = mbed/TARGET_ARCH_BLE/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_0_0/s110_nrf51822_7.0.0_softdevice.hex
12+
SOFTDEVICE = mbed/TARGET_HRM1017/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0/s110_nrf51822_7.1.0_softdevice.hex
1313

1414
###############################################################################
1515
AS = $(GCC_BIN)arm-none-eabi-as

workspace_tools/singletest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_version():
8585
""" Returns test script version
8686
"""
8787
single_test_version_major = 1
88-
single_test_version_minor = 3
88+
single_test_version_minor = 4
8989
return (single_test_version_major, single_test_version_minor)
9090

9191

@@ -154,11 +154,13 @@ def get_version():
154154
use_default_toolchain = 'default' in opts.toolchains_filter.split(',') if opts.toolchains_filter is not None else True
155155
use_supported_toolchains = 'all' in opts.toolchains_filter.split(',') if opts.toolchains_filter is not None else False
156156
toolchain_filter = opts.toolchains_filter
157+
platform_name_filter = opts.general_filter_regex.split(',') if opts.general_filter_regex is not None else opts.general_filter_regex
157158
# Test specification with information about each target and associated toolchain
158159
test_spec = get_autodetected_TEST_SPEC(muts_list,
159160
use_default_toolchain=use_default_toolchain,
160161
use_supported_toolchains=use_supported_toolchains,
161-
toolchain_filter=toolchain_filter)
162+
toolchain_filter=toolchain_filter,
163+
platform_name_filter=platform_name_filter)
162164
# MUTs configuration auto-detection
163165
MUTs = get_autodetected_MUTS(muts_list)
164166
else:

workspace_tools/test_api.py

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,13 +1451,16 @@ def get_module_avail(module_name):
14511451
return module_name in sys.modules.keys()
14521452

14531453

1454-
def get_autodetected_MUTS(mbeds_list):
1454+
def get_autodetected_MUTS(mbeds_list, platform_name_filter=None):
14551455
""" Function detects all connected to host mbed-enabled devices and generates artificial MUTS file.
14561456
If function fails to auto-detect devices it will return empty dictionary.
14571457
14581458
if get_module_avail('mbed_lstools'):
14591459
mbeds = mbed_lstools.create()
14601460
mbeds_list = mbeds.list_mbeds()
1461+
1462+
@param mbeds_list list of mbeds captured from mbed_lstools
1463+
@param platform_name You can filter 'platform_name' with list of filtered targets from 'platform_name_filter'
14611464
"""
14621465
result = {} # Should be in muts_all.json format
14631466
# Align mbeds_list from mbed_lstools to MUT file format (JSON dictionary with muts)
@@ -1476,7 +1479,11 @@ def get_autodetected_MUTS(mbeds_list):
14761479
return result
14771480

14781481

1479-
def get_autodetected_TEST_SPEC(mbeds_list, use_default_toolchain=True, use_supported_toolchains=False, toolchain_filter=None):
1482+
def get_autodetected_TEST_SPEC(mbeds_list,
1483+
use_default_toolchain=True,
1484+
use_supported_toolchains=False,
1485+
toolchain_filter=None,
1486+
platform_name_filter=None):
14801487
""" Function detects all connected to host mbed-enabled devices and generates artificial test_spec file.
14811488
If function fails to auto-detect devices it will return empty 'targets' test_spec description.
14821489
@@ -1488,23 +1495,24 @@ def get_autodetected_TEST_SPEC(mbeds_list, use_default_toolchain=True, use_suppo
14881495

14891496
for mut in mbeds_list:
14901497
mcu = mut['platform_name']
1491-
if mcu in TARGET_MAP:
1492-
default_toolchain = TARGET_MAP[mcu].default_toolchain
1493-
supported_toolchains = TARGET_MAP[mcu].supported_toolchains
1494-
1495-
# Decide which toolchains should be added to test specification toolchain pool for each target
1496-
toolchains = []
1497-
if use_default_toolchain:
1498-
toolchains.append(default_toolchain)
1499-
if use_supported_toolchains:
1500-
toolchains += supported_toolchains
1501-
if toolchain_filter is not None:
1502-
all_toolchains = supported_toolchains + [default_toolchain]
1503-
for toolchain in toolchain_filter.split(','):
1504-
if toolchain in all_toolchains:
1505-
toolchains.append(toolchain)
1506-
1507-
result['targets'][mcu] = list(set(toolchains))
1498+
if platform_name_filter is None or (platform_name_filter and mut['platform_name'] in platform_name_filter):
1499+
if mcu in TARGET_MAP:
1500+
default_toolchain = TARGET_MAP[mcu].default_toolchain
1501+
supported_toolchains = TARGET_MAP[mcu].supported_toolchains
1502+
1503+
# Decide which toolchains should be added to test specification toolchain pool for each target
1504+
toolchains = []
1505+
if use_default_toolchain:
1506+
toolchains.append(default_toolchain)
1507+
if use_supported_toolchains:
1508+
toolchains += supported_toolchains
1509+
if toolchain_filter is not None:
1510+
all_toolchains = supported_toolchains + [default_toolchain]
1511+
for toolchain in toolchain_filter.split(','):
1512+
if toolchain in all_toolchains:
1513+
toolchains.append(toolchain)
1514+
1515+
result['targets'][mcu] = list(set(toolchains))
15081516
return result
15091517

15101518

0 commit comments

Comments
 (0)