---
# System prepended metadata

title: ESP-32

---

# ESP-32

## Prerequisites
1. [Ninja](https://cmake.org/)
2. [CMake](https://ninja-build.org/)

```
brew install cmake ninja
```

3. [CP210x driver](https://www.silabs.com/documents/public/software/Mac_OSX_VCP_Driver.zip)

## Toolchain Setup

1. Download file
```
mkdir -p ~/esp
cd ~/esp
wget https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz
tar -xzf xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz
```

2. Setup environment variable

```
export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH
alias get_esp32="export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH"
export IDF_PATH=~/esp/esp-idf
export PATH="$IDF_PATH/tools:$PATH"
```

4. Dowload ESP-IDF

```
cd ~/esp
git clone -b v3.2.2 --recursive https://github.com/espressif/esp-idf.git
```

## Hello World

1. Copy file

```
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
cd hello_world
```

2. Configure

```
idf.py menuconfig
```

If you are using `python3`,

3. Build

```
idf.py build
```

4. Flash

```
idf.py -p /dev/cu.SLAB_USBtoUART flash
```

5. Monitor

```
idf.py -p /dev/cu.SLAB_USBtoUART monitor
```

## Wallet

1. Download file

```
git clone --recursive https://github.com/oopsmonk/iota_esp32_wallet.git
```

2. Initializing components

```
cd iota_esp32_wallet
bash ./init.sh
```

3. Wallet Configuration

```
idf.py menuconfig
# WiFi SSID & Password
[IOTA Wallet] -> [WiFi]

# SNTP Client
[IOTA Wallet] -> [SNTP]

# Default IRI node
[IOTA Wallet] -> [IRI Node]
```

```
cat /dev/urandom |LC_ALL=C tr -dc 'A-Z9' | fold -w 81 | head -n 1
```

4. Build

```
idf.py build
```

5. Flash

```
idf.py -p /dev/cu.SLAB_USBtoUART flash
```
