I've been crashed down by a compile issues in esp8266.

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
kevinscorpionfox
Posts: 11
Joined: Thu May 23, 2019 9:57 am

I've been crashed down by a compile issues in esp8266.

Post by kevinscorpionfox » Wed Jun 02, 2021 12:44 pm

My system is ubuntu 20.1
since I think esp-open-sdk is old, I've got the latest toolchain from here. https://github.com/espressif/ESP8266_RTOS_SDK. And I have done the path as well.

$ xtensa-lx106-elf-gcc --version
xtensa-lx106-elf-gcc (crosstool-NG esp-2020r3-49-gd5524c1) 8.4.0

now I think toolchain has been installed.
then
$ git clone https://github.com/micropython/micropython.git
$ cd ports/unix
$ make submodules
$ make
$ ./micropython, got it.
$ make test
801 tests performed (21040 individual testcases)
801 tests passed

then
cd ..
cd esp8266
$ make submodules
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
$ make V=1 submodules
Updating submodules: lib/axtls lib/berkeley-db-1.xx
git submodule update --init ../../lib/axtls ../../lib/berkeley-db-1.xx
$ make V=1
OK, IT SHOWS THE ERRORS:
*****************************************************
xtensa-lx106-elf-gcc: error: unrecognized command line option '-mforce-l32'; did you mean '--force-link'?
xtensa-lx106-elf-gcc: error: unrecognized command line option '-mforce-l32'; did you mean '--force-link'?
xtensa-lx106-elf-gcc: error: unrecognized command line option '-mforce-l32'; did you mean '--force-link'?
Traceback (most recent call last):
File "../../py/makeqstrdefs.py", line 188, in <module>
preprocess()
File "../../py/makeqstrdefs.py", line 62, in preprocess
for output in p.imap(pp(flags), chunks):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 868, in next
raise value
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "../../py/makeqstrdefs.py", line 46, in run
return subprocess.check_output(args.pp + flags + files)
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xtensa-lx106-elf-gcc', '-E', '-I../../lib/berkeley-db-1.xx/PORT/include', '-I.', '-I../..', '-Ibuild-GENERIC', '-I/usr/include', '-Wall', '-Wpointer-arith', '-Werror', '-std=gnu99', '-nostdlib', '-DUART_OS=-1', '-fsingle-precision-constant', '-Wdouble-promotion', '-D__ets__', '-DICACHE_FLASH', '-fno-inline-functions', '-Wl,-EL', '-mlongcalls', '-mtext-section-literals', '-mforce-l32', '-DLWIP_OPEN_SRC', '-DFFCONF_H="lib/oofatfs/ffconf.h"', '-DMICROPY_VFS_FAT=1', '-DMICROPY_VFS_LFS2=1', '-DLFS2_NO_MALLOC', '-DLFS2_NO_DEBUG', '-DLFS2_NO_WARN', '-DLFS2_NO_ERROR', '-DLFS2_NO_ASSERT', '-DMICROPY_PY_USSL=1', '-DMICROPY_SSL_AXTLS=1', '-I../../lib/axtls/ssl', '-I../../lib/axtls/crypto', '-I../../extmod/axtls-include', '-DMICROPY_PY_BTREE=1', '-Os', '-DNDEBUG', '-Iboards/GENERIC', '-fdata-sections', '-ffunction-sections', '-DMICROPY_MODULE_FROZEN_MPY', '-DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool', '-DMICROPY_MODULE_FROZEN_STR', '-DMICROPY_ROM_TEXT_COMPRESSION=1', '-DNO_QSTR', '../../lib/oofatfs/ff.c', '../../lib/oofatfs/ffunicode.c', '../../lib/littlefs/lfs2.c', '../../lib/littlefs/lfs2_util.c', '../../lib/axtls/ssl/asn1.c', '../../lib/axtls/ssl/loader.c', '../../lib/axtls/ssl/tls1.c', '../../lib/axtls/ssl/tls1_svr.c', '../../lib/axtls/ssl/tls1_clnt.c', '../../lib/axtls/ssl/x509.c', '../../lib/axtls/crypto/aes.c', '../../lib/axtls/crypto/bigint.c', '../../lib/axtls/crypto/crypto_misc.c', '../../lib/axtls/crypto/hmac.c', '../../lib/axtls/crypto/md5.c', '../../lib/axtls/crypto/rsa.c', '../../lib/axtls/crypto/sha1.c', '../../extmod/modbtree.c', '../../lib/berkeley-db-1.xx/btree/bt_close.c', '../../lib/berkeley-db-1.xx/btree/bt_conv.c', '../../lib/berkeley-db-1.xx/btree/bt_debug.c']' returned non-zero exit status 1.
make: *** [../../py/mkrules.mk:105: build-GENERIC/genhdr/qstr.i.last] Error 1
make: *** Deleting file 'build-GENERIC/genhdr/qstr.i.last'
*****************************************************


