From 5e0eb8b9db1c250b6ed7cd05467c2ed496cdadbf Mon Sep 17 00:00:00 2001 From: YoungSoo Shin Date: Mon, 15 Sep 2025 10:36:45 +0900 Subject: [PATCH] Update docs: add custom.md for custom firmware guide and clarify ESP32-C3 pin usage Signed-off-by: YoungSoo Shin --- docs/custom.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ docs/pin.md | 4 ++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 docs/custom.md diff --git a/docs/custom.md b/docs/custom.md new file mode 100644 index 0000000..66522ea --- /dev/null +++ b/docs/custom.md @@ -0,0 +1,66 @@ +# Custom firmware + +If you want, you can create your own custom firmware. + +## Install Tools + +To build the source code, you need the following packages on Ubuntu 24.04. + +```bash +sudo apt install nodejs npm nanopb +``` + +You need `esp-idf` version 5.4. It might be possible to build with the latest version, but it has not been confirmed. + +First, install the necessary tools for esp-idf. + +```bash +sudo apt install git wget flex bison gperf python3 python3-pip python3-venv \ + cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 \ + +``` + +Next, clone the esp-idf tool. + +```bash +mkdir -p ~/esp +cd ~/esp +git clone -b release/v5.4 --recursive https://github.com/espressif/esp-idf.git +``` + +You need to install tools such as a compiler and a debugger. + +```bash +cd ~/esp/esp-idf +./install.sh esp32c3 +``` + +Please prepare to build the source by running the shell for using esp-idf. +```bash +. $HOME/esp/esp-idf/export.sh +``` +## Build custom firmware based on PowerMate + +First, clone the PowerMate source code. +```bash +git clone https://github.com/shinys000114/odroid-powermate.git +``` + +After connecting the USB Type-C cable to the PowerMate and the host PC, run the command below to build and update PowerMate. +```bash +cd odroid-powermate +idf.py app flash monitor +``` + +## Create a new project + +Create a project with the command below and create your own firmware. + +```bash +idf.py create-project proj +cd proj +idf.py set-target esp32c3 +``` + +For a more detailed guide, please refer to the link below. +[https://docs.espressif.com/projects/esp-idf/en/release-v5.4/esp32/get-started/linux-macos-setup.html#](https://docs.espressif.com/projects/esp-idf/en/release-v5.4/esp32/get-started/linux-macos-setup.html#) \ No newline at end of file diff --git a/docs/pin.md b/docs/pin.md index 430620e..bdee4c0 100644 --- a/docs/pin.md +++ b/docs/pin.md @@ -13,6 +13,7 @@ minicom -D /dev/ttyACM0 -b 115200 ## J2 UART Pin header Connected to the `U0RXD`, `U0TXD` system UART of the ESP32-C3. Currently not used on this board. +It can be used as GPIO through appropriate configuration in esp-idf. ## J3 ODROID UART Connector @@ -47,4 +48,5 @@ The output is set to 5.25V considering voltage drop. Please use with caution. **Reserved** -SSD1309 OLED Connector \ No newline at end of file +SSD1309 OLED Connector +It cannot be used as GPIO for other purposes because it shares the I2C bus with `PCA9557PW`, `INA3221`. \ No newline at end of file