Cross Compiler only
Cross Compiler only
Hello,
When the binaries became public, I stopped compiling myself from source and deleted the bloated Vagrant VM which I had built following the Adafruit tutorial.
Now I would like to start experimenting again with frozen/precompiled modules and I am wondering: would it be possible to install and run only the cross-compiler on its own without having to install the whole toolchain for firmware compilation?
Since Ubuntu command line is now included in Windows 10 after the last update, I now have the possibility to install some parts of the toolchain without having to create yet another full fledged-VM.
Any pointers as to which elements are required for a cross-compiler-only use would be appreciated.
Llwy
When the binaries became public, I stopped compiling myself from source and deleted the bloated Vagrant VM which I had built following the Adafruit tutorial.
Now I would like to start experimenting again with frozen/precompiled modules and I am wondering: would it be possible to install and run only the cross-compiler on its own without having to install the whole toolchain for firmware compilation?
Since Ubuntu command line is now included in Windows 10 after the last update, I now have the possibility to install some parts of the toolchain without having to create yet another full fledged-VM.
Any pointers as to which elements are required for a cross-compiler-only use would be appreciated.
Llwy
Re: Cross Compiler only
mpy-cross is independent form any target device. For trial, I just built it on Windows 7/mingw, and it compiled and works. So yes, you can create mpy-cross separately. The other aspect is running the compiled files on esp8266. In the official build, the precompiled files atre packed into flash. For that, you have to install the complete toolchain (dang).
But you can also have esp8266 executing compiled Python scrips directly from the file system. Unfortunately, this requires changing mpconfigport.h and py/emitglue.c and creating a new binary (see viewtopic.php?f=16&t=1962&p=11014) , which means: you are trapped again. Maybe @pfalcon could enable support of .mpy files as standard feature.
Regards
But you can also have esp8266 executing compiled Python scrips directly from the file system. Unfortunately, this requires changing mpconfigport.h and py/emitglue.c and creating a new binary (see viewtopic.php?f=16&t=1962&p=11014) , which means: you are trapped again. Maybe @pfalcon could enable support of .mpy files as standard feature.
Regards
Re: Cross Compiler only
Dear Robert.
Thank you for your quick answer.
I had forgotten about the need to edit emitglue.c and mpconfigport.h...
I now remember since you were the one to tell me about those files in the first place.
OK so there is nothing much I can do right now to experiment with .mpy files if I do not wish to install and maintain a complete firmware compilation toolchain.
I'll keep my eyes open in case the .mpy support from flash becomes a standard feature.
Thank you for your quick answer.
I had forgotten about the need to edit emitglue.c and mpconfigport.h...
I now remember since you were the one to tell me about those files in the first place.
OK so there is nothing much I can do right now to experiment with .mpy files if I do not wish to install and maintain a complete firmware compilation toolchain.
I'll keep my eyes open in case the .mpy support from flash becomes a standard feature.
Re: Cross Compiler only
Hello Llwy, I could pack you the recent binary with these patches. I'll send y note this evening.
Re: Cross Compiler only
That's awfully nice of you Robert, thank you for the offer.
I will gladly take it.
Llwy
I will gladly take it.
Llwy
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Cross Compiler only
My approach is to get the toolchain from here http://www.kaltpost.de/~wendlers/micropython/ and use it to compile the current source. This saves a load of hassle and disk space; nor any need to edit sourcefiles. You can then quickly produce and deploy a build with modules frozen as bytecode.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Cross Compiler only
@Llwy: I have placed an actual build with mpy file support from the command line here: https://github.com/robert-hh/Shared-Stuff.git
All files that used to be in the scripts directory have been moved to the modules directory, and are thus compiled, and there is also a copy of upysh.py and pye.py included there (It's just my standard set). See if it works for you. But finally, I think that you will reinstall the tool chain, like pythoncoder suggested. With Windows10/bash it could/should work. I tried the standard toolchain for the ARM version, but not the esp toolchain.
Best Regards, Robert
All files that used to be in the scripts directory have been moved to the modules directory, and are thus compiled, and there is also a copy of upysh.py and pye.py included there (It's just my standard set). See if it works for you. But finally, I think that you will reinstall the tool chain, like pythoncoder suggested. With Windows10/bash it could/should work. I tried the standard toolchain for the ARM version, but not the esp toolchain.
Best Regards, Robert
Re: Cross Compiler only
Dear Robert,
I flashed your binary successfully.
I will try to install the cross compiler only on Windows Bash this weekend.
Llwy
I flashed your binary successfully.
I will try to install the cross compiler only on Windows Bash this weekend.
Llwy
Re: Cross Compiler only
Hello Llwy, once you're in bash, just run:
That will install almost all tools needed for SW building.
Code: Select all
apt-get install build-essential
Re: Cross Compiler only
Use this as has been said.
http://www.kaltpost.de/~wendlers/micropython/
You shouldn't even need build-essential just "make" and the SDK.
The new Windows 10 thing is just a shell and some other bits and pieces in fact a lot like Cygwin. I somewhat doubt it'll actually run Linux binaries, for which you'll want a little virtual machine, but am happy to be corrected. Looks like I am corrected though cracks in emulation still might dictate use of a proper VM.
Jon
http://www.kaltpost.de/~wendlers/micropython/
You shouldn't even need build-essential just "make" and the SDK.
The new Windows 10 thing is just a shell and some other bits and pieces in fact a lot like Cygwin. I somewhat doubt it'll actually run Linux binaries, for which you'll want a little virtual machine, but am happy to be corrected. Looks like I am corrected though cracks in emulation still might dictate use of a proper VM.
Jon