Ejemplo n.º 1
0
def build_configs(target):
    if target == 'arm-pikeos':
        t = ArmPikeOS()
    elif target == 'arm-pikeos4.2':
        t = ArmPikeOS42()
    elif target == 'zynq7000':
        t = Zynq7000()
    elif target == 'rpi2':
        t = Rpi2()
    elif target == 'rpi2mc':
        t = Rpi2Mc()
    elif target == 'rpi3':
        t = Rpi3()
    elif target == 'rpi3mc':
        t = Rpi3Mc()
    elif target == 'zynqmp':
        t = ZynqMP()
    elif target.startswith('sam'):
        t = Sam(target)
    elif target.startswith('smartfusion2'):
        t = SmartFusion2()
    elif target.startswith('stm32'):
        t = Stm32(target)
    elif target == 'openmv2':
        t = Stm32(target)
    elif target == 'tms570':
        # by default, the TMS570LS3137 HDK board
        t = TMS570('tms570ls31')
    elif target == 'tms570_sci':
        # by default, the TMS570LS3137 HDK board
        t = TMS570('tms570ls31', uart_io=True)
    elif target == 'tms570lc':
        # alias for the TMS570LC43x HDK board
        t = TMS570('tms570lc43', uart_io=True)
    elif target == 'tms570lc_dcc':
        t = TMS570('tms570lc43', uart_io=False)
    elif target == 'lm3s':
        t = LM3S()
    elif target == 'm1agl':
        t = M1AGL()
    elif target == 'microbit':
        t = Microbit()
    elif target == 'nrf52840':
        t = NRF52840()
    elif target == 'nrf52832':
        t = NRF52832()
    elif target == 'cortex-m0':
        t = CortexM0()
    elif target == 'cortex-m0p':
        t = CortexM0P()
    elif target == 'cortex-m1':
        t = CortexM1()
    elif target == 'cortex-m3':
        t = CortexM3()
    elif target == 'cortex-m4':
        t = CortexM4()
    elif target == 'cortex-m4f':
        t = CortexM4F()
    elif target == 'cortex-m7f':
        t = CortexM7F()
    elif target == 'cortex-m7df':
        t = CortexM7DF()
    elif target == 'leon2' or target == 'leon':
        t = Leon2()
    elif target == 'leon3':
        t = Leon3(smp=False)
    elif target == 'leon3-smp':
        t = Leon3(smp=True)
    elif target == 'leon4':
        t = Leon4(smp=False)
    elif target == 'leon4-smp':
        t = Leon4(smp=True)
    elif target == 'mpc8641':
        t = MPC8641()
    elif target == '8349e':
        t = MPC8349e()
    elif target == 'p2020':
        t = P2020()
    elif target == 'p5566':
        t = P5566()
    elif target == 'mpc5634':
        t = P5634()
    elif target == 'mcm':
        t = Visium()
    elif target == 'spike':
        t = Spike()
    elif target == 'hifive1':
        t = HiFive1()
    elif target == 'unleashed':
        t = Unleashed()
    elif target == 'picorv32':
        t = PicoRV32()
    elif target == 'rv32imc':
        t = RV32IMC()
    elif target == 'x86-linux':
        t = X86Native()
    elif target == 'x86-windows':
        t = X86Native()
    elif target == 'x86_64-linux':
        t = X8664Native()
    elif target == 'x86_64-windows':
        t = X8664Native()
    else:
        print 'Error: undefined target %s' % target
        sys.exit(2)

    return t
