ESP8266 Missing linker scripts

Has anybody tried the ESP8266 tool chain on the new version of the IDE ?

Using Version 0.10.5 on Linux Mint 18.2. on a 64 bit machine.
Have loaded correct version of Java (1.8.0_191).
IDE works with Arduino Mega 256 - no problems in compiling and downloading test program (Blink).

When attempting to compile test program for "Wemos R1 R2 & mini" fails at Linking sketch stage fails with the following error message :

• Converting binary files
• Compiling sketch...
• Compiling core...
‣ esp8266
• Compiling libraries...
• Linking sketch...

/home/xxxx/.uecide/compilers/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot open linker script file -Wl,--gc-sections: No such file or directory
collect2: error: ld returned 1 exit status
Compiling Failed

Does anyone have a explanation for the above ?
Is it something I have either done or neglected to do, such as
1. Not selected and downloaded the correct ESP8266 options.
2. Are there further compile / linker options to be specified.

Since first contemplating this post I have got the test sample program to compile and download using a). ESPressif tools and b). Arduino IDE (1.8.8) separately.

I now suspect that this is due to a linker script file of the form "eagle.app.v6.xxx.ld" not being found or not installed.

Where should this file (and other linker files) be located ?
Is there a specific configuration file that needs to be amended to solve this problem ?

Any help would be greatly appreciated.

Apologies in advance if this post breaks any site conventions or etiquette as this is my first post to any forum.

Tags: 

Comments

Odd. This used to work fine.

Odd. This used to work fine. Suddenly it's not got the specification for the LD script in the configuration. No idea what has gone wrong there...

Ok, new version of the

Ok, new version of the esp8266 packages are now up - you can update them in the plugin manager.

Many thanks for the very

Many thanks for the very prompt solution to my query. The suggested update using the plugin manager did indeed solve the missing linker scripts error.
I did notice that during the upgrade there was a warning about a broken dependency. I did make a note of it but seem to have lost that piece of paper - from memory it referred to "firmdata-arduino" I think. The warning seemed to make no difference to the compilation and linking of the the test script.

I now have another problem to report in that I am unable to download to the ESP8266 module. It fails with the following error :

Compiling finished.
Memory usage
• Program size: 246,355 bytes
• Memory size: 30,468 bytes (37%)
• Compilation took 10.691 seconds.
{Core/err.noprogrammer}

I have spent some time attempting to solve this myself. I can confirm that the directory :
"/home/xxxx/.uecide/programmers/tools/linux64" contains a copy of esptool (V0.4.8). I assume that this is the required programmer. I suspect that this is another configuration error / mismatch, and as such is outside my control. However this has been a very good learning experience as it has caused me to read up on esptool and other aspects of ESP8266 downloading and communication.

Any advice or insights as to a possible solution would be appreciated, as I realise I do not know enough about the configuration / compilation / linking / download processes used by UECIDE to continue without possibly breaking something else in error.

