Introduction: Blink for ESP8266 Native, Like Arduino Using Windows

Picture of Blink for ESP8266 Native, Like Arduino Using Windows

When I bougth the ESP8266, my first thought was to use ESP8266 as a Wifi shield for Arduino. I found out that the ESP8266 is a powerfull device by it self. And I asked myself. Why not use this device without using an arduino. This cheap (3 US$) device is more powerfull than an Arduino UNO, got more memory (4000Kb versus 32Kb), higher clock speed (80Mhz versus vs 16Mhz) and 9 GPIO pins in version ESP-12

This instructables is for everyone that is using an Arduino and would like to go for the next level by using the ESP8266 native, without an Arduino. We are going to develop direct on te ESP8266.

So let's give its a try.

Shopping list

1) ESP8266 ( I have bought a the version ESP-12, there are several versions,
Any will do ESP-01 is the most common)) for example on aliexpress
2) USB to TTL with 3.3 volt output. (or you can use your Arduino UNO) for example on aliexpress
3) a led
4) a resistor 1K

Disclaimer

Be aware that developing for ESP8266 isn't as easy as developing for Arduino. The ESP8266 is since autumn 2014 on the market. The SDK has not achieved the 1.00 version. (at writing, the latest version is. v0.9.5). This device is using the powersource of 3.3Volt and can be damaged quite easily. Having this said, a lot of sites talks about this but on my on experience I have not seen any smoke yet. Most of the examples found on the web are created by guru's using Linux (ubuntu). I assume most of the Arduino users uses Windows, like I do.

My personal goal for this Instructable is to share all my pitfalls so that you would not have the same issues.

I will go from unboxing until the end. You may skip some steps.

Step 1 Hardware setup
Step 2 Upload the latest firmware.
Step 3 Install development environment (this is the hard part)
Step 4 Compile blink
Step 5 Upload blink
Step 6 Wiring the led
Step 7 Pitfalls & httpd

Step 1: Hardware Setup & Serial Communication

Picture of Hardware Setup & Serial Communication

If you made already a terminal connection than you can skip this step.

USB TTL <--> ESP8266 ESP-01

VCC -- VCC
GND -- GND
TX -- RX
RX -- TX
VCC -- CH_PD

This is wiring in normal (operational) mode.


When you connect your USB cable to the computer, a new com port will be available in a terminal emulator.
I prefer to use the serial monitor in the Arduino environment.
Open the arduino environment and select the com port from your USB TTL, In my case this is COM10
Open the serial monitor from the tools menu and set the communication to 115200 baud. Don't forget to set the key emulation to "Both NL & CR".

Try to send the following command: AT+RST
It will reset your ESP8266 and send some info back to serial monitor.

If this doen't work, do not go to the next step.
If you have seen any response, but unreadable. This can be correct. After a reset, the ESP6288 sends information with a strange baudrate, ignore that. If it doesn't react the command AT+RST it could be that you have to switch to baudrate 9600 or check the cables.
Don't forget that your TX should be connected to RX and RX should be connected to TX.

Step 2: Upload Latest Firmware & SDK

Picture of Upload Latest Firmware & SDK

The ESP6288 is new on the market since autumn 2014 with a couple of new versions of the firmware.
Actually the latest version is still a sort of beta version version (0.9.5.). But don't worry it is stable.
The latest esp_iot_sdk_v0.9.5_15_01_23 can be downloaded from bbs.espressif.com
If you have this version already on your ESP8266, just skip this step. Extract the zipfile (for example to c:\projects\ESP8266\)

First I struggled with uploading software to ESP8288. All the examples are using command examples using phyton. fortunately I found a good alternative. There is an easy solution available for Windows OS named ESPflasher from NodeMCU. The goal for those guys is to upload NodeMCU as an alternative firmware. But it works also very good for uploading standard firmware and our blink 'sketch'.
Just download it from here https://github.com/nodemcu/nodemcu-flasher . Github will download everything to one zip file. I use only ESP8266Flasher.exe from it. Nothing else.

run ESP8266Flasher.exe and select the second tab "Config"
Select from the esp_iot_sdk_v0.9.5 directory 4 files, and change the offset
c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\boot_v1.2.bin 0x00000
c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\at\user1.512.new.bin 0x01000
c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\blank.bin 0x3e000
c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\blank.bin 0x7e000

Yes you are right! The blank.bin will be uploaded twice.

Select in the Operation tab the your COM port, (In my example it is COM10).
Do not press flash yet!
Connect GPIO_0 to GND with a wire (or even better, with a resistor).
Reset the device. The device is now in flash mode.
Press the button flash in ESPFlasher and wait until its ready.
Remove the wire from GPIO_0 to GND. And reset the device.

That's it for firmware, let's check!
We are on version 0.9.5. Now, so for sure we should set the baudrate to 115200
Open again the serial monitor (in Arduino) and reset the device.
You will see on the first line some crazy tekst. Don't worry, this is normal. As long as it end with the text "ready".
Send the command AT+GMR and you will have the response:
AT+GMR
AT version:0.21.0.0
SDK version:0.9.5
OK
As you can see, we are on version 0.9.5

Step 3: Setup Toolchain in Windows (the Hardpart)

Picture of Setup Toolchain in Windows (the Hardpart)

Let's hope the previous steps were considered as easy.
This will be the hard part.
In Arduino we just press the button "Verify" and the compiler does his work.
Sorry for that. This is not the case for ESP8266. And certainly not for a computer running on windows.
First we have to download the compiler.
The compiler is named xtensa-lx106-elf-141114.7z and can be downloaded from https://drive.google.com/folderview?id=0BzWyTGWIwcYQendHbWlsNUZpX0E&usp=drive_web#list here. It is from a guy named mobyfab. 7z is a zipped file. I used WinZip to extract. Extract this to the directory xtensa-lx106-elf. I use c:\projects\ESP8266\xtensa-lx106-elf for this. (it is compiled for a 64 bit computer, I assume you are running a 64 bit)

Each example has several steps, like building and compiling. Each program has its own script for that. this is called a Makefile. You will find the makefiles in almost every directory Under Linux it is standard peace of software. For Windows we have to install make.exe first.

Download the installer from here https://www.cygwin.com
I have installed, the installer in c:\cygwin\
Run setup-x86.exe and select "make"

Press next until you see the screen select packages. fill in the field "Search" the word "make". (see screenshot)
Expand Devel and select the second last called "Make: The GNU version of the 'make' utility".
It is possible to switch between different versions. (Use the version 4.0-2 the version 4.1-1 could result in a dll error.)
Press next until you are finished.

In other toolchain examples they pointed out to have python. I think it is not needed.

Download esptool.exe, you may find a copy here: https://github.com/JeroenBeemster/ESP8266-Blink

copy this file to c:\cygwin\bin (or the place where you have installed cygwin). A path to this directory has been made by installing cygwin. So we (mis)use this :)



Step 4: Make Blink (compile the Example)

Picture of Make Blink (compile the Example)

Download the example from github

https://github.com/JeroenBeemster/ESP8266-Blink

Open the file Makefile. (I use Notepad++ for this)
Change the following lines:
XTENSA_TOOLS_ROOT ?= C:/projects/esp8266/xtensa-lx106-elf/bin
SDK_BASE ?= C:/Projects/ESP8266/esp_iot_sdk_v0.9.5

Change these two lines to the place where you have saved the elf-compiler and the SDK in step 3 and 2.
Be aware that the forwardslash (/) must be a forward slash. A a backslash (\) will not work.

Run ESPMake.bat
This batch run's Make.exe that will execute the commands in the Makefile.
Two new directories will be created. These directories are "build" and "firmware".
You may remove these directories, For example, if you would like to re-compile the solution again.

If the following 2 files are created, we have achieved this step.
firmware\0x00000.bin
firmware\0x40000.bin
This is a milestone. If we are here, the next step are easy.

Step 5: Upload the Program to ESP8266

Picture of Upload the Program to ESP8266

Select the files in the sub-directory \firmware

