Nico Website

来源:互联网 发布:淘宝口令红包怎么领 编辑:程序博客网 时间:2024/05/22 13:16


Installing the ESP8266 SDK under Ubuntu 14.04 and Eclipse

Update 30-10-2014

Thanks to Zarya, some small bugs / modifications are fixed. The installation should be straight forward now:

Building the toolchain

I followed this excellent link: Building the toolchain

If you are unfamiliar with Ubuntu I would get some basic done before continuing. Understand at least how to open a terminal program and how to get root priviliges as some steps need to be performed as “root”. Most of the work consists of copying the instructions and pasting them in the terminal program (CTRL+SHIFT+V).The build process takes about 22 minutes on my laptop.

Installing the ESP tool did not work for me so I downloaded the files from GITHUB (the link is in the text) and built it myself:

download the zip fileunpack it (I unpacked it in the /opt/Espressif folder)go to the foldertype "make clean <RETURN>"type "make <RETURN>"both without the quotation marks

Building the AT example

This is the code that allows you to use the ESP8266 module as an interface to WiFi through serial AT commands.

The make fails generating the bin files (flash files). The cause is that the make file points to /usr/bin/esptool and I installed in /opt/Espressif/esptool. For this case I will make a copy of esptool itself to /usr/bin.

now got to the ~/esp_sources/at folder and type make<RETURN> there are now 2 bin files in the subfolder “firmware”.

Installing Eclipse

As I also compile Arduino projects in Eclipse I prefere Jantje’s eclipse plugin for Arduino. I used the latest overnight build from here.

I just download it and unpack it in my home folder. But any folder in your environment will work. Eclipse also needs a JRE (Java Runtime Environment). As I did not have installed yet, I simply download the latest version, unpack it and store it in the eclipseArduino folder. Not the ideal way but it works fine :).

EclipseArduino may be started now. Eclipse will ask for a workspace where all eclipse projects will be stored. Just create one where you like. I always put it in Documents.

We are almost done.

Import the AT example project in eclipse

First we create a project. for example AT_example

steps:

  • file->new->project
  • open C/C+=
  • select makefile Project with existing code
  • select next
  • for projectname enter “AT_example”
  • for existing code location browse to where you stored the AT example in esp_sources folder (in m,y case it would be “/home/nico/esp_sources/at”
  • for “toolchain for indexer settings” select “none”.
  • click finish and you are done.

Build the AT example

In Eclipse project explorer you will see your created project. You can for example select through the menu  “project->clean” to reset all file flags. The you could now compile the project “project->build project” and the binaries will be built.

Done!!!!!!

update 27-10-2014 Update for SDK 0.9.2

Of course once you understand how it works…. the SDK changes. The installation is still the same but a small problem arises in the final build of AT (haven’t tried the IoT_demo yet). The compilation goes well, but the final link fails as it is missing 2 libraries. These are  libupgrade.a and libupgrade_ssl.a. The libraries are installed but the makefile does not reference them.

The easiest way to fix this is to edit this line in the make file and change

LIBS        = c gcc hal phy net80211 lwip wpa main 

into

LIBS= c gcc hal phy net80211 lwip wpa main upgrade upgrade_ssl

 

Installing with SDK 0.9.1

Having played around enough to get the nag of it, today I will show you how I installed the SDK under Ubuntu and building/compiling programs with Eclipse Keppler. I prefer Eclipse as this also allows me to program the Atmel 8-bit family of processors in a decent environment and I like the supporting plugins like “Jantjes ArduinoEclipse plugin”, “Doxygen” and  “CVS” as I use these tools as well in the Windows7 enviroment. At the same time I can alsu build/update/modify the demo programs.

My machine:

  • 64 Bit dual core laptop with Windows7 and Unbuntu 14.04.
  • Total disk capacity 1.5 TB (Ubuntu has 150Gb assigned to it as this is more than enough
  • 4Gb RAM memory

Prerequisites

Unbuntu installed. I am starting with a fresh installation and documenting the steps as I go.

Building the toolchain

I followed this excellent link: Building the toolchain

If you are unfamiliar with Ubuntu I would get some basic done before continuing. Understand at least how to open a terminal program and how to get root priviliges as some steps need to be performed as “root”. Most of the work consists of copying the instructions and pasting them in the terminal program (CTRL+SHIFT+V).The build process takes about 22 minutes on my laptop.

There is a small error in the instructions:

as local user:

/opt/Espressifgit clone -b lx106 git://github.com/jcmvbkbc/crosstool-NG.git cd crosstool-NG./bootstrap && ./configure --prefix=`pwd` && make && make install./ct-ng xtensa-lx106-elf./ct-ng build

should be:

cd /opt/Espressifgit clone -b lx106 git://github.com/jcmvbkbc/crosstool-NG.git cd crosstool-NG./bootstrap && ./configure --prefix=`pwd` && make && make install./ct-ng xtensa-lx106-elf./ct-ng build

From here on just continue the steps.

Installing the ESP tool did not work for me so I downloaded the files from GITHUB (the link is in the text) and built it myself:

download the zip fileunpack it (I unpacked it in the /opt/Espressif folder)go to the foldertype "make clean <RETURN>"type "make <RETURN>"both without the quotation marks

Building the AT example

This is the code that allows you to use the ESP8266 module as an interface to WiFi through serial AT commands.

The make fails generating the bin files (flash files). The cause is that the make file points to /usr/bin/esptool and I installed in /opt/Espressif/esptool. For this case I will make a copy of esptool itself to /usr/bin.

now got to the ~/esp_sources/at folder and type make<RETURN> there are now 2 bin files in the subfolder “firmware”.

Installing Eclipse

As I also compile Arduino projects in Eclipse I prefere Jantje’s eclipse plugin for Arduino. I used the latest overnight build from here.

I just download it and unpack it in my home folder. But any folder in your environment will work. Eclipse also needs a JRE (Java Runtime Environment). As I did not have installed yet, I simply download the latest version, unpack it and store it in the eclipseArduino folder. Not the ideal way but it works fine :).

EclipseArduino may be started now. Eclipse will ask for a workspace where all eclipse projects will be stored. Just create one where you like. I always put it in Documents.

We are almost done.

Import the AT example project in eclipse

First we create a project. for example AT_example

steps:

  • file->new->project
  • open C/C+=
  • select makefile Project with existing code
  • select next
  • for projectname enter “AT_example”
  • for existing code location browse to where you stored the AT example in esp_sources folder (in m,y case it would be “/home/nico/esp_sources/at”
  • for “toolchain for indexer settings” select “none”.
  • click finish and you are done.

Build the AT example

In Eclipse project explorer you will see your created project. You can for example select through the menu  “project->clean” to reset all file flags. The you could now compile the project “project->build project” and the binaries will be built.

The next time I will show how to modify/create your own AT commands. Enabling to expand AT. I have not figured out how to create a simple plugin that would allow the creation of a new project.

 

 

 

 

 

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

 

 

 

De volgende HTML-tags en -attributen zijn toegestaan: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

 

  • recent messages

    • Create your own User commands in the AT demo for ESP8266
    • Installing ESP8266 under Ubuntu and using Eclipse to build projects
    • Playing with the ESP8266
    • Microscope Holder using 3D printing
    • Working with WS2812B led streams
  • Recente reacties

    • Nico Verduin op Playing with the ESP8266
    • Wim nijntjes op Playing with the ESP8266
    • Nico Verduin op Marshall 18W built from all kinds of scratch parts
    • Wim nijntjes op Marshall 18W built from all kinds of scratch parts
    • eProto op Playing with the ESP8266
  • Archief

    • oktober 2014
    • september 2014
    • augustus 2014
  • Categorieën

    • Geen categorie
  • Meta

    • Log in
    • Berichten RSS
    • Reacties RSS
    • WordPress.org
Translate »
0 0
原创粉丝点击