diff --git a/workspace_tools/build.py b/workspace_tools/build.py index 44fff281c9..73984b4c2c 100755 --- a/workspace_tools/build.py +++ b/workspace_tools/build.py @@ -157,7 +157,10 @@ if __name__ == '__main__': # Additional Libraries if options.rtos: - libraries.extend(["rtx", "rtos"]) + if mcu == "RZ_A1H": + libraries.extend(["rtx_ca", "rtos_ca"]) + else: + libraries.extend(["rtx", "rtos"]) if options.eth: libraries.append("eth") if options.usb: diff --git a/workspace_tools/build_release.py b/workspace_tools/build_release.py index 9dd437cf79..dcb1ca5e00 100755 --- a/workspace_tools/build_release.py +++ b/workspace_tools/build_release.py @@ -73,6 +73,8 @@ OFFICIAL_MBED_LIBRARY_BUILD = ( ('LPC11U68', ('uARM','GCC_ARM','GCC_CR')), ('OC_MBUINO', ('ARM', 'uARM', 'GCC_ARM')), + + ('RZ_A1H' , ('ARM')), ) diff --git a/workspace_tools/libraries.py b/workspace_tools/libraries.py index 5bb19913e0..6ec4d36165 100644 --- a/workspace_tools/libraries.py +++ b/workspace_tools/libraries.py @@ -33,6 +33,18 @@ LIBRARIES = [ "build_dir": RTOS_LIBRARIES, "dependencies": [MBED_LIBRARIES, MBED_RTX], }, + { + "id": "rtx_ca", + "source_dir": MBED_RTX_CA, + "build_dir": RTOS_LIBRARIES, + "dependencies": [MBED_LIBRARIES], + }, + { + "id": "rtos_ca", + "source_dir": RTOS_ABSTRACTION, + "build_dir": RTOS_LIBRARIES, + "dependencies": [MBED_LIBRARIES, MBED_RTX_CA], + }, # USB Device libraries { diff --git a/workspace_tools/paths.py b/workspace_tools/paths.py index 2b601e8170..4fed2995c7 100644 --- a/workspace_tools/paths.py +++ b/workspace_tools/paths.py @@ -49,6 +49,7 @@ MBED_RPC = join(LIB_DIR, "rpc") # mbed RTOS RTOS = join(LIB_DIR, "rtos") MBED_RTX = join(RTOS, "rtx") +MBED_RTX_CA = join(RTOS, "rtx_ca") RTOS_ABSTRACTION = join(RTOS, "rtos") RTOS_LIBRARIES = join(BUILD_DIR, "rtos") diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 0db04ffd7b..b9903bdf94 100644 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -21,7 +21,8 @@ CORE_LABELS = { "Cortex-M0+": "M0P", "Cortex-M3" : "M3", "Cortex-M4" : "M4", - "Cortex-M4F" : "M4" + "Cortex-M4F" : "M4", + "Cortex-A9" : "A9" } import os @@ -711,6 +712,14 @@ class ARM_MPS2(Target): self.supported_toolchains = ["ARM", "GCC_ARM"] self.default_toolchain = "ARM" +class RZ_A1H(Target): + def __init__(self): + Target.__init__(self) + self.core = "Cortex-A9" + self.extra_labels = ['RENESAS', 'MBRZA1H'] + self.supported_toolchains = ["ARM", "GCC_ARM"] + self.supported_form_factors = ["ARDUINO"] + self.default_toolchain = "ARM" class OC_MBUINO(LPC11U24): def __init__(self): @@ -794,6 +803,7 @@ TARGETS = [ LPCCAPPUCCINO(), HRM1017(), ARM_MPS2(), + RZ_A1H(), RBLAB_NRF51822(), RBLAB_BLENANO(), OC_MBUINO(), diff --git a/workspace_tools/tests.py b/workspace_tools/tests.py index 92d8888c09..33eb764339 100644 --- a/workspace_tools/tests.py +++ b/workspace_tools/tests.py @@ -208,7 +208,7 @@ TESTS = [ "id": "MBED_A20", "description": "I2C master/slave test", "source_dir": join(TEST_DIR, "mbed", "i2c_master_slave"), "dependencies": [MBED_LIBRARIES, TEST_MBED_LIB,], - "mcu": ["LPC1768"], + "mcu": ["LPC1768", "RZ_A1H"], "peripherals": ["i2c_loop"] }, { @@ -583,7 +583,7 @@ TESTS = [ "duration": 15, "automated": True, "host_test": "wait_us_auto", - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_2", "description": "Mutex resource lock", @@ -591,7 +591,7 @@ TESTS = [ "dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB], "duration": 20, "automated": True, - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_3", "description": "Semaphore resource lock", @@ -599,28 +599,28 @@ TESTS = [ "dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB], "duration": 20, "automated": True, - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_4", "description": "Signals messaging", "source_dir": join(TEST_DIR, "rtos", "mbed", "signals"), "dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB], "automated": True, - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_5", "description": "Queue messaging", "source_dir": join(TEST_DIR, "rtos", "mbed", "queue"), "dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB], "automated": True, - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_6", "description": "Mail messaging", "source_dir": join(TEST_DIR, "rtos", "mbed", "mail"), "dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB], "automated": True, - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_7", "description": "Timer", @@ -629,14 +629,14 @@ TESTS = [ "duration": 15, "automated": True, "host_test": "wait_us_auto", - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_8", "description": "ISR (Queue)", "source_dir": join(TEST_DIR, "rtos", "mbed", "isr"), "dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, TEST_MBED_LIB], "automated": True, - "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z"], + "mcu": ["LPC1768", "LPC1549", "LPC11U24", "LPC812", "KL25Z", "KL05Z", "K64F", "KL46Z", "RZ_A1H"], }, { "id": "RTOS_9", "description": "SD File write-read", diff --git a/workspace_tools/toolchains/gcc.py b/workspace_tools/toolchains/gcc.py index fda908dc30..ac705ada2f 100644 --- a/workspace_tools/toolchains/gcc.py +++ b/workspace_tools/toolchains/gcc.py @@ -48,6 +48,10 @@ class GCC(mbedToolchain): self.cpu.append("-mfpu=fpv4-sp-d16") self.cpu.append("-mfloat-abi=softfp") + if target.core == "Cortex-A9": + self.cpu.append("-mfpu=vfpv3-fp16") + self.cpu.append("-mfloat-abi=hard") + # Note: We are using "-O2" instead of "-Os" to avoid this known GCC bug: # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46762 common_flags = ["-c", "-Wall", "-Wextra",