@@ -3,46 +3,73 @@ It is based on Unix port, and expected to remain so.
3
3
The port requires additional testing, debugging, and patches. Please
4
4
consider to contribute.
5
5
6
+ All gcc-based builds use the gcc compiler from [ Mingw-w64] ( mingw-w64.org ) ,
7
+ which is the advancement of the original mingw project. The latter is
8
+ getting obsolete and is not actively supported by MicroPython.
9
+
10
+ Build instruction assume you're in the ports/windows directory.
6
11
7
12
Building on Debian/Ubuntu Linux system
8
13
---------------------------------------
9
14
10
- sudo apt-get install gcc-mingw-w64
15
+ sudo apt-get install python3 build-essential gcc-mingw-w64
16
+ make -C ../../mpy-cross
11
17
make CROSS_COMPILE=i686-w64-mingw32-
12
18
13
- If for some reason the mingw-w64 crosscompiler is not available, you can try
14
- mingw32 instead, but it comes with a really old gcc which may produce some
15
- spurious errors (you may need to disable -Werror):
16
-
17
- sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
18
- make CROSS_COMPILE=i586-mingw32msvc-
19
-
20
19
21
20
Building under Cygwin
22
21
---------------------
23
22
24
- Install following packages using cygwin 's setup.exe:
23
+ Install Cygwin, then install following packages using Cygwin 's setup.exe:
25
24
26
25
* mingw64-i686-gcc-core
27
26
* mingw64-x86_64-gcc-core
28
27
* make
29
28
29
+ Also install the python3 package, or install Python globally for Windows (see below).
30
+
30
31
Build using:
31
32
33
+ make -C ../../mpy-cross CROSS_COMPILE=i686-w64-mingw32-
32
34
make CROSS_COMPILE=i686-w64-mingw32-
33
35
34
36
Or for 64bit:
35
37
38
+ make -C ../../mpy-cross CROSS_COMPILE=x86_64-w64-mingw32-
36
39
make CROSS_COMPILE=x86_64-w64-mingw32-
37
40
38
41
42
+ Building under MSYS2
43
+ --------------------
44
+
45
+ Install MSYS2 from http://repo.msys2.org/distrib , start the msys2.exe shell and
46
+ install the build tools:
47
+
48
+ pacman -Syuu
49
+ pacman -S make mingw-w64-x86_64-gcc pkg-config python3
50
+
51
+ Start the mingw64.exe shell and build:
52
+
53
+ make -C ../../mpy-cross STRIP=echo SIZE=echo
54
+ make
55
+
56
+
39
57
Building using MS Visual Studio 2013 (or higher)
40
58
------------------------------------------------
41
59
42
- In the IDE, open ` micropython.vcxproj ` and build.
60
+ Install Python. There are several ways to do this, for example: download and install the
61
+ latest Python 3 release from https://www.python.org/downloads/windows or from
62
+ https://docs.conda.io/en/latest/miniconda.html ,
63
+ or open the Microsoft Store app and search for Python and install it.
64
+
65
+ Install Visual Studio and the C++ toolset (for recent versions: install
66
+ the free Visual Studio Community edition and the * Desktop development with C++* workload).
67
+
68
+ In the IDE, open ` micropython-cross.vcxproj ` and ` micropython.vcxproj ` and build.
43
69
44
70
To build from the command line:
45
71
72
+ msbuild ../../mpy-cross/mpy-cross.vcxproj
46
73
msbuild micropython.vcxproj
47
74
48
75
__ Stack usage__
@@ -57,6 +84,19 @@ There are several ways to deal with this:
57
84
See [ issue 2927] ( https://github.com/micropython/micropython/issues/2927 ) for more information.
58
85
59
86
87
+ Running the tests
88
+ -----------------
89
+
90
+ This is similar for all ports:
91
+
92
+ cd ../../tests
93
+ python3 ./run-tests
94
+
95
+ Depending on the combination of platform and Python version used it might be
96
+ needed to first set the MICROPY_MICROPYTHON environment variable to
97
+ the full path of micropython.exe.
98
+
99
+
60
100
Running on Linux using Wine
61
101
---------------------------
62
102
0 commit comments