Ejemplo n.º 1
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            disable_tool = "tool-micronucleus"
            if "digispark" in board['build']['core']:
                disable_tool = "tool-avrdude"
            del self.PACKAGES[disable_tool]['alias']

        return BasePlatform.configure_default_packages(self, envoptions,
                                                       targets)
Ejemplo n.º 2
0
    def configure_default_packages(self, envoptions, targets):
        if (envoptions.get("framework") == "wiringpi"
                and "linux_arm" not in util.get_systype()):
            raise exception.PlatformioException(
                "PlatformIO does not support temporary cross-compilation "
                "for WiringPi framework. Please run PlatformIO directly on "
                "Raspberry Pi")

        return BasePlatform.configure_default_packages(self, envoptions,
                                                       targets)
Ejemplo n.º 3
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            if "digispark" in board['build']['core']:
                self.PACKAGES['tool-micronucleus']['alias'] = "uploader"
            else:
                self.PACKAGES['tool-avrdude']['alias'] = "uploader"

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 4
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            disable_tool = "tool-micronucleus"
            if "digispark" in board['build']['core']:
                disable_tool = "tool-avrdude"
            del self.PACKAGES[disable_tool]['alias']

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 5
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            if "digispark" in board['build']['core']:
                self.PACKAGES['tool-micronucleus']['alias'] = "uploader"
            else:
                self.PACKAGES['tool-avrdude']['alias'] = "uploader"

        return BasePlatform.configure_default_packages(self, envoptions,
                                                       targets)
Ejemplo n.º 6
0
    def configure_default_packages(self, envoptions, targets):
        if (envoptions.get("framework") == "wiringpi" and
                "linux_arm" not in util.get_systype()):
            raise exception.PlatformioException(
                "PlatformIO does not support temporary cross-compilation "
                "for WiringPi framework. Please run PlatformIO directly on "
                "Raspberry Pi"
            )

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 7
0
 def run(self, variables, targets, verbose):
     for v in variables:
         if "BOARD=" not in v:
             continue
         disable_tool = "tool-micronucleus"
         _, board = v.split("=")
         bdata = get_boards(board)
         if "digispark" in bdata['build']['core']:
             disable_tool = "tool-avrdude"
         del self.PACKAGES[disable_tool]['alias']
         break
     return BasePlatform.run(self, variables, targets, verbose)
Ejemplo n.º 8
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            if board['build']['core'] == "teensy":
                name = "toolchain-atmelavr"
            else:
                name = "toolchain-gccarmnoneeabi"
            self.PACKAGES[name]['alias'] = "toolchain"
            self.PACKAGES[name]['default'] = True

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 9
0
 def run(self, variables, targets, verbose):
     for v in variables:
         if "BOARD=" not in v:
             continue
         disable_tool = "tool-micronucleus"
         _, board = v.split("=")
         bdata = get_boards(board)
         if "digispark" in bdata['build']['core']:
             disable_tool = "tool-avrdude"
         del self.PACKAGES[disable_tool]['alias']
         break
     return BasePlatform.run(self, variables, targets, verbose)
Ejemplo n.º 10
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            if board['build']['core'] == "teensy":
                name = "toolchain-atmelavr"
            else:
                name = "toolchain-gccarmnoneeabi"
            self.PACKAGES[name]['alias'] = "toolchain"
            self.PACKAGES[name]['default'] = True

        return BasePlatform.configure_default_packages(self, envoptions,
                                                       targets)
Ejemplo n.º 11
0
 def run(self, variables, targets):
     for v in variables:
         if "BOARD=" not in v:
             continue
         tuploader = "tool-avrdude"
         _, board = v.split("=")
         bdata = get_boards(board)
         if "digispark" in bdata['build']['core']:
             tuploader = "tool-micronucleus"
         self.PACKAGES[tuploader]['alias'] = "uploader"
         break
     return BasePlatform.run(self, variables, targets)
Ejemplo n.º 12
0
 def run(self, variables, targets, verbose):
     for v in variables:
         if "BOARD=" not in v:
             continue
         _, board = v.split("=")
         bdata = get_boards(board)
         if bdata['build']['core'] == "teensy":
             tpackage = "toolchain-atmelavr"
         else:
             tpackage = "toolchain-gccarmnoneeabi"
         self.PACKAGES[tpackage]['alias'] = "toolchain"
         break
     return BasePlatform.run(self, variables, targets, verbose)
