From f2663876fc3ab0e5a65141d44ce8554ad681e828 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 12 Jan 2017 15:05:27 -0600 Subject: [PATCH 1/2] Inherit names from target parents --- tools/targets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/targets.py b/tools/targets.py index a795958f5a..84ae222b1c 100644 --- a/tools/targets.py +++ b/tools/targets.py @@ -21,6 +21,7 @@ import struct import shutil import inspect import sys +from copy import copy from collections import namedtuple from tools.patch import patch from tools.paths import TOOLS_BOOTLOADERS @@ -276,7 +277,10 @@ class Target(namedtuple("Target", "name json_data resolution_order resolution_or @property def labels(self): """Get all possible labels for this target""" - labels = [self.name] + CORE_LABELS[self.core] + self.extra_labels + names = copy(self.resolution_order_names) + if "Target" in names: + names.remove("Target") + labels = (names + CORE_LABELS[self.core] + self.extra_labels) # Automatically define UVISOR_UNSUPPORTED if the target doesn't # specifically define UVISOR_SUPPORTED if "UVISOR_SUPPORTED" not in labels: From 290d7de83597adeb298ac25d8ba84abbf27a6f69 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Tue, 17 Jan 2017 15:16:55 -0600 Subject: [PATCH 2/2] Correct definition of LPC4088* to use a common ancestry --- targets/targets.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/targets/targets.json b/targets/targets.json index e01c1672ce..4768cf386d 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -336,7 +336,7 @@ "default_lib": "small", "release_versions": ["2"] }, - "LPC4088": { + "MCU_LPC4088": { "inherits": ["LPCTarget"], "core": "Cortex-M4F", "extra_labels": ["NXP", "LPC408X"], @@ -347,11 +347,14 @@ "toolchains": ["ARM_STD", "ARM_MICRO"] }, "device_has": ["ANALOGIN", "ANALOGOUT", "CAN", "DEBUG_AWARENESS", "ERROR_PATTERN", "ETHERNET", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"], - "release_versions": ["2", "5"], "device_name": "LPC4088FBD144" }, + "LPC4088": { + "inherits": ["MCU_LPC4088"], + "release_versions": ["2", "5"] + }, "LPC4088_DM": { - "inherits": ["LPC4088"], + "inherits": ["MCU_LPC4088"], "release_versions": ["2", "5"] }, "LPC4330_M4": {