       if !firmware
         firmware = files[0]
       console.log 'Flash', firmware
+
+      if atom.config.get('spark-ide.deleteFirmwareAfterFlash')
+        fs.unlink firmware
     else
       # If multiple firmware, show select
       @initView 'select-firmware-view'


  serialize: ->

  initView: (name) ->
    _s ?= require 'underscore.string'
    className = ''

    fs ?= require 'fs-plus'
    utilities ?= require './vendor/utilities'

    rootPath = atom.project.getPath()
    files = fs.listSync(rootPath)
    files = files.filter (file) ->
