koffienl / ESPimatic

read/control DS18B20/DHT/IR/Relay from and to Pimatic on ESP8266
35 stars 15 forks source link

Cannot upload more than 3 files #2

Closed pasz1972 closed 8 years ago

pasz1972 commented 8 years ago

Somehow I cannot upload more than 3 files. After the 3rd file, a file is 0 bytes in size and the upload functionality is not able to receive more. Even after deleting files, the upload is not working anymore.

koffienl commented 8 years ago

Waht ESP do you have and with what settings did you compile? You need at least 1 mb flash to store te firmware and the HTML files

demlak commented 8 years ago

reflash.. first upload root.html.. oben this file in browser. there you will see how much space is left.

incmve commented 8 years ago

@demlak true but only if you flash your ESP with the correct flash size. I had the same thing, I flashed my esp-201 on 512kB but it has 1mb flash so the root.html file only sees 512KB (2 files 99% full), I changed the flash size in IDE to 1mb and flashed it again then it showed 35% full with all files.

There is an example in IDE to read out the actual flash size of you ESP CheckFlashConfig

/* 
 ESP8266 CheckFlashConfig by Markus Sattler

 This sketch tests if the EEPROM settings of the IDE match to the Hardware

 */

void setup(void) {
    Serial.begin(115200);
}

void loop() {

    uint32_t realSize = ESP.getFlashChipRealSize();
    uint32_t ideSize = ESP.getFlashChipSize();
    FlashMode_t ideMode = ESP.getFlashChipMode();

    Serial.printf("Flash real id:   %08X\n", ESP.getFlashChipId());
    Serial.printf("Flash real size: %u\n\n", realSize);

    Serial.printf("Flash ide  size: %u\n", ideSize);
    Serial.printf("Flash ide speed: %u\n", ESP.getFlashChipSpeed());
    Serial.printf("Flash ide mode:  %s\n", (ideMode == FM_QIO ? "QIO" : ideMode == FM_QOUT ? "QOUT" : ideMode == FM_DIO ? "DIO" : ideMode == FM_DOUT ? "DOUT" : "UNKNOWN"));

    if(ideSize != realSize) {
        Serial.println("Flash Chip configuration wrong!\n");
    } else {
        Serial.println("Flash Chip configuration ok.\n");
    }

    delay(5000);
}
pasz1972 commented 8 years ago

Solved. Had to select 4M (1M SPIFFS) for this board : http://cdn3.bigcommerce.com/s-vt19phz/products/2065/images/5309/ESP8266_ESP_12_Full_Evaluation_Board_from_Tronixlabs_Australia_3__92271.1421807409.1280.1280.png?c=2