1 Creating the Visual Studio Template Project
2 ===========================================
4 1. Create an empty Visual C++ Win32 Console App project
6 Microsoft Visual Studio Express 2013 for Windows Desktop
7 Open New Project Wizard (File -> New Project..)
10 Solution Name: YosysVS
11 [X] Create directory for solution
12 [ ] Add to source control
14 [X] Console applications
18 2. Open YosysVS Project Properties
20 Select Configuration: All Configurations
22 C/C++ -> General -> Additional Include Directories
25 C/C++ -> Preprocessor -> Preprocessor Definitions
26 Add: _YOSYS_;_CRT_SECURE_NO_WARNINGS
28 3. Resulting file system tree:
32 YosysVS/YosysVS/YosysVS.vcxproj
33 YosysVS/YosysVS/YosysVS.vcxproj.filters
36 YosysVS/YosysVS.v12.suo
38 4. Zip YosysVS as YosysVS-Tpl-v1.zip
40 Compiling with Visual Studio
41 ============================
43 Visual Studio builds are not directly supported by build scripts, but they are still possible.
47 - Go to https://github.com/YosysHQ/yosys/actions/workflows/vs.yml?query=branch%3Amaster
48 - Click on the most recent completed run
49 - In Artifacts region find vcxsrc and click on it to download
50 - Unpack downloaded ZIP file
51 - Open YosysVS.sln with Visual Studio
55 - Make sure to have make, python3 and git available
56 - Git clone yosys repository
57 - Execute ```make vcxsrc YOSYS_VER=latest```
58 - File yosys-win32-vcxsrc-latest.zip will be created
59 - Transfer that file to location visible by Windows application
61 - Open YosysVS.sln with Visual Studio
63 Cross-Building for Windows with MXE
64 ===================================
66 Check http://mxe.cc/#requirements and install all missing requirements.
68 As root (or other user with write access to /usr/local/src):
71 git clone https://github.com/mxe/mxe.git
74 make -j$(nproc) MXE_PLUGIN_DIRS="plugins/tcl.tk" \
75 MXE_TARGETS="i686-w64-mingw32.static" \
78 Then as regular user in some directory where you build stuff:
80 git clone https://github.com/YosysHQ/yosys.git yosys-win32
83 make -j$(nproc) mxebin