Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Alex_S
#6953
ihouses wrote:Looking at the schematic for connecting the board to the USB to serial converter I see that GPIO5 and GPIO0 are needed, but in my board there are only GPIO2 and GPIO0. Is it OK connect GPIO2 instead of GPIO5?

You can try pin CHIP_EN instead of RESET (GPIO5). I checked it with rev.ESP-03.
User avatar
By CHERTS
#6971
Alex_S wrote:
CHERTS wrote:
alonewolfx2 wrote:can we use make htmlflash in esphttp example?


File webpages.espfs (htmlflash) can only be done under linux, utility mkespfsimage for windows is working not correctly.
I tried to compile it in Visual Studio 2012 project is located in the directory C:\Espressif\examples\esphttpd\mkespfsimage_vs2012 or attachment, but the utility creates an invalid webpages.espfs
You can view the source code and may be able to find the error and correct it.

The resulting file is corrupted because stdout stream has TEXT mode. As result - it adds "\r\n" line endings instead of "\n".
The binary mode of stdout stream can be set by the "setmode" command:
_setmode( _fileno( stdout ), _O_BINARY );
If you will add this command to the main() function - the utility will provide correct file system image. So it is working for windows too!
Thanks!


Thank Alex_S, mkespfsimage.exe now works correctly.
In an attachment, a working project esphttpd, for the purpose of assembly, follow target all, flash and htmlflash. Configuring wi-fi in the file include\user_config.h
You do not have the required permissions to view the files attached to this post.
User avatar
By dnts
#6988 Great! Finally I can compile the server files! one thing I did modify in the makefile is force it to regenerate the html file system:

Code: Select allhtmlflash: webpages.espfs
   rm -f webpages.espfs
   cd html; find | ../mkespfsimage/mkespfsimage.exe > ../webpages.espfs; cd ..
   if [ $$(stat -c '%s' webpages.espfs) -gt $$(( 0x2E000 )) ]; then echo "webpages.espfs too big!"; false; fi
   $(ESPTOOL) -p $(ESPPORT) write_flash 0x12000 webpages.espfs


Now I can make incremental changes and flash them.
User avatar
By CHERTS
#7038
dnts wrote:Great! Finally I can compile the server files! one thing I did modify in the makefile is force it to regenerate the html file system:
Code: Select allhtmlflash: webpages.espfs
   rm -f webpages.espfs
   cd html; find | ../mkespfsimage/mkespfsimage.exe > ../webpages.espfs; cd ..
   if [ $$(stat -c '%s' webpages.espfs) -gt $$(( 0x2E000 )) ]; then echo "webpages.espfs too big!"; false; fi
   $(ESPTOOL) -p $(ESPPORT) write_flash 0x12000 webpages.espfs

Now I can make incremental changes and flash them.


Your code is incorrect when running target htmlflash first start will be target webpages.espfs, so it makes no sense to duplicate code.

Code: Select allwebpages.espfs:
   cd html; find | ../mkespfsimage/mkespfsimage.exe > ../webpages.espfs; cd ..

htmlflash: webpages.espfs
   if [ $$(stat -c '%s' webpages.espfs) -gt $$(( 0x2E000 )) ]; then echo "webpages.espfs too big!"; false; fi
   $(ESPTOOL) -p $(ESPPORT) write_flash 0x12000 webpages.espfs