run ESP8266Flasher.exe and select the second tab "Config"
Select from the firmware directory 2 files, and change the offset
firmware\0x00000.bin
firmware\0x40000.bin

Select in the Operation tab the your COM port, (In my example it is COM10).
Do not press flash yet!
Connect GPIO_0 to GND with a wire (or even better, with a resistor).
Reset the device. The device is now in flash mode.
Press the button flash in ESPFlasher and wait until its ready.
Remove the wire from GPIO_0 to GND. And reset the device.

As you can see these are the same steps as uploading the firmware.
BTW it is not possible to send AT commands to your ESP8266. If you would like to restore to factory settings. Just redo step-2

Step 6: Wiring the Led

Picture of Wiring the Led

Connect the led to GPIO-2 with a resistor (I used 1K resistor).
Connect the resistor to ground.
Connect ESP8266 to a powersource. I use the TTL as the powersource.
There are a lot of information on the internet that warns you to use a powersource that can not deliver enough power. Until now I have not found any problems with this. May be I am just lucky.
Let's hope you are also.

Your led should blink now. We have achieved the goal.

Step 7: Pitfalls / Httpd

1) makefile
Only use forwardslash, never use backslach in makefiles
c:\projects\esp8266 doesn't work
c:/project/esp8266 does.

2) when there is a "find" command in makefile, be aware there is also a windows command named find.
solution is quite simple, add the full path:
change: find
into: c:\cygwin\bin\find

3) I have used cygwin86.exe. It seems that some computers only run on cygwinx86.exe
This file has to be in the bin directory.

4) Example httpd

When you download httpd from github got a library in a subdirectory httpd\lib\heatshrink\ that seems to be empty. Go back to github and download this separate.

5) Example httpd
Trying to compile mkespfsimage c:\cygwin has to be added with the following cgg compiler.

Comments

FabricioN3 (author)2017-09-04

Thanks for this tutorial! I have a question. Why this first example (blink) is creating an access point in ESP8266? Is it expected?

KeyshavM (author)2016-10-17

Can I use the ESP8266 SDK API on TI TM4C123G LaunchPad, and using it to communicate with esp8266 over UART?

Mahesh227 (author)2016-07-06

Hi, Running this command

C:\projects\ESP8266\Blink>make.exe

AR build/blink_app.a

LD build/blink.out

C:/projects/ESP8266/esp_iot_sdk_v0.9.5/lib\libmain

dt_init':

(.irom0.text+0x3a8): undefined reference to `user_

C:/projects/ESP8266/esp_iot_sdk_v0.9.5/lib\libmain

dt_init':

(.irom0.text+0x527): undefined reference to `user_

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:114: build/blink.out] Error 1.

Besides that error why i'm not getting CC user/user_main.c.

Could you please clarify.

Mahesh227 (author)2016-07-06

Hi, Running this command

C:\projects\ESP8266\Blink>make.exe

AR build/blink_app.a

LD build/blink.out

C:/projects/ESP8266/esp_iot_sdk_v0.9.5/lib\libmain

dt_init':

(.irom0.text+0x3a8): undefined reference to `user_

C:/projects/ESP8266/esp_iot_sdk_v0.9.5/lib\libmain

dt_init':

(.irom0.text+0x527): undefined reference to `user_

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:114: build/blink.out] Error 1.

Besides that error why i'm not getting CC user/user_main.c.

Could you please clarify.

kc2ipx (author)2016-05-29

So far everything has worked very good but when I run makefile.bat this is what I get.

When I downloaded gcc make the only choice was 4.1.1 or 4.2.0. I chose 4.2.0. I am

using win 10 with the latest updates. I hope there is something you can tell me to fix

this. I am as far as I know hot to go. Thanks Dave

C:\projects\ESP8266\ESP8266-Blink-master\ESP8266-Blink-master>make.exe

3 [main] make 8424 child_info_fork::abort: C:\cygwin\bin\cygcrypt-0.dll: Loaded to different address: parent(0x67700000) != child(0x190000)

make: fork: Resource temporarily unavailable

C:\projects\ESP8266\ESP8266-Blink-master\ESP8266-Blink-master>pause

Press any key to continue . . .

inotsure (author)2016-03-27

Hi

i am beginner to programming. Encounter an issue while following the steps.

i done flashing the firmware(step 2) and the log said that everything is successful but i could not send command to it anymore.

When i send AT+RST or anything, no reply. it works before i upload the firmware.

it still allow me to reupload the firmware but that is no changes.

i tried upload with resistor and without. still no changes.

Sudipta KrC (author)2016-03-17

I am using Windows 8.1. In the step 4, It is failing to create the .bin files at the end. I tried executing the ESPtool.exe. It is giving incompatiability error.

Any idea if we have a 64 bit version of this ESPtool.exe somewhere ?

S.PRAVEENS (author)2016-03-10

Hi
Could u please help how to interface esp8266 and arduino codes
Programming tool ::arduino
Os:::windows 8

LuchoBecerra (author)S.PRAVEENS2016-03-11

If you planing on use Arduino IDE to program your ESP8266, you should give esp8266/Arduino a look

for native development on windows I recommend Unofficial Development Kit for Espressif ESP8266

foad62 (author)2015-11-23

Hi,

Thank you for your tutorial.

I followed every step discussed above however I get the following error:

C:\projects\Example File\ESP8266-Blink-master>make.exe

CC user/user_main.c

C:/projects/ESP8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc:

66/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc: cannot execute bi

Makefile:142: recipe for target 'build/user/user_main.o' failed

make: *** [build/user/user_main.o] Error 126

C:\projects\Example File\ESP8266-Blink-master>pause

Press any key to continue . . .

shivayla (author)2015-11-02

Hi ,

Good steps and helpfull to discover about ESP8266,One thing i need to clarify after i installing the software and runs the command prompt,the command prompt says,

C:\Projects\esp8266\ESP8266-Blink-master>make.exe

'make.exe' is not recognized as an internal or external command,

operable program or batch file.

Thank you...

MoesLab (author)2015-10-15

Hi Thanks for awesome tutorial,

I came along all the way till compiling step,

the batch file can not find make.exe

'make.exe' is not recognized as an internal or external command,

operable program or batch file.

How can I solve this issue?

AmeenN (author)MoesLab2015-10-16

Just add c:\cygwin\bin to PATH, from Advanced System Settings -> Environment Variables.

MoesLab (author)AmeenN2015-10-18

AmeenN thanks for reply now I have another problem running batch file

c:\ESP8266\ESP8266-Blink-master>make.exe

CC user/user_main.c

AR build/blink_app.a

LD build/blink.out

FW firmware/0x00000.bin

Makefile:105: recipe for target 'firmware/0x00000.bin' failed

make: *** [firmware/0x00000.bin] Error 127

please help

AmeenN (author)MoesLab2015-10-19

I expect that you have installed 64bit version of cygwin, if that's the case just remove it and install 32 bit version even if your Windows version is 64.

DonDavio (author)2015-10-17

Thanks for this demo. Is there a way to view the debugging messages in the source code (i.e. the calls to os_printf)? Which GPIO pin would these be transmitted on?

I'll reiterate what has been said below - you MUST use the 32-bit version of Cygwin (setup-x86.exe). The x64 version causes a compilation error - "Makefile:105: recipe for target 'firmware/0x00000.bin' failed".

DonDavio (author)DonDavio2015-10-17

Never mind - I just realised these messages are being transmitted on the normal TX pin. For some reason I thought debugging had to happen on a different pin than flashing!

PadraicM (author)2015-09-24

Great tutorial. Two points to make - the NodeMCU flasher tool isn't very clear about what it will download - on the Config screen, there's a TINY little check-box on each line that needs to be checked for each firmware file. That's why folks are having 'Fatal Exception' problems, because by default only the first line is checked (0x00000). There's also a hint in the status area at the bottom of the screen - it shows the address and size of the currently loading file, which should match the size of the firmware file on disk.

