Skip to content

Commit

Permalink
Updated build guide
Browse files Browse the repository at this point in the history
  • Loading branch information
KenVanHoeylandt committed Jan 10, 2025
1 parent b5f3514 commit 2ca36e1
Showing 1 changed file with 62 additions and 14 deletions.
76 changes: 62 additions & 14 deletions docs/building-tactility.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,100 @@

Ensure you clone the repository including the submodules! For example:

```bash
```sh
git clone --recurse-submodules -j8 https://github.com/ByteWelder/Tactility.git
```

## Build environment setup
## ESP32 Build Environment

- ESP32 (any?)
- [esp-idf 5.3.2](https://docs.espressif.com/projects/esp-idf/en/v5.3.2/esp32/get-started/index.html) or a newer v5.3.x
- (for PC simulator) SDL2 library, including SDL image

## Build an ESP32 variant

Run this:

```bash
```sh
Buildscripts/build.sh <board-name>
```

`<board_name>` is the the last part of the names of the boards in `./sdkconfig.board.<board-name>`.

For example:

```bash
```sh
Buildscripts/build.sh lilygo-tdeck
```

## Build the simulator

Ensure you do **not** have esp-idf on your path and run:

```bash
idf.py build
```

## Building ESP32 manually

Copy the `sdkconfig.board.YOUR_BOARD` into `sdkconfig`. Use `sdkconfig.defaults` if you are setting up a custom board.

```bash
```sh
cp sdkconfig.board.<board-name>
idf.py build
```

Flash:

```sh
idf.py -p <port> flash monitor
```

`<port>` is something like `/dev/ttyACM0` or `/dev/ttyUSB0` on Linux/macOS, or `COM3` on Windows.


Flashing ESP32:

```bash
idf.py flash monitor
```

## Simulator

You'll need:
- C++ compiler: preferrably GCC/G++ as others are untested
- CMake
- SDL2 library

### Windows

Install WSL and open the Ubuntu application from your start menu, then follow the Linux guide:

### Linux

Install dependencies:

*(Ubuntu)*
```sh
sudo apt-get install -y build-essential git cmake libsdl2-dev
```

*(Arch)*
```sh
pacman -S base-devel git cmake sdl2
```

Clone the repository:

```sh
git clone https://github.com/ByteWelder/Tactility.git --recurse-submodules
```

From the project folder, run:

```sh
cmake -S ./ -B buildsim && cd buildsim && make && cd -
```

Then go to the `Data/` folder and start the executable from there:

```sh
cd Data
../buildsim/App/AppSim
```

### macOS

In theory this is similar to Linux, except you use [Brew](https://brew.sh/) to install the dependencies.

0 comments on commit 2ca36e1

Please sign in to comment.