mirror of https://github.com/ARMmbed/mbed-os.git
added extra_labels_add checking to script
and moved a previously missed device.h file to targets.jsonpull/1859/head
parent
0d3c83589b
commit
32075c38e4
|
@ -1173,17 +1173,20 @@
|
|||
"inherits": ["MCU_NRF51_16K"],
|
||||
"progen": {"target": "mkit"},
|
||||
"extra_labels_add": ["NRF51822", "NRF51822_MKIT"],
|
||||
"macros_add": ["TARGET_NRF51822_MKIT"]
|
||||
"macros_add": ["TARGET_NRF51822_MKIT"],
|
||||
"features": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"]
|
||||
},
|
||||
"NRF51822_BOOT": {
|
||||
"inherits": ["MCU_NRF51_16K_BOOT"],
|
||||
"extra_labels_add": ["NRF51822", "NRF51822_MKIT"],
|
||||
"macros_add": ["TARGET_NRF51822_MKIT"]
|
||||
"macros_add": ["TARGET_NRF51822_MKIT"],
|
||||
"features": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"]
|
||||
},
|
||||
"NRF51822_OTA": {
|
||||
"inherits": ["MCU_NRF51_16K_OTA"],
|
||||
"extra_labels_add": ["NRF51822", "NRF51822_MKIT"],
|
||||
"macros_add": ["TARGET_NRF51822_MKIT"]
|
||||
"macros_add": ["TARGET_NRF51822_MKIT"],
|
||||
"features": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"]
|
||||
},
|
||||
"ARCH_BLE": {
|
||||
"supported_form_factors": ["ARDUINO"],
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// The 'provides' section in 'target.json' is now used to create the device's hardware preprocessor switches.
|
||||
// Check the 'provides' section of the target description in 'targets.json' for more details.
|
||||
/* mbed Microcontroller Library
|
||||
* Copyright (c) 2006-2013 ARM Limited
|
||||
*
|
||||
|
@ -16,41 +18,20 @@
|
|||
#ifndef MBED_DEVICE_H
|
||||
#define MBED_DEVICE_H
|
||||
|
||||
#define DEVICE_PORTIN 1
|
||||
#define DEVICE_PORTOUT 1
|
||||
#define DEVICE_PORTINOUT 1
|
||||
|
||||
#define DEVICE_INTERRUPTIN 1
|
||||
|
||||
#define DEVICE_ANALOGIN 1
|
||||
#define DEVICE_ANALOGOUT 0
|
||||
|
||||
#define DEVICE_SERIAL 1
|
||||
|
||||
#define DEVICE_I2C 1
|
||||
#define DEVICE_I2CSLAVE 0
|
||||
|
||||
#define DEVICE_SPI 1
|
||||
#define DEVICE_SPISLAVE 1
|
||||
|
||||
#define DEVICE_CAN 0
|
||||
|
||||
#define DEVICE_RTC 0
|
||||
|
||||
#define DEVICE_ETHERNET 0
|
||||
|
||||
#define DEVICE_PWMOUT 1
|
||||
|
||||
#define DEVICE_SEMIHOST 0
|
||||
#define DEVICE_LOCALFILESYSTEM 0
|
||||
|
||||
#define DEVICE_SLEEP 1
|
||||
|
||||
#define DEVICE_DEBUG_AWARENESS 0
|
||||
|
||||
#define DEVICE_STDIO_MESSAGES 0
|
||||
|
||||
#define DEVICE_ERROR_PATTERN 1
|
||||
|
||||
#include "objects.h"
|
||||
|
||||
|
|
|
@ -144,6 +144,8 @@ def add_to_targets(targets, device_file, verbose=False, remove=False) :
|
|||
for key, value in targets.iteritems() :
|
||||
for alt in value['extra_labels'] if 'extra_labels' in value else [] :
|
||||
if stem_match(device, alt) : possible_matches.add(key)
|
||||
for alt in value['extra_labels_add'] if 'extra_labels_add' in value else [] :
|
||||
if stem_match(device, alt) : possible_matches.add(key)
|
||||
possible_matches = list(possible_matches)
|
||||
for match in possible_matches :
|
||||
if device == match : possible_matches = [match]
|
||||
|
|
Loading…
Reference in New Issue