MicroPython Compilation Error

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Scorpi0
Posts: 9
Joined: Sat Mar 12, 2016 2:04 pm

Re: MicroPython Compilation Error

Post by Scorpi0 » Sun Mar 13, 2016 4:16 pm

Thank you for the replies, but I'm still receiving the error. My problem is after creating the esp-open-sdk, when I compile micropython using "make", I get this:

Code: Select all

vagrant@vagrant-ubuntu-trusty-64:~/micropython/esp8266$ make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
CC ets_alt_task.c
In file included from ets_alt_task.c:5:0:
/home/vagrant/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/esp_sdk_ver.h:1:1: error: expected identifier or '(' before '-' token
 -e #undef ESP_SDK_VERSION
 ^
/home/vagrant/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/esp_sdk_ver.h:1:4: error: stray '#' in program
 -e #undef ESP_SDK_VERSION
    ^
make: *** [build/ets_alt_task.o] Error 1
vagrant@vagrant-ubuntu-trusty-64:~/micropython/esp8266$ 
After rebuilding the toolchain I still get the same problem. I followed the guide on adafruit: "https://learn.adafruit.com/building-and ... d-firmware".

Llwy
Posts: 34
Joined: Thu Mar 10, 2016 7:43 am

Re: MicroPython Compilation Error

Post by Llwy » Sun Mar 13, 2016 5:50 pm

Scorpi0,
I have exactly the same behaviour, even after updating and re-building the SDK with

Code: Select all

make clean
git pull
git submodule sync
git submodule update
make
For me, the only way to compile properly is to manually edit /home/vagrant/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/esp_sdk_ver.h as explained by another poster and remove the "-e".
It is however necessary to edit the file AFTER the SDK "make" command as the "make" command will overwrite the file's modifications.

I hope this helps,

Llwy

Scorpi0
Posts: 9
Joined: Sat Mar 12, 2016 2:04 pm

Re: MicroPython Compilation Error

Post by Scorpi0 » Sun Mar 13, 2016 7:05 pm

Thank you for you reply. Sorry but i'm new to this, can you explain how to manually edit the file under the mac terminal?

gschmott
Posts: 6
Joined: Sun Mar 13, 2016 5:03 pm

Re: MicroPython Compilation Error

Post by gschmott » Sun Mar 13, 2016 7:57 pm

Llwy wrote:Scorpi0,
I have exactly the same behaviour, even after updating and re-building the SDK with

Code: Select all

make clean
git pull
git submodule sync
git submodule update
make
For me, the only way to compile properly is to manually edit /home/vagrant/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/esp_sdk_ver.h as explained by another poster and remove the "-e".
It is however necessary to edit the file AFTER the SDK "make" command as the "make" command will overwrite the file's modifications.

I hope this helps,

Llwy
Re-sync the esp-open-sdk repo. With https://github.com/pfalcon/esp-open-sdk ... ba5ec1bd7b this issue is fixed by telling 'make' to use the bash shell whose 'echo' function understands the '-e' option. I re-sync'ed and this issue went away.

Scorpi0
Posts: 9
Joined: Sat Mar 12, 2016 2:04 pm

Re: MicroPython Compilation Error

Post by Scorpi0 » Mon Mar 14, 2016 5:34 am

Thank you for your update, it works fine now. Problem solved!

skylin008
Posts: 53
Joined: Wed Mar 11, 2015 6:21 am

Re: MicroPython Compilation Error

Post by skylin008 » Mon Mar 14, 2016 8:52 am

I used latest esp sdk adn micropython version.when compiled ,show follw error message:
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -lmain
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -ljson
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -lssl
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -llwip_open
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -lpp
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -lnet80211
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -lwpa
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -lphy
/opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-ld: cannot find -lnet80211
make:****[build/firmware.elf] Error 1.[/b]

how to solve this issue.Thanks advance!

Scorpi0
Posts: 9
Joined: Sat Mar 12, 2016 2:04 pm

Re: MicroPython Compilation Error

Post by Scorpi0 » Mon Mar 14, 2016 7:48 pm

I have another problem when I tried to run the firmware on my ESP8266. I get a blank screen first, then after pressing enter, it says: "task prio out of range: 2". I can't see what i'm typing.

How can I fix it?
Thanks.


Scorpi0
Posts: 9
Joined: Sat Mar 12, 2016 2:04 pm

Re: MicroPython Compilation Error

Post by Scorpi0 » Mon Mar 14, 2016 8:33 pm

Ok thanks.

Scorpi0
Posts: 9
Joined: Sat Mar 12, 2016 2:04 pm

Re: MicroPython Compilation Error

Post by Scorpi0 » Tue Mar 15, 2016 6:30 pm

I still get the same error (task prio out of range: 2) even after changing:

Code: Select all

#define UART_TASK_ID 0

to

#define UART_TASK_ID 1

Post Reply