Advertisement
joymonkey

SAMD-FLASH.WSF

Feb 20th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <job>
  2. <script language="VBScript">
  3.  
  4. Option Explicit
  5. On Error Resume Next
  6. Dim WshShell
  7. set WshShell=CreateObject("WScript.Shell")
  8.  
  9. WScript.Sleep 500
  10. WshShell.run "cmd.exe"
  11. WScript.Sleep 500
  12. WshShell.SendKeys ("cd ""C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\bin"" ")
  13. WshShell.SendKeys ("{Enter}")
  14. WScript.Sleep 500
  15. WshShell.SendKeys ("start cmd /k call OpenOCD -f interface/cmsis-dap.cfg -f target/at91samdXX.cfg")
  16. WshShell.SendKeys ("{Enter}")
  17. WScript.Sleep 500
  18.  
  19. WshShell.run "cmd.exe"
  20. WScript.Sleep 500
  21. WshShell.SendKeys ("telnet localhost 4444")
  22. WshShell.SendKeys ("{Enter}")
  23. WScript.Sleep 100
  24. WshShell.SendKeys ("{Enter}")
  25. WScript.Sleep 100
  26. WshShell.SendKeys ("reset halt")
  27. WshShell.SendKeys ("{Enter}")
  28. WScript.Sleep 500
  29. WshShell.SendKeys ("flash write_image erase ""C:\\samd21_sam_ba.hex"" 0x0")
  30. WshShell.SendKeys ("{Enter}")
  31. WScript.Sleep 5000
  32. WshShell.SendKeys ("reset run")
  33. WshShell.SendKeys ("{Enter}")
  34. WScript.Sleep 500
  35.  
  36. WshShell.SendKeys ("exit")
  37. WshShell.SendKeys ("{Enter}")
  38. WScript.Sleep 100
  39. WshShell.SendKeys ("+^c")
  40. WshShell.SendKeys ("exit")
  41. WshShell.SendKeys ("{Enter}")
  42.  
  43. WshShell.SendKeys ("exit")
  44. WshShell.SendKeys ("{Enter}")
  45. WScript.Sleep 100
  46. WshShell.SendKeys ("+^c")
  47. WshShell.SendKeys ("exit")
  48. WshShell.SendKeys ("{Enter}")
  49.  
  50. WScript.Sleep 100
  51. WshShell.SendKeys ("+^c")
  52. WshShell.SendKeys ("exit")
  53. WshShell.SendKeys ("{Enter}")
  54.  
  55. WScript.Quit
  56. </script>
  57. </job>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement