Twitter E-mail RSS
formats

ESP8266 – Debian cross-tools package

Debian package  for Xtensa lx106 is composed  of gcc-4.8.2, binutils-2.24, newlib-xtensa, gdb-7.5.1 and lx106-hal . Package provide GNU Compiler gcc-xtensa-lx106-elf,  binary utilities binutils-xtensa-lx106-elf, newlib C library newlib-xtensa-lx106-elf , GNU Debugger gdb-xtensa-lx106-elf  and Hardware Abstraction Library hal-xtensa-lx106-elf.

Installing debian cross-tool package

Update your system software sources with    PPA repository  ppa:germia/esp8266ex:

sudo add-apt-repository ppa:germia/esp8266ex

Refresh list of software available, including the PPA you just added:

sudo apt-get update

Install packages:

sudo apt-get install  gcc-xtensa-lx106-elf \
binutils-xtensa-lx106-elf \
newlib-xtensa-lx106-elf \
hal-xtensa-lx106-elf \
gdb-xtensa-lx106-elf

It is very convenient to define CROSS_COMPILE in your .bashrc

CROSS_COMPILE=xtensa-lx106-elf-

otherwise use:

make CROSS_COMPILE=xtensa-lx106-elf-

Please note that Espressif SDK use different nomenclature for binutils and compiler:

AR = xt-ar
CC = xt-xcc
NM = xt-nm
CPP = xt-cpp
OBJCOPY = xt-objcopy

In order to compile Espressif application need to  create symlinks:

sudo ln -s /usr/bin/xtensa-lx106-elf-gcc-ar /usr/bin/xt-ar
sudo ln -s /usr/bin/xtensa-lx106-elf-gcc /usr/bin/xt-xcc
sudo ln -s /usr/bin/xtensa-lx106-elf-nm /usr/bin/xt-nm
sudo ln -s /usr/bin/xtensa-lx106-elf-cpp /usr/bin/xt-cpp
sudo ln -s /usr/bin/xtensa-lx106-elf-objcopy /usr/bin/xt-objcopy
sudo ln -s /usr/bin/xtensa-lx106-elf-readelf /usr/bin/xt-readelf
sudo ln -s /usr/bin/xtensa-lx106-elf-objdump /usr/bin/xt-objdump

At this point you should be able to use ESP8266 toolchain in console mode or on integrated Eclipse environment.

Creative Commons License
This work by http://g-lab.ca is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License

Home ESP8266EX ESP8266 – Debian cross-tools package