1.. zephyr:board:: esp32s2_franzininho
2
3Overview
4********
5
6Franzininho is an educational development board based on ESP32-S2 which is a highly integrated, low-power, single-core Wi-Fi Microcontroller SoC,
7designed to be secure and cost-effective, with a high performance and a rich set of IO capabilities. [1]_
8
9The features include the following:
10
11- RSA-3072-based secure boot
12- AES-XTS-256-based flash encryption
13- Protected private key and device secrets from software access
14- Cryptographic accelerators for enhanced performance
15- Protection against physical fault injection attacks
16- Various peripherals:
17
18  - 43x programmable GPIOs
19  - 14x configurable capacitive touch GPIOs
20  - USB OTG
21  - LCD interface
22  - camera interface
23  - SPI
24  - I2S
25  - UART
26  - ADC
27  - DAC
28  - LED PWM with up to 8 channels
29
30System requirements
31===================
32
33Prerequisites
34-------------
35
36Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
37below to retrieve those files.
38
39.. code-block:: console
40
41   west blobs fetch hal_espressif
42
43.. note::
44
45   It is recommended running the command above after :file:`west update`.
46
47Building & Flashing
48*******************
49
50Simple boot
51===========
52
53The board could be loaded using the single binary image, without 2nd stage bootloader.
54It is the default option when building the application without additional configuration.
55
56.. note::
57
58   Simple boot does not provide any security features nor OTA updates.
59
60MCUboot bootloader
61==================
62
63User may choose to use MCUboot bootloader instead. In that case the bootloader
64must be built (and flashed) at least once.
65
66There are two options to be used when building an application:
67
681. Sysbuild
692. Manual build
70
71.. note::
72
73   User can select the MCUboot bootloader by adding the following line
74   to the board default configuration file.
75
76   .. code:: cfg
77
78      CONFIG_BOOTLOADER_MCUBOOT=y
79
80Sysbuild
81========
82
83The sysbuild makes possible to build and flash all necessary images needed to
84bootstrap the board with the ESP32 SoC.
85
86To build the sample application using sysbuild use the command:
87
88.. zephyr-app-commands::
89   :tool: west
90   :zephyr-app: samples/hello_world
91   :board: esp32s2_franzininho
92   :goals: build
93   :west-args: --sysbuild
94   :compact:
95
96By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
97images. But it can be configured to create other kind of images.
98
99Build directory structure created by sysbuild is different from traditional
100Zephyr build. Output is structured by the domain subdirectories:
101
102.. code-block::
103
104  build/
105  ├── hello_world
106  │   └── zephyr
107  │       ├── zephyr.elf
108  │       └── zephyr.bin
109  ├── mcuboot
110  │    └── zephyr
111  │       ├── zephyr.elf
112  │       └── zephyr.bin
113  └── domains.yaml
114
115.. note::
116
117   With ``--sysbuild`` option the bootloader will be re-build and re-flash
118   every time the pristine build is used.
119
120For more information about the system build please read the :ref:`sysbuild` documentation.
121
122Manual build
123============
124
125During the development cycle, it is intended to build & flash as quickly possible.
126For that reason, images can be built one at a time using traditional build.
127
128The instructions following are relevant for both manual build and sysbuild.
129The only difference is the structure of the build directory.
130
131.. note::
132
133   Remember that bootloader (MCUboot) needs to be flash at least once.
134
135Build and flash applications as usual (see :ref:`build_an_application` and
136:ref:`application_run` for more details).
137
138.. zephyr-app-commands::
139   :zephyr-app: samples/hello_world
140   :board: esp32s2_franzininho
141   :goals: build
142
143The usual ``flash`` target will work with the ``esp32s2_franzininho`` board
144configuration. Here is an example for the :zephyr:code-sample:`hello_world`
145application.
146
147.. zephyr-app-commands::
148   :zephyr-app: samples/hello_world
149   :board: esp32s2_franzininho
150   :goals: flash
151
152Open the serial monitor using the following command:
153
154.. code-block:: shell
155
156   west espressif monitor
157
158After the board has automatically reset and booted, you should see the following
159message in the monitor:
160
161.. code-block:: console
162
163   ***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
164   Hello World! esp32s2_franzininho
165
166References
167**********
168
169.. target-notes::
170
171.. [1] https://www.espressif.com/en/products/socs/esp32-s2
172.. _`ESP32S2 Technical Reference Manual`: https://espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_en.pdf
173.. _`ESP32S2 Datasheet`: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
174