Skip to content

Remove IAR from all NRF51822-based targets #1569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions workspace_tools/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,20 +1214,20 @@ def __init__(self):
self.core = "Cortex-M0"
self.extra_labels = ["NORDIC", "MCU_NRF51", "MCU_NRF51822"]
self.macros = ['NRF51', 'TARGET_NRF51822']
self.supported_toolchains = ["ARM", "GCC_ARM", "IAR"]
self.supported_toolchains = ["ARM", "GCC_ARM"]
self.is_disk_virtual = True
self.detect_code = ["1070"]

def program_cycle_s(self):
return 6

def init_hooks(self, hook, toolchain_name):
if toolchain_name in ['ARM_STD', 'ARM_MICRO', 'GCC_ARM', 'IAR']:
if toolchain_name in ['ARM_STD', 'GCC_ARM']:
hook.hook_add_binary("post", self.binary_hook)

@staticmethod
def binary_hook(t_self, resources, elf, binf):

# Scan to find the actual paths of soft device
sdf = None
for softdeviceAndOffsetEntry in t_self.target.EXPECTED_SOFTDEVICES_WITH_OFFSETS:
Expand All @@ -1242,7 +1242,7 @@ def binary_hook(t_self, resources, elf, binf):
if sdf is None:
t_self.debug("Hex file not found. Aborting.")
return

# Look for bootloader file that matches this soft device or bootloader override image
blf = None
if t_self.target.MERGE_BOOTLOADER is True:
Expand Down Expand Up @@ -1274,7 +1274,7 @@ def binary_hook(t_self, resources, elf, binf):
with open(binf.replace(".bin", ".hex"), "w") as f:
binh.tofile(f, format='hex')


# 16KB Nordic targets are tight on SRAM using S130 (default) so we
# introduce two possible options:
# 1) Use S130 (default) - for this derive from MCU_NRF51_16K
Expand Down Expand Up @@ -1551,7 +1551,6 @@ def __init__(self):
class DELTA_DFCM_NNN40(MCU_NRF51_32K):
def __init__(self):
MCU_NRF51_32K.__init__(self)
self.supported_toolchains = ["ARM", "GCC_ARM"]
self.macros += ['TARGET_NRF_LFCLK_RC']
self.progen = {
"target":"dfcm-nnn40",
Expand All @@ -1562,7 +1561,6 @@ def program_cycle_s(self):
class DELTA_DFCM_NNN40_BOOT(MCU_NRF51_32K_BOOT):
def __init__(self):
MCU_NRF51_32K_BOOT.__init__(self)
self.supported_toolchains = ["ARM", "GCC_ARM"]
self.extra_labels += ['DELTA_DFCM_NNN40']
self.macros += ['TARGET_DELTA_DFCM_NNN40', 'TARGET_NRF_LFCLK_RC']
def program_cycle_s(self):
Expand All @@ -1571,7 +1569,6 @@ def program_cycle_s(self):
class DELTA_DFCM_NNN40_OTA(MCU_NRF51_32K_OTA):
def __init__(self):
MCU_NRF51_32K_OTA.__init__(self)
self.supported_toolchains = ["ARM", "GCC_ARM"]
self.extra_labels += ['DELTA_DFCM_NNN40']
self.macros += ['TARGET_DELTA_DFCM_NNN40', 'TARGET_NRF_LFCLK_RC']
def program_cycle_s(self):
Expand All @@ -1580,7 +1577,6 @@ def program_cycle_s(self):
class NRF51_DK(MCU_NRF51_32K):
def __init__(self):
MCU_NRF51_32K.__init__(self)
self.supported_toolchains = ["ARM", "GCC_ARM"]
self.supported_form_factors = ["ARDUINO"]
self.progen = {
"target":"nrf51-dk",
Expand All @@ -1591,15 +1587,13 @@ def __init__(self):
MCU_NRF51_32K_BOOT.__init__(self)
self.extra_labels += ['NRF51_DK']
self.macros += ['TARGET_NRF51_DK']
self.supported_toolchains = ["ARM", "GCC_ARM"]
self.supported_form_factors = ["ARDUINO"]

class NRF51_DK_OTA(MCU_NRF51_32K_OTA):
def __init__(self):
MCU_NRF51_32K_OTA.__init__(self)
self.extra_labels += ['NRF51_DK']
self.macros += ['TARGET_NRF51_DK']
self.supported_toolchains = ["ARM", "GCC_ARM"]
self.supported_form_factors = ["ARDUINO"]

class NRF51_DONGLE(MCU_NRF51_32K):
Expand Down Expand Up @@ -1676,7 +1670,7 @@ def __init__(self):
self.macros += ['TARGET_TY51822R3', 'TARGET_NRF_32MHZ_XTAL']
self.supported_toolchains = ["ARM", "GCC_ARM"]


### ARM ###

class ARM_MPS2_Target(Target):
Expand Down Expand Up @@ -1736,7 +1730,7 @@ def __init__(self):
self.macros = ['CMSDK_CM7']
self.supported_toolchains = ["ARM"]
self.default_toolchain = "ARM"

class ARM_MPS2_BEID(ARM_MPS2_Target):
def __init__(self):
ARM_MPS2_Target.__init__(self)
Expand Down Expand Up @@ -1783,7 +1777,7 @@ def __init__(self):
self.supported_toolchains = ["GCC_ARM", "IAR", "ARM"]
self.default_toolchain = "ARM"
self.progen = {
"target": "maxwsnenv",
"target": "maxwsnenv",
}

class MAX32600MBED(Target):
Expand All @@ -1795,7 +1789,7 @@ def __init__(self):
self.supported_toolchains = ["GCC_ARM", "IAR", "ARM"]
self.default_toolchain = "ARM"
self.progen = {
"target": "max32600mbed",
"target": "max32600mbed",
}

### Silicon Labs ###
Expand Down Expand Up @@ -1886,7 +1880,7 @@ def __init__(self):
self.extra_labels = ['WIZNET', 'W7500x', 'WIZwiki_W7500ECO']
self.supported_toolchains = ["uARM", "ARM"]
self.default_toolchain = "ARM"

class SAMR21G18A(Target):
def __init__(self):
Target.__init__(self)
Expand Down