Code Monkey home page Code Monkey logo

spiffy's Introduction

spiffy

No longer maintained. Please see forks for other repos!

Build a spiffs file system binary for embedding/writing onto the nodemcu ESP8266 spiffs file system

What is it

spiffy builds a binary spiffs image for you to write_flash to a esp8266 runing nodemcu so you can get all the files onto your cool IoT device in one fell swoop.

usage

Clone the repo and build spiffy

git clone https://github.com/xlfe/spiffy.git
cd spiffy
mkdir build
make

create a folder with the files you'd like to embed

mkdir files

and add your lua scripts, etc to ./files/

run spiffy to build the rom

$ ./build/spiffy
Creating rom spiff_rom.bin of size 16384 bytes
Adding files in directory files
init.lua added to spiffs (66 bytes)
$ ll *.bin
-rw-rw-r-- 1 build build 16384 Jan  1 21:00 spiff_rom.bin

NB: The default rom size is 16k - you can edit main.c to change this

burn your rom to the esp device

Thanks for the info The offset for spiffs file system:

  • eagle.app.v6.flash.bin: 0x00000~len( eagle.app.v6.flash.bin )
  • eagle.app.v6.irom0text.bin: 0x10000~0x10000 + len( eagle.app.v6.irom0text.bin )
  • spiffs_embed.bin: (0x10000 + lengthof(iromtext) + 0x4000) & (0xFFFFC000)
  • Ie: next to the irom0text.bin, but aligned to 4 * 4096 Bytes (0x4000).

For example:

uild@build:/opt/Espressif/nodemcu-firmware/bin$ ll
drwxrwxr-x  3 build build   4096 Dec 31 16:38 .
drwxrwxr-x 17 build build   4096 Jan  1 20:23 ..
-rw-rw-r--  1 build build  52064 Dec 31 16:25 eagle.app.v6.flash.bin
-rwxrwxr-x  1 build build 293568 Dec 31 16:25 eagle.app.v6.irom0text.bin

So to burn my image I would run:

esptool.py --port /dev/ttyUSB0 write_flash STARTADDR ../../spiffy/spiff_rom.bin
  • Ie: STARTADDR = (0x10000 + lengthof(iromtext) + 0x4000) & (0xFFFFC000)

Done!

spiffy's People

Contributors

xlfe avatar adiea avatar ajaybhargav avatar polkabana avatar vowstar avatar

Watchers

James Cloos avatar Maya Posch avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.