I've just started using Robo's esp'ecial ESP8266 fork with an ESP8266 board from sweetpeas.se, (a recent kickstarter), and had to change the micropython/esp8266/Makefile to work with pfalcon/esp-open-sdk compiled with espressif code separate. Would those Makefile details help the new project? Does the new project use pfalcon/esp-open-sdk as is?
John Griessen
£35 supporter
.
MicroPython on the ESP8266: beautifully easy IoT
MicroPython on the ESP8266: beautifully easy IoT
John Griessen blog.kitmatic.com
Re: MicroPython on the ESP8266: beautifully easy IoT
IMHO it should be more reasonable to wait a few weeks for the KS campaign to finish and let Damien and Paul deliver a new "release" for the ESP8266 than use the current port.
Re: MicroPython on the ESP8266: beautifully easy IoT
As the author of the fork, I agree. Wait for the official port. The port will include a makefile for pfalcon's idk and probably significantly more.
While my fork has a lot more functionality than the esp code in the official repository most of it will be duplicated in the offical port and have the official API. I'll rebase my fork to support that official port and only add device driver, functionality not already supported in the master or when I'd rather have the driver in C than python.
While my fork has a lot more functionality than the esp code in the official repository most of it will be duplicated in the offical port and have the official API. I'll rebase my fork to support that official port and only add device driver, functionality not already supported in the master or when I'd rather have the driver in C than python.
Re: MicroPython on the ESP8266: beautifully easy IoT
Wait for the official port.
OK.
The ESP fork *IS* a proof of concept.
I was able to compile it and use it, (with a little change of Makefile details)
the Makefile details were:
use an environment variable so the place on a user's file system being different did not cause editing the Makefile:
export ESP_IOT_SDK="blahblahblah" -->Something like ESP_IOT_SDK="/opt/esp-open-sdk/esp_iot_sdk_v1.5.0"
and in the Makefile:
INC += -I$(ESP_IOT_SDK)/include
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -Wno-error -ansi -std=gnu99 -nostdlib -DUART_OS=$(UART_OS) \
$(CFLAGS_XTENSA) $(COPT) $(CFLAGS_EXTRA)
LIBS = -L$(ESP_IOT_SDK)/lib -lmain -ljson -llwip -lpp -lnet80211 -lwpa -lphy -lnet80211 -lcrypto -lsmartconfig
John Griessen
John Griessen blog.kitmatic.com
Re: MicroPython on the ESP8266: beautifully easy IoT
jgriessen, Since MicroPython 1.6 release, we already started working on ESP8266 development and refactors. The changes are massive, so you may expect the port to be in flux. You can report issues via Github https://github.com/micropython/micropython , but again, the port will be in flux for some time, that's expected. Stay tuned for the upcoming new port source release, then any issue reports will be very welcome! If in the meantime you'd like to flex your firmware building skills, I'd suggest to use 1.6 release instead of master (it requires ESP8266 SDK 1.4.0).
Please note that if you follow esp-open-sdk README instructions, then no changes to MicroPython esp8266/Makefile are required - everything should work out of the box.
Please note that if you follow esp-open-sdk README instructions, then no changes to MicroPython esp8266/Makefile are required - everything should work out of the box.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: MicroPython on the ESP8266: beautifully easy IoT
I was using your https://github.com/pfalcon/esp-open-sdk with make STANDALONE=nPlease note that if you follow esp-open-sdk README instructions, then no changes to MicroPython esp8266/Makefile are required - everything should work out of the box.
Should I use make STANDALONE=y? Also, I was building the mianos fork.
I'll try following https://github.com/pfalcon/esp-open-sdk readme and
use it to compile 1.6 release instead of master or mianos fork.
-- I guess I need to unzip that, since it is not unzipped as cloned from the repo.(it requires ESP8266 SDK 1.4.0).
No, that's not enough. I still get the same missing includes as before...
Code: Select all
xtensa-lx106-elf-gcc -I../lib/netutils -I. -I.. -I../stmhal -I../lib/mp-readline -I../lib/netutils -I../lib/timeutils -Ibuild -I/opt/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib -DUART_OS=1 -fsingle-precision-constant -Wdouble-promotion -D__ets__ -DICACHE_FLASH -fno-inline-functions -Wl,-EL -mlongcalls -mtext-section-literals -Os -DNDEBUG -fdata-sections -ffunction-sections -c -MD -o build/main.o main.c
main.c:39:28: fatal error: user_interface.h: No such file or directory
#include "user_interface.h"
^
compilation terminated.
Code: Select all
# Whether to merge SDK into Xtensa toolchain, producing standalone
# ESP8266 toolchain. Use 'n' if you want generic Xtensa toolchain
# which can be used with multiple SDK versions.
STANDALONE = y
# Directory to install toolchain to, by default inside current dir.
TOOLCHAIN = $(TOP)/xtensa-lx106-elf
# Vendor SDK version to install, see VENDOR_SDK_ZIP_* vars below
# for supported versions.
VENDOR_SDK = 1.5.0
Should I change the Makefile from esp-open-sdk?
John Griessen
John Griessen blog.kitmatic.com
Re: MicroPython on the ESP8266: beautifully easy IoT
Yes. When I change just this in esp-open-sdk/Makefile from git master as of today,Should I change the Makefile from esp-open-sdk?
VENDOR_SDK = 1.5.0
-->
VENDOR_SDK = 1.4.0
then recompile esp-open-sdk, then recompile v1.6 checkout of micropython/micropython,
teh compile works.
John Griessen blog.kitmatic.com
Re: MicroPython on the ESP8266: beautifully easy IoT
You should use the default, which is STANDALONE=y, and then just "make" is enough. Perhaps, that wasn't made explicit enough, and now it should be, please re-read README at https://github.com/pfalcon/esp-open-sdk .jgriessen wrote:
I was using your https://github.com/pfalcon/esp-open-sdk with make STANDALONE=n
Should I use make STANDALONE=y?
You don't need to change anything, you can pass any variable on the make command line, like you already did with "make STANDALONE=n". Specifically, to build with 1.4.0 SDK, use "make VENDOR_SDK=1.4.0". If you're serious about building various software projects, you may find useful to at least skim thru GNU make manual at https://www.gnu.org/software/make/manua ... index.html , to know what capabilities are available and where to look for more details later.When I change just this in esp-open-sdk/Makefile from git master as of today,
VENDOR_SDK = 1.5.0
So, the idea is that you don't need to change anything, everything works out of the box. At most, you need to override some parameters via command line, to match requirements of different components, like MicroPython 1.6.0 requiring ESP8266 SDK 1.4.0. I also made sure that current uPy master builds with current esp-open-sdk master. But keep in mind "the port is in flux" notice above. We'll be establishing formal testing process (like, CI loop) after the source code release.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/