Linux Command Line on Windows

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Peter.Kenyon
Posts: 70
Joined: Wed Oct 14, 2015 5:07 pm

Linux Command Line on Windows

Post by Peter.Kenyon » Thu Mar 31, 2016 7:11 am

Saw this at Build, https://channel9.msdn.com/Events/Build/2016/C906
maybe this will help out us windoze people to build upython.
Though personally I don't know why we don't use ... python

stijn
Posts: 484
Joined: Thu Apr 24, 2014 9:13 am

Re: Linux Command Line on Windows

Post by stijn » Thu Mar 31, 2016 8:25 am


Peter.Kenyon
Posts: 70
Joined: Wed Oct 14, 2015 5:07 pm

Re: Linux Command Line on Windows

Post by Peter.Kenyon » Sat Apr 09, 2016 10:49 am

windows 10 insider build 14316 has this feature.
watch this space

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

Re: Linux Command Line on Windows

Post by dhylands » Sat Apr 09, 2016 6:19 pm

Peter.Kenyon wrote:Saw this at Build, https://channel9.msdn.com/Events/Build/2016/C906
maybe this will help out us windoze people to build upython.
Though personally I don't know why we don't use ... python
I probably wouldn't use MicroPython as-is on Windows, unless I was just testing for compatability. But I believe that there are several people which embed MicroPython inside other apps, which happen to be built on Windows. In this case it makes sense to have a vanilla micropython build for testing purposes.

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

Re: Linux Command Line on Windows

Post by dhylands » Sat Apr 09, 2016 6:23 pm

Peter.Kenyon wrote:windows 10 insider build 14316 has this feature.
watch this space
I don't have a Windows 10 machine to play with this on, but this feature might tempt me to upgrade my Windows 7 machine.

I've read that you can't run Windows executables from bash running in this environment. So I suspect you'll need to use the linux toolchain (rather than the Windows one) in order to build micropython.

It will be interesting to find out how tools like flashing will work in this environment.

stijn
Posts: 484
Joined: Thu Apr 24, 2014 9:13 am

Re: Linux Command Line on Windows

Post by stijn » Sat Apr 09, 2016 6:58 pm

dhylands wrote:I probably wouldn't use MicroPython as-is on Windows, unless I was just testing for compatability. But I believe that there are several people which embed MicroPython inside other apps, which happen to be built on Windows. In this case it makes sense to have a vanilla micropython build for testing purposes.
uPy 'core' works fine on Windows, it's just not extensive as the unix port. Anyway I thought the Peter was talking about cross-compiling etc using native linux toolchains, since this can be a bit of a challenge now if you only have a Windows box?

I quickly tried the latest Windows 10 build and it indeed gives you a bash shell, actually quite nifty. Still needs some work though.

Peter.Kenyon
Posts: 70
Joined: Wed Oct 14, 2015 5:07 pm

Re: Linux Command Line on Windows

Post by Peter.Kenyon » Sun Apr 10, 2016 6:10 am

Yes I want to be able to cross compile for the stm port. I got it working using a hyperv, but hopefully this will work as well.

rajeevmu
Posts: 1
Joined: Mon May 16, 2016 11:06 am
Contact:

Re: Linux Command Line on Windows

Post by rajeevmu » Mon May 16, 2016 11:26 am

[quote="Peter.Kenyon"]Saw this at Build, [url]https://channel9.msdn.com/Events/Build/2016/C906[/url]
maybe this will help out us windoze people to build upython.
Though personally I don't know why we don't use ... python[/quote]
Even I do not know it. I am working on C language because in college you only get to learn about languages such as C, C++ and Jave. Python is considered as backward language in India. You just get basic knowledge about python. Even in my college , there is not even a single teacher who can teach me this language.

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

Re: Linux Command Line on Windows

Post by dhylands » Mon May 16, 2016 3:23 pm

Why people want to use micropython on a PC has been discussed elsewhere on the forum.

stijn
Posts: 484
Joined: Thu Apr 24, 2014 9:13 am

Re: Linux Command Line on Windows

Post by stijn » Thu Jul 07, 2016 1:17 pm

I quickly tried the latest Windows 10 build and it indeed gives you a bash shell, actually quite nifty. Still needs some work though.
No idea why I didn't try it immediately, but the thing really works *way* better than I expected: I just did apt-get install build-essential, cloned micropython, cd unix, make axtls, make, make test and it all just works without any problem. I mean, wtf, even all tests pass :o

So basically I've always been keeping msys/cygwin/linux virtual machines around, or logging into workstations to test linux things when developping but it seems it will be possible to drop at least some of those.

Post Reply