Made everything a bit more friendly. Esp-open-sdk nowadays is the toolchain builder of choice anyway; it now works without modifications to that.

pull/30/head
Jeroen Domburg 10 years ago
parent da4d120b0c
commit f25557b9cf
  1. 11
      Makefile
  2. 19
      README
  3. 3
      include/espmissingincludes.h
  4. 8
      include/stdint.h
  5. 1
      user/heatshrink_decoder.c

@ -11,8 +11,9 @@
BUILD_BASE = build
FW_BASE = firmware
# Base directory for the compiler
XTENSA_TOOLS_ROOT ?= /opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/bin
# Base directory for the compiler. Needs a / at the end; if not set it'll use the tools that are in
# the PATH.
XTENSA_TOOLS_ROOT ?=
#Extra Tensilica includes from the ESS VM
SDK_EXTRA_INCLUDES ?= /opt/Espressif/include
@ -66,9 +67,9 @@ FW_FILE_2 = 0x40000
FW_FILE_2_ARGS = -es .irom0.text $@ -ec
# select which tools to use as compiler, librarian and linker
CC := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
AR := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
LD := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
CC := $(XTENSA_TOOLS_ROOT)xtensa-lx106-elf-gcc
AR := $(XTENSA_TOOLS_ROOT)xtensa-lx106-elf-ar
LD := $(XTENSA_TOOLS_ROOT)xtensa-lx106-elf-gcc

@ -34,20 +34,19 @@ allows you to control a LED that's connected to GPIO2.
BUILDING EVERYTHING
For this, you need an environment that can compile ESP8266 firmware. Environments for this still
are in flux at the moment, but I'm using a crosstool-ng gcc setup combined with the libs & includes
from the ESP SDK and ESP VM. You probably also need an UNIX-like system; I'm working on
Debian Linux myself.
are in flux at the moment, but I'm using esp-open-sdk: https://github.com/pfalcon/esp-open-sdk .
You probably also need an UNIX-like system; I'm working on Debian Linux myself.
To manage the paths to all this, you can source a small shell fragment into your current session. For
example, I source a file with these contents:
export PATH=${PWD}/crosstool-NG/builds/xtensa-lx106-elf/bin:$PATH
export XTENSA_TOOLS_ROOT=${PWD}/crosstool-NG/builds/xtensa-lx106-elf/bin
export SDK_BASE=${PWD}/esp_iot_sdk_v0.9.5/
export SDK_EXTRA_INCLUDES=${PWD}/esp_iot_sdk_novm_unpacked/usr/xtensa/XtDevTools/install/builds/RC-2010.1-win32/lx106/xtensa-elf/include/
export ESPTOOL=${PWD}/esptool/esptool.py
export PATH=${PWD}/esp-open-sdk/xtensa-lx106-elf/bin:$PATH
export SDK_BASE=${PWD}/esp-open-sdk/sdk
export ESPTOOL=${PWD}/esptool/esptool
export ESPPORT=/dev/ttyUSB0
export ESPBAUD=460800
Actual setup of the SDK and toolchain is out of the scope of this document, so I hope this helps you
enough to set up your own if you haven't already.
enough to set up your own if you haven't already.
If you have that, you can clone out the source code:
git clone http://git.spritesserver.nl/esphttpd.git/
@ -75,7 +74,7 @@ WRITING CODE FOR THE WEBSERVER
the SDK works, this shouldn't be too hard :P
CHANGE FROM SDK 0.9.3 (and earlier) TO SDK 0.9.4:
CHANGE FROM SDK 0.9.3 (and earlier) TO SDK 0.9.4 (and later):
Change all occurences of
espconn_sent(connData->conn, (uint8 *)buff, len);
to

@ -1,8 +1,9 @@
#ifndef ESPMISSINGINCLUDES_H
#define ESPMISSINGINCLUDES_H
#include <ets_sys.h>
#include <stdint.h>
#include <c_types.h>
#include <ets_sys.h>
//Missing function prototypes in include folders. Gcc will warn on these if we don't define 'em anywhere.
//MOST OF THESE ARE GUESSED! but they seem to swork and shut up the compiler.

@ -1,8 +0,0 @@
//Including the system-wide stdint.h messes stuff up... but I don't want to change heatshrink
//not to do it. Including this dummy file fixes it too, tho'.
#ifndef __ets__
//Do include stdint for testing builds.
#include_next <stdint.h>
#endif

@ -6,7 +6,6 @@
#define _STDLIB_H_
#define _STRING_H_
#define _STDDEF_H
#define _STDINT_H
#include "espmissingincludes.h"
#include "c_types.h"

Loading…
Cancel
Save