diff --git a/workspace_tools/make.py b/workspace_tools/make.py index 1f19b1a322..398f5d64b7 100644 --- a/workspace_tools/make.py +++ b/workspace_tools/make.py @@ -104,7 +104,7 @@ if __name__ == '__main__': # Import pyserial: https://pypi.python.org/pypi/pyserial from serial import Serial - sleep(target.program_cycle_s) + sleep(target.program_cycle_s()) serial = Serial(options.serial, timeout = 1) if options.baud: serial.setBaudrate(options.baud) diff --git a/workspace_tools/server.py b/workspace_tools/server.py index 01f712832f..5e8834ca7a 100644 --- a/workspace_tools/server.py +++ b/workspace_tools/server.py @@ -139,15 +139,17 @@ class Tester(BaseRequestHandler): self.send_result("{error}") return - delete_dir_files(disk) + if not target.is_disk_virtual: + delete_dir_files(disk) + copy(image_path, disk) # Copy Extra Files - if test.extra_files: + if not target.is_disk_virtual and test.extra_files: for f in test.extra_files: copy(f, disk) - sleep(target.program_cycle_s) + sleep(target.program_cycle_s()) # Host test self.request.setblocking(0) diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index d60ca7edbb..f03c419225 100644 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -12,9 +12,8 @@ class Target: # ARM Core self.core = None - # How much time (in seconds) it takes to the interface chip to flash a - # new image and reset the target chip - self.program_cycle_s = 1.5 + # Is the disk provided by the interface chip of this board virtual? + self.is_disk_virtual = False # list of toolchains that are supported by the mbed SDK for this target self.supported_toolchains = None @@ -24,6 +23,9 @@ class Target: self.name = self.__class__.__name__ + def program_cycle_s(self): + return 4 if self.is_disk_virtual else 1.5 + def get_labels(self): return [self.name, CORE_LABELS[self.core]] + self.extra_labels @@ -47,7 +49,7 @@ class LPC1768(Target): self.extra_labels = ['NXP', 'LPC176X'] - self.supported_toolchains = ["ARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"] + self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"] class LPC11U24(Target): @@ -71,7 +73,7 @@ class KL05Z(Target): self.supported_toolchains = ["ARM"] - self.program_cycle_s = 4 + self.is_disk_virtual = True class KL25Z(Target): @@ -84,7 +86,7 @@ class KL25Z(Target): self.supported_toolchains = ["ARM", "GCC_CW_EWL", "GCC_CW_NEWLIB"] - self.program_cycle_s = 4 + self.is_disk_virtual = True class LPC812(Target): @@ -97,7 +99,7 @@ class LPC812(Target): self.supported_toolchains = ["uARM"] - self.program_cycle_s = 4 + self.is_disk_virtual = True class LPC4088(Target): diff --git a/workspace_tools/toolchains/__init__.py b/workspace_tools/toolchains/__init__.py index e176ef5c17..97e29d699b 100644 --- a/workspace_tools/toolchains/__init__.py +++ b/workspace_tools/toolchains/__init__.py @@ -144,7 +144,7 @@ class mbedToolchain: if self.options: self.info("Build Options: %s" % (', '.join(self.options))) - self.obj_path = join(target.name, self.name) + self.obj_path = join("TARGET_"+target.name, "TOOLCHAIN_"+self.name) self.symbols = None self.labels = None