build/microsemi/libero_soc: remove previous impl directory if exists
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 23 Nov 2018 07:11:57 +0000 (08:11 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 23 Nov 2018 07:11:57 +0000 (08:11 +0100)
litex/build/microsemi/libero_soc.py

index 657df3d64c5cc7bd20637ae199e5fc090550db52..720b7b581af6380032193c599ab29380e9a8152b 100644 (file)
@@ -237,6 +237,9 @@ class MicrosemiLiberoSoCPolarfireToolchain:
         
         # run
         if run:
+            # delete previous impl
+            if os.path.exists("impl"):
+                shutil.rmtree("impl")
             _run_script(script)
 
         os.chdir(cwd)