Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Unable to build for ESP Wroom 02

edited October 23 in Mongoose OS

Hi there,

I've got a problem during building the firmware for the esp wroom 02 with 2 MB Flash Size. I think I have watched through all related forum articels and questions, but unfortunately with no result.

--Show what you do to achieve the goal - the code, commands, etc

First, when I am using the Web UI and select the 2MB demo.c file the build and flash process works as expected, but when I am using the console and an other/ or also the demo it's not building for the 2MB Size.

1.I've tried adding:

build_vars:
FLASH_SIZE: 2097152

in the mos.yml file --> result: Error: /go/src/cesanta.com/mos/flash/esp/flasher/flash.go:203: Image 4096 @ 0x3fb000 will not fit in flash (size 2097152)

  1. Tried to change the makefile. build like desribed in this question: https://forum.mongoose-os.com/discussion/1108/how-to-change-spiffs-size-fs-size, but get the same result.

  2. Tried the whole for local and remote build. And also with an empty and demo files.

--Show the result you see - logs, output, observed behavior

when building I think it's always builds for the 4MB version. When I look under build/fw.zip ... the fs.bin file always have a size of 256KB.

The result by the flashing process is always:

Opening COM4 @ 115200...
Connecting to ESP8266 ROM, attempt 1 of 10...
  Connected, chip: ESP8266EX
Running flasher @ 0...
  Flasher is running
Flash size: 2097152, params: 0x0230 (dio,16m,40m)
Error: /go/src/cesanta.com/mos/flash/esp/flasher/flash.go:203: Image 4096 @ 0x3fb000 will not fit in flash (size 2097152)
/go/src/cesanta.com/mos/flash/esp/flasher/flash.go:92:
/go/src/cesanta.com/mos/flash.go:157:
/go/src/cesanta.com/mos/main.go:164:

--Describe the result you expect

[Oct 23 14:51:29.411] Opening COM4 @ 115200...
[Oct 23 14:51:29.553] Connecting to ESP8266 ROM, attempt 1 of 10...
[Oct 23 14:51:29.931]   Connected, chip: ESP8266EX
[Oct 23 14:51:29.931] Running flasher @ 0...
[Oct 23 14:51:31.027]   Flasher is running
[Oct 23 14:51:31.029] Flash size: 2097152, params: 0x0230 (dio,16m,40m)
[Oct 23 14:51:31.032] Deduping...
[Oct 23 14:51:31.040]      2320 @ 0x0 -> 0
[Oct 23 14:51:31.754]    731808 @ 0x8000 -> 0
[Oct 23 14:51:31.883]    131072 @ 0xdb000 -> 0
[Oct 23 14:51:31.897]       128 @ 0x1fc000 -> 0
[Oct 23 14:51:31.898] Writing...
[Oct 23 14:51:31.898]      4096 @ 0x7000
[Oct 23 14:51:31.954]      4096 @ 0x1fb000
[Oct 23 14:51:32.013] Wrote 8192 bytes in 0.12 seconds (553.68 KBit/sec)
[Oct 23 14:51:32.013] Verifying...
[Oct 23 14:51:32.013]      2320 @ 0x0
[Oct 23 14:51:32.018]      4096 @ 0x7000
[Oct 23 14:51:32.024]    731808 @ 0x8000
[Oct 23 14:51:32.347]    131072 @ 0xdb000
[Oct 23 14:51:32.408]      4096 @ 0x1fb000
[Oct 23 14:51:32.414]       128 @ 0x1fc000
[Oct 23 14:51:32.418] Booting firmware...
[Oct 23 14:51:32.473] All done!

Did anyone have an idea, what I am doing wrong, when trying to build the firmware for a 2MB chip?

Thank's in advance

Comments

  • nliviunliviu Romania

    Using a 4M chip and building/flashing for 2M works for me:

    build_vars:
      FLASH_SIZE: 2097152
    

    You can also mos build --platform esp8266 --build-var FLASH_SIZE=2097152 --clean instead of adding the build_vars in mos.yml.

    Content of fw.zip

    -rw-r--r-- 1 *** *** 735904 Oct 23 14:39 demo-c.bin
    -rw-r--r-- 1 *** ***    128 Oct 23 14:39 esp_init_data_default_v08.bin
    -rw-r--r-- 1 *** *** 131072 Oct 23 14:39 fs.bin
    -rw------- 1 *** ***   1163 Oct 23 14:39 manifest.json
    -rw-r--r-- 1 *** ***   2320 Oct 23 14:39 rboot.bin
    

    Flash for 2M:

    mos flash --esp-flash-params dio,16m,40m
    Loaded demo-c/esp8266 version 1.0 (20181023-143951)
    Using port /dev/ttyUSB1
    Opening /dev/ttyUSB1 @ 115200...
    Connecting to ESP8266 ROM, attempt 1 of 10...
      Connected, chip: ESP8266EX
    Running flasher @ 0...
      Flasher is running
    Flash size: 2097152, params: 0x0230 (dio,16m,40m)
    Deduping...
         2320 @ 0x0 -> 0
       131072 @ 0xdb000 -> 8192
          128 @ 0x1fc000 -> 0
    Writing...
         4096 @ 0x7000
       737280 @ 0x8000
         8192 @ 0xe0000
         4096 @ 0x1fb000
    Wrote 752288 bytes in 47.72 seconds (123.17 KBit/sec)
    Verifying...
         2320 @ 0x0
         4096 @ 0x7000
       735904 @ 0x8000
       131072 @ 0xdb000
         4096 @ 0x1fb000
          128 @ 0x1fc000
    Booting firmware...
    All done!
    
  • Thank You for Your answer.

    I managed it with the new version of mos(2.7) and the command mos build --platform esp8266 --build-var FLASH_SIZE=2097152 --clean

    With the build vars in mos.yml it's still not working.

    Thank You, and best regards

Sign In or Register to comment.