It seems like toolchain's problem, but I've still tried the old way
$ make V=1 axtls
make: *** No rule to make target 'axlts'. Stop.

and I've tried
$ git submodule update --init
it doesn't work as well.

So, do I have to use esp-open-sdk as the toolchain in esp8266?
Those has been added into /etc/profile

export PATH=~/ESP/xtensa-lx106-elf-gcc8_4_0-esp-2020r3-linux-amd64/xtensa-lx106-elf/bin:$PATH
export IDF_PATH=~/ESP/esp8266/ESP8266_RTOS_SDK
export ESPIDF=~/ESP/esp8266/ESP8266_RTOS_SDK
export PATH=/home/kevin/micropython/micropython/ports/unix:$PATH

I'm totally confused now. SOS.

kevinscorpionfox
Posts: 11
Joined: Thu May 23, 2019 9:57 am

Re: I've been crashed down by a compile issues in esp8266.

Post by kevinscorpionfox » Wed Jun 02, 2021 4:54 pm

I just want to tell you guys, I just try the toolchain from esp-open-sdk, version=4.8.x , now it's working for me, I will try to compile esp32 with the latest toolchain and the older one, later.

kevinscorpionfox
Posts: 11
Joined: Thu May 23, 2019 9:57 am

Re: I've been crashed down by a compile issues in esp8266.

Post by kevinscorpionfox » Tue Jun 08, 2021 12:44 pm

been tested. If you want to compile esp32, get your toolchain from there:
https://github.com/espressif/esp-idf

User avatar
hcet14
Posts: 34
Joined: Sat Dec 19, 2020 12:59 am

Re: I've been crashed down by a compile issues in esp8266.

Post by hcet14 » Sun Jun 27, 2021 9:23 am

kevinscorpionfox wrote:
Wed Jun 02, 2021 4:54 pm
I just want to tell you guys, I just try the toolchain from esp-open-sdk, version=4.8.x , now it's working for me
Hi kevinscorpionfox,

I would like to use ESP8266_RTOS_SDK. Can you be more specific what you have done exactly. You mentioned some problems
I'm totally confused now. SOS.
Thanks,

hcet14
I'm a beginner with this stuff and no programmer at all.

kevinscorpionfox
Posts: 11
Joined: Thu May 23, 2019 9:57 am

Re: I've been crashed down by a compile issues in esp8266.

Post by kevinscorpionfox » Mon Feb 21, 2022 3:28 am

hcet14 wrote:
Sun Jun 27, 2021 9:23 am
kevinscorpionfox wrote:
Wed Jun 02, 2021 4:54 pm
I just want to tell you guys, I just try the toolchain from esp-open-sdk, version=4.8.x , now it's working for me
Hi kevinscorpionfox,

I would like to use ESP8266_RTOS_SDK. Can you be more specific what you have done exactly. You mentioned some problems
I'm totally confused now. SOS.
Thanks,

hcet14
Dude, that's my "be more specific", DO NOT USE ESP8266_RTOS_SDK when you try to complie micropython project in ESP8266. I wasted couple days becasuse of this.

Post Reply