<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=ESP8266_NodeMCU_Firmware</id>
	<title>ESP8266 NodeMCU Firmware - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=ESP8266_NodeMCU_Firmware"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=ESP8266_NodeMCU_Firmware&amp;action=history"/>
	<updated>2026-06-08T17:41:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=ESP8266_NodeMCU_Firmware&amp;diff=27122&amp;oldid=prev</id>
		<title>Chao at 17:01, 18 June 2020</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=ESP8266_NodeMCU_Firmware&amp;diff=27122&amp;oldid=prev"/>
		<updated>2020-06-18T17:01:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Custom firmware ==&lt;br /&gt;
=== Online custom-build, or Docker Build ===&lt;br /&gt;
* Could run from https://nodemcu-build.com/&lt;br /&gt;
* Docker build&lt;br /&gt;
* Install docker, git clone or download nodemcu firmware from github to your user directory for example c:\users\electrodragon\&lt;br /&gt;
 git clone https://github.com/nodemcu/nodemcu-firmware.git&lt;br /&gt;
* run command to generate bin firmware file, in windows folder c:/user/hechao/nodemcu-firmware/ can not be changed, for example:&lt;br /&gt;
 docker run --rm -it -v //c/Users/electrodragon/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build&lt;br /&gt;
* run either integer or float only INTEGER or FLOAT&lt;br /&gt;
 docker run -e &amp;quot;INTEGER_ONLY=1&amp;quot; --rm -it -v //c/Users/electrodragon/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build&lt;br /&gt;
 docker run -e &amp;quot;FLOAT_ONLY=1&amp;quot; --rm -it -v //c/Users/hechao/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build&lt;br /&gt;
&lt;br /&gt;
=== Build Details ===&lt;br /&gt;
&lt;br /&gt;
==== Enable/disable Modules - user_modules.h ====&lt;br /&gt;
Edit app/include/user_modules.h and comment-out the #define statement for modules you don't need. Example:&lt;br /&gt;
 ...&lt;br /&gt;
 #define LUA_USE_MODULES_MQTT&lt;br /&gt;
 // #define LUA_USE_MODULES_COAP&lt;br /&gt;
 // #define LUA_USE_MODULES_U8G&lt;br /&gt;
 ...&lt;br /&gt;
==== board related configuration - user_config.h ====&lt;br /&gt;
Enable smart config: in file /app/include/user_config.h&lt;br /&gt;
 //#define WIFI_SMART_ENABLE&lt;br /&gt;
&lt;br /&gt;
==== version related properties - user_version.h  ====&lt;br /&gt;
 #define NODE_VERSION    &amp;quot;NodeMCU 1.5.4.1 - custom build by electrodragon.com&amp;quot;&lt;br /&gt;
 #ifndef BUILD_DATE  &lt;br /&gt;
 #define BUILD_DATE        &amp;quot;2016-09-23&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Flashing details ===&lt;br /&gt;
* Need to flash nodemcu firmware and your code bin firmware now together into target device&lt;br /&gt;
* calculate your nodemcu firmware size for the code bin firmware address first, for example: &lt;br /&gt;
#  use the nodemcu firmware, size on disk as below:&lt;br /&gt;
[[File:Nodemcu size on disc.png|300px]]&lt;br /&gt;
# so the bits size is: 408KB + 4KB =412 KB, 412 KB*1024 = 421888, change from dec to hex by using &amp;quot;calculator&amp;quot; you get 67000&lt;br /&gt;
# so for the two firmware, the upload address should be:&lt;br /&gt;
 0x00000 for nodemcu firmware bin&lt;br /&gt;
 and 0x67000 for your code firmware bin&lt;br /&gt;
# Finally use esp download tool, combine bin function to combine the two bin files&lt;br /&gt;
[[File:Spiffy combine.png|300px]]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=LC9ooO3opBE Reference youtube tutorial]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Custom Lua to Bin file by Using SPIFFY ===&lt;br /&gt;
* The following methods has too many bugs, main file spiffs also obsoleted, better do not use&lt;br /&gt;
* Reference: [https://github.com/DiUS/spiffsimg spiffimg] and [https://github.com/xlfe/spiffy spiffy] use [https://github.com/pellepl/spiffs spiffs] as core file&lt;br /&gt;
==== Setup ====&lt;br /&gt;
* [[ESP8266_Lubuntu_SDK|Setup the Lubuntu environment]] and copy [https://github.com/nodemcu/nodemcu-firmware nodemcu firmware] into &amp;quot;share&amp;quot; folder&lt;br /&gt;
* [https://github.com/xlfe/spiffy Find spiffy git here], download and copy all the file to nodemcu SDK &amp;gt; spiffy folder, so total directly should be look like:&lt;br /&gt;
 /home/esp8266/Share/nodemcu-firmware-master/spiffy&lt;br /&gt;
* in spiffy folder, create build and run make, a few files will be generated into build folder&lt;br /&gt;
* create files folder, files to store lua file like init.lua   print (&amp;quot;Hello&amp;quot;)&lt;br /&gt;
* run spiffy to build the rom, before this, you may need delete file &amp;quot;spiff_rom.bin&amp;quot; first, this is the generated bin file&lt;br /&gt;
 ./build/spiffy&lt;br /&gt;
* Open file spiff_rom.bin by ultraedit can see the original codes&lt;br /&gt;
* If the file large than 16K should edit main.c to change this:&lt;br /&gt;
 4*4*1024 = 16K, can change to 8*4*1024 = 32K&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category: NodeMCU]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>