Ported to esp8266!?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Ported to esp8266!?

Post by pfalcon » Sat Jan 24, 2015 1:52 pm

There was some progress on esp8266 port lately - REPL code was refactored to fit with cooperative multistasking nature of esp8266, which opens the road to actually implement networking functionality. Initial bit of such code was posted for review - https://github.com/micropython/micropython/pull/1083 .

But the progress is slow and will remain slow unless more people will cooperate on and contribute to port. (And there's really a need for cooperation, as many things need to be discussed before implementing). So, if you're interested in thi sport, please consider:
  • Contribute
  • If you can't contribute code, please spread the word, to find people who can contribute code
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/

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Ported to esp8266!?

Post by kfricke » Tue Jan 27, 2015 11:06 am

I do understand your sub-thread spawned from this topic, but am not into those topics deep enough to be really help out there. I could test your ESP2688 ports (preferably in binary form) and contribute pure python code, but sadyl not more. I assume contributing to porting is needed far more at this time?!?

Is there anything can you suggest me to try to contribute to in this topic?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Ported to esp8266!?

Post by pfalcon » Wed Jan 28, 2015 1:18 am

kfricke wrote: I assume contributing to porting is needed far more at this time?!?
Actually, spreading the word is more important than code writing. The idea is simple: if only every 1000th of who heard about it will contribute, then hundreds of thousands should hear about it ;-).
Is there anything can you suggest me to try to contribute to in this topic?
Why need for so explicit instructions? ;-) Well, ok, esp8266.com forum has a thread on MicroPython, right? On which page it is now? Target: to make sure it never falls off page 1. By whatever means - posting poring news (don't post all at once, sustainability is the key), starting flame that Lua sucks and Python rules, whatever ;-).
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/

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Ported to esp8266!?

Post by kfricke » Thu Feb 05, 2015 10:45 am

The recent Git commits are making me interested in the new features of this port (wifi is being implemented). So i decided to give this build a try.

Building the ESP-Open-SDK from pfalcon's Git repository worked on my Debian Wheezy like a charm (except Wheezy does not know a unrar package, luckily this is not needed). But the "make" in the esp8266 directory of MicroPython does not work, because the ESP-Open-SDK can not be found. There is no description for the final step to "install the SDK locally", as mentioned in the README.md of this port. Or did i miss it somewhere?

Code: Select all

$ make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
mkdir -p build/genhdr
make: xtensa-lx106-elf-gcc: Kommando nicht gefunden
CPP ../py/qstrdefs.h
make: xtensa-lx106-elf-gcc: Kommando nicht gefunden
make: *** [build/genhdr/qstrdefs.generated.h] Fehler 127
Regardless the fact that I am not that far into successfully building the firmware image for the ESP8266... will i then be able to download the firmware onto my ESP8266 using my USB-FTDI Adapter, which is configured to target 3.3v logic-level? Of course the ESP8266 must first be set into the correct boot mode etc.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Ported to esp8266!?

Post by dhylands » Thu Feb 05, 2015 6:15 pm

That's the toolchain that's missing.

So somewhere in the tree you should find it (perhaps try using find some-dir -name xtensa-lx106-elf-gcc) and add that directory to your PATH

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Ported to esp8266!?

Post by pfalcon » Thu Feb 05, 2015 7:14 pm

Or did i miss it somewhere?
Yes, the needed steps are output at the end of esp-open-sdk installation process (and yes, there're no magic in them - you need to add binaries to PATH, just as any other toolchain, or binary package in general).
Regardless the fact that I am not that far into successfully building the firmware image for the ESP8266... will i then be able to download the firmware onto my ESP8266 using my USB-FTDI Adapter, which is configured to target 3.3v logic-level?
You will be, if you follow relevant instructions exactly (relevant instructions are those related to esp8266 development in general, not uPy port to it).
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/

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Ported to esp8266!?

Post by kfricke » Thu Feb 05, 2015 9:28 pm

Got it after opening my eyes and firmware is built now. Went nice and smooth. Thanks for the collection of the toolchain!
You should not call the final step "installation", but "adding the SDK to the build environment" ;-)

Now i will take my little spare time this weekend and study the ESP8266 programming instructions. Thanks so far!

raz123
Posts: 2
Joined: Sun Feb 08, 2015 2:47 am

Re: Ported to esp8266!?

Post by raz123 » Sun Feb 08, 2015 2:49 am

kfricke wrote:Got it after opening my eyes and firmware is built now.
Sweet. Could you upload it somewhere? I'd like to try it and can't build for now :\

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Ported to esp8266!?

Post by kfricke » Mon Feb 09, 2015 9:17 am

Sure, check this link (valid only for two days!). Good luck with it and please report back here!

I haven't had the fine soldering iron at hand to modify my ESP board to download the firmware onto it. I have an Olimex ESP8266 DEV board. Does anyone have a good advice how to modify this board to easily switch those tiny jumper pads?
The Olimex docs does tell us...
If you want, you can add wires and a PTH jumper or a slide switch to the
pads of the jumpers. This would allow easier change of the jumpers in
future.
But i don't like wires floating off the board.

My only idea would be to open the connections and use the exposed pins on the side of the board to mount the whole devboard onto another board which makes the needed pins "switchable". This sadly enlarges the tiny board as well :-/

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: Ported to esp8266!?

Post by kfricke » Mon Feb 09, 2015 1:46 pm

@pfalcon: On the official ESP8266 forum i got a request for wifi connection examples. Can you provide some? Due to the fact outlined in my previous post i have not been able to work on this yet. Thanks!

Post Reply