That error (it actually

That error (it actually should have a much nicer text, but it's missing from the i18n file - oops) is emitted when there is no programmer selected in the Hardware menu. Make sure that:

  • The esptool programmer is installed, and
  • It is selected for use.

Hi Matt,

Hi Matt,
Sorry to bother you again but following on from my last post I am still unable to flash my ESP8266 module via UECIDE.
Firstly, in my previous post I got the path to the "esptool" wrong it should have been :
"/home/xxxx/.uecide/programmers/esptool/tools/linux64/

I believe the ESP programmer is installed (green tick in Tools-->Plugin Manager--Programmers-->ESP8266 menu).
ESPtool for the ESP8266 Programmer
Available : 5.0.8
Installed : 5.0.8

Is there anything other option I need to choose in order to select the esptool programmer.
I thought it was automatically selected when an ESP8266 board was chosen.

The "esptool" is located in directory "/home/xxxx/.uecide/programmers/esptool/tools/linux64/"
cd into above directory and running in terminal
./esptool -version
gives
esptool v0.4.8 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>

Running the same command from user "home" directory gives same output.

If I rename esptool, then recompile using UECIDE I get the following messages :
Compiling...
• Preprocessing...
• Converting binary files
• Compiling sketch...
• Compiling core...
‣ esp8266
• Compiling libraries...
• Linking sketch...
‣ Generating bin file...
Unable to start process
Cannot run program "/home/xxxx/.uecide/programmers/esptool/tools/linux64/esptool" (in directory "/tmp//tmp/build-df2b78dc-f96c-4277-ab3f-8cf5cb88aa2a"): error=2, No such file or directory
‣ Generating eep file...
‣ Generating etx file...
‣ Generating lss file...
Compiling finished.
Memory usage
• Program size: 246,355 bytes
• Memory size: 30,468 bytes (37%)
• Compilation took 8.405 seconds.
{Core/err.noprogrammer}

Error message suggests that esptool located in the above directory is installed and being used by UECIDE, prior to the renaming.
I have listed the options selected for the ESP module (defaults - not altered from installation).

#pragma option CpuFrequency = 80
#pragma option Debug = Disabled
#pragma option DebugLevel = None____
#pragma option FlashErase = none
#pragma option FlashSize = 4M1M
#pragma option LwIPVariant = v2mss536
#pragma option UploadSpeed = 115200
#pragma option warnings = off

Changing flash size makes no difference to error message {Core/err.noprogrammer}
Changing upload speed makes no difference to error message {Core/err.noprogrammer}

Hardware-->Programmers menu entry is blank implying that UECIDE identifies that "esptool" is not installed.

STAND ALONE OPERATION OF ESPTOOL
I can upload flash the ESP module from a terminal using the esptool in the /home/xxx/../../linux64 directory in the the three (3) screnarios specified using the command line options listed below, so I do not think the 'esptool' is at fault.

OPTION 1 - UECIDE generated "espblink.bin" copied to "esptool" directory
cd into "esptool" directory
./esptool -bz 4M -bf 80M -cp /dev/ttyUSB0 -cd nodemcu -cf espblink.bin

OPTION 2 - UECIDE generated "espblink.bin" from /tmp/build-xx" directory
cd into "esptool" directory
./esptool -bz 4M -bf 80M -cp /dev/ttyUSB0 -cd nodemcu -cf /tmp/build-df2b78dc-f96c-4277-ab3f-8cf5cb88aa2a/espblink.bin

OPTION 3 - UECIDE generated "espblink.bin" from /tmp/build-xx" directory
cd into "home" directory
/home/xxxx/.uecide/programmers/esptool/tools/linux64/esptool -bz 4M -bf 80M -cp /dev/ttyUSB0 -cd nodemcu -cf /tmp/build-df2b78dc-f96c-4277-ab3f-8cf5cb88aa2a/espblink.bin

I believe that the above largely rules out :-
1. Problems with the path to the "esptool".
2. Problems with the path to the file to be downloaded.
3. Problems with the length and format of the command line options.
4. Problems with directory and access permissions ?

Sorry about the length of this but I know your time is limited and want to provide as much information to enable you to focus on the likely source of the problem.
Thanks in advance for your help.

That is a truly odd error. It

That is a truly odd error. It says the file isn't found, but it plainly is. I'd say it was trying to run a 32-bit executable on a 64-bit OS without the 32-bit libraries installed, but it's not because you can run it manually.

The command it's running at that point is:

/home/matt/.uecide/programmers/esptool/tools/linux64/esptool \
    -eo /home/matt/.uecide/cores/esp8266/bootloaders/eboot/eboot.elf \
    -bo /tmp/untitled22/build/untitled22.bin \
    -bm dio \
    -bf 40 \
    -bz 4M \
    -bs .text \
    -bp 4096 \
    -ec \
    -eo /tmp/untitled22/build/untitled22.elf \
    -bs .irom0.text \
    -bs .text \
    -bs .data \
    -bs .rodata \
    -bc \
    -ec   

I don't like the /tmp//tmp/... bit though. That does look somewhat odd. That path is obtained from the internal build.path variable, which should be set from the absolute path of the build folder. Normally that uses the java.io.tmpdir system property from Java - so maybe that has got messed up on your system somehow?

You can try seeing if that is the cause of the problem by turning on "Compile the sketch in the sketch folder" in Preferences (in "Preferences/Compiler"). That uses a "build" folder inside the sketch folder instead of one in /tmp.

I found a typo in the family

I found a typo in the family specification for the esptool programmer. If you update in the program manager hopefully it should start working.

Matt,

Matt,
Success!! It works !!
Many thanks for continuing to investigate.

I had tested as you suggested (compiling in sketch directory) and it made no difference to the error reported. I was at a bit of loss as to how to test any further.
I had got to the stage where I was considering the nuclear option - a fresh install of the operating system, reloading the correct version of Java and then UECIDE. I had made a backup of all the different installations I had done in preparation, so the fact that it now downloads to the ESP8266 module has clearly saved me quite a bit of potentially wasted time.

I had done quite a lot of playing around with ESP compilers and the Espressif SDK, different versions of UECIDE and loaded Arduino as well, so was unable to guarantee that I had not screwed up somewhere along the route, or that I had introduced a subtle conflict or interaction between the different systems. I must admit that I had not noticed the double slash in the path to the "esptool" that I mentioned in my previous post.

It is good to feel that I have not been "crying wolf" as to the error and have even contributed to helping make UECIDE better in some small way.

Keep up the good work and thanks again for responding as quickly as you did to my posts. I hope, in the best way possible, that I won't be bothering you again for some time.

Pages