The wall of SDK 1.5 Examples

Posts: 24
Joined: Wed Dec 09, 2015 1:16 pm

The wall of SDK 1.5 Examples

Postby Fleuve » Fri Dec 11, 2015 2:40 am

I’m newbies with ESP8266-01, but I’ve a lot experience in C++ and ASM then I’m really understood what the “makefile” do for you. But before ask you question, let me resume the situation.

Plug on a breadboard with a simple MAX233 on a standard DB9 Com1. I used BS170 Transistor to shift level on both port (RX/TX).

OS and program

    Microsoft Windows 10 x64
    Cygwin x86
    Xtensa 1.0.6 build 161014 (I have also build 141114)
    Python 2.7 (I think we can go without)
    NodeMCU ESP-FLASHER (better look)
    Espressif SDK 1.50 last build

The resume
Of course everything begin with NodeMCU and ESPlorer, it’s the fastest way to get result, but I’d like LUA script and we can make lighter with specific firmware. After I decide to compile with SDK 1.5 by Espressif, of course lack of experience I face the wall.

The first result I get is when I’ve try Blink tutorial ( by jbeemster (ADD crypto to LIBS inside MAKEFILE to be Compatible 1.5). After an analyst of the Makefile, I’ve understand the method.

GCC every .C file inside asked module (driver, user)
AR every .O file inside asked module into App.a file
LD the App.a file into TARGET.out
Esptool TARGET.out into TARGET.eagle.flash.bin
Esptool TARGET.out into TARGET.eagle.irom0text.bin

I think that Esptool can be replaced by OBJ-Dump and OBJ-Copy but I’m not sure. My batch file included in my package can replace makefile and if we skip (or convert) Esptool it’s can be also used without CYGWIN and PHYTON. Inside the package ( you can also see a ESP-ENV, it’s a simple batch file who start Command prompt with proper path (That’s solution offer to not increase your path constantly)

Code: Select all

@echo off
if /i "%1" equ "/S" goto Start
cmd /k %~dp0%~nx0 /S
goto :EOF

set Prompt=[$P]$_¯
cd /d %~dp0%
set path=%~dp0bin;%~dp0CygWinLite\bin;%~dp0xtensa106\bin;%~dp0Python27;%~dp0Python27\Scripts;%path%
set COMPILE=gcc

Now I can go inside my blink projects folder and do some command like
    Make clean
    Build (the non-Cygwin solution)
The wall of SDK Examples

Ok, Now for the final. I move AT example content inside app folder. That’s mean that I’ve App/user instead App/at/User. I go inside my root SDK and l have try some command. But before, note that I’ve the same result inside Cygwin shell that Native Windows CMD.

The first MAKE try have the same result that my Own Build batch, because it’s compile into the eagle version.


#error "upgrade is not supported when eagle.flash.bin+eagle.irom0text.bin!!!"

Let’s give another mode


make[1]: Entering directory '/cygdrive/e/ESPBuilder/Sdk/app'
make[2]: Entering directory '/cygdrive/e/ESPBuilder/Sdk/app/user'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLA
SH -DAT_UPGRADE_SUPPORT -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle user_main.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLA
SH -DAT_UPGRADE_SUPPORT -I include -I ./ -I ../../include/ets -I ../include -I ../../include -I ../../include/eagle at_upgrade.c
.output/eagle/debug/obj/at_upgrade.d:1: *** multiple target patterns. Stop.
make[2]: Leaving directory '/cygdrive/e/ESPBuilder/Sdk/app/user'
../Makefile:307: recipe for target '.subdirs' failed
make[1]: *** [.subdirs] Error 2
make[1]: Leaving directory '/cygdrive/e/ESPBuilder/Sdk/app'
Makefile:307: recipe for target '.subdirs' failed
make: *** [.subdirs] Error 2

Now I give up! :) Does someone can explain where the problem is? Does my build or my structure folder, does Windows require another third party program to work? I’ve face error but this one stick me on the floor. If someone know difference between compiling USER VS EAGLE or that you know how convert ESPTOOL to OBJ-DUMP/OBJ-COPY just tell me I’m going to update script.

Posts: 1641
Joined: Mon Oct 27, 2014 11:08 am

Re: The wall of SDK 1.5 Examples

Postby ESP_Faye » Mon Dec 14, 2015 2:03 pm


Code: Select all

#error "upgrade is not supported when eagle.flash.bin+eagle.irom0text.bin!!!"

To compile eagle.flash.bin+eagle.irom0text.bin, you need to disable OTA (upgrade) function.
Revise user_config.h as below.

Code: Select all


Code: Select all

.output/eagle/debug/obj/at_upgrade.d:1: *** multiple target patterns. Stop.

Please try to call "make clean" first to delete the files generated in previous compilation, then compile it again.

Posts: 24
Joined: Wed Dec 09, 2015 1:16 pm

Re: The wall of SDK 1.5 Examples

Postby Fleuve » Tue Dec 22, 2015 1:50 pm

Thanks for reply...

But I think the problem come with cygwin and i presume is about folder or difference about (windows "/" vs Linux "\"). Because what I've done after my first post is install the Lubuntu.OVA with Virtual Machine and there is the result.

I begin modify the makefile on lubuntu to have echo on some operation. After with my dual screen I only copy and paste from ternimal to command prompt. Everything work fine, except some folder to add manually.

Code: Select all


I've try to relaunch make process on command prompt with folder pre-create and nothing work (still multiple target problem). Then I've update my ESPLauncher and everything working fine. Now ESPLauncher require only python package (maybe a c version of can make it really windows native). Next step is convert to visual studio, now i know how compile it.

I'm gonna make a tutorial soon, but you can get working version

You can now directly compile directly inside example folder...
1)launch ESPENV
2)use BUILD inside example folder. (SHARP MENU using BROWSE.BAT. From my personal genius 2 year ago)

Compile chart

AT ->every mode except IROM (trying to modidy user_config for OTA nothing to do)
DRIVER_LIB ->NOT YET... seem missing user_config.
IOT_DEMO ->every mode
SMART_CONFIG ->every mode
WPS ->every mode


Who is online

Users browsing this forum: No registered users and 18 guests