Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 2.52 KB

Windows.md

File metadata and controls

83 lines (58 loc) · 2.52 KB

Building & Running on Windows

These instructions cover building 32blit on Windows (without WSL).

Prerequisites

You'll need to install:

  • Git for Windows
  • Python
  • At least the Visual Studio build tools (For local builds, select "C++ build tools"). This includes a copy of CMake. A full Visual Studio install can also be used.
  • The GNU Arm Embedded Toolchain (For 32blit device builds, use the 9-2020-q2-update version). Make sure to select the "Add path to environment variable" at the end of the setup.

Now open "Developer Command Prompt for VS 2019" and install the 32blit tools:

py -m pip install 32blit

(Keep this open for building later)

This may result in a waning similar to:

WARNING: The script 32blit.exe is installed in 'C:\Users\[Name]\AppData\Local\Programs\Python\Python39\Scripts' which is not on PATH.

You will either need to add that to your PATH, or run the tools as py -m ttblit ... instead of 32blit ....

Using Visual Studio

To build using Visual Studio see here. The rest of these instructions cover command-line builds.

Building & Running on 32Blit

If you want to run code on 32Blit, you should now refer to Building & Running On 32Blit. You will need to add -G"NMake Makefiles" to your cmake commands and use nmake instead of make. For example:

mkdir build.stm32
cd build.stm32
cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=../32blit.toolchain ..
nmake

Building & Running Locally

Set up the 32Blit Makefile from the root of the repository with the following commands:

mkdir build
cd build
cmake -G"NMake Makefiles" ..

Now to make any example, type:

nmake example-name

For example:

nmake raycaster

This will produce examples/raycaster/raycaster.exe which you should run with:

.\examples\raycaster\raycaster

Build Everything

Alternatively you can build everything by just typing:

nmake

When the build completes you should be able to run any example.