Also, I found that I had to disconnect the LED to reboot the ESP8266 - and then connect it once the chip was up and running (garbage in the serial monitor and no flashing LED). Checking the datasheet, I noticed that the max drive current for a GPIO pin is 12mA. Normally these MCUs can sink more current than they can source, so I suggest changing the LED to active low - in other words, connect the LED/resistor combination between VCC and the GPIO pin, not between GPIO and GND. Now it works perfectly.

Fyi I'm using a red LED with a 330-ohm resistor.

nkn137 (author)2015-09-07

i followed the tutorial and got through all the steps with minimum dificulty. The problem is that when im done with flashing the blink example [step5] the led does not blink. Any idea why?

thetootoon (author)2015-07-21

I followed the tutorial step by step and it all seems ok, build ends with no error. But when I remove flash mode jumper and reset my device I get this on serial port (at 74600) :

Fatal exception (0):

epc1=0x4024058c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x0

Any idea ?

bbass408 (author)thetootoon2015-08-13

I also got this error when trying to run the 8266 on a breadboard power supply using the power plug (not the usb plug) to power it. I switched to USB input to the PS and it all worked fine.

thetootoon (author)thetootoon2015-07-21

I was using FTDI cable 3V3 which uses 3.3 levels but outputs 5V. Anyway I add a 3.3V converter and use a brand new ESP to be sure that it was not corrupted. Now no more Fatal exception but no blink and nothing on serial...

ThorstenR (author)2015-07-23

Hi!