Ejemplo n.º 2
0
def build_configs(target):
    # PikeOS
    if target == 'aarch64-pikeos5':
        t = AArch64PikeOS5()
    elif target == 'arm-pikeos':
        t = ArmPikeOS()
    elif target == 'arm-pikeos4.2':
        t = ArmPikeOS42()
    elif target == 'arm-pikeos5':
        t = ArmPikeOS5()
    elif target == 'ppc-pikeos5':
        t = PPCPikeOS5()
    # AArch64 elf
    elif target == 'rpi3':
        t = Rpi3()
    elif target == 'rpi3mc':
        t = Rpi3Mc()
    elif target == 'zynqmp':
        t = ZynqMP()
    # ARM elf
    elif target == 'zynq7000':
        t = Zynq7000()
    elif target == 'zynqmpr5':
        t = ZynqmpR5()
    elif target == 'rpi2':
        t = Rpi2()
    elif target == 'rpi2mc':
        t = Rpi2Mc()
    elif target.startswith('sam'):
        t = Sam(target)
    elif target.startswith('smartfusion2'):
        t = SmartFusion2()
    elif target.startswith('stm32f0'):
        t = Stm32F0(target)
    elif target.startswith('stm32l'):
        t = Stm32l(target)
    elif target.startswith('stm32'):
        t = Stm32(target)
    elif target == 'feather_stm32f405':
        t = Stm32(target)
    elif target == 'nucleo_f401re':
        t = Stm32(target)
    elif target == 'openmv2':
        t = Stm32(target)
    elif target == 'tms570':
        # by default, the TMS570LS3137 HDK board
        t = TMS570('tms570ls31')
    elif target == 'tms570_sci':
        # by default, the TMS570LS3137 HDK board
        t = TMS570('tms570ls31', uart_io=True)
    elif target == 'tms570lc':
        # alias for the TMS570LC43x HDK board
        t = TMS570('tms570lc43', uart_io=True)
    elif target == 'tms570lc_dcc':
        t = TMS570('tms570lc43', uart_io=False)
    elif target == 'lm3s':
        t = LM3S()
    elif target == 'microbit':
        t = Microbit()
    elif target == 'nrf52840':
        t = NRF52840()
    elif target == 'nrf52832':
        t = NRF52832()
    elif target == "microsemi-m1":
        t = MicrosemiM1()
    elif target == 'cortex-m0':
        t = CortexM0()
    elif target == 'cortex-m0p':
        t = CortexM0P()
    elif target == 'cortex-m1':
        t = CortexM1()
    elif target == 'cortex-m3':
        t = CortexM3()
    elif target == 'cortex-m4':
        t = CortexM4()
    elif target == 'cortex-m4f':
        t = CortexM4F()
    elif target == 'cortex-m7f':
        t = CortexM7F()
    elif target == 'cortex-m7df':
        t = CortexM7DF()
    elif target == 'cortex-m23':
        t = CortexM23()
    elif target == 'cortex-m33f':
        t = CortexM33F()
    elif target == 'cortex-m33df':
        t = CortexM33DF()
    # SPARC/Leon elf
    elif target == 'leon2' or target == 'leon':
        t = Leon2()
    elif target == 'leon3':
        t = Leon3(smp=False)
    elif target == 'leon3-smp':
        t = Leon3(smp=True)
    elif target == 'leon4':
        t = Leon4(smp=False)
    elif target == 'leon4-smp':
        t = Leon4(smp=True)
    # PPC elf
    elif target == 'mpc5200':
        t = MPC5200()
    elif target == 'mpc8641':
        t = MPC8641()
    elif target == '8349e':
        t = MPC8349e()
    elif target == 'p2020':
        t = P2020()
    elif target == 'p5566':
        t = P5566()
    elif target == 'mpc5634':
        t = P5634()
    elif target == 'virtex5':
        t = Virtex5()
    # Visium elf
    elif target == 'mcm':
        t = Visium()
    # Risc-V
    elif target == 'spike':
        t = Spike()
    elif target == 'hifive1':
        t = HiFive1()
    elif target == 'unleashed':
        t = Unleashed()
    elif target == 'polarfiresoc':
        t = PolarFireSOC()
    elif target == "rv32i":
        t = RV32I()
    elif target == "rv32im":
        t = RV32IM()
    elif target == "rv32iac":
        t = RV32IAC()
    elif target == "rv32imac":
        t = RV32IMAC()
    elif target == "rv32imafc":
        t = RV32IMAFC()
    elif target == "rv32imafdc":
        t = RV32IMAFDC()
    elif target == "rv64im":
        t = RV64IM()
    elif target == "rv64imc":
        t = RV64IMC()
    elif target == "rv64imac":
        t = RV64IMAC()
    elif target == "rv64imafc":
        t = RV64IMAFC()
    elif target == "rv64imfc":
        t = RV64IMFC()
    elif target == "rv64imafdc":
        t = RV64IMAFDC()
    # x86_64
    elif target == 'x86_64':
        t = X8664Generic()
    # native platforms
    elif target in ('x86-linux', 'x86-windows'):
        t = X86Native()
    elif target in ('x86_64-linux', 'x86_64-windows', 'x86_64-windows64'):
        t = X8664Native()
    else:
        print('Error: undefined target %s' % target)
        sys.exit(2)

    return t