• I am trying to compile Espurino but it seems to fail right at the end. The last lines in my make are:

      4 -rwxrwxr-x 1 kolban kolban   2108 Sep 16 11:18 eagle.app.v6.data.bin
    384 -rwxrwxr-x 1 kolban kolban 389124 Sep 16 11:18 eagle.app.v6.irom0text.bin
     24 -rwxrwxr-x 1 kolban kolban  21588 Sep 16 11:18 eagle.app.v6.rodata.bin
     32 -rwxrwxr-x 1 kolban kolban  29692 Sep 16 11:18 eagle.app.v6.text.bin
    mv: cannot stat 'eagle.app.flash.bin': No such file or directory
    Makefile:1642: recipe for target 'espruino_esp8266_user1.bin' failed
    make: *** [espruino_esp8266_user1.bin] Error 1
    

    The source is a fresh download of 1v87. I am compiling on Ubuntu Linux using the Xtensa toolchain built from https://github.com/pfalcon/esp-open-sdk. It appears that this has pulled in ESP8266 SDK 1.5.

    The initial debugging I have done is to look through the Makefile to see where "eagle.app.flash.bin" is mentioned. It appears at:

    L1649 - The source of a move statement
    L1679 - The source of a move statement
    

    I don't yet know if I am missing an instruction or failed to perform a step (both are possible) or whether there is something "up" with the build recipe. If anyone has any knowledge here, most appreciated.

  • have you tried a make clean and then a make?

    What env have you set up - this is my build script:

    root@OFFICE-PC:/mnt/c/ubuntu/Espruino# cat build-esp-4mb.sh
    #! /bin/bash
    export ESP8266_BOARD=1
    export FLASH_4MB=1
    export ESP8266_SDK_ROOT=/mnt/c/ubuntu/esp-open-­sdk/sdk
    export PATH=$PATH:/mnt/c/ubuntu/esp-open-sdk/xt­ensa-lx106-elf/bin/
    export ESPHOSTNAME=espruino:88
    make $*
    

    The last lines output look like:

    LD espruino_esp8266_partial.o
    LD espruino_esp8266_user1.elf
    LD espruino_esp8266_user2.elf
    To disassemble: xtensa-lx106-elf-objdump -d -l -x espruino_esp8266_user2.elf
    Sections:
    Idx Name          Size      VMA       LMA       File off  Algn
      3 .text         00006cd0  40100000  40100000  00002f10  2**2
                      CONTENTS, ALLOC, LOAD, READONLY, CODE
      4 .irom0.text   0006ab94  40201010  40201010  00009be0  2**4
                      CONTENTS, ALLOC, LOAD, READONLY, CODE
    To disassemble: xtensa-lx106-elf-objdump -d -l -x espruino_esp8266_user1.elf
    xtensa-lx106-elf-objdump -d -l -x espruino_esp8266_user1.elf >espruino_esp8266_user1.lst
      4 -rwxrwxrwx 1 root root   2204 Sep 17 10:10 eagle.app.v6.data.bin
    428 -rwxrwxrwx 1 root root 437140 Sep 17 10:10 eagle.app.v6.irom0text.bin
     12 -rwxrwxrwx 1 root root   9616 Sep 17 10:10 eagle.app.v6.rodata.bin
     28 -rwxrwxrwx 1 root root  27856 Sep 17 10:10 eagle.app.v6.text.bin
    ** user1.bin uses  476884 bytes of 491520 available
    

    I'm not sure why you build is failing on the user1 target.

  • @Wilberforce
    Many thanks for the assistance ... I checked my settings and they were almost identical to yours. I tried a make clean and then a rebuild but same error. If we look at the current master Makefile which is here:

    https://github.com/espruino/Espruino/blo­b/master/Makefile

    and we look at lines 1968 and 1982 ... we see two mv statements that use the fiile eagle.app.flash.bin as the source but I am at a loss to see where this file may come from in the first place. It isn't in the Git repository and I don't see where it is "generated". Can I ask you to look in your Makefile and see what is on or around the same sections of instructions?

    .... later

    I found the commit that made these changes ... it is this one:

    https://github.com/espruino/Espruino/com­mit/8323a8a832ceb538e832b954bc7dbfbf3c47­685c

    as I dug deeper ... the file that is missing (eagle.app.flash.bin) appears to be generated by a program called gen_appbin.py which is named in the variable APPGEN_TOOL.

    However, what I find odd is line 1966 of the Makefile which reads:

    $(Q)COMPILE=gcc python $(APPGEN_TOOL) $(USER1_ELF) 2 $(ESP_FLASH_MODE) $(ESP_FLASH_FREQ_DIV) $(ESP_FLASH_SIZE) 0 >/dev/null

    and this is where my Makefile skills may be leaving me. What does that line do/mean? As far as I can tell it assigns to a variable called COMPILE ... but I'm guessing that must be wrong.

  • If you're compiling using the SDK that comes with the open_sdk toolchain you're gonna have fun... Install the open_sdk without SDK and get & patch the SDK separately. You can also have it simpler by following what in the .travis.yaml file manually...

    $(Q)COMPILE=gcc python $(APPGEN_TOOL) expands the $(Q) to an @ if you have verbose off, and COMPILE=gcc is an environment variable that gets set for the python command. The APPGEN_TOOL is a pythoon script that comes with the Espressif SDK and that creates the binary images.

  • The line:
    https://github.com/espruino/Espruino/blo­b/master/Makefile#L1966

    $(Q)COMPILE=gcc python $(APPGEN_TOOL) $(USER1_ELF) 2 $(ESP_FLASH_MODE) $(ESP_FLASH_FREQ_DIV) $(ESP_FLASH_SIZE) 0 >/dev/null

    This should be generating the eagle.app.flash.bin file.

    $(Q) gets evaluated - normally it it set to be empty - so it is set to Quiet - which suppresses the output.

    We can set the output to verbose, so you can see what your error is:

    make V=1 ... so in our case here we are using a script, so:

    ./build-esp-4mb.sh V=1

    This runs the build in verbose mode, so you will be able to see where the error is.

    In my case I see:

    COMPILE=gcc python /mnt/c/ubuntu/esp-open-sdk/sdk/tools/gen­_appbin.py espruino_esp8266_user1.elf 2 0 15 4 0 >/dev/null

    This implies there is something wrong with your python setup.

    As python is used to build the wrapper files - in your case I would have thought this would have failed earlier.

    What is your output from ?:

    root@OFFICE-PC:/mnt/c/ubuntu/Espruino# python -V
    Python 2.7.6
    
  • With the help of @tve ... it seems that the latest download of the esp-open-sdk brings in the ESP8266 SDK 1.5 release (note that 2.0 is now available). As such, when I tried to build Espruino, it used the ESP8266 SDK 1.5 release. Now, SDK 1.5 supplies a tool called "gen_appbin.py" which is used by the Espruino Make system. Unfortunately, SDK 1.5 added an extra required parameter to that command which, so far, we have been unable to find any documentation upon. The up-shot of this is that attempting to build Espruino against an ESP8266 SDK 1.5 (or later) results in the errors reported at the start of this thread.

    As a community, we need to decide what we want to do next. My votes would be to attempt to get Espruino working with SDK 2.0 and skip SDK 1.5. This would then mean the following tasks:

    1. Install and build the esp-open-sdk package
    2. Upgrade it to use SDK 2.0
    3. Correct/fix/change the Espruino Makefile to add the required parameters to gen_appbin
    4. Correct/fix/change the Espruino Makefile to use the "boot" file supplied by SDK 2.0.
    5. Possibly other steps ...

    Does this sound about right to the community?

    ... Later ...
    I downloaded a virgin/fresh ESP8266 directly from the Espruino Github ... and this time I found the missing/extra parameter. Yet another case of me bungling something I'm afraid. I still find problems building against 1.5 SDK ... namely I had to change the reference of lwip_536 to lwip and change the boot file from boot_v1.4(b1) to boot_v1.5. But other than it ... it compiled cleanly.

    ... Later still ...
    It seems like @Wilberforce and @tve have already provided separate pull requests to update to SDK 1.5 and SDK 2.0 ... this looks promising.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Problems compiling ESP8266 - missing "eagle.app.flash.bin"

Posted by Avatar for Kolban @Kolban

Actions