Tanmatsu is the dream terminal device for hackers, makers, and tech enthousiasts. Based around the powerful ESP32-P4 microcontroller, this device provides an accessible way to make, hack, and tinker on the go.
Tanmatsu lets you program on the go and communicate over long distances using LoRa whilst also providing advanced connectivity and extendability options for hardware hacking and development.
Blog
Interested? See our blog for project updates.
Features
Tanmatsu is based around the upcoming ESP32-P4 SoC by Espressif: their most powerful RISC-V microcontroller yet. With its 400MHz dual-core processor and 32MB of built-in PSRAM it makes the ideal platform for powerful processing on the go whilst still maintaining the ease of use one expects form a microcontroller platform.
In addition to the powerhouse ESP32-P4 application processor we have included an ESP32-C6 WiFi, Bluetooth Low Energy, and IEEE802.15.4 wireless radio module. This module enables wireless internet access, as well as access to local mesh networking like Thread and ZigBee in a hacker friendly way.
A LoRa radio module provides access to LoRa networks such as long distance mesh network services and (G)FSK modulated classic 433 or 868MHz communication, depending on the LoRa module installed.
The device has 16MB of built-in flash storage for firmware and applications, expandable using a micro SD card. The micro SD card socket supports SD cards at 3.3v and 1.8v voltage levels (SDIO 3) for extra fast transfer speeds.
A big MIPI DSI display and the QWERTY keyboard make for great ease of use both in the workshop and on the go.
In addition to all the built-in functionality the device allows for expansion modules using its two expansion ports. The back facing expansion port allows for expanding functionality using personality modules, while the side facing expansion port allows for easily connecting a wide variety of PMOD and SAO compatible accessories.
A QWIIC style expansion connector allows connecting the device to a wide range of sensors available from manufacturers such as Sparkfun and Adafruit, it supports both the I2C and the new I3C communication bus standards.
A 3D printed case is included with every Tanmatsu, this sturdy case will allow the device to be used everywhere whilst keeping the electronics safe and protected.
Software
The launcher firmware allows starting user made applications and in addition it provides access to a marketplace for applications where developers can publish their creations. Apps can be downloaded and installed directly on the device.
Hardware features - summary
ESP32-P4 dual-core 400MHz RISC-V microcontroller with 32MB of built-in PSRAM
ESP32-C6 radio module for WiFi, BLE and IEEE 802.15.4 mesh networking connectivity
Ai-Thinker Ra-01S or Ra-01SH module for long range communication using LoRa modulation and generic (G)FSK modulation for short range classic wireless radio applications at 433MHz or 868MHz respectively
16MB of built-in flash storage for firmware and applications
Fast and big 800x480 MIPI DSI display
QWERTY keyboard
Lithium polymer battery
Audio output via headphone jack and speaker
I2C and I3C connectivity via Qwiic compatible JST SH style connector
SD card socket supporting SD cards at 3.3v and 1.8v voltage levels (SDIO 3)
Side facing expansion port with both SAO and PMOD capabilities
Back facing expansion port for expanding functionality using personality modules
Software features - summary
Launcher menu for easy access to multiple applications and firmwares
Access to user generated content and applications repository via the hub app
Open source
The hardware design will be made fully open source and available under a permissive license (CERN-OHL-P). The design can be edited using the open source PCB CAD application KiCAD, allowing everyone to edit the design without any roadblocks.
The board support package and launcher firmware will also be made open source under a permissive license (MIT), enabling modifications and improvements by the community and granting users and developers complete freedom and control.
Personality modules
Whilst the base Tanmatsu device already provides lots of functionality we plan on creating and making available multiple personality modules for extending the functioality in ways useful to you. More information about the planned personality modules will be made available soon.
1 - Tanmatsu: hardware
WiFi, BLE and IEEE802.15.4 radio module
This ESP32-C6 based module provides the board with access to Wifi, BLE and IEEE802.15.4 (mesh network) connectivity while also controlling the LoRa radio module.
Camera connector
The camera connector is used to connect a CSI camera mdoule. It is pinout-compatible with the camera connector on the Raspberry Pi Zero and 5. Note that software support is limited to a subset of Raspberry Pi compatile camera module sensor chips such as OV5647.
QWIIC & Stemma QT compatible I2C & I3C connector
This connector can be used to connect external I2C or I3C based accessories. Both Adafruit and Sparkfun make a variety of modules and cables which could be connected to this port.
USB-C device port
This port is used to charge the battery, to program and debug the ESpP32-P4 and ESp32-C6 microcontrollers and to install apps and browse files from your computer.
USB-A host port
This port can be used to connect an USB device to the Tanmatsu.
SD card slot
Accepts micro SD memory cards including modern high speed SDIO 3.0 cards.
Battery connector
Allows for connecting a single cell Lithium Polymer or Lithium Ion battery cell. Using a protected cell is mandatory. Unprotected cells could potentially be drained below their lowest allowable voltage, which causes damage to the battery. Current control, over voltage protection and propper constant voltage/current charge control are is built-in into the Tanmatsu mainboard.
Sensor connector
Can be used to connect an I2C connected sensor PCB.
1.1 - Tanmatsu: connectors
1.1.1 - Tanmatsu: internal add-on port
This port is not exposed by default, and a modified back cover needs to be used to make it accessible. For this reason the port is also named the “internal expansion port”.
Pinout
Function
Name
GPIO
Description
Notes
Power output
VOTG
-
Output from booster DC/DC converter in the PMIC
5 volt when booster is enabled, +/- VSYS when booster is disabled
USB
HUB_USB1_P
-
Port on USB hub for USB-C port (DP)
Can be used to expose an USB device on the add-on to the PC plugged into the USB-C port
Power output
HUB_USB1_N
-
Port on USB hub for USB-C port (DN)
Can be used to expose an USB device on the add-on to the PC plugged into the USB-C port
USB
VBATT
-
Battery voltage (3.0 – 4.2v)
Directly connected to battery connector, always on even when the device is turned off
Power output
VSYS
-
System voltage (3.0 – 5.0v)
Switched power rail for powering the system, can be powered by battery or USB-C port, off when device is turned off
Power ref.
GND
-
Voltage reference (ground)
Power ref.
GND
-
Voltage reference (ground)
Power output
+3.3v
-
Main logic supply rail (3.3v)
I2C
INT_SCL
Internal I2C bus, shared with other I2C devices (SCL)
Used to connect I2C devices and an EEPROM for add-on identification
I2C
INT_SDA
Internal I2C bus, shared with other I2C devices (SDA)
Used to connect I2C devices and an EEPROM for add-on identification
GPIO
E0
36
GPIO
GPIO
E1
0
GPIO
GPIO
E2
6
GPIO, also connected to camera GPIO 1
Shared with camera connector
GPIO
E3
46
GPIO, VSDCARD LDO must be enabled to use this pin
Connected via level shifter, externally these GPIOs operate at 3.3v but the GPIOs are powered by the VSDCARD power domain
GPIO
E4
47
GPIO, VSDCARD LDO must be enabled to use this pin
Connected via level shifter, externally these GPIOs operate at 3.3v but the GPIOs are powered by the VSDCARD power domain
GPIO
E5
48
GPIO, VSDCARD LDO must be enabled to use this pin
Connected via level shifter, externally these GPIOs operate at 3.3v but the GPIOs are powered by the VSDCARD power domain
GPIO
E6
45
GPIO, VSDCARD LDO must be enabled to use this pin
Connected via level shifter, externally these GPIOs operate at 3.3v but the GPIOs are powered by the VSDCARD power domain
GPIO
E7
7
GPIO, in low power domain of P4, has 51k pull-up resistor
Can be used as wakeup pin to wake up the ESP32-P4 from deep sleep
GPIO
E8
54
GPIO
GPIO
E9
49
GPIO
GPIO
E10
53
GPIO
GPIO
EXT_USB_P
26
Can be used as GPIO or as USB FS PHY (DP)
The USB PHYs of the P4 can be swapped between the USB serial/jtag and user controlled USB peripheral. If badgelink is used then this PHY exposes the serial/jtag peripheral
GPIO
E11
52
GPIO
GPIO
EXT_USB_N
27
Can be used as GPIO or as USB FS PHY (DN)
The USB PHYs of the P4 can be swapped between the USB serial/jtag and user controlled USB peripheral. If badgelink is used then this PHY exposes the serial/jtag peripheral
GPIO
E12
51
GPIO
GPIO
P4_TX
37
Exposes boot console of P4, can be used as GPIO
Must be low during boot
GPIO
E13
50
GPIO
GPIO
P4_RX
38
Exposes boot console of P4, can be used as GPIO
Must be high during boot
I2S
I2S_MCLK
Digital audio bus master clock
Reference clock for connected I2S devices
I2S
I2S_LRCK
Digital audio bus word clock
Word clock (left-right selection) for connected I2S devices
I2S
I2S_DATA
Digital audio bus data output
Data output from mainboard for connected I2S DACs
I2S
I2S_SCLK
Digital audio bus sample clock
Sample clock for connected I2S devices
Power output
+3.3v
-
Main logic supply rail (3.3v)
I3C
I3C_SDA
I3C bus, shared with QWIIC connector (SDA)
Can also be used as I2C bus
Power ref.
GND
-
Voltage reference (ground)
I3C
I3C_SCL
I3C bus, shared with QWIIC connector (SCL)
Can also be used as I2C bus
Limitations & warnings
Total for all 3.3v outputs must not exceed 1A of current. It is generally adviced to stay well below this figure.
Do not exceed a current of 1.5A from the battery when the battery is connected to the internal battery connector
Do not charge the battery via the internal add-on port
1.2 - Tanmatsu: specifications
This section lists the technical specifications of the Tanmatsu hardware.
Note: information on this page is actively being worked on and might contain accidental errors and inaccuracies.
Physical dimensions
Size of the device including the 3D printed case:
Width: 12 cm (4.72 in)
Length: 13.5 cm (5.31 in)
Height: 1.8 cm (0.71 in)
Weight: 215 g (0.47 pounds) including case and battery
Note: display supports 16M colors (24-bit / RGB888) but current software can not make use of this mode.
Nicolai Electronics developed an ESP-IDF component for configuring the MIPI DSI peripheral in the ESP32-P4 for use with this display. The component also allows for easy switching between the display on the Tanmatsu and the display included with the official ESP32-P4 development kit.
The display will be available as a spare part from our webshop once Tanmatsu is shipped.
Keyboard
Full 69-key alphanumeric keyboard with colored 6 function keys
Metal dome sheet for tactile feeling
LED backlight (white)
The keyboard has been developed by our awesome friends at Solder Party.
The keyboard and corresponding metal dome sheet will be available as a spare part in our webshop once Tanmatsu starts shipping.
Battery
Single cell protected Lithium Polymer battery with PH-2.0 style connector. The connector and pinout are compatible with the battery connector on Adafruit boards.
Parameter
Value
Capacity
2500 mAh
Nominal voltage
3.7 V
Chemistry
Lithium Polymer
Dimensions
“104050” (w: 10mm, h: 40mm, l: 52mm)
Connector
JST compatible PH 2.0
Manufacturer
Tewaycell
Minimum cell voltage [V]
2.5v (3.0v recommended)
Nominal cell voltage [V]
3.7 V
Maximum cell voltage [V]
4.2 V
The battery will be available as a spare part in our webshop once Tanmatsu starts shipping.
Connectors and interfaces
On the outside of the case:
USB-C device port connected to an USB hub. Allows access to:
The ESP32-P4 USB interface (PHY 1, defaults to USB-serial/JTAG debug interface but can be remapped to custom USB functions by software)
ESP32-C6 USB-serial/JTAG debug interface
Personality module expansion port (provides access to an optionally connected USB device on a personality module)
USB-A host port (480 Mbit superspeed USB 2.0), provides 1A of current with automatic current limiting
Qwiic and Stemma-QT compatible 4-pin SH connector for connecting I2C and I3C accessories
3.5 mm headphone jack
CATT (Connect All The Things) connector: combined PMOD and SAO compatible 2.54 mm pinsocket optionally also usable as JTAG interface for debugging the ESP32-P4 application processor
Three push buttons (Power, up and down). Holding down the down button when applying power puts the ESP32-P4 into USB download mode for easy firmware recovery
Micro SD card slot compatible with SDIO 2 and SDIO 3 cards at 3.3v and 1.8v voltage levels
(optional) SMA antenna connector for LoRa antenna
On the inside of the case:
PH-2.0 2-pin battery connector
PicoBlade 2-pin speaker connector for 8 Ohm speaker
Raspberry Pi camera compatible 22-pin MIPI CSI camera interface
IPEX-1 antenna connector for LoRa antenna
Personality module connector: 36-pin 2.54 mm pinsocket with:
Access to power rails (5V, Vbatt, Vsys and 3.3v)
USB hub downstream port connected to the USB-C port via an USB hub
Internal I2C bus (can be used for sensors and for an identification EEPROM)
14 GPIO pins
ESP32-P4 USB interface (PHY 2) or 2 extra GPIO pins
UART interface or 2 extra GPIO pins
I2S interface or 4 extra GPIO pins (shared with audio codec, when used as GPIO audio functionality is unavailable)
I3C bus (shared with 4-pin SH connector) or 2 extra GPIO pins
Chips and modules
WiFi, BLE and IEEE 802.15.4 radio
Module: Espressif Systems ESP32-C6-WROOM-1-N8
CPU: 32-bit RISC-V single core microprocessor, up to 160 MHz
The management coprocessor is responsible for reading the keyboard matrix and power management. It presents itself as an I2C peripheral on the internal I2C bus of the Tanmatsu and provides the following services:
Keyboard events
PWM control for the display backlight
PWM control for the keyboard backlight
Real Time Clock (RTC) backed by watch crystal
Alarm wakeup
PMIC control
Power switching for USB-A port
Power and boot-mode control for the ESP32-C6 radio module
Power switching for audio amplifier
Headphone detection
Addressable LED control for the 6 built-in addressable LEDs
The firmware for this chip will be made available under terms of the MIT license after the product starts shipping to customers. Modifying the firmware is of course possible but is not recommended.
The firmware of the coprocessor can be updated from the ESP32-P4 application processor, for this Nicolai Electronics developed an ESP-IDF component capable of reprogramming CH32V20x and CH32V30x microcontrollers from the ESP32-P4 application processor.
LoRa radio
The PCB footprint supports a range of radio modules from Ai-Thinker. Software support will initially be provided for the RA-01SH 868 MHz band SX1262 based and the RA-01S 433 MHz band SX1268 based modules.
All Tanmatsu boards will be delivered with a module which has the IPEX-1 antenna connector installed. Optionally an SMA antenna connector can be installed to allow connecting standard external LoRa antennas. Tanmatsu will be provided with either an internal IPEX-1 antenna or a basic SMA antenna depending on the option chosen.
Audio
Everest Semiconductor ES8156 audio codec:
Hardware volume control via I2C interface
Stereo audio DAC
FM8002A mono speaker amplifier:
Can be switched on and off using the coprocessor
Connected to built-in 8 Ohm speaker
Power management
PMIC
Texas Instruments BQ25895RTW PMIC for battery charging and monitoring as well as DC/DC boost converter for 5 volt rail (to power USB-A port, addressable LEDs and 5 volt pin on the personality module expansion header).
Provides soft power on/off functionality when the device is battery powered and allows seamless transition between battery and USB-C power source.
3.3v rail DC/DC converter
Texas Instruments TPS63020DSJR DC/DC buck and boost converter providing a stable 3.3v rail even when the battery voltage drops below 3.3 volt.
Backlight drivers
Two AP3032KTR backlight driver chips, one for the display and one for the keyboard backlight LEDs. Brightness controlled using PWM via the CH32V203 coprocessor.
Standby power rail
A small LDO provides 2.5v to the Vbatt rail of the CH32V203 coprocessor even when the device is off. This uses almost no power (theoretically the battery would last over 10 years on a single charge if the device is never turned on, ignoring LiPo battery self-discharge) and allows the Real Time Clock in the CH32V203 coprocessor to keep track of time even when the device is off. A special latch circuit circuit allows the CH32V203 to power on the Tanmatsu using its alarm pulse output by emulating a press of the power button.
Addressable LEDs
Six SK6805-EC20 addressable LEDs controlled by the coprocessor.
Sensors
Bosch BMI270 IMU combined accelerometer and gyroscope
Header for optional SCD40 or SCD41 CO2, temperature and humidity sensor (not populated, modules are available on AliExpress) or other I2C controlled sensor
Questions?
If you have questions please contact us by joining one of our community chatgroups (Telegram and Discord) or by emailing us.
1.3 - Tanmatsu: 3D printed case
Information about the 3D printed case for Tanmatsu.
Note: information on this page is actively being worked on and might contain accidental errors and inaccuracies.
Filament
The 3D printed case and spacer are printed using Extrudr PLA NX2 on Prusa Mini and Prusa XL printers.
Design files
Once Tanmatsu is available the spacer and case designs will be published as STEP and STL files.
The 3D printed case and spacer will both be available as a spare part from our webshop once Tanmatsu is shipped.
Photos
These photos show some of the prototype 3D printed cases, final design will differ slightly because we are still actively working on improving the design for easier manufacturing and better dust protection.
Special thanks
We want to thank our friends over at YTec 3D for developing the Tanmatsu case and designs. Check out their amazing projects.
Questions?
If you have questions please contact us by joining one of our community chatgroups (Telegram and Discord) or by emailing us.
2 - Tanmatsu: getting started
Introduction
Congratulations! You just got your hands on your Tanmatsu, we bet you’re excited to get started so let’s not delay and get right to it!
Turning Tanmatsu on and off
The top most button on the right side of the device is the power button.
Tanmatsu has multiple power states, some are defined by software, others by hardware. Depending on the state your device is in you will need to hold down the power button for a different duration to reach the desired state.
If your Tanmatsu is completely turned off it is in a mode where only the clock is running. This mode requires so little power that you should not notice any battery drain in years if the device is left alone. Pressing the power button for 2.5 seconds turns the device on if it is in this state.
If your Tanmatsu is turned on you can turn it off completely by holding down the power button for more than half a second.
If you keep holding down the power button after the device has powered off then the device will restart 2.5 seconds after it powered off. This allows for easily rebooting your tanmatsu by holding down the power button for 3 seconds.
Depending on the app currently running on your Tanmatsu there might be more power states available. We recommend trying a short press of the power button to enter and leave the sleep state.
Charging your Tanmatsu
You can charge your Tanmatsu by plugging in a power source (phone charger or computer) into the USB-C port. Tanmatsu will automatically power on when a power source is detected and battery charging will start automatically.
Tanmatsu will only charge when on or in sleep mode. If Tanmatsu is powered off the battery will not be charged even with a power source connected to the USB-C port. The default firmware for Tanmatsu will include a mode which turns off the radio and display and keyboard backlight before putting the ESP32-P4 application processor into deep sleep mode. You can enter this mode by pressing the power button for less than half a second. You can check if your Tanmatsu is charging by looking at the color of the power LED.
Power LED
The color of the power LED indicates the state of the power management system.
If the power LED displays a solid single color:
Blue: running on battery, no charger detected
Yellow: charger detected, battery is being charged
Green: charger detected, battery is fully charged
Red: charger detected, no battery detected
If the power LED displays a blinking color:
Slowly blinking red: the battery is almost empty, connect a charger to avoid losing work
Rapidly blinking red: a fault occured in the power management circuit
In case you encounter a fault condition please exit the currently running app and return to the launcher menu. The launcher menu will provide more detailed information about the active fault flags.
PMIC status LED
There is a small red LED on the back of the mainboard. This LED provides additional status information about the state of the power management system of Tanmatsu.
Off: the battery is not being charged
Slow blinking: a PMIC fault has occured
Rapid bliniing: Tanmatsu is trying to charge the battery but no battery is being detected
PMIC stands for “Power Management Integrated Circuit”. Tanmatsu uses a BQ25895 PMIC from Texas Instruments to manage battery charging.
Fault conditions
A fault doesn’t immediately mean there is anything wrong with your Tanmatsu and using a Lithium Polymer battery is not dangerous if the battery is handled correctly. Tanmatsu contains a multiple layers of protection to prevent any damage to your device, the battery or it’s surroundings. If charging is stopped due to a fault then most likely there is something wrong with your battery, though this doesn’t immediately have to be a problem.
The protection functions built into the Tanmatsu mainboard will, in addition to the battery protection circuit built into the battery itself, stop charging if it detects that the battery voltage is below the minimum safe threshold for a Lithium Polymer battery or above the maximum voltage threshold of a Lithium Polymer battery. In both cases the power LED will rapidly blink in red and the small red LED on the back of the mainboard will
A situation that can trigger the under-voltage protection is a situation where the battery has drained below it’s rated minimum voltage due to degradation when left completely empty for a long period of time. In this situation is is also possible that the battery simply is not detected, in which case the power LED will turn red when an external power source is connected. If the battery has accidently reached a voltage near 2.5 volt then the battery will be disconnected to protect it. Normally the battery voltage recovers a bit automatically after leaving the battery alone for a few minutes. In this situation you can safely restart start charging the battery again after the voltage has reached it’s normal level.
The battery supplied with your Tanmatsu has a built-in protection circuit preventing the battery from draining below it’s minimum rated voltage during normal use.
A Lithium Polymer battery that has reached a voltage below 2.5 volt for a prolonged period of time can become chemically unstable, we recommend replacing the battery if your battery has drained below 2.5 volt. Recharging a Lithium Polymer battery that has been subjected to a situation where it reached a voltage of less than 2.5 volt can be dangerous, the battery may for example swell up and could potentially damage the device or it’s surroundings.
3 - Tanmatsu: software
Work in progress
The software for Tanmatsu is currently under active development. On this page we will regulary post updates on our progress. Don’t want to miss out on any updates? Join our Discord or Telegram groups.
Device drivers
The invisible though crucial part of all software running on Tanmatsu. These ESP-IDF components provide the building blocks for interfacing with the hardware on the Tanmatsu mainboard.
The Tanmatsu has a MIPI DSI display with a ST7701 controller. Espressif provides a driver for this controller, we added the correct initialization commands and configuration for the display on the Tanmatsu and packaged these in a component. In addition to the configuration of the Tanmatsu display the display included with the Espressif ESP32-P4 devkit is also supported by this component, allowing for easy switching between Tanmatsu hardware and the ESP32-P4 devkit.
Coprocessor
This driver component manages communication with the coprocessor firmware via I2C and exposes functions for accessing all coprocessor functionality.
ES8156 audio DAC
This driver component allows for configuring the ES8156 audio DAC via I2C.
BMI270 IMU
This driver component wraps the Bosch SDK for the BMI270 IMU, implementing communication via I2C for the ESP32-P4.
In circuit programming
These components are as invisible during normal use as they are useful when you need them. To do initial hardware bringup and to update the firmware of the coprocessor and the radio Tanmatsu needs a way to reprogram these chips from the ESP32-P4 application processor.
The BSP (Board Support Package) wraps the driver components to provide an easy way to integrate board support for Tanmatsu (and other devices) into ESP-IDF projects.
AppFS allows for dynamically installing and running ESP32 firmware from a special flash partition. This mechanism allows for installing and running apps directly from the Tanmatsu launcher.
The LVGL BSP interface is a component providing the glue needed to use the LVGL graphics stack component provided by Espressif with the BSP component, mapping the keyboard buttons and correctly configuring the display and display rotation.
AppFS is an ESP-IDF component that implements a method for dynamically installing and loading firmware binaries. It implements a pseudo filesystem interface for storing firmwares and a bootloader modification which allows for starting firmwares from the AppFS partition.
Originally AppFS was created by Jeroen Domburg (sprite_tm) for the PocketSprite keychain gameconsole. Since it’s creation Badge.Team has succesfully deployed, updated and extended AppFS to make it the ready to use component it is today.
The current version of AppFS supports ESP-IDF 5.3 and later and has bootloader modifications for the ESP32, ESP32-C6 and ESP32-P4 included. Other ESP32 variants are not supported yet.
Using the AppFS component in your projects
Apps do not require any changes to be started using AppFS, you only need the AppFS component to build a launcher menu.
To include the AppFS component in your launcher menu project first add the component as a requirement using idf.py:
idf.py add-dependency "badgeteam/appfs^1.0.0"
This makes the AppFS APIs available, but does not apply the required bootloader changes.
To apply the bootloader changes either create two symlinks or copy the contents of the folders.
#include "esp_err.h"
#include "esp_log.h"
#include "appfs.h"
void initialize_appfs(void) {
esp_err_t res = appfsInit(APPFS_PART_TYPE, APPFS_PART_SUBTYPE);
if (res != ESP_OK) {
ESP_LOGE(TAG, "Failed to initialize AppFS: %s", esp_err_to_name(res));
return;
}
}
See the functions defined in appfs.h for more information on how to use the library.
Partition table
The appfs.h header defines a type and subtype for the AppFS partition:
#define APPFS_PART_TYPE 0x43 /*<! Default partition type of an appfs partition */
#define APPFS_PART_SUBTYPE 0x3 /*<! Default partition subtype of an appfs partition */
To create an AppFS partition add an entry to the partitions CSV file for your project:
After ESP-IDF has downloaded the component a tools folder can be found at managed_components/badgeteam__appfs/tools. In this folder a set of Python scripts can be found for creating and managing AppFS partition data.
Creating an AppFS partition image
In the partition table above the partition is 8000 KB in size. Converted to bytes 8000 KB becomes 8000 x 1024 = 8192000 bytes.
A partition can be created using the following command:
python appfs_generate.py 8192000 example.bin
To add firmware binaries to the AppFS partition file the appfs_add_file.py tool can be used:
python appfs_add_file.py example.bin myapp.bin "myapp" "My app" 1
The name and title fields are strings. The filename (name field) of the file can be a maximum of 48 bytes long and the title of the file can be 64 bytes long. The version field is an 16 bits unsigned integer with a range of 0 - 65535.
The filename (name field) of the file is used in the AppFS API to identify files in the filesystem, filenames have to be unique. The title field is optional and may be used to include a human readable alternative to the filename. If unused the title field can be set to a blank string "". The version field is also optional and may be used to identify the installed version of an application, allowing for easier implementation of update mechanisms. If unused the version field can be set to 0.