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