mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4366 from theotherjimmy/dedupe-nordic
Move duplicated analogin and pwmout to NRF52 directorypull/4383/head
commit
186f406c24
|
|
@ -2628,7 +2628,7 @@
|
||||||
"inherits": ["Target"],
|
"inherits": ["Target"],
|
||||||
"core": "Cortex-M4F",
|
"core": "Cortex-M4F",
|
||||||
"macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S132", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\""],
|
"macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S132", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\""],
|
||||||
"extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5", "SDK11"],
|
"extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5", "SDK11", "NRF52_COMMON"],
|
||||||
"OUTPUT_EXT": "hex",
|
"OUTPUT_EXT": "hex",
|
||||||
"is_disk_virtual": true,
|
"is_disk_virtual": true,
|
||||||
"supported_toolchains": ["GCC_ARM", "ARM", "IAR"],
|
"supported_toolchains": ["GCC_ARM", "ARM", "IAR"],
|
||||||
|
|
@ -2708,7 +2708,7 @@
|
||||||
"inherits": ["Target"],
|
"inherits": ["Target"],
|
||||||
"core": "Cortex-M4F",
|
"core": "Cortex-M4F",
|
||||||
"macros": ["TARGET_NRF52840", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S140", "NRF_SD_BLE_API_VERSION=5", "NRF52840_XXAA", "NRF_DFU_SETTINGS_VERSION=1", "NRF_SD_BLE_API_VERSION=5", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\""],
|
"macros": ["TARGET_NRF52840", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S140", "NRF_SD_BLE_API_VERSION=5", "NRF52840_XXAA", "NRF_DFU_SETTINGS_VERSION=1", "NRF_SD_BLE_API_VERSION=5", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\""],
|
||||||
"extra_labels": ["NORDIC", "MCU_NRF52840", "NRF5", "SDK13"],
|
"extra_labels": ["NORDIC", "MCU_NRF52840", "NRF5", "SDK13", "NRF52_COMMON"],
|
||||||
"OUTPUT_EXT": "hex",
|
"OUTPUT_EXT": "hex",
|
||||||
"is_disk_virtual": true,
|
"is_disk_virtual": true,
|
||||||
"supported_toolchains": ["GCC_ARM", "ARM", "IAR"],
|
"supported_toolchains": ["GCC_ARM", "ARM", "IAR"],
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ class Makefile(Exporter):
|
||||||
for key in ['include_paths', 'library_paths', 'hex_files',
|
for key in ['include_paths', 'library_paths', 'hex_files',
|
||||||
'to_be_compiled']:
|
'to_be_compiled']:
|
||||||
ctx[key] = sorted(ctx[key])
|
ctx[key] = sorted(ctx[key])
|
||||||
ctx.update(self.flags)
|
ctx.update(self.format_flags())
|
||||||
|
|
||||||
for templatefile in \
|
for templatefile in \
|
||||||
['makefile/%s_%s.tmpl' % (self.TEMPLATE,
|
['makefile/%s_%s.tmpl' % (self.TEMPLATE,
|
||||||
|
|
@ -128,6 +128,17 @@ class Makefile(Exporter):
|
||||||
else:
|
else:
|
||||||
raise NotSupportedException("This make tool is in development")
|
raise NotSupportedException("This make tool is in development")
|
||||||
|
|
||||||
|
def format_flags(self):
|
||||||
|
"""Format toolchain flags for Makefile"""
|
||||||
|
flags = {}
|
||||||
|
for k, v in self.flags.iteritems():
|
||||||
|
if k in ['asm_flags', 'c_flags', 'cxx_flags']:
|
||||||
|
flags[k] = map(lambda x: x.replace('"', '\\"'), v)
|
||||||
|
else:
|
||||||
|
flags[k] = v
|
||||||
|
|
||||||
|
return flags
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def build(project_name, log_name="build_log.txt", cleanup=True):
|
def build(project_name, log_name="build_log.txt", cleanup=True):
|
||||||
""" Build Make project """
|
""" Build Make project """
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class Uvision(Exporter):
|
||||||
# Flag is invalid if set in template
|
# Flag is invalid if set in template
|
||||||
# Optimizations are also set in the template
|
# Optimizations are also set in the template
|
||||||
invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x)
|
invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x)
|
||||||
flags['c_flags'] = [flag for flag in c_flags if not invalid_flag(flag)]
|
flags['c_flags'] = [flag.replace('"','\\"') for flag in c_flags if not invalid_flag(flag)]
|
||||||
flags['c_flags'] = " ".join(flags['c_flags'])
|
flags['c_flags'] = " ".join(flags['c_flags'])
|
||||||
return flags
|
return flags
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue