Programming Tool for ESP8266

I’m a Windows guy – no, I don’t want to use a command line or a Linux VM if possible thank you. And so it was that I’ve been using Coolterm – and very nice too – for programming the little ESP8266 boards. The problem comes when you have to type the same thing over and over or in the case of LUA programming, wrap the whole lot in some prefix or suffix like wrapping “end” in “file.writeline([[end]]” etc.

tmpF342So a couple of nights ago  I made a start on my own serial terminal – so in thanks for the advice that people have sent in as I’ve gone down the route of learning about these devices, here’s the first stab at my contribution. It’s a bog-standard install, if works on Windows 7 and 8 – NO guarantees, NO support right now… but if you want it, it’s yours.

Run the setup, it should appear. Set your baud rate and possibly COM port, press OPEN and if you have that all correct you should be able to talk to your board by putting AT into the left box and pressing SEND. You can put multiple lines in the left box, you can CLEAR the left and right boxes. You can inject text (left dropdown box) into the left box (left arrow) – or fire straight out to the ESP8266 with the little right arrow.

If you prefix a line in the left box with + (left most column for now) then that LUA wrapper stuff will be added when it is sent out – and in any case – ANY stuff going out to the 8266 will have a line by line delay of 300ms or whatever you set in the top right box (you need to close, set the value, open).

both the delay and baud rate are persistent but you’ll have to set the port every time if you have more than one until I figure out how to automate that. And that hopefully should make life a little easier for some of you. As time goes on I may well improve this and I’ll put a note in here to say what I’ve done.  The Dropbox link is here. Note this will NOT work on XP as apparently said operating system does not support .NET 4.5 – sorry.

12:11PM – Update on ESP8266, ESPRESSIF will in a couple of days update their docs to put in the things I’ve been hammering about in other entries – I’ve also asked them if they’ll explain the CYGWIN stuff a little better as I can’t compile code with it (errors). I have to say this is starting to go somewhere.

Advertisements

16 thoughts on “Programming Tool for ESP8266

  1. Nice start with the terminal tool – it’s working well for me, and it is a bit cleaner looking than coolterm 🙂
    Cheers
    rob

    • Awww. thanks. I added remembering baud rates and made the panels bigger. I’ll make the whole thing re-sizeable when I remember how. Used to be a whiz at VB and this is my first shot at vb.net hence the no warranty 🙂

    • Hey Pete.

      I used your tool. I’m getting into LUA. Its giving errors sometimes. But he I dont need to flash all the time.

      Maybe I want to make a chrome app. The serial port is available in Chrome apps :D. Then we can create a code style with html5 and much more. And the Chromeapp is available for: Windows, Mac & Linux.

      Tnx for your app “Windows man”, you made my day.

      • Chrome app.. I don’t know how to do that – would be interesting to see – I used vb.net in the new community version of Visual Studio – works a treat. I’m a died in the wool VB6 programmer – stopped using it years ago but this was just like getting together with an old friend.

  2. Hey Peter. Greetings from the colonies.

    Thanks for the tool, that will definitely make AT-command testing easier.

    Regarding compilation with Cygwin in Windows (http://blog.electrodragon.com/esp8266-sdk-windows-setup/), the build system worked for me (Win 8.1), but the built binaries seemed to put out junk and didn’t echo or respond to AT commands… or the baud rate is unknown.

    This morning I saw updated instructions for how to add the AT20 stuff to the Cygwin build system. I followed them and rebuilt… and it worked – my ESP8266 was responding to AT commands again. Because I found the AT20 instructions a bit hard to follow at first, I rewrote them and posted them at the bottom of that page.

    Cheers.

    • The files that are set up to run are the IOT demo and that’s at 78k baud or similar. This morning I followed the instructions on the ESPRESSIF site to remove all of that and over-write with the latest AT code.. the MAKE worked – but the second operation failed and I’ve informed ESPRESSIF. I really am looking forward to being able to tinker. Meanwhile earlier this evening I was messing with my code and now have an Arduino talking to the ESP-01 and producing completely reliable results. I have 2 days of business meetings starting in the morning and I will leave it running with remote control so I can check – but I quite expect it will stay up.

  3. Hi Ken – would you like to point me to the bit you saw this morning – as I want to take the new, working AT code with the latest library – and compile it successfully before tinkering. Shame we can’t do the same with the LUA code as the very first thing I’d add would be the ability to read a Dallas 1-wire temperature sensor on GPIO0… indeed once we have reliable telnet so the serial port is freed up – I could see reading the temperature on one pin – and firing out serial stuff to a display on the serial out…

  4. Well, THAT didn’t work – the MAKE worked – but then the MAKE COMPOSE — see the very end…

    Something about a strangely named missing file or directory…

    Pete@BigDell /SDK
    $ make compose

    ###############################################
    ### electrodragon ###
    ### http://www.electrodragon.com ###
    ###############################################

    generate bin

    /bin/sh /SDK/app/gen_misc.sh
    make[1]: Entering directory ‘/SDK’
    make[2]: Entering directory ‘/SDK/app’
    make[3]: Entering directory ‘/SDK/app/user’
    make[3]: Leaving directory ‘/SDK/app/user’
    make[3]: Entering directory ‘/SDK/app/driver’
    make[3]: Leaving directory ‘/SDK/app/driver’
    make[2]: Leaving directory ‘/SDK/app’
    make[1]: Leaving directory ‘/SDK’
    rm: cannot remove ‘../bin/eagle.app.v6.flash.bin’: No such file or directory
    rm: cannot remove ‘../bin/eagle.app.v6.irom0text.bin’: No such file or directory

    /SDK/app/gen_misc.sh: line 6: cd: .output/eagle/debug/image: No such file or dir
    ectory
    /SDK/app/gen_misc.sh: line 8: xt-objdump: command not found
    /SDK/app/gen_misc.sh: line 9: xt-objdump: command not found
    /SDK/app/gen_misc.sh: line 11: xt-objcopy: command not found
    /SDK/app/gen_misc.sh: line 12: xt-objcopy: command not found
    /SDK/app/gen_misc.sh: line 13: xt-objcopy: command not found
    /SDK/app/gen_misc.sh: line 14: xt-objcopy: command not found
    /SDK/app/gen_misc.sh: line 16: ../../../../../tools/gen_appbin.py: No such file
    or directory
    cp: cannot stat ‘eagle.app.v6.irom0text.bin’: No such file or directory
    cp: cannot stat ‘eagle.app.v6.flash.bin’: No such file or directory
    /bin/sh /SDK/bin/compose.sh
    ###############################################
    ### Electrodragon ###
    ### http://www.Electrodragon.com ###
    ###############################################

    finish compile, please flash to test
    13:53:53: Debug: src/helpers.cpp(140): ‘CreateActCtx’ failed with error 0x000000
    7b (the filename, directory name, or volume label syntax is incorrect.).
    init finished
    _COM: 6
    ESP_ROM_BAUD : 115200
    close
    check all test offset : 0 0x0
    case ok
    test offset : 262144 0x40000
    case ok
    test offset : 516096 0x7e000
    case ok
    test check all res: (True, [[u’D:\\cygwin\\SDK\\bin\\eagle.app.v6.flash.bin’,
    0], [u’D:\\cygwin\\SDK\\bin\\eagle.app.v6.irom0text.bin’, 262144], [u’D:\\cygwin
    \\SDK\\bin\\blank.bin’, 516096]])
    (True, [[u’D:\\cygwin\\SDK\\bin\\eagle.app.v6.flash.bin’, 0], [u’D:\\cygwin\\SDK
    \\bin\\eagle.app.v6.irom0text.bin’, 262144], [u’D:\\cygwin\\SDK\\bin\\blank.bin’
    , 516096]])
    test offset : 0 0x0
    case ok
    test offset : 262144 0x40000
    case ok
    test offset : 516096 0x7e000
    case ok
    test check all res: (True, [[u’D:\\cygwin\\SDK\\bin\\eagle.app.v6.flash.bin’,
    0], [u’D:\\cygwin\\SDK\\bin\\eagle.app.v6.irom0text.bin’, 262144], [u’D:\\cygwin
    \\SDK\\bin\\blank.bin’, 516096]])
    /SDK/bin/compose.sh: line 21: df.pc: No such file or directory

    Pete@BigDell /SDK
    $

  5. Hi,

    The fact that most embedded systems and hardware hacking projects (Raspberry Pi, Beagle Bone etc and now in this particular case ESP8266) are all based on Linux wasn’t just a mere coincidence; you know. You will hate me for saying this, but I think that should give you a signal that it’s time to ditch good ol’ Windows. I did the same. After many years of living in denial, I got tired of looking at the fun everybody is having from outside. I bit the bullet, dove head first and never looked back. That was 6 years ago. It is not going to be a fun ride, I can assure you. But for me, in retrospect, it was the best decision ever !

    Good luck.

    • If it works for you that’s great, I have many years investment in learning to work with Windows – I don’t like the archaic commands in Linux, the many varieties of interface or the attitude of a lot of people out there who use Linux who seem to hate Microsoft and scorn those who are not competent in Linux. We have Arduino and that works just fine in Windows and I’d like to see similar environments for developing for example the ESP8266. I’ve managed to compile the code a couple of times and to expect your average Arduino hobbyist to understand the barrage of nonsense that comes out of the existing environment is really pushing it too far – as evidenced by the VERY FEW viable firmware alternatives out there despite the whole lot being open source and free. There are very pretty websites detailing how to use said compiling environments but following the instructions letter by letter rarely works and assumes knowledge of Linux commands. I don’t feel I’m “not free” by sticking with Windows- I just hope that soon, Espressif or someone else comes up with a simplified environment so we can get on producing our own variations of the software without having to learn a whole new way of life.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s