I thînk you are creating a firmware to large to fit on the board.
Which modules get applied is controlled in the .py board file. Since you are have a 4mb module, you should use the esp8266_4mb firmware which also needs to be flashed a certain way.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I thînk you are creating a firmware to large to fit on the board.
Which modules get applied is controlled in the .py board file. Since you are have a 4mb module, you should use the esp8266_4mb firmware which also needs to be flashed a certain way.
See here- the flash size parameter
http://www.espruino.com/EspruinoESP8266