diff python/ide.py @ 250:f5fba5b554d7

Removal of obsolete editor
author Windel Bouwman
date Sun, 28 Jul 2013 19:07:51 +0200
parents e41e4109addd
children 6ed3d3a82a63
line wrap: on
line diff
--- a/python/ide.py	Fri Jul 26 20:26:05 2013 +0200
+++ b/python/ide.py	Sun Jul 28 19:07:51 2013 +0200
@@ -283,9 +283,15 @@
             ce.setErrors(self.diag.diags)
             return
 
-        self.buildOutput.append("Flashing stm32f4 discovery")
         code_s = outs.getSection('code')
         self.debugInfo = code_s.debugInfos()
+        self.buildOutput.append("Flashing stm32f4 discovery")
+        if self.ctrlToolbar.device:
+            bts = code_s.to_bytes()
+            self.ctrlToolbar.device.writeFlash(0x08000000, bts)
+            stl = self.ctrlToolbar.device.iface
+            stl.reset()
+            stl.halt()
 
         self.buildOutput.append("Done!")