Browse Source

Add platform package requirement info

Explained the need for a custom platform package for arduino-esp32 in the technical information.
pull/24/head
Maurice Makaay 3 years ago
committed by GitHub
parent
commit
54b6f4a4f1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 0 deletions
  1. +44
    -0
      doc/technical_details.md

+ 44
- 0
doc/technical_details.md View File

@ -10,6 +10,7 @@ Table of contents:
* [High level overview](#high-level-overview) * [High level overview](#high-level-overview)
* [ESP32 pinout](#esp32-pinout) * [ESP32 pinout](#esp32-pinout)
* [Front panel](#front-panel) * [Front panel](#front-panel)
* [Build requirements](#build-requirements)
* [Original firmware](#original-firmware) * [Original firmware](#original-firmware)
@ -241,6 +242,49 @@ The ESP32 can read the last event multiple times. It will not be cleared
by the front panel after reading it. by the front panel after reading it.
## Build requirements
The ESP-WROOM-32D that is used for this lamp (and for various other Xiaomi devices),
contains a single core CPU, even though the data sheet for ESP-WROOM-32D specifies
a dual core CPU. Therefore, when flashing the device with a generic ESP32 build,
you will end up with the following boot error:
```
E (459) cpu_start: Running on single core chip, but application is built with dual core support.
E (459) cpu_start: Please enable CONFIG_FREERTOS_UNICORE option in menuconfig.
```
Another issue with a lot of these devices, is that the MAC address that is burnt into
EFUSE does not match the CRC checksum that is also burnt into EFUSE. Using a generic
ESP32 build, you will end up with the boot error:
```
Base MAC address from BLK0 of EFUSE CRC error
```
For these reasons, you must build the firmware using a taylored version of arduino-esp32.
You can make use of the version [created by @pauln](https://github.com/pauln/arduino-esp32)
or the version [created by @mmakaay](https://github.com/mmakaay/arduino-esp32-unicore-no-mac-crc).
To make use of one of these in an ESPHome build, you'll have to provide a platform package
definition for the PlatformIO build. Here's an example configuration that will work for
these Xiaomi devices:
```yaml
esphome:
name: my_device_name
platform: ESP32
board: esp32doit-devkit-v1
platformio_options:
platform: espressif32@3.2.0
platform_packages: |-
framework-arduinoespressif32 @ https://github.com/mmakaay/arduino-esp32-unicore-no-mac-crc
```
If you want to build your own platform package, then you can checkout
the build scripts [by @mmakaay here](https://github.com/mmakaay/arduino-esp32-unicore-no-mac-crc-builder).
## Original firmware ## Original firmware
Below, I have gathered some of the interesting boot messages from the Below, I have gathered some of the interesting boot messages from the


Loading…
Cancel
Save