Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By rw86347
#13701 I am running Mac OS

I have install the cross compilers from
https://github.com/pfalcon/esp-open-sdk

I believe everything has installed fine.

I am now trying to compile one of the example programs.

I am guessing I need to update the Makefile. I have tried but I think I have done it wrong. Here is a little more background information.

here is where I was able to find "stdint.h"
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/src/gcc-4.8.2/fixincludes/tests/base/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/src/gcc-4.8.2/libstdc++-v3/include/c_compatibility/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/src/gcc-4.8.2/libstdc++-v3/include/tr1/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/include/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/sys/linux/include/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/sys/linux/sys/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-core-pass-2/gcc/include/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-final/gcc/include/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-final/xtensa-lx106-elf/libstdc++-v3/include/tr1/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-gdb-cross/gdb/build-gnulib/import/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-isl-host-x86_64-build_apple-darwin14.1.0/include/isl/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/include/isl/stdint.h
/Volumes//case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/lib/gcc/xtensa-lx106-elf/4.8.2/include/stdint.h
/Volumes//case-sensitive/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stdint.h
/Volumes//case-sensitive/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/c++/4.8.2/tr1/stdint.h
/Volumes//case-sensitive/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/stdint.h


Here is where I was able to find ets_sys.h
/Volumes//case-sensitive/esp-open-sdk/esp_iot_sdk_v1.0.0/include/ets_sys.h


Here is the Makefile
# tnx to mamalala
# Changelog
# Changed the variables to include the header file directory
# Added global var for the XTENSA tool root
#
# This make file still needs some work.
#
#
# Output directors to store intermediate compiled files
# relative to the project directory
BUILD_BASE = build
FW_BASE = firmware

# Base directory for the compiler
XTENSA_TOOLS_ROOT ?= /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/bin/

# base directory of the ESP8266 SDK package, absolute
SDK_BASE ?= /Volumes/case-sensitive/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/lib/gcc/xtensa-lx106-elf/4.8.2/include/

#Esptool.py path and port
ESPTOOL ?= esptool.py
ESPPORT ?= /dev/ttyUSB0

# name for the target project
TARGET = app

# which modules (subdirectories) of the project to include in compiling
MODULES = driver user
EXTRA_INCDIR = include /Volumes//case-sensitive/esp-open-sdk/esp_iot_sdk_v1.0.0/

# libraries used in this project, mainly provided by the SDK
LIBS = c gcc hal pp phy net80211 lwip wpa main

# compiler flags using during compilation of source files
CFLAGS = -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH

# linker flags used to generate the main object file
LDFLAGS = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static

# linker script used for the above linkier step
LD_SCRIPT = eagle.app.v6.ld
User avatar
By jcmvbkbc
#13714
rw86347 wrote:I am guessing I need to update the Makefile. I have tried but I think I have done it wrong.

What problem are you trying to solve?
User avatar
By rw86347
#13928 I just gave up and moved to a Linux box.

I have been able to compile many of the programs on the Linux box, but I just can't seem to get IoT_Demo to work.