Skip to content

Commit

Permalink
docs: update windows and linux guides to clone examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Jun 24, 2024
1 parent cd78fec commit 720d081
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
15 changes: 14 additions & 1 deletion docs/Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,22 @@ If you want to run code on 32Blit, you should now refer to [Building & Running O

## Building & Running Locally

Set up the 32Blit Makefile from the root of the repository with the following commands:
First you need something to build. The [32blit-examples](https://github.com/32blit/32blit-examples) repository includes a series of demos showcasing various 32blit SDK features. These instructions will assume you're building those and have cloned or extracted that repository alongside 32blit-sdk:

```shell
git clone https://github.com/32blit/32blit-examples
```

Your directory tree should look something like:

- root_dir
- 32blit-sdk
- 32blit-examples

Create a build directory and configure the examples. The 32blit-sdk should be automatically detected:

```shell
cd 32blit-examples
mkdir build
cd build
cmake ..
Expand Down
21 changes: 20 additions & 1 deletion docs/Windows-VisualStudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ The solutions and projects are made to use toolset version c142.

The solution file is located at `vs\32blit.sln`. It contains two static linked libraries, _32blit_ and _32blit-sdl_ and all the examples that will compile to .EXE.

For the solution file to work, you will need to clone the examples repo as `examples` inside the SDK.

```shell
cd 32blit-sdk
git clone https://github.com/32blit/32blit-examples examples
```

You will also need to download SDL2 development libraries from the [SDL releases](https://github.com/libsdl-org/SDL/releases/latest). Here find the latest version of the VC development libraries (at the time of this writing SDL2-devel-2.24.0-VC.zip). Additionally, download SDL2_image from [here](https://github.com/libsdl-org/SDL_image/releases/latest) (SDL2_image-devel-2.6.1-VC.zip) and SDL2_net from [here](https://github.com/libsdl-org/SDL_net/releases/latest) (SDL2_net-devel-2.2.0-VC.zip).

Place these in the `vs\sdl\` folder. You will need to merge the include/lib folders. If you are using CMake/Open Folder, these are downloaded automatically.
Expand All @@ -38,9 +45,21 @@ Place these in the `vs\sdl\` folder. You will need to merge the include/lib fold

This has the advantage of being closer to the build for the device.

First you need something to build. The [32blit-examples](https://github.com/32blit/32blit-examples) repository includes a series of demos showcasing various 32blit SDK features. These instructions will assume you're building those and have cloned or extracted that repository alongside 32blit-sdk:

```shell
git clone https://github.com/32blit/32blit-examples
```

Your directory tree should look something like:

- root_dir
- 32blit-sdk
- 32blit-examples

1. Open Visual Studio

2. `File` > `Open` > `Folder` and open the folder where you cloned this repo. (Alternatively, if you haven't cloned the repo yet, use `File` -> `Clone or check out code`)
2. `File` > `Open` > `Folder` and open the folder where you cloned the examples repo. (Alternatively, if you haven't cloned the repo yet, use `File` -> `Clone or check out code`)

3. Build!

Expand Down
17 changes: 16 additions & 1 deletion docs/Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,26 @@ You should now be able to run `32blit.exe`, you can test your connection to your

## Building & Running

First you need something to build. The [32blit-examples](https://github.com/32blit/32blit-examples) repository includes a series of demos showcasing various 32blit SDK features. These instructions will assume you're building those and have cloned or extracted that repository alongside 32blit-sdk:

```shell
git clone https://github.com/32blit/32blit-examples
```

Your directory tree should look something like:

- root_dir
- 32blit-sdk
- 32blit-examples

To build using Visual Studio [see here](Windows-VisualStudio.md). The rest of these instructions cover command-line builds.

### On 32Blit

If you want to run code on 32Blit, you should now refer to [Building & Running On 32Blit](32blit.md). On Windows you will need to add `-G"NMake Makefiles"` to your cmake commands, for example:

```
cd 32blit-examples
mkdir build.stm32
cd build.stm32
cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=../32blit.toolchain ..
Expand All @@ -72,9 +85,11 @@ cmake --build . --target raycaster.flash

### Locally (Windows .exe)

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

Create a build directory and configure the examples. The 32blit-sdk should be automatically detected:

```shell
cd 32blit-examples
mkdir build
cd build
cmake -G"NMake Makefiles" ..
Expand Down

0 comments on commit 720d081

Please sign in to comment.