Ejemplo n.º 13
0
 def run(self, variables, targets):
     for v in variables:
         if "BOARD=" not in v:
             continue
         _, board = v.split("=")
         bdata = get_boards(board)
         if bdata['build']['core'] == "teensy":
             tpackage = "toolchain-atmelavr"
         else:
             tpackage = "toolchain-gccarmnoneeabi"
         self.PACKAGES[tpackage]['alias'] = "toolchain"
         break
     return BasePlatform.run(self, variables, targets)
Ejemplo n.º 14
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            upload_protocol = board.get("upload", {}).get("protocol", None)
            upload_tool = None
            if upload_protocol == "openocd":
                upload_tool = "tool-openocd"
            elif upload_protocol == "sam-ba":
                upload_tool = "tool-bossac"
            elif upload_protocol == "stk500v2":
                upload_tool = "tool-avrdude"

            if upload_tool:
                self.PACKAGES[upload_tool]['alias'] = "uploader"

        return BasePlatform.configure_default_packages(self, envoptions,
                                                       targets)
Ejemplo n.º 15
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board"):
            board = get_boards(envoptions.get("board"))
            upload_protocol = board.get("upload", {}).get("protocol", None)
            upload_tool = None
            if upload_protocol == "openocd":
                upload_tool = "tool-openocd"
            elif upload_protocol == "sam-ba":
                upload_tool = "tool-bossac"
            elif upload_protocol == "stk500v2":
                upload_tool = "tool-avrdude"

            if upload_tool:
                self.PACKAGES[upload_tool]['alias'] = "uploader"

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 16
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("framework") == "cmsis":
            self.PACKAGES['framework-mbed']['default'] = True

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 17
0
 def on_run_err(self, line):  # pylint: disable=R0201
     # fix STDERR "flash written" for avrdude
     if "avrdude" in line:
         self.on_run_out(line)
     else:
         BasePlatform.on_run_err(self, line)
Ejemplo n.º 18
0
    def configure_default_packages(self, envoptions, targets):
        if not envoptions.get("framework"):
            self.PACKAGES['sdk-esp8266']['default'] = True

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 19
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board") == "rfduino":
            self.PACKAGES['tool-rfdloader']['alias'] = "uploader"

        return BasePlatform.configure_default_packages(
            self, envoptions, targets)
Ejemplo n.º 20
0
 def __init__(self):
     if get_systype() == "linux_x86_64":
         del self.PACKAGES['toolchain-gcclinux64']
     BasePlatform.__init__(self)
Ejemplo n.º 21
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("framework") == "cmsis":
            self.PACKAGES['framework-mbed']['default'] = True

        return BasePlatform.configure_default_packages(self, envoptions,
                                                       targets)
Ejemplo n.º 22
0
 def on_run_err(self, line):  # pylint: disable=R0201
     # fix STDERR "flash written" for avrdude
     if "avrdude" in line:
         self.on_run_out(line)
     else:
         BasePlatform.on_run_err(self, line)
Ejemplo n.º 23
0
    def configure_default_packages(self, envoptions, targets):
        if envoptions.get("board") == "rfduino":
            self.PACKAGES['tool-rfdloader']['alias'] = "uploader"

        return BasePlatform.configure_default_packages(self, envoptions,
                                                       targets)
Ejemplo n.º 24
0
 def __init__(self):
     if "linux_arm" in util.get_systype():
         del self.PACKAGES['toolchain-gccarmlinuxgnueabi']
     BasePlatform.__init__(self)
Ejemplo n.º 25
0
 def __init__(self):
     if get_systype() == "linux_x86_64":
         del self.PACKAGES['toolchain-gcclinux64']
     BasePlatform.__init__(self)
Ejemplo n.º 26
0
 def __init__(self):
     if "linux_arm" in util.get_systype():
         del self.PACKAGES['toolchain-gccarmlinuxgnueabi']
     BasePlatform.__init__(self)
Ejemplo n.º 27
0
 def __init__(self):
     if get_systype() == "linux_i686":
         del self.PACKAGES['toolchain-gcclinux32']
     BasePlatform.__init__(self)
Ejemplo n.º 28
0
 def __init__(self):
     if get_systype() == "linux_i686":
         del self.PACKAGES['toolchain-gcclinux32']
     BasePlatform.__init__(self)