Don't know what I did wrong. But I cannot upgrade/downgrade to an firmware other than the original. After flashing with ESPflasher my ESP8266-01 won't boot. It works if I install a "all in one" firmware file. But using the single files from i.e "esp_iot_sdk_v1.2.0" will lead into a bricked ESP. :(

cybericius (author)2015-07-13

Hi,

Any advice on why the flashing stops at around 0x9000 and 0xD000 blocks? Tried to split the binary into 16K chunks, so I can see which blocks are the ones where it stops by increasing the memory address target for each chunk by 0x4000. For all the rest it is working, connections are proper for sure. Using an external MB102 as a power supply and an FT232RL FTDI Module as a serial-to-USB module.

Thanks.

William RobertoS (author)2015-07-01

I am unable to update the firmware ESP8266 am currently in version AT + GMR = 0018000902 What Configuring Advanced tab in the flasher software?

Log tab in the message :
Note : Detect serial port changed.
Note : Auto MAP serial port.Port -> COM15

Note : Serial port connected .
Note : Begin find ESP8266 .

slarti.fartfast (author)2015-06-18

You might want to check all the typing - e.g. you call the ESP8266 a "6288" and "8288"!

AbdullbasitA (author)2015-05-22

Good tutorial Thank you .

BTW, It's 512K Flash not 4000

Blunderer (author)2015-05-08

I used following tools and that made it much easier :

For flashing use ESPflasher

For uploading/compiling the codes use this IDE , it works for both "lua" and "AT" command based firmware and much easier to use. Simply type the program in a text file and change the extension from ".txt" to ".lua" for upload or use the programming window inside the ESPlorer IDE. There are a lot of examples available based on lua and can be tweaked ass per one's requirement.

Note: I am just a beginner and thought of sharing what I did.

jbeemster (author)2015-03-06

Make.exe should be available, (normally installed c:\cygwin\bin)
See retry step three.

B0SC0 (author)jbeemster2015-03-07

Okay, now I am almost there.

If I run cmd.exe I cannot make or run ESPMake.bat

I get:

"C:\projects\ESP8266-Blink-master>make.exe
'make.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\projects\ESP8266-Blink-master>pause
Press any key to continue . . ."

However, if I run it in Cygwin64 I get this:

"Makefile:105: recipe for target 'firmware/0x00000.bin' failed
make: *** [firmware/0x00000.bin] Error 127"

I get both folders - build and firmware, but nothing in firmware.

I tried what you suggested for frujin.

"esptool.exe -eo build/blink.out -bo firmware/0x00000.bin -bs .text -bs .data -bs .rodata -bc -ec"

It ran but didn't change anything.

Any suggestions?

nicoEE (author)B0SC02015-04-03

I literally spent all day with the same problem and finally got it working.

Forget about cygwin64 or cygwinx86-x64. You gotta use cygwinx86. (and remember to put esptool.exe in its respective /bin folder)

Hopefully the author of this wonderful article edits it to make note of this!...

jbeemster (author)B0SC02015-03-08

I think you have installed cygwin64 with the option to ONLY to be runned within cygwin64. When you reinstall, you will find the question to have cygwin to be able to run outside cygwin. I guess you do not have c:\cygwin64\bin in your path. [you may check this by run a dos prompt and type the command path]
My recommendation: Better focus on the question above. before continue with esptool.exe .

B0SC0 (author)jbeemster2015-03-08

"When you reinstall, you will find the question to have cygwin to be able to run outside cygwin."

--I never see an option for this during reinstall.

--I am running setup-x86_64.exe on win7 pro.

--My directory structure is:

C:\cygwin\bin -- I have copied esptool.exe here.
C:\projects\ESP8266
C:\projects\ESP8266\ESP8266-Blink-master --Makefile and ESPMake.bat is here
C:\projects\ESP8266\xtensa-lx106-elf\bin
C:\projects\ESP8266\esp_iot_sdk_v0.9.5

--My portion of Makefile in C:\projects\ESP8266\ESP8266-Blink-master:


# Base directory for the compiler
XTENSA_TOOLS_ROOT ?= C:/projects/ESP8266/xtensa-lx106-elf/bin

# base directory of the ESP8266 SDK package, absolute
SDK_BASE ?= C:/projects/ESP8266/esp_iot_sdk_v0.9.5


--I noticed in your instructable that the line:

SDK_BASE ?= C:/Projects/ESP8266/esp_iot_sdk_v0.9.5 has a capitol P for projects

--I am thinking that is a typo for /Projects/

--so I changed mine to /projects/

jbeemster (author)B0SC02015-03-08

I used setup-x86.exe so not the 64 bit version. (I use version 8, but that should not be the problem.)
I think your right about my previous suggestion.
typo is also correct (but windows is not case sensitive)
What about the path command on command prompt. is there c:\cygwin\bin in?

B0SC0 (author)jbeemster2015-03-08

--Okay, got the path setup.

C:\>path
PATH=c:\cygwin\bin


--and I can now run ESPMake.bat in the command window.

--still getting this

C:\projects\ESP8266\ESP8266-Blink-master>make.exe
CC user/user_main.c
AR build/blink_app.a
LD build/blink.out
FW firmware/0x00000.bin
Makefile:105: recipe for target 'firmware/0x00000.bin' failed
make: *** [firmware/0x00000.bin] Error 127

starkec (author)2015-03-27

Hi great work on the arduinesp it will definitely get a lot more people involve with the esp8266! However im testing it out and trying to get the wifi blink example working everything goes fine until it connects to the network then i get a continuous repeat of

reconnect

scandone

reconnect

in the serial monitor. I confirmed that it is not an issue of the board by login into the network manually using AT commands which worked fine. I am asking here because for some reason word press keeps asking me to login on your website any hints or help would be great.

jbeemster (author)starkec2015-03-27

something strange with delay() since version 1.0 of SDK
Could you change delay(1000) with os_delay_us(100000)
That might work.
Could you also try another browser. It seems a problem with different browsers in wordpress

EasyIoT (author)2015-03-27

I have to add PATH=c:\cygwin\bin and then it work. Tested with esp_iot_sdk_v1.0.0.

Thanks for this tutorial.

Akin Yildiz (author)2015-03-25

hello sir, very interesting work. i'm a true beginner and have a few questions.
i have flashed and installed NodeMCU on my esp-01 and now use LUA to program it. and it seems a bit more easier to get everything started.
are there and advandages/disadvantages between the two options, compared to your approach.

from what I understand the SDK is what comes prebuilt inside the ESP chip.? and all we are doing at first is to update this software.?
but what I have done was to delete the company software and instead install another operating software on it (nodemcu).? am i in the right direction? just trying to understand everything better :)
hope my question makes sense. thank you for sharing.

