diff --git a/targets/targets.json b/targets/targets.json index ae2ff703fc..247c7217c9 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"], @@ -346,11 +346,14 @@ "function": "LPC4088Code.binary_hook" }, "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": { 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: