Making your own C programs for the ESP8266


Author: CNLohr
85051 View
16m 44s Lenght
642 Rating


NOTE: Many USB to Serial dongles cannot provide sufficient 3.3v rail to power an ESP. Please use a 3.3V supply to power the ESP. This is a how-to video on the build environment for the ESP8266. Link to the esp8266 forum post: http://www.esp8266.com/viewtopic.php?f=5&t=744 The newer way to do most of these things: https://github.com/esp8266/esp8266-wiki/wiki/Toolchain (You may want to read this to see if it works out better for you) There is an alternative build environment here you should probably also check out: https://github.com/pfalcon/esp-open-sdk If you want what I have in this video, read below! Link to esp8266ws2812: https://github.com/cnlohr/ws2812esp8266 Link to my ping tool: https://github.com/cnlohr/cnping


Comments

  1. Hey, could you please make a new video like this or maybee post a link to an good tutorial on how to setup the toolchain and get an base to work with? I'm trying to get a working toolchain since a week.. tried open-sdk and different tutorials from github.com/esp8266 wiki. But i allways ran into shi*y errors. It's so depressing.

    please help, this would be so kind!
    greetings
  2. Nice to see this is now an easier process. May I ask, is there much of speed difference between this native and the arduino-esp8266 project?
  3. Nice! I just remembered having bought two of those some time ago. Time to get codin'...
  4. Agh, I wish someone would port colorchord for arduino
  5. Just got a ridiculous idea for ESP8266 project, gotta check if Arch user repo already has esp gcc ready :D

    I just soldered my ESP8266 to my Altera DE1 devboard and passed through ESP Tx/Rx to DE1's RS232 right through null modem cable and into my macine's real RS232 port. Because I have a lot of stuff and I'm lazy :P
    And I'm not sure how much pins my project will take, so I thought that my FPGA could serve me nicely as a temporary port expander...
  6. Why most of "linux people" uses mouse, then click on "copy", then "paste"? There is keboard shortcut: Ctrl+Shift+C for copy, and Ctrl+Shift+V for paste. Much faster than finding where the pointer is.
  7. Hey, this tutorial seems to be somewhat outdated by now and I can't seem to find anything that is not really old or for the Arduino environment. It would be awesome if you could recommend a good place to start when developing for the esp8266 in C, or maybe even make an updated tutorial! I also have discovered your esp82xx repo. Would that be the way to go?
  8. why do you have 2 wires soldered direcly to USB to Serial adapter USB Port?

    PS: Why you don't like FTDI?
  9. great video ... specially liked the part where you said to not use a FTDI converter
  10. I have a wild idea to make an Ada compiler for this. I have seen the tool kit and since there is a C compiler (GCC) I can build an Ada compiler for it, I think. Has anyone done any other language compiler for this device besides C compiler?
  11. Thumbs up for using Linux. No apologizing needed. :)
  12. can you link the commands you executed in a text file as they are not in git
  13. Hi Charles. Where do you get information about how to program esp8266 on C language? I can't find a way to start from. Thanks!
  14. Hi,
    Thank you or doing that. Your github post and video help me a lot.
    I have been looking and trying for a long time now. I built and flashed the blinky example. I use a headless Debian 8 on a i386 platform, and it worked flawlessly. Can't wait to play with websockets. Thanks again very much for taking the time and helping out our community.
  15. when i run make following output appeared

    dilawar@dilawar:~/git/ws2812esp8266$ make
    ~/esp8266/xtensa-toolchain-build/build-lx106/root/bin/xtensa-lx106-elf-gcc -mlongcalls -I/home/dilawar/esp8266/esp_iot_sdk_v0.9.3/include -Imyclib -Iinclude -Iuser -Os -I/home/dilawar/esp8266/esp_iot_sdk_v0.9.3/include/ driver/uart.c user/mystuff.c user/ws2812.c user/user_main.c -flto -nostdlib -Wl,--relax -Wl,--gc-sections -L/home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib -L~/esp8266/xtensa-toolchain-build/build-lx106/root/lib/gcc/xtensa-lx106-elf/4.8.2/libgcc.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/liblwip.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libssl.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libupgrade.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libnet80211.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/liblwip.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libwpa.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libnet80211.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libphy.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libmain.a /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib/libpp.a ~/esp8266/xtensa-toolchain-build/build-lx106/root/lib/gcc/xtensa-lx106-elf/4.8.2/libgcc.a -T /home/dilawar/esp8266/esp_iot_sdk_v0.9.3/ld/eagle.app.v6.ld -B/home/dilawar/esp8266/esp_iot_sdk_v0.9.3/lib -o image.elf
    /tmp/cc81ry5j.ltrans0.ltrans.o:(.literal+0x2c): undefined reference to `wifi_set_opmode_current'
    /tmp/cc81ry5j.ltrans0.ltrans.o: In function `procTask$part$0$1467$1368':
    cc81ry5j.ltrans0.o:(.text+0xbb): undefined reference to `wifi_set_opmode_current'
    collect2: error: ld returned 1 exit status
    make: * [image.elf] Error 1

    i found where wifi_opmode_current function is calling but i couldn't remove the error
  16. This video was very useful. I used it to help built the toolchain into a Debian instance in a virtual machine. I have built and am using your ws2812 driver, thanks :-) Do you have any examples for native code for the ESP to connect to an access point and send a periodic UDP broadcast packet, I am trying to build some simple sensors.
  17. when i compile ur example im getting follwing error.
    /tmp/ccfP9f8x.ltrans0.ltrans.o:(.literal+0x2c): undefined reference to `wifi_set_opmode_current'
    any guess ?
    '
  18. Awesome tutorial. Super helpful. One thing you might add in the description or in the git readme is that if you get permission denied (Ubuntu 14.04) for writing to the ESP you need to add yourself to the dialout group: `sudo usermod -a -G dialout $USER`
  19. damn you are good! thank for the R.E.A.L.L.Y good post!!
  20. Isn't it nowadays more easy to programm ESP8266 with extended Arduino IDE? Anyway: nice explanation and video like always. THANK YOU!