jbeemster (author)Akin Yildiz2015-03-26

LUA is a good alternative for beginners. Only if you got stuck and would like to go further use "C". I advise you to not leave LUA for now. You are almost correct. SDK stands for Software Development Kit. This kit is delivered by espressif. I just used the latest one. By using the kit you create a sort of executable that can be uploaded to the ESP8266. Another executable is LUA. In my explenation there are some things not really 100% truth, but for a beginner, that will be too much details.

BTW: I just finished the first version of arduinesp. With this you may build your sketch (program) in Arduino and upload it directly from Arduino to ESP8266. Have a look at http://www.arduinesp.com

Akin Yildiz (author)jbeemster2015-03-26

nevermind, downloading right now (the main download button works) this looks great. can't wait to try. thank you for the reply.!

B0SC0 (author)2015-03-06

I am getting this error when running

ESPMake.bat

Any help?


C:\projects\ESP8266-Blink-master>make.exe
'make.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\projects\ESP8266-Blink-master>pause
Press any key to continue . . .

jbeemster (author)2015-03-06

I think It cannot find the esptool.exe?
try the following line on the command-line
esptool.exe -eo build/blink.out -bo firmware/0x00000.bin -bs .text -bs .data -bs .rodata -bc -ec

frujin (author)2015-03-05

Hello jbeemaster,

I did everything according to the instructions and this is what happens when I try to build the blink example (see below). Can you please advice?

C:\Tools\ESP\_projects\ESP8266-Blink-master>make -B
CC user/user_main.c
AR build/blink_app.a
LD build/blink.out
FW firmware/0x00000.bin
Makefile:105: recipe for target 'firmware/0x00000.bin' failed
make: *** [firmware/0x00000.bin] Error 127

mikewen (author)2015-03-01

I wrote a browser based IDE for ESP8266:

https://github.com/NodeUSB/nodemcu-ide

jbeemster (author)mikewen2015-03-01

Seems like this is for LUA development , not for native ESP8266 (C development).

yannd made it! (author)2015-02-28

Everithing work fine now !

Thanks to Jbeemster for this Great Tutorial !

Where can I find more example of code ? I want to send some REST command to Microsoft Azure, do you have some Hints for this ?

yannd (author)2015-02-27

Hello,

I follow your instruction but I have a problem at the step 2 : I Flashed the device whith ESP8266Flasher.exe like you say it. But when I open the serial Monitor (115200 baud) and I make a reset of the device I obtain a really strange message without ready at the end :


And I have no response to my AT Command !

I try to Flash the device again and I have the same problem, what can I do know ?

I need some help please because now my device is down !

Thanks for your help !

Yann

jbeemster (author)yannd2015-02-28

Hi Yann,
The strange reply from the ESP is "normal".
I advise you to change "Retour Chariot" to " Both NL & CR".
Your AT commands are not responsing with this change.
I hope this will help.

yannd (author)jbeemster2015-02-28

Thanks for your answer but It's not the solution, I try a lot of different things.

But now I have more explanations, when I look with an oscilloscope, I found that the Baud rate was at 74600 ???

I try to read the message with RealTerm and fixing the Baudrate to 74600 and then I read this message after a reset :

chksum 0xcf

ho 0 tail 12 room 4

load 0x3ffe8314, len 288, room 12

tail 4

chksum 0xcf

csum 0xcf

2nd boot version : 1.2

SPI Speed : 40MHz

SPI Mode : QIO

SPI Flash Size : 4Mbit

jump to run user1

get flash_addr error!

user code done

And I have no response to my AT command !

Do you have an explanation of this message ?

Perhaps, there is an error here :

c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\boot_v1.2.bin 0x00000
c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\at\user1.512.new.bin 0x01000
c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\blank.bin 0x3e000 (can this be 0x7C000 ?)
c:\projects\ESP8266\esp_iot_sdk_v0.9.5\bin\blank.bin 0x7e000

Thanks for your help,

Yann de fransman :-)

About This Instructable

136,415views

107favorites

License:

More by jbeemster:Blink for ESP8266 native, like arduino using Windows
Add instructable to: