Skip to main content

SimpleGo Development Guide

Guide for developers who want to contribute to SimpleGo.


Getting Started

Prerequisites

RequirementVersionNotes
ESP-IDF5.5.2+Espressif framework
Python3.8+Build tools
Git2.30+Version control
HardwareESP32-S3T-Deck recommended

Clone Repository

Run: git clone https://github.com/cannatoshi/SimpleGo.git


ESP-IDF Installation

Windows

  1. Create directory: mkdir C:\Espressif
  2. Clone: git clone --recursive https://github.com/espressif/esp-idf.git
  3. Install: .\install.ps1 esp32s3
  4. Activate: C:\Espressif\esp-idf\export.ps1

Linux / macOS

  1. Create directory: mkdir -p ~/esp
  2. Clone: git clone --recursive https://github.com/espressif/esp-idf.git
  3. Install: ./install.sh esp32s3
  4. Activate: source ~/esp/esp-idf/export.sh

Project Structure

PathDescription
main/Application source code
main/main.cEntry point
main/smp_*.cProtocol modules
include/Header files
components/wolfssl/X448 cryptography
components/kyber/Post-quantum (future)
docs/Documentation
CMakeLists.txtProject build file
partitions.csvFlash partition table

Build Commands

CommandDescription
idf.py set-target esp32s3Set target chip
idf.py buildCompile project
idf.py flash -p COM5Flash to device
idf.py monitor -p COM5Serial monitor
idf.py build flash monitor -p COM5All in one
idf.py cleanClean build
idf.py menuconfigConfiguration

Configuration

WiFi Credentials

Edit main/main.c:

  • Set WIFI_SSID to your network name
  • Set WIFI_PASS to your password

SimpleX Server

Edit main/smp_network.c:

  • Set SMP_SERVER_HOST
  • Set SMP_SERVER_PORT (default 5223)

Code Style

Naming Conventions

ElementConventionExample
Functionssnake_case with prefixsmp_ratchet_init()
Variablessnake_casechain_key
ConstantsUPPER_SNAKE_CASESMP_MAX_MSG_SIZE
Typessnake_case with _tratchet_state_t

Debugging

Log Levels

LevelMacroUse Case
ErrorESP_LOGECritical failures
WarningESP_LOGWUnexpected
InfoESP_LOGINormal operation
DebugESP_LOGDDevelopment
VerboseESP_LOGVDetailed tracing

Git Workflow

Branch Naming

TypeFormatExample
Featurefeat/descriptionfeat/group-messaging
Bugfixfix/descriptionfix/kdf-order
Documentationdocs/descriptiondocs/crypto-guide

Commit Messages

Format: type(scope): description

Types: feat, fix, docs, refactor, test, chore

Example: feat(crypto): add X448 key generation


Troubleshooting

Build Errors

ErrorSolution
Component not foundRun idf.py reconfigure
Header not foundCheck include paths
Undefined referenceAdd source to CMakeLists.txt

Flash Errors

ErrorSolution
Failed to connectCheck USB cable
Wrong chipRun idf.py set-target esp32s3
TimeoutHold BOOT button

Resources

Documentation

Community


License

AGPL-3.0 - See LICENSE