Espressif ESP8266 New SDK Update

You may be aware that ESPRESSIF have released a new update to their SDK which now stands at version 1.5

I’ll be interested to hear what experience other folks have of this..  On compiling my normal home control code which has worked without modification since version 1.0 I got this..

LD build/app.out
c:/Espressif/ESP8266_SDK/lib\libwpa.a(wpa_auth.o): In function `wpa_receive’:
(.irom0.text+0x9a0): undefined reference to `aes_wrap’
c:/Espressif/ESP8266_SDK/lib\libwpa.a(wpa_auth.o): In function `__wpa_send_eapol’:
(.irom0.text+0xd73): undefined reference to `aes_wrap’
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: *** [build/app.out] Error 1

and in the update info from Espressif they say ….

User application needs to add “-lcrypto” in ‘LINKFLAGS_eagle.app.v6″ area of Makefile.

Well I don’t have one of those in my Make file.

Not a good start, what? But there is a simple solution (not quite what it said on the Espressif forum)  – see the comments!

13 thoughts on “Espressif ESP8266 New SDK Update

  1. Hi Can anyone comment on this error:

    mingw32-make.exe -f C:/Users/mugginsjm/Desktop/scargill-hackitt-1a6f6c895c87/Makefile all
    CC driver/i2c.c
    CC driver/gpio16.c
    CC driver/uart.c
    CC driver/ds18b20.c
    CC mqtt/proto.c
    CC mqtt/utils.c
    CC mqtt/config.c
    CC mqtt/mqtt_msg.c
    CC mqtt/queue.c
    CC mqtt/ringbuf.c
    CC mqtt/mqtt.c
    CC user/aidans_code.c
    CC user/httpd.c
    CC user/heatshrink_decoder.c
    CC user/cgiwifi.c
    CC user/petes_code.c
    CC user/espfs.c
    CC user/base64.c
    CC user/aidan_and_petes.c
    CC user/wifi.c
    CC user/auth.c
    CC user/user_main.c
    CC user/httpdespfs.c
    CC user/cgi.c
    CC user/rboot-ota.c
    CC user/io.c
    CC user/stdout.c
    CC easygpio/easygpio.c
    CC rboot/rboot.c
    rboot/rboot.c:13:25: fatal error: rboot-hex2a.h: No such file or directory
    compilation terminated.
    C:/Users/mugginsjm/Desktop/scargill-hackitt-1a6f6c895c87/Makefile:160: recipe for target ‘build/rboot/rboot.o’ failed
    mingw32-make: *** [build/rboot/rboot.o] Error 1

    1. Hi John, I’m receiving the same error (rboot/rboot.c:13:25: fatal error: rboot-hex2a.h: No such file or directory). If you’ve managed to crack it, any help or direction would be appreciated.

      I installed the unofficial development kit & Eclipse environment as per “http://www.esp8266.com/viewtopic.php?f=9&t=820” Perhaps I have an incompatible version or am using an outdated or incompatible setup?

      I did manage to install the precompiled ROM’s from “https://tech.scargill.net/blowing-the-home-control-2016-code/” without issue, just looking to be able to compile myself and play along.

      Thanks !

      1. For anyone with the same issue, I, being a complete noob at this, thought I should be flashing the makefile.windows because I’m on a windows PC. After simply reinstalled the code from bitbucket and using the default makefile it compiled and flashed no problems.

  2. Hi Peter..need a little help if possible.
    I’ve downloaded your new updated code main branch and used the 1.5.0 SDK made the changes on the makefile and managed to compile your older version of the code.
    But now trying to do the same on the newer code. I get “undefined reference to `rboot_set_current_rom'” while building the function “wifi_station_scan_done” what am i missing?

    1. No idea at this point – I was planning to check out the new SDK, instead I’ve just wasted the day talking to utterly useless PLUSNET on their “Liveperson” system only to get no-where. Hence my plans went to pot I’m afraid. Espressif forum is probably the quickest way unless one of our many readers in here has ideas???

      1. By compiling using sdk v1.5 i got following error.Any idea how to resolve it?

        mingw32-make.exe -f C:/Users/abc/worksorg/mesh/Makefile all
        AR build/app_app.a
        LD build/app.out
        c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty’:
        (.irom0.text+0x5c4): undefined reference to `user_init’
        c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_rf_pre_init’:
        (.irom0.text+0x85a): undefined reference to `user_init’
        c:/Espressif/ESP8266_SDK/lib\libwpa.a(wpa_auth.o): In function `wpa_receive’:
        (.irom0.text+0x9a0): undefined reference to `aes_wrap’
        c:/Espressif/ESP8266_SDK/lib\libwpa.a(wpa_auth.o): In function `__wpa_send_eapol’:
        (.irom0.text+0xd73): undefined reference to `aes_wrap’
        collect2.exe: error: ld returned 1 exit status
        C:/Users/abc/worksorg/mesh/Makefile:187: recipe for target ‘build/app.out’ failed
        mingw32-make.exe: *** [build/app.out] Error 1

        1. Erm, same issue I had – see comment above yours. Fixed. It actually tells you in the API update info that you have to add CRYPTO – sadly I didn’t have the line in my makefile they suggested but you’ll see my solution above.

          1. Still it shows error

            AR build/app_app.a
            LD build/app.out
            c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_uart_wait_tx_fifo_empty’:
            (.irom0.text+0x5c4): undefined reference to `user_init’
            c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function `user_rf_pre_init’:
            (.irom0.text+0x85a): undefined reference to `user_init’
            collect2.exe: error: ld returned 1 exit status
            C:/Users/abc/worksorg/mesh/Makefile:187: recipe for target ‘build/app.out’ failed
            mingw32-make.exe: *** [build/app.out] Error 1

      2. Hi Peter,

        I resolved my issue after some stress. The problem was on the Makefile on the inclusion of the modules to be used/included in compiling. The “undefined reference” was because the compiler was not finding the rboot classes and heather files. I altered the Makefile and its all good. Thanks again for your prompt reply.

          1. Hi Girish,
            I’ll try but i’m a very green newbie myself (so i’m not even sure if what i’m saying is 60% true 🙂 ). I tried quite a few things and spent quite a bit of time scratching my head…before getting to the interpretation that the error i was getting “undefined reference to ” was that for some reason the compiler cannot find the C files that are referenced by the functions in the program (i believe this is called the linking phase).
            In your case it looks like it cannot find ‘user_init’. In the Makefile there is a line that says:
            # which modules (subdirectories) of the project to include in compiling
            MODULES = driver mqtt user easygpio
            In my case compiler was not finding the “rboot” files (not really sure why…) so i just added that and it worked.
            So if the problem is similar check if the “user” folder is there as i believe thats the one that contains the user_init.c
            I’m not sure if this helps but good luck.

  3. It’s just a matter of adding “crypto” to the libs used, something like this

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

    1. Indeed you are correct sir! THat is exactly what was needed.

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

      Sadly that takes my .TEXT use from 0x7xx to 0x7cxx – but it will still work… I’ll have to find a way to save a little more RAM to compensate 🙂

Comments are closed.