Sen descrición

Andrew Chalkley af81f229fe Testing Node 6.0.0 %!s(int64=9) %!d(string=hai) anos
back-end 22bd0bd5d0 Adds response handling tests %!s(int64=9) %!d(string=hai) anos
front-end 2f112bb629 Typo %!s(int64=9) %!d(string=hai) anos
test 22bd0bd5d0 Adds response handling tests %!s(int64=9) %!d(string=hai) anos
.gitignore 59f4c4725c Updated UI %!s(int64=9) %!d(string=hai) anos
.jshintrc c99e53e452 Adds electron keywords %!s(int64=9) %!d(string=hai) anos
.travis.yml af81f229fe Testing Node 6.0.0 %!s(int64=9) %!d(string=hai) anos
README.md dfc042d186 Fixed docs %!s(int64=9) %!d(string=hai) anos
index.js 67c419dd15 Disables the debug window %!s(int64=9) %!d(string=hai) anos
package.json 260d329076 Removed dep %!s(int64=9) %!d(string=hai) anos
typings.json 5104d04c84 Available serial ports %!s(int64=9) %!d(string=hai) anos

README.md

Flasher.js

Build Status

Flasher.js is a tool to get JavaScript running natively on the Internet of Things device, ESP8266. This application runs on Windows, Mac OS X and Linux.

This tool flashes (installs) the Espruino JavaScript run time on ESP8266 EP-12 devices like the Adafruit Huzzah and Adadfruit Feather Huzzah.


Run the GUI

OS X

npm install
npm start

Windows 10

You'll need installed:

  • Visual Studio Community Edition (or better) installed with Windows 8/8.1 SDK.
  • Python 2.7

    npm install
    del node_modules\serialport\build\Release\serialport.node
    del node_modules\nslog\build\Release\nslog.node
    npm run rebuild
    npm start
    

ROM Communication

The ESP8266 is notoriously finicky about being flashed, we've done our best to abstract that for you.

Here is an example of flashing the ESP8266 with the latest Espruino build.

const log = require("./logger");

const esp = new RomComm({
    portName: "/dev/cu.SLAB_USBtoUART",
    baudRate: 115200
});

esp.open().then((result) => {
    log.info("ESP is open", result);
    esp.flashAddressFromFile(0x0000, "/path/to/binaries/boot_v1.4(b1).bin")
        .then(() => esp.flashAddressFromFile(0x1000, "/path/to/binaries/espruino_esp8266_user1.bin"))
        .then(() => esp.flashAddressFromFile(0x3FC000, "/path/to/binaries/esp_init_data_default.bin"))
        .then(() => esp.flashAddressFromFile(0x3FE000, "/path/to/binaries/blank.bin"))
        .then(() => esp.close())
        .then((result) => log.info("Flashed to latest Espruino build!", result));
}).catch((error) => {
    log.error("Oh noes!", error);
});

See also RomComm.flashAddress for passing just a buffer representation of the file.

We are using Bunyan for logging, make sure to pipe it through the parser.


Contributing

If you want to contribute to the Flasher.js clone this repo and run the following commands.

npm install
npm start