nodemcujs / nodemcujs-firmware

A real JavaScript based interactive firmware for ESP32.
MIT License
55 stars 7 forks source link

can not read index.js #1

Open weixiongmei opened 5 years ago

weixiongmei commented 5 years ago

This is ESP32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB external flash Partition size: total: 1860161, used: 2008

List of Directory [/spiffs/]

T Size Date/Time Name

f 609 03/01/1970 06:36 index.js f 140 31/12/1969 05:47 b.js f 135 31/12/1969 05:47 a.js

    884 in 3 file(s)

SPIFFS: free 1814 KB of 1816 KB

file: "/spiffs/index.js" Error reading from file

I (1559) uart: queue free spaces: 20 V (1559) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args V (1559) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE D (1559) intr_alloc: Connected src 34 to int 13 (cpu 0) Error: failed to read file: /spiffs/index.js Error: failed to read file: /spiffs/index.js No such file: /spiffs/index.js

LanFly commented 5 years ago

you should rebuild mkspiffs tools with CPPFLAGS="-DSPIFFS_OBJ_META_LEN=4". And then rebuild your spiffs.bin with newer mkspiffs.

checkout your mkspiffs version:

mkspiffs --version

It should be look like this:

mkspiffs ver. 0.2.3-6-g983970e
Build configuration name: generic
SPIFFS ver. 0.3.7-5-gf5e26c4
Extra build flags: -DSPIFFS_OBJ_META_LEN=4
SPIFFS configuration:
  SPIFFS_OBJ_NAME_LEN: 32
  SPIFFS_OBJ_META_LEN: 4
  SPIFFS_USE_MAGIC: 1
  SPIFFS_USE_MAGIC_LENGTH: 1
  SPIFFS_ALIGNED_OBJECT_INDEX_TABLES: 0

SPIFFS_OBJ_META_LEN: 4