Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By bluegiraffe
#34512 So I'm trying out the new Sming develop branch and while the provided examples compile fine and work, one of my programs compiles but then it fails at generating the image:

Code: Select all# Generating image...
Traceback (most recent call last):
  File "/opt/esp-open-sdk/esptool/esptool.py", line 647, in <module>
    image.add_segment(e.get_symbol_addr(start), data)
  File "/opt/esp-open-sdk/esptool/esptool.py", line 384, in get_symbol_addr
    self._fetch_symbols()
  File "/opt/esp-open-sdk/esptool/esptool.py", line 381, in _fetch_symbols
    self.symbols[fields[2]] = int(fields[0], 16)
ValueError: invalid literal for int() with base 16: 'U'
/opt/Sming/Sming/Makefile-project.mk:274: recipe for target 'out/build/app.out' failed
make: *** [out/build/app.out] Error 1


I'm using the latest version of the esp-open-sdk.

Any ideas?
User avatar
By bluegiraffe
#34640 Well, no answer, but anyway...

The issue is with esptool.py something is wrong with it and gives the above error when converting the elf image to the bin files that are needed to be flashed onto the esp8266.

Using the latest repository for the esptool.py the error changes to:
A fatal error occurred: ELF binary has undefined symbol __errno

The solution?

I was able to use an esptool.py alternative -> https://github.com/igrr/esptool-ck
and with this version the images/bin files are generated correctyl and then make flash works as usual.
User avatar
By bluegiraffe
#34771 I used as is documented on the Github page:

The example:
Code: Select allesptool -bz 4M -eo app.elf -bo app_00000.bin -bs .text -bs .data -bs .rodata -bc -ec -eo app.elf -es .irom0.text app_40000.bin -ec


So I replace the app.elf filename to be our/build/app.out.
It then generates the bin image files., in the above example app_00000.bin and app_40000.bin.

What I did was to do a make flash to see what files the esptool.py is expecting and copy the above generated files to the correct location.
An example:
Code: Select allesptool -bz 4M -eo out/build/app.out -bo out/firmware/0x00000.bin  -bs .text -bs .data -bs .rodata -bc -ec -eo out/build/app.out  -es .irom0.text  out/firmware/0x40000.bin  -ec


Then I just call make flash and it works.

Note that I'm not flashing the spiff filesystem.