• Hi!

    In a project I'm currently working on I need to update the current program on many Espruino boards. The Espruino IDE is very good, but because of what I presume is a Chrome-related bug I'm having unstable results when unplugging/replugging boards at the frequency I do.

    So, I made a quick solution for working with Sublime Text.
    Follow the instructions:

    Get the EspruinoUploader.exe. Either check out the project https://github.com/AlexanderBrevig/Subli­meTextEspruinoUploader or download the attached EspruinoUploader.exe.

    In Sublime Text go Tools -> Build System -> New Build System

    Paste this code (replace YOUR/PATH/TO with the actual path)

    {
    	"cmd": "C:/YOUR/PATH/TO/EspruinoUploader.exe $file_extension 9800 $file",
      	"working_dir": "$project_path",
    }
    

    Locate or create C:\Users\USER\AppData\Roaming\Sublime Text 3\Packages\User\JavaScript.sublime-setti­ngs and paste this (replace USER with the correct username for your Users folder).

    {
    	"extensions":
    	[
    		"com3",
    		"com4",
    		"com5",
    		"com6",
    		"com7",
    		"com8" //just continue for how many you need
    	]
    }
    

    Maybe you'll have a master on COM4 and a slave on COM5, then name your files master.com4 and slave.com5.

    Shut down Sublime Text, now open and navigate to master.com4 (make sure your Espruino is connected to COM4)

    Select Tools -> Build System -> espruino and hit Ctrl + Shift + B

    SUCCESS!

    One slight annoyance is if you want the same code uploaded to many different COM ports. Currently I use a simple Node.js file watcher thingy that simply writes the contents of one file to the others.
    I've not decided how to fix that. Any ideas?


    1 Attachment

About