Compare commits

..

80 Commits

Author SHA1 Message Date
4ada3f5804 Fix Windows USB issues
- Device will not reset if previous baudrate was not 9600
- CDC Device is not recognized if WebUSB is enabled
2021-07-20 13:36:27 +03:00
268595c743 Various USB fixes (#5422)
* Fix compile archive arguments for the new toolchain

* Add menu to S2 for picking through which port to upload

Internal USB CDC requires to reset and wait for the new port (because persistence is not yet stable)

* USB CDC should also be started in main

* Fix URL and USB version for WebUSB

* Update vendor callback API

* Update CDC::write to use TX_DONE semaphore

* Update USB_Serial example
2021-07-20 11:59:13 +03:00
4a0305a05e Fixes SD begin() end() memory leak #2897 (#5419) 2021-07-19 19:08:51 +03:00
6393dbc91b Fix gh-pages update script 2021-07-19 18:56:00 +03:00
49df8778f9 Merge pull request #5417 from pedrominatel/docs/readme_docs_update
Links to the new docs updated and new docs build badge added
2021-07-19 17:31:48 +02:00
f79411f3d3 Links to the new docs updated and new docs build badge added 2021-07-19 15:01:39 +01:00
db4e7667af add callback to HTTPUpdate (#5408)
- add callback function to HTTPUpdate
- update example to print httpupdate progress
- fix ArduinoIDE syntax coloring

Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
2021-07-19 14:28:17 +03:00
f64ca2e084 Fixed typo in comments. (#5407)
A typographical error is corrected in the 2nd line of the comment. 
From = " This is un example howto use Touch Intrrerupts "
To = " This is an example of how to use Touch Intrrerupts "
2021-07-19 13:38:40 +03:00
1effae46ea Docs: Initial documentation structure using Sphinx (#5355)
This PR is the initial documentation structure including the basic information about the project and Sphinx configuration.

####CONTENTS:
- Getting Started
- Installing
- Boards
- Libraries
- Library Builder
- Tutorials
- ESP-IDF as Component
- OTA Web Update
- makeEspArduino
- Troubleshooting
- Contributing

This PR also changes the README.md.
2021-07-19 13:37:26 +03:00
d9833f9b6d Remove mkfatfs tool from package json
Fixes: https://github.com/espressif/arduino-esp32/issues/5376
2021-07-18 22:48:03 +03:00
0aafa05e8f Added function to retrieve the amount of data received from an BLECharacteristic (#5339) 2021-07-17 02:03:44 +03:00
16f4b0f5ba IDF master d93887f9f (#5336)
* Update toolchain

* Update package_esp32_index.template.json

* add optional component dependencies after Kconfig options are known (#5404)

Until this commit, Kconfig options (e.g. CONFIG_TINYUSB_ENABLED) were
used in conditions preceding idf_component_register to determine which
components need to be added to `arduino` component requirements.
However the Kconfig options aren't known at the early expansion stage,
when the component CMakeLists.txt files are expanded the first time
and requirements are evaluated. So all the conditions evaluated as if
the options were not set.
This commit changes the logic to only add these components as
dependencies when the Kconfig options are known. Dependencies become
"weak", which means that if one of the components isn't included into
the build for some reason, it is not added as a dependency.
This may happen, for example, if the component is not present in the
`components` directory or is excluded by setting `COMPONENTS` variable
in the project CMakeLists.txt file.
This also ensures that if the component is not present, it will not be
added as a dependency, and this will allow the build to proceed.

Follow-up to https://github.com/espressif/arduino-esp32/pull/5391.
Closes https://github.com/espressif/arduino-esp32/issues/5319.

* IDF master d93887f9f

* PlatformIO updates for CI (#5387)

* Update PlatformIO CI build script

- Switch to the latest toolchains 8.4.0 for ESP32, ESP32S2, ESP32C3
- Use PlatformIO from master branch for better robustness

* Update package.json for PlatformIO

Co-authored-by: Ivan Grokhotkov <ivan@espressif.com>
Co-authored-by: Valerii Koval <valeros@users.noreply.github.com>
2021-07-17 01:57:49 +03:00
780588dce3 Remove undocumented and uncontrollable WiFI RSSI filter. (#5393)
Commit d15e1b0e [1] in the 2.0.0 pull request #4996 introduced a filter
to connect only to WiFi networks with a RSSI of -75 or better. This
results in strage behaviour, as a scan still shows networks, that can't
be connected to, even though with older versions, connecting to those
networks was possible and the connection (albeit slow) was stable.

Remove the RSSI filter for now by setting the threshold to -127, i.e.
the lowest possible value. Maybe in the future the filter threshold
could be exposed to users, to allow filtering out nearly unreachable
networks.

[1] github.com/espressif/arduino-esp32/pull/4996/commits/d15e1b0
2021-07-16 23:43:25 +03:00
eac8b2def3 fix port{Input,Output,Mode}Register macros for chips with <=32 pins (#5402)
Closes https://github.com/espressif/arduino-esp32/issues/5378
2021-07-16 23:42:08 +03:00
a9bd39de66 Fix pin attenuation being overwritten (#5399)
Fixes: #5041
2021-07-16 17:34:25 +03:00
5eda278177 Update camera example (#5397)
Fixes: https://github.com/espressif/arduino-esp32/issues/5128
Fixes: https://github.com/espressif/arduino-esp32/issues/5324
2021-07-16 16:55:59 +03:00
c8a4010fa6 Rename LITTLEFS to LittleFS to match ESP8266 (#5396)
Fixes: https://github.com/espressif/arduino-esp32/issues/5103
2021-07-16 15:46:38 +03:00
dd25e2b9d6 Fix some WiFi issues (#5395)
* Add back ARDUINO_EVENT_WIFI_READY

Fixes: https://github.com/espressif/arduino-esp32/issues/5315

* use strncpy and strncmp for WiFi SSID and Password in AP and STA

Fixes: https://github.com/espressif/arduino-esp32/issues/5367

* Implement timeout for waitForConnectResult

Fixes: https://github.com/espressif/arduino-esp32/issues/5330

* Remove old definition of "reverse" from stdlib_noniso

Fixes: https://github.com/espressif/arduino-esp32/issues/5045

* Make "reverse" noniso conditional on ESP_DSP
2021-07-16 14:48:57 +03:00
cf6ab9c8a3 component: Remove circular dependency around 'main' (#5391)
arduino-esp32 has to depend on main in autostart mode, for setup() and loop(),
but this can be done with undefined symbol entries to avoid a large dependency
cycle and other linker errors.

Closes https://github.com/espressif/esp-idf/issues/6968
2021-07-16 12:25:53 +03:00
676f5cfe30 fix UART FIFO test for being full (#5390)
Fixes #5362
2021-07-16 03:21:49 +03:00
f4f1c8956b pinMatrixInDetach() has wrong parameter (#5385)
Fixes #5112
Call to pinMatrixInDetach() was changed from version 1.0.6 in version 2.0.0 injecting a bug as seen in cores/esp32/esp32-hal-uart.c
80418fadcf

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2021-07-15 02:07:43 +03:00
cbcba53dff Improve error message when ADC2 can not be used because WiFi is On
reference: https://github.com/espressif/arduino-esp32/issues/102
2021-07-08 13:58:17 +03:00
c37557c711 Update .gitignore (#5323)
In current master, after get.exe, there's tools/mkfatfs.exe that must be ignored.
Also cleaning up a simple duplicate line in .gitignore.
This is for Windows only, any hints on what can be done for Linux, Mac, is appreciated.
2021-06-29 11:45:08 +03:00
8f46bade7a Fix hardware timers
Fixes: https://github.com/espressif/arduino-esp32/issues/5337
Fixes: https://github.com/espressif/arduino-esp32/issues/4743

Thanks to @maxgerhardt
2021-06-28 15:44:30 +03:00
21947ebe76 Make String::concat() faster for some types. (#5307)
* Make String::concat() faster for some types.

This patch removes the unneeded call to `strlen()` when concatenating some types to a `String`. Additionally it fixes some whitespace for consistency.

* Update WString.cpp
2021-06-18 13:10:40 +03:00
c7bdb234bf Update stale.yml (#5299)
Stale bot labels fix.
2021-06-17 20:01:29 +03:00
cf43d174b7 Add FTM support and examples (#5272)
Rework of #5266 by @pedrominatel
2021-06-16 21:24:48 +03:00
b1bcec08f8 Update boards_manager.md (#5296) 2021-06-16 20:58:31 +03:00
46d888eb68 Fix #5293 by adding missing dependency to nghttp (#5294)
Fixes #5293

/components/arduino/libraries/WebServer/src/HTTP_Method.h:4:10: fatal error: http_parser.h: No such file or directory #include "http_parser.h"
2021-06-16 20:56:25 +03:00
1f4f2b6e97 Enable clock output for Ethernet RMII on ESP32 (#5274)
fixes #5239

* Add back clock mode argument
2021-06-16 20:45:20 +03:00
ea236e28e5 Fix incorrect Flash Size in Esp32c3 (#5279)
original PR #5278 from @s-hadinger, which is not accepted because of failure of CLAassistant

`ESP.getFlashChipSize()` always returns `0` on Esp32c3 due to a change in the Flash layout. It looks like to Espressif documentation was not updated accordingly.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/storage/spi_flash.html#spi-flash-size

- Esp32 and Esp32s3 have the flash information update by esptool.py
and decribed here
- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/spi_flash.html
Esp32c3 has no image information at 0x0000 and contrary to the docu
this information is at offset 0x0000
2021-06-11 13:46:14 +03:00
5ae3e836f9 Fix wrong password same SSID (#5124)
When iterating through APlist from first to the last element, a corrected password for already known SSID is not used. Therefore, I propose to iterate from the back of the list. With iterating from the back through the vector, an already known SSID with a corrected password is used instead.
2021-06-10 13:19:58 +03:00
eca328e576 Add support for build_opt.h in the sketch folder to use additional global build options (#5237)
Additional compile arguments can be given by a file named "build_opt.h".
This enables users to easily extend their arguments on a central place.
The script has been taken from stm32duino's Arduino_Core_STM32 package

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2021-06-10 13:18:03 +03:00
5b5cbb4926 Fix softap_config_equal compare auth_mode/cipher #5115 (#5121)
fixes #5115
2021-06-10 13:16:38 +03:00
aec2635b07 WifiAP disable insecure TKIP (#5122)
fixes #4805
2021-06-10 13:16:12 +03:00
e7e94ea247 Enable I2C_BUFFER_LENGTH definition for Wire lib (#5172) 2021-06-10 13:15:35 +03:00
b5ee7ddeed Convert hall read to use hal/idf (#5268)
Fixes #4866
2021-06-10 11:58:08 +03:00
10602939cc Added support for Trueverit ESP32 Universal IoT Driver MK II (#5269)
Add support for the Trueverit Universal IoT Driver MK II (https://www.trueverit.com)

The board will be released on market using electronic distributors soon, as the other one board added via #5219

This new board (referred as MK II) has onboard Texas Instruments DP83848 Eth PHY chip.
2021-06-10 11:57:10 +03:00
23820874ec Added the README template for examples and libraries (#5228)
Typos fixed and added more details and instructions
Added README file to WiFiScan example
Review on the README template
Added link to DevKits
2021-06-09 21:12:29 +03:00
4f9e583b29 IDF master 1d7068e4b (#5257)
esp-dsp: master 7cc5073
esp-face: master 420fc7e
esp-rainmaker: f1b82c7
esp32-camera: master 7a06a7e
esp_littlefs: master b58f00c
2021-06-09 13:12:47 +03:00
7f87d0fc3a Fix compilation for use as IDF component (#5265) 2021-06-09 12:56:12 +03:00
90fc68d83f doitESPduino32 - Add definitions for SPI pins names (#5248)
The doitESPduino32/pins_Arduino.h lacks definitions for the common SPI pins names: SS, MOSI, MISO, SCK
This breaks compatibility with Arduino libs, including SPI.h/.cpp

This PR solves the issue while maintaining compatibility with previous pin naming (IO5/23/19/18), and ensures consistency with other boards variants.
2021-06-09 12:55:13 +03:00
4f8e5b54b7 Add new board (Deneyap Kart) (#5236)
New board addition request for an ESP32 Wrover based Developer Board
2021-06-09 12:51:45 +03:00
483a424d0a restore apache-2.0 licence to to BLE library (#5261)
The code in the BLE library originates from https://github.com/nkolban/esp32-snippets/tree/master/cpp_utils as well as https://github.com/nkolban/ESP32_BLE_Arduino

The original code in the esp32-snippets library is apache-2.0 licence'ed.
In addition when Neil Kolban stopped maintaining this library he made it available with the express requirement that the licence stays as apache-2.0
(Please see: https://github.com/nkolban/esp32-snippets/issues/813)
"... I do require that it continue to be Apache Licensed and free of charge for any and all uses (private or commercial)."

This change is to clarify the licence of this library.
2021-06-09 12:41:19 +03:00
e7d0ad2efd Update BLEScan.cpp (#5241)
Proposed fix to #4627 as a remediation to PR #3995
#3995 introduced that a device detected on BLE would not be entered in vector if a callback has been defined. 
By doing so, it was not possible anymore to have a counter in a call back (AND device in vector) to limit the number of detected device in a single scan, which could crash ESP32 as a result.
2021-06-09 12:40:59 +03:00
77f504453f WMath.cpp doesn't include Arduino.h, where makeWord(h, l) is declared, common denominator type therefore is uint8_t, which is in use already in Arduino.h, too. (#5230)
Fixes #5229
2021-06-09 12:40:08 +03:00
67de199bac add onMtuChanged to BLEServerCallbacks (#5222)
* add onMtuChanged to BLEServerCallbacks

Add method onMtuChanged to the BLEServerCallbacks so the application can be notified if the MTU size changes.

* Correct missing semicolon and misspelled method.

Correct missing semicolon and misspelled method.
2021-06-09 12:37:46 +03:00
39155e70a6 ssl_client.cpp: Fix parameter name in _handle_error. (#5217) 2021-06-09 12:33:52 +03:00
f385ee4219 Fixed labels on the boards pinouts images (#5213) 2021-06-09 12:33:12 +03:00
e30b821be1 Add missing Wifi Provisioning dependency (#5203) 2021-06-09 12:32:40 +03:00
cb7aef1e88 Fix crash in WiFiClient when read() called after stop() (#5197)
Thi may happen if read() gets called repeatedly (such as in HttpClient to parse response headers) and the connection is closed unexpectedly or the remote peer may have unexpected behavior that causes the underlying socket to report an error. In that case read() itself calls stop(), which invalidates the receive buffer object. Then when read() is called again without checking, such as inside readStringUntil(), the _rxBuffer is null and ESP32 crashes.
2021-06-09 12:30:14 +03:00
fb513c79fa Add uPesy ESP32 DevKit boards support (#5144)
* Add uPesy ESP32 DevKit boards support
2021-06-09 12:29:23 +03:00
90d3ae25af Added support for Trueverit Universal IoT Driver (#5219)
Add support for the Trueverit Universal IoT Driver (https://www.trueverit.com)

The board will be released on market using electronic distributors soon
2021-06-09 12:27:32 +03:00
a618fc1361 IDF master c13afea63 (#5214)
esp-dsp: master 7cc5073
esp-face: master 420fc7e
esp-rainmaker: f1b82c7
esp32-camera: master 6f8489e
esp_littlefs: master b58f00c
2021-05-31 16:32:51 +03:00
0db9e2f45b Update esptool 2021-05-28 10:05:19 +03:00
a1d8b959b0 Fix length typo (#5189) 2021-05-18 14:01:20 +03:00
de66c39f04 Bump library versions to 2.0.0 (#5182)
* Bump library versions to 2.0.0

* Fixed name on SD library (see #5181)
2021-05-18 14:00:49 +03:00
1b5696a534 Bug fix for Heltec boards defintion (#5180) 2021-05-18 14:00:22 +03:00
955675e712 Adding build.mcu to save name killed export. reverting. fixes #5174 (#5177) 2021-05-18 13:59:36 +03:00
2082945d36 Make LOOP_STACK_SIZE user configurable at compile-time. (#5173)
This PR lets the user override the LOOP STACK SIZE set in sdkconfig (for example with -DARDUINO_LOOP_STACK_SIZE=12288).
2021-05-18 13:58:56 +03:00
0d6b142228 Update BLE_client.ino (#5156)
Pull request #4999 added setMTU function to BLEClient.cpp/.h, this line provides implementation of this added functionality to the BLE client example to resolve cases in which data from notifyCallback exceeds 20 characters (3 bytes for command type and attribute ID, 20 bytes for attribute data (char*)pData).
2021-05-18 13:57:56 +03:00
7c3a82a525 Fix (en|dis)able typo on BLEAdvertising start() (#5142) 2021-05-18 13:54:48 +03:00
dadc101506 Add files via upload - CONTRIBUTING.rst (#5138)
* Add files via upload

Adding of Contributing.rst file.

* Update CONTRIBUTING.rst
2021-05-18 13:54:25 +03:00
1b2f34b0d6 MDNSResponder: Add method to get TXT key values. (#5135) 2021-05-18 13:51:43 +03:00
76f0a80fe7 Removed second NTP server from configTime. SNTP only uses one (#5127) 2021-05-18 13:50:40 +03:00
5bfbcfc91c Added condition to only use tinyusb as needed (#5123)
* Added condition to only use tinyusb as needed

* Removed esp32c3 from targets supporting tinyusb
2021-05-18 13:49:32 +03:00
7a53c2d371 softAP should only start modern WPA2 (#5114)
* AP with old WPA should not be used due security flaws.
* restore behavior from 1.0.6, see 46d5afb17f/libraries/WiFi/src/WiFiAP.cpp (L127)
2021-05-18 13:34:52 +03:00
cb2fbe445d Added new boads pinout images for ESP32, ESP32-S2 and ESP32-C3 (#5133)
Board images updated and added warning on Flash/PSRAM pins
2021-05-18 13:33:57 +03:00
48becf8966 Update boards.txt (#5113)
add board KB32-FT
2021-05-18 13:32:30 +03:00
15f8853819 RMaker_readme: Minor corrections (#5175) 2021-05-18 13:31:29 +03:00
7856de7a57 BLE5 features to use with C3/S3 (#5085)
Added new BLE5 features to use on C3/S3 family:

extended scan,
extended/multi advertising
New code is not fancy (no feedback from events), but i think it is functional. To get feedback from events i am suggesting to use custom GAP callback, which is already implemented in BLEDevice.
2021-04-22 13:01:20 +03:00
e62ff6dc37 RainMaker library: Minor changes (#5092)
- Use Serial.print instead of log_i for QR code helper information,
  so that it is always printed by default.
- Expose the RainMaker factory reset and wifi reset APIs.
- Simplify example to have only a Switch device. Create another example for custom device.
- Enable push button based Factory reset and Wi-Fi reset.
- Added support for the TimeZone service.
- Moved API doc to RainMaker library's top level README.
- Other minor doc changes.
2021-04-22 12:59:27 +03:00
182499071a Still finding missing bits for the tinys2 board definition :( (#5098) 2021-04-22 12:57:41 +03:00
cdd48e4ee4 Re-add TinyS2 to boards.txt (#5093)
* Removed ProS2 and added TinyS2 to boards.txt

* Fixed incorrect NUM_OUTPUT_PINS - should be 47 not 45
This is why my APA doesn't work on my FeatherS2 as it usess IO45 and the check is for < not <=

* TinyS2 from boards.txt got stomped with old proS2 stuff (no idea why), so adding it back in.
2021-04-21 18:57:10 +03:00
0c3597f8d7 readme: minor fixes around chip names (#5097) 2021-04-21 18:55:58 +03:00
82161bebe3 Use cpu_hal_get_cycle_count for all chips 2021-04-19 14:25:09 +03:00
55b8f67d80 In esp32-hal-log, direct calls to ESP_LOG_x macros is more efficient than using intermediate function log_to_esp (#5081)
As indicated in https://github.com/espressif/arduino-esp32/issues/4845#issuecomment-820540642_ it is more efficient to call directly the ESP LOG macros. This spares a function call, a 512b buffer and a call to vsnprintf. No change in functionality.
2021-04-19 12:30:01 +03:00
9c20f1bdd0 added denky boards (#5079)
Added new boards including one with brand new ESP32-PICO-V3-02
2021-04-19 12:28:58 +03:00
b45cf11ff1 Fixed ESP::getCycleCount for S2/C3 (#5075)
Fixes #5071
2021-04-19 12:28:06 +03:00
fb0d63b576 Update README.md 2021-04-17 15:48:13 +03:00
1499 changed files with 57037 additions and 18015 deletions

View File

@ -1,19 +1,43 @@
#!/bin/bash
export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git#feature/idf-v4.0"
PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master"
XTENSA32_TOOLCHAIN_VERSION="8.4.0+2021r1"
XTENSA32S2_TOOLCHAIN_VERSION="8.4.0+2021r1"
RISCV_TOOLCHAIN_VERSION="8.4.0+2021r1"
ESPTOOLPY_VERSION="~1.30100.0"
ESPRESSIF_ORGANIZATION_NAME="espressif"
echo "Installing Python Wheel ..."
pip install wheel > /dev/null 2>&1
echo "Installing PlatformIO ..."
pip install -U https://github.com/platformio/platformio/archive/develop.zip > /dev/null 2>&1
pip install -U https://github.com/platformio/platformio/archive/master.zip > /dev/null 2>&1
echo "Installing Platform ESP32 ..."
python -m platformio platform install $PLATFORMIO_ESP32_URL > /dev/null 2>&1
python -m platformio platform install $PLATFORMIO_ESP32_URL > /dev/null 2>&1
echo "Replacing the framework version ..."
python -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoespressif32']['version'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
echo "Replacing the package versions ..."
replace_script="import json; import os;"
replace_script+="fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+');"
replace_script+="data=json.load(fp);"
# Use framework sources from the repository
replace_script+="data['packages']['framework-arduinoespressif32']['version'] = '*';"
replace_script+="del data['packages']['framework-arduinoespressif32']['owner'];"
# Use toolchain packages from the "espressif" organization
replace_script+="data['packages']['toolchain-xtensa-esp32']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
replace_script+="data['packages']['toolchain-riscv32-esp']['owner']='$ESPRESSIF_ORGANIZATION_NAME';"
# Update versions to use the upstream
replace_script+="data['packages']['toolchain-xtensa-esp32']['version']='$XTENSA32_TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-xtensa-esp32s2']['version']='$XTENSA32S2_TOOLCHAIN_VERSION';"
replace_script+="data['packages']['toolchain-riscv32-esp']['version']='$RISCV_TOOLCHAIN_VERSION';"
# esptool.py may require an upstream version (for now platformio is the owner)
replace_script+="data['packages']['tool-esptoolpy']['version']='$ESPTOOLPY_VERSION';"
# Save results
replace_script+="fp.seek(0);fp.truncate();json.dump(data, fp, indent=2);fp.close()"
python -c "$replace_script"
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
echo "Linking Core..."

View File

@ -85,53 +85,59 @@ function git_safe_upload_to_pages(){
return $?
}
EVENT_JSON=`cat $GITHUB_EVENT_PATH`
git_safe_upload_to_pages "index.md" "README.md"
echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
echo "EVENT_JSON: $EVENT_JSON"
# At some point github stopped providing a list of edited file
# but we also stopped havong documentation in md format,
# so we can skip this portion safely and update just the index
pages_added=`echo "$EVENT_JSON" | jq -r '.commits[].added[]'`
echo "added: $pages_added"
pages_modified=`echo "$EVENT_JSON" | jq -r '.commits[].modified[]'`
echo "modified: $pages_modified"
pages_removed=`echo "$EVENT_JSON" | jq -r '.commits[].removed[]'`
echo "removed: $pages_removed"
# EVENT_JSON=`cat $GITHUB_EVENT_PATH`
for page in $pages_added; do
if [[ $page != "README.md" && $page != "docs/"* ]]; then
continue
fi
echo "Adding '$page' to pages ..."
if [[ $page == "README.md" ]]; then
git_safe_upload_to_pages "index.md" "README.md"
else
git_safe_upload_to_pages "$page" "$page"
fi
done
# echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
# echo "EVENT_JSON: $EVENT_JSON"
for page in $pages_modified; do
if [[ $page != "README.md" && $page != "docs/"* ]]; then
continue
fi
echo "Modifying '$page' ..."
if [[ $page == "README.md" ]]; then
git_safe_upload_to_pages "index.md" "README.md"
else
git_safe_upload_to_pages "$page" "$page"
fi
done
# pages_added=`echo "$EVENT_JSON" | jq -r '.commits[].added[]'`
# echo "added: $pages_added"
# pages_modified=`echo "$EVENT_JSON" | jq -r '.commits[].modified[]'`
# echo "modified: $pages_modified"
# pages_removed=`echo "$EVENT_JSON" | jq -r '.commits[].removed[]'`
# echo "removed: $pages_removed"
for page in $pages_removed; do
if [[ $page != "README.md" && $page != "docs/"* ]]; then
continue
fi
echo "Removing '$page' from pages ..."
if [[ $page == "README.md" ]]; then
git_remove_from_pages "README.md" > /dev/null
else
git_remove_from_pages "$page" > /dev/null
fi
done
# for page in $pages_added; do
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
# continue
# fi
# echo "Adding '$page' to pages ..."
# if [[ $page == "README.md" ]]; then
# git_safe_upload_to_pages "index.md" "README.md"
# else
# git_safe_upload_to_pages "$page" "$page"
# fi
# done
# for page in $pages_modified; do
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
# continue
# fi
# echo "Modifying '$page' ..."
# if [[ $page == "README.md" ]]; then
# git_safe_upload_to_pages "index.md" "README.md"
# else
# git_safe_upload_to_pages "$page" "$page"
# fi
# done
# for page in $pages_removed; do
# if [[ $page != "README.md" && $page != "docs/"* ]]; then
# continue
# fi
# echo "Removing '$page' from pages ..."
# if [[ $page == "README.md" ]]; then
# git_remove_from_pages "README.md" > /dev/null
# else
# git_remove_from_pages "$page" > /dev/null
# fi
# done
echo
echo "DONE!"

2
.github/stale.yml vendored
View File

@ -26,7 +26,7 @@ exemptMilestones: false
exemptAssignees: false
# Label to use when marking as stale
staleLabel: Status: Stale
staleLabel: "Status: Stale"
# Comment to post when marking as stale. Set to `false` to disable
markComment: >

View File

@ -7,7 +7,6 @@ on:
- pages
paths:
- 'README.md'
- 'docs/**'
- '.github/scripts/on-pages.sh'
- '.github/workflows/gh-pages.yml'

5
.gitignore vendored
View File

@ -6,6 +6,7 @@ tools/esptool
tools/esptool.exe
tools/mkspiffs
tools/mklittlefs
tools/mkfatfs.exe
.DS_Store
#Ignore files built by Visual Studio/Visual Micro
@ -17,4 +18,6 @@ __vm/
.vscode/
platform.sloeber.txt
boards.sloeber.txt
tools/mklittlefs
# Ignore docs build (Sphinx)
docs/build

View File

@ -7,7 +7,6 @@ set(CORE_SRCS
cores/esp32/esp32-hal-dac.c
cores/esp32/esp32-hal-gpio.c
cores/esp32/esp32-hal-i2c.c
cores/esp32/esp32-hal-log.c
cores/esp32/esp32-hal-ledc.c
cores/esp32/esp32-hal-matrix.c
cores/esp32/esp32-hal-misc.c
@ -56,7 +55,7 @@ set(LIBRARY_SRCS
libraries/FS/src/vfs_api.cpp
libraries/HTTPClient/src/HTTPClient.cpp
libraries/HTTPUpdate/src/HTTPUpdate.cpp
libraries/LITTLEFS/src/LITTLEFS.cpp
libraries/LittleFS/src/LittleFS.cpp
libraries/NetBIOS/src/NetBIOS.cpp
libraries/Preferences/src/Preferences.cpp
libraries/RainMaker/src/RMaker.cpp
@ -141,7 +140,7 @@ set(includedirs
libraries/FS/src
libraries/HTTPClient/src
libraries/HTTPUpdate/src
libraries/LITTLEFS/src
libraries/LittleFS/src
libraries/NetBIOS/src
libraries/Preferences/src
libraries/RainMaker/src
@ -161,21 +160,51 @@ set(includedirs
set(srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS})
set(priv_includes cores/esp32/libb64)
set(requires spi_flash mbedtls mdns esp_adc_cal)
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt arduino_tinyusb main)
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
list(APPEND priv_requires esp_https_ota)
endif()
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_LITTLEFS)
list(APPEND priv_requires esp_littlefs)
endif()
set(requires spi_flash mbedtls mdns esp_adc_cal wifi_provisioning nghttp)
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl bt esp_ipc)
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
if(IDF_TARGET STREQUAL "esp32")
target_compile_options(${COMPONENT_TARGET} PUBLIC -DARDUINO=10812 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="esp32" -DESP32)
string(TOUPPER ${CONFIG_IDF_TARGET} idf_target_caps)
target_compile_options(${COMPONENT_TARGET} PUBLIC
-DARDUINO=10812
-DARDUINO_${idf_target_caps}_DEV
-DARDUINO_ARCH_ESP32
-DARDUINO_BOARD="${idf_target_caps}_DEV"
-DARDUINO_VARIANT="${CONFIG_IDF_TARGET}"
-DESP32)
if(CONFIG_AUTOSTART_ARDUINO)
# in autostart mode, arduino-esp32 contains app_main() function and needs to
# reference setup() and loop() in the main component. If we add main
# component to priv_requires then we create a large circular dependency
# (arduino-esp32 -> main -> arduino-esp32) and can get linker errors, so
# instead we add setup() and loop() to the undefined symbols list so the
# linker will always include them.
#
# (As they are C++ symbol, we need to add the C++ mangled names.)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _Z5setupv -u _Z4loopv")
endif()
if(IDF_TARGET STREQUAL "esp32s2")
target_compile_options(${COMPONENT_TARGET} PUBLIC -DARDUINO=10812 -DARDUINO_ESP32S2_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32S2_DEV" -DARDUINO_VARIANT="esp32s2" -DESP32)
# This function adds a dependency on the given component if the component is included into the build.
function(maybe_add_component component_name)
idf_build_get_property(components BUILD_COMPONENTS)
if (${component_name} IN_LIST components)
idf_component_get_property(lib_name ${component_name} COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} PUBLIC ${lib_name})
endif()
endfunction()
if(IDF_TARGET MATCHES "esp32" AND CONFIG_ESP_RMAKER_TASK_STACK)
maybe_add_component(esp_rainmaker)
maybe_add_component(qrcode)
endif()
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
maybe_add_component(arduino_tinyusb)
endif()
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
maybe_add_component(esp_https_ota)
endif()
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_LITTLEFS)
maybe_add_component(esp_littlefs)
endif()

50
CONTRIBUTING.rst Normal file
View File

@ -0,0 +1,50 @@
Contributions Guide
===================
We welcome contributions to the Arduino ESP32 project!
How to Contribute
-----------------
Contributions to Arduino ESP32 - fixing bugs, adding features, adding documentation - are welcome. We accept contributions via `Github Pull Requests <https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests>`_.
Before Contributing
-------------------
Before sending us a Pull Request, please consider this list of points:
* Is the contribution entirely your own work, or already licensed under an LGPL 2.1 compatible Open Source License? If not then we unfortunately cannot accept it.
* Is the code adequately commented for people to understand how it is structured?
* Is there documentation or examples that go with code contributions?
* Are comments and documentation written in clear English, with no spelling or grammar errors?
* Example contributions are also welcome.
* If the contribution contains multiple commits, are they grouped together into logical changes (one major change per pull request)? Are any commits with names like "fixed typo" `squashed into previous commits <https://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit/>`_?
* If you're unsure about any of these points, please open the Pull Request anyhow and then ask us for feedback.
Pull Request Process
--------------------
After you open the Pull Request, there will probably be some discussion in the comments field of the request itself.
Once the Pull Request is ready to merge, it will first be merged into our internal git system for in-house automated testing.
If this process passes, it will be merged onto the public github repository.
Legal Part
----------
Before a contribution can be accepted, you will need to sign our :doc:`contributor-agreement`. You will be prompted for this automatically as part of the Pull Request process.
Related Documents
-----------------
.. toctree::
:maxdepth: 1
contributor-agreement

View File

@ -1,14 +1,25 @@
# Arduino core for the ESP32
[![Build Status](https://travis-ci.org/espressif/arduino-esp32.svg?branch=master)](https://travis-ci.org/espressif/arduino-esp32) ![](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg)
[![Build Status](https://travis-ci.org/espressif/arduino-esp32.svg?branch=master)](https://travis-ci.org/espressif/arduino-esp32) ![](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![Documentation Status](https://readthedocs.com/projects/espressif-arduino-esp32/badge/?version=latest)](https://docs.espressif.com/projects/arduino-esp32/en/latest/?badge=latest)
### Need help or have a question? Join the chat at [![https://gitter.im/espressif/arduino-esp32](https://badges.gitter.im/espressif/arduino-esp32.svg)](https://gitter.im/espressif/arduino-esp32?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Contents
- [ESP32-S2 and ESP32-C3 Support](#esp32-s2-and-esp32-c3-support)
- [Development Status](#development-status)
- [Installation Instructions](#installation-instructions)
- [Decoding Exceptions](#decoding-exceptions)
- [Issue/Bug report template](#issuebug-report-template)
- [ESP32Dev Board PINMAP](#esp32dev-board-pinmap)
### ESP32-S2 and ESP32-C3 Support
If you want to test ESP32-S2 and/or ESP32-C3 through the board manager, please use the development release link:
```
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
```
Now you can install the latest 2.0.0 version from the boards manager.
### Development Status
@ -16,20 +27,16 @@ Latest Stable Release [![Release Version](https://img.shields.io/github/release
Latest Development Release [![Release Version](https://img.shields.io/github/release/espressif/arduino-esp32/all.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/latest/) [![Release Date](https://img.shields.io/github/release-date-pre/espressif/arduino-esp32.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/latest/) [![Downloads](https://img.shields.io/github/downloads-pre/espressif/arduino-esp32/latest/total.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/latest/)
### Documentation
### Installation Instructions
- Using Arduino IDE Boards Manager (preferred)
+ [Instructions for Boards Manager](docs/arduino-ide/boards_manager.md)
- Using Arduino IDE with the development repository
+ [Instructions for Windows](docs/arduino-ide/windows.md)
+ [Instructions for Mac](docs/arduino-ide/mac.md)
+ [Instructions for Debian/Ubuntu Linux](docs/arduino-ide/debian_ubuntu.md)
+ [Instructions for Fedora](docs/arduino-ide/fedora.md)
+ [Instructions for openSUSE](docs/arduino-ide/opensuse.md)
- [Using PlatformIO](docs/platformio.md)
- [Building with make](docs/make.md)
- [Using as ESP-IDF component](docs/esp-idf_component.md)
- [Using OTAWebUpdater](docs/OTAWebUpdate/OTAWebUpdate.md)
You can use [Arduino-ESP32 Online Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/) to get all information about this project.
* [Getting Started](https://docs.espressif.com/projects/arduino-esp32/en/latest/getting_started.html)
* [Installing (Windows, Linux and macOS)](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html)
* [Libraries](https://docs.espressif.com/projects/arduino-esp32/en/latest/libraries.html)
* [ESP-IDF as Component](https://docs.espressif.com/projects/arduino-esp32/en/latest/esp-idf_component.html)
* [FAQ](https://docs.espressif.com/projects/arduino-esp32/en/latest/faq.html)
* [Troubleshooting](https://docs.espressif.com/projects/arduino-esp32/en/latest/troubleshooting.html)
### Decoding exceptions
@ -38,14 +45,10 @@ You can use [EspExceptionDecoder](https://github.com/me-no-dev/EspExceptionDecod
### Issue/Bug report template
Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as [for reference](https://github.com/espressif/arduino-esp32/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3A%22for%20reference%22%20).
Finally, if you are sure no one else had the issue, follow the [ISSUE_TEMPLATE](docs/ISSUE_TEMPLATE.md) while reporting any issue.
Finally, if you are sure no one else had the issue, follow the [issue template](docs/ISSUE_TEMPLATE.md) while reporting any issue.
### ESP32Dev Board PINMAP
### Contributing
![Pin Functions](docs/esp32_pinmap.png)
We welcome contributions to the Arduino ESP32 project!
![ESP32S2_Pinmap](docs/esp32s2_pinmap.png)
### Tip
Sometimes to program ESP32 via serial you must keep GPIO0 LOW during the programming process
See [contributing](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html) in the documentation for more information on how to contribute to the project.

View File

@ -1,5 +1,6 @@
menu.UploadSpeed=Upload Speed
menu.SerialMode=Serial Connected To
menu.UploadMode=Upload Mode
menu.CPUFreq=CPU Frequency
menu.FlashFreq=Flash Frequency
menu.FlashMode=Flash Mode
@ -158,8 +159,8 @@ esp32s2.upload.maximum_size=1310720
esp32s2.upload.maximum_data_size=327680
esp32s2.upload.flags=
esp32s2.upload.extra_flags=
esp32s2.upload.use_1200bps_touch=true
esp32s2.upload.wait_for_upload_port=true
esp32s2.upload.use_1200bps_touch=false
esp32s2.upload.wait_for_upload_port=false
esp32s2.serial.disableDTR=false
esp32s2.serial.disableRTS=false
@ -186,6 +187,13 @@ esp32s2.menu.SerialMode.default.build.serial=0
esp32s2.menu.SerialMode.cdc=USB CDC
esp32s2.menu.SerialMode.cdc.build.serial=1
esp32s2.menu.UploadMode.default=UART0
esp32s2.menu.UploadMode.default.upload.use_1200bps_touch=false
esp32s2.menu.UploadMode.default.upload.wait_for_upload_port=false
esp32s2.menu.UploadMode.cdc=Internal USB
esp32s2.menu.UploadMode.cdc.upload.use_1200bps_touch=true
esp32s2.menu.UploadMode.cdc.upload.wait_for_upload_port=true
esp32s2.menu.PSRAM.disabled=Disabled
esp32s2.menu.PSRAM.disabled.build.defines=
esp32s2.menu.PSRAM.enabled=Enabled
@ -962,132 +970,118 @@ feathers2.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
pros2.name=UM ProS2
pros2.vid.0=0x239A
pros2.pid.0=0x80A9
tinys2.name=UM TinyS2
tinys2.vid.0=0x303a
tinys2.pid.0=0x8001
pros2.upload.tool=esptool_py
pros2.upload.maximum_size=1310720
pros2.upload.maximum_data_size=327680
pros2.upload.flags=
pros2.upload.extra_flags=
pros2.upload.use_1200bps_touch=true
pros2.upload.wait_for_upload_port=true
tinys2.upload.tool=esptool_py
tinys2.upload.maximum_size=1310720
tinys2.upload.maximum_data_size=327680
tinys2.upload.flags=
tinys2.upload.extra_flags=
tinys2.upload.use_1200bps_touch=true
tinys2.upload.wait_for_upload_port=true
pros2.serial.disableDTR=false
pros2.serial.disableRTS=false
tinys2.serial.disableDTR=false
tinys2.serial.disableRTS=false
pros2.build.tarch=xtensa
pros2.build.bootloader_addr=0x1000
pros2.build.target=esp32s2
pros2.build.mcu=esp32s2
pros2.build.core=esp32
pros2.build.variant=um_pros2
pros2.build.board=PROS2
tinys2.build.tarch=xtensa
tinys2.build.bootloader_addr=0x1000
tinys2.build.target=esp32s2
tinys2.build.mcu=esp32s2
tinys2.build.core=esp32
tinys2.build.variant=um_tinys2
tinys2.build.board=TINYS2
pros2.build.serial=1
pros2.build.f_cpu=240000000L
pros2.build.flash_size=16MB
pros2.build.flash_freq=80m
pros2.build.flash_mode=dio
pros2.build.boot=qio
pros2.build.partitions=fatflash
pros2.build.defines=
tinys2.build.serial=1
tinys2.build.f_cpu=240000000L
tinys2.build.flash_size=4MB
tinys2.build.flash_freq=80m
tinys2.build.flash_mode=dio
tinys2.build.boot=qio
tinys2.build.partitions=default
tinys2.build.defines=
pros2.menu.SerialMode.cdc=USB CDC
pros2.menu.SerialMode.cdc.build.serial=1
pros2.menu.SerialMode.default=UART0
pros2.menu.SerialMode.default.build.serial=0
tinys2.menu.SerialMode.cdc=USB CDC
tinys2.menu.SerialMode.cdc.build.serial=1
tinys2.menu.SerialMode.default=UART0
tinys2.menu.SerialMode.default.build.serial=0
pros2.menu.PSRAM.enabled=Enabled
pros2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
pros2.menu.PSRAM.disabled=Disabled
pros2.menu.PSRAM.disabled.build.defines=
tinys2.menu.PSRAM.enabled=Enabled
tinys2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
tinys2.menu.PSRAM.disabled=Disabled
tinys2.menu.PSRAM.disabled.build.defines=
pros2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
pros2.menu.PartitionScheme.fatflash.build.partitions=ffat
pros2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
pros2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
pros2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
pros2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
pros2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
pros2.menu.PartitionScheme.default.build.partitions=default
pros2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
pros2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
pros2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
pros2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
pros2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
pros2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
pros2.menu.PartitionScheme.minimal.build.partitions=minimal
pros2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
pros2.menu.PartitionScheme.no_ota.build.partitions=no_ota
pros2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
pros2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
pros2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
pros2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
pros2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
pros2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
pros2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
pros2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
pros2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
pros2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
pros2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
pros2.menu.PartitionScheme.huge_app.build.partitions=huge_app
pros2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
pros2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
pros2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
pros2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
tinys2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
tinys2.menu.PartitionScheme.default.build.partitions=default
tinys2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
tinys2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
tinys2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
tinys2.menu.PartitionScheme.minimal.build.partitions=minimal
tinys2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
tinys2.menu.PartitionScheme.no_ota.build.partitions=no_ota
tinys2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
tinys2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
tinys2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
tinys2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
tinys2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
tinys2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
tinys2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
tinys2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
tinys2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
tinys2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
tinys2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
tinys2.menu.PartitionScheme.huge_app.build.partitions=huge_app
tinys2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
tinys2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
tinys2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
tinys2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
pros2.menu.CPUFreq.240=240MHz (WiFi)
pros2.menu.CPUFreq.240.build.f_cpu=240000000L
pros2.menu.CPUFreq.160=160MHz (WiFi)
pros2.menu.CPUFreq.160.build.f_cpu=160000000L
pros2.menu.CPUFreq.80=80MHz (WiFi)
pros2.menu.CPUFreq.80.build.f_cpu=80000000L
pros2.menu.CPUFreq.40=40MHz
pros2.menu.CPUFreq.40.build.f_cpu=40000000L
pros2.menu.CPUFreq.20=20MHz
pros2.menu.CPUFreq.20.build.f_cpu=20000000L
pros2.menu.CPUFreq.10=10MHz
pros2.menu.CPUFreq.10.build.f_cpu=10000000L
tinys2.menu.CPUFreq.240=240MHz (WiFi)
tinys2.menu.CPUFreq.240.build.f_cpu=240000000L
tinys2.menu.CPUFreq.160=160MHz (WiFi)
tinys2.menu.CPUFreq.160.build.f_cpu=160000000L
tinys2.menu.CPUFreq.80=80MHz (WiFi)
tinys2.menu.CPUFreq.80.build.f_cpu=80000000L
tinys2.menu.CPUFreq.40=40MHz
tinys2.menu.CPUFreq.40.build.f_cpu=40000000L
tinys2.menu.CPUFreq.20=20MHz
tinys2.menu.CPUFreq.20.build.f_cpu=20000000L
tinys2.menu.CPUFreq.10=10MHz
tinys2.menu.CPUFreq.10.build.f_cpu=10000000L
pros2.menu.FlashSize.16M=16MB (128Mb)
pros2.menu.FlashSize.16M.build.flash_size=16MB
pros2.menu.FlashSize.4M=4MB (32Mb)
pros2.menu.FlashSize.4M.build.flash_size=4MB
pros2.menu.FlashSize.8M=8MB (64Mb)
pros2.menu.FlashSize.8M.build.flash_size=8MB
pros2.menu.FlashSize.8M.build.partitions=default_8MB
pros2.menu.FlashSize.2M=2MB (16Mb)
pros2.menu.FlashSize.2M.build.flash_size=2MB
pros2.menu.FlashSize.2M.build.partitions=minimal
tinys2.menu.FlashSize.4M=4MB (32Mb)
tinys2.menu.FlashSize.4M.build.flash_size=4MB
tinys2.menu.FlashSize.2M=2MB (16Mb)
tinys2.menu.FlashSize.2M.build.flash_size=2MB
tinys2.menu.FlashSize.2M.build.partitions=minimal
pros2.menu.UploadSpeed.921600=921600
pros2.menu.UploadSpeed.921600.upload.speed=921600
pros2.menu.UploadSpeed.115200=115200
pros2.menu.UploadSpeed.115200.upload.speed=115200
pros2.menu.UploadSpeed.256000.windows=256000
pros2.menu.UploadSpeed.256000.upload.speed=256000
pros2.menu.UploadSpeed.230400.windows.upload.speed=256000
pros2.menu.UploadSpeed.230400=230400
pros2.menu.UploadSpeed.230400.upload.speed=230400
pros2.menu.UploadSpeed.460800.linux=460800
pros2.menu.UploadSpeed.460800.macosx=460800
pros2.menu.UploadSpeed.460800.upload.speed=460800
tinys2.menu.UploadSpeed.921600=921600
tinys2.menu.UploadSpeed.921600.upload.speed=921600
tinys2.menu.UploadSpeed.115200=115200
tinys2.menu.UploadSpeed.115200.upload.speed=115200
tinys2.menu.UploadSpeed.256000.windows=256000
tinys2.menu.UploadSpeed.256000.upload.speed=256000
tinys2.menu.UploadSpeed.230400.windows.upload.speed=256000
tinys2.menu.UploadSpeed.230400=230400
tinys2.menu.UploadSpeed.230400.upload.speed=230400
tinys2.menu.UploadSpeed.460800.linux=460800
tinys2.menu.UploadSpeed.460800.macosx=460800
tinys2.menu.UploadSpeed.460800.upload.speed=460800
pros2.menu.DebugLevel.none=None
pros2.menu.DebugLevel.none.build.code_debug=0
pros2.menu.DebugLevel.error=Error
pros2.menu.DebugLevel.error.build.code_debug=1
pros2.menu.DebugLevel.warn=Warn
pros2.menu.DebugLevel.warn.build.code_debug=2
pros2.menu.DebugLevel.info=Info
pros2.menu.DebugLevel.info.build.code_debug=3
pros2.menu.DebugLevel.debug=Debug
pros2.menu.DebugLevel.debug.build.code_debug=4
pros2.menu.DebugLevel.verbose=Verbose
pros2.menu.DebugLevel.verbose.build.code_debug=5
tinys2.menu.DebugLevel.none=None
tinys2.menu.DebugLevel.none.build.code_debug=0
tinys2.menu.DebugLevel.error=Error
tinys2.menu.DebugLevel.error.build.code_debug=1
tinys2.menu.DebugLevel.warn=Warn
tinys2.menu.DebugLevel.warn.build.code_debug=2
tinys2.menu.DebugLevel.info=Info
tinys2.menu.DebugLevel.info.build.code_debug=3
tinys2.menu.DebugLevel.debug=Debug
tinys2.menu.DebugLevel.debug.build.code_debug=4
tinys2.menu.DebugLevel.verbose=Verbose
tinys2.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
S_ODI_Ultra.name=S.ODI Ultra v1
@ -5338,10 +5332,10 @@ heltec_wifi_lora_32.build.partitions=default
heltec_wifi_lora_32.build.defines=-D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} {build.psram}
heltec_wifi_lora_32.menu.PSRAM.disabled=Disabled
heltec_wifi_lora_32.menu.PSRAM.disabled.build.defines=
heltec_wifi_lora_32.menu.PSRAM.disabled.build.psram=
heltec_wifi_lora_32.menu.PSRAM.disabled.build.extra_libs=
heltec_wifi_lora_32.menu.PSRAM.enabled=Enabled
heltec_wifi_lora_32.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wifi_lora_32.menu.PSRAM.enabled.build.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wifi_lora_32.menu.PSRAM.enabled.build.extra_libs=
heltec_wifi_lora_32.menu.CPUFreq.240=240MHz (WiFi/BT)
@ -5439,10 +5433,10 @@ heltec_wifi_lora_32_V2.build.partitions=default_8MB
heltec_wifi_lora_32_V2.build.defines=-D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} {build.psram}
heltec_wifi_lora_32_V2.menu.PSRAM.disabled=Disabled
heltec_wifi_lora_32_V2.menu.PSRAM.disabled.build.defines=
heltec_wifi_lora_32_V2.menu.PSRAM.disabled.build.psram=
heltec_wifi_lora_32_V2.menu.PSRAM.disabled.build.extra_libs=
heltec_wifi_lora_32_V2.menu.PSRAM.enabled=Enabled
heltec_wifi_lora_32_V2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wifi_lora_32_V2.menu.PSRAM.enabled.build.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wifi_lora_32_V2.menu.PSRAM.enabled.build.extra_libs=
heltec_wifi_lora_32_V2.menu.CPUFreq.240=240MHz (WiFi/BT)
@ -5540,10 +5534,10 @@ heltec_wireless_stick.build.partitions=default_8MB
heltec_wireless_stick.build.defines=-D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} {build.psram}
heltec_wireless_stick.menu.PSRAM.disabled=Disabled
heltec_wireless_stick.menu.PSRAM.disabled.build.defines=
heltec_wireless_stick.menu.PSRAM.disabled.build.psram=
heltec_wireless_stick.menu.PSRAM.disabled.build.extra_libs=
heltec_wireless_stick.menu.PSRAM.enabled=Enabled
heltec_wireless_stick.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wireless_stick.menu.PSRAM.enabled.build.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wireless_stick.menu.PSRAM.enabled.build.extra_libs=
heltec_wireless_stick.menu.CPUFreq.240=240MHz (WiFi/BT)
@ -5641,10 +5635,10 @@ heltec_wireless_stick_lite.build.partitions=default
heltec_wireless_stick_lite.build.defines=-D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} {build.psram}
heltec_wireless_stick_lite.menu.PSRAM.disabled=Disabled
heltec_wireless_stick_lite.menu.PSRAM.disabled.build.defines=
heltec_wireless_stick_lite.menu.PSRAM.disabled.build.psram=
heltec_wireless_stick_lite.menu.PSRAM.disabled.build.extra_libs=
heltec_wireless_stick_lite.menu.PSRAM.enabled=Enabled
heltec_wireless_stick_lite.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wireless_stick_lite.menu.PSRAM.enabled.build.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
heltec_wireless_stick_lite.menu.PSRAM.enabled.build.extra_libs=
heltec_wireless_stick_lite.menu.CPUFreq.240=240MHz (WiFi/BT)
@ -8208,3 +8202,661 @@ ET-Board.menu.DebugLevel.debug=Debug
ET-Board.menu.DebugLevel.debug.build.code_debug=4
ET-Board.menu.DebugLevel.verbose=Verbose
ET-Board.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
ch_denky.name=Denky
ch_denky.upload.tool=esptool_py
ch_denky.upload.maximum_size=1310720
ch_denky.upload.maximum_data_size=327680
ch_denky.upload.flags=
ch_denky.upload.extra_flags=
ch_denky.serial.disableDTR=true
ch_denky.serial.disableRTS=true
ch_denky.build.tarch=xtensa
ch_denky.build.bootloader_addr=0x1000
ch_denky.build.target=esp32
ch_denky.build.mcu=esp32
ch_denky.build.core=esp32
ch_denky.build.variant=ch_denky
ch_denky.build.board=DENKY
ch_denky.build.f_cpu=240000000L
ch_denky.build.flash_size=4MB
ch_denky.build.flash_freq=80m
ch_denky.build.flash_mode=dio
ch_denky.build.boot=dio
ch_denky.build.partitions=default
ch_denky.build.defines=
ch_denky.menu.Revision.denkyd4=PICO-V3-02
ch_denky.menu.Revision.denkyd4.build.board=DENKY_PICOV3
ch_denky.menu.Revision.denkyd4.build.flash_size=8MB
ch_denky.menu.Revision.denky32=WROOM32
ch_denky.menu.Revision.denky32.build.board=DENKY_WROOM32
ch_denky.menu.Revision.denkyd4.build.flash_size=4MB
ch_denky.menu.PartitionScheme.default=Default
ch_denky.menu.PartitionScheme.default.build.partitions=default
ch_denky.menu.PartitionScheme.no_ota=No OTA (Large APP)
ch_denky.menu.PartitionScheme.no_ota.build.partitions=no_ota
ch_denky.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
ch_denky.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
ch_denky.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
ch_denky.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
ch_denky.menu.UploadSpeed.921600=921600
ch_denky.menu.UploadSpeed.921600.upload.speed=921600
ch_denky.menu.UploadSpeed.115200=115200
ch_denky.menu.UploadSpeed.115200.upload.speed=115200
ch_denky.menu.UploadSpeed.256000.windows=256000
ch_denky.menu.UploadSpeed.256000.upload.speed=256000
ch_denky.menu.UploadSpeed.230400.windows.upload.speed=256000
ch_denky.menu.UploadSpeed.230400=230400
ch_denky.menu.UploadSpeed.230400.upload.speed=230400
ch_denky.menu.UploadSpeed.460800.linux=460800
ch_denky.menu.UploadSpeed.460800.macosx=460800
ch_denky.menu.UploadSpeed.460800.upload.speed=460800
ch_denky.menu.UploadSpeed.512000.windows=512000
ch_denky.menu.UploadSpeed.512000.upload.speed=512000
ch_denky.menu.PSRAM.enabled=Enabled
ch_denky.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
ch_denky.menu.PSRAM.enabled.build.extra_libs=
ch_denky.menu.PSRAM.disabled=Disabled
ch_denky.menu.PSRAM.disabled.build.defines=
ch_denky.menu.PSRAM.disabled.build.extra_libs=
ch_denky.menu.DebugLevel.none=None
ch_denky.menu.DebugLevel.none.build.code_debug=0
ch_denky.menu.DebugLevel.error=Error
ch_denky.menu.DebugLevel.error.build.code_debug=1
ch_denky.menu.DebugLevel.warn=Warn
ch_denky.menu.DebugLevel.warn.build.code_debug=2
ch_denky.menu.DebugLevel.info=Info
ch_denky.menu.DebugLevel.info.build.code_debug=3
ch_denky.menu.DebugLevel.debug=Debug
ch_denky.menu.DebugLevel.debug.build.code_debug=4
ch_denky.menu.DebugLevel.verbose=Verbose
ch_denky.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
uPesy_wrover.name=uPesy ESP32 Wrover DevKit
uPesy_wrover.upload.tool=esptool_py
uPesy_wrover.upload.maximum_size=1310720
uPesy_wrover.upload.maximum_data_size=327680
uPesy_wrover.upload.flags=
uPesy_wrover.upload.extra_flags=
uPesy_wrover.serial.disableDTR=true
uPesy_wrover.serial.disableRTS=true
uPesy_wrover.build.tarch=xtensa
uPesy_wrover.build.bootloader_addr=0x1000
uPesy_wrover.build.target=esp32
uPesy_wrover.build.mcu=esp32
uPesy_wrover.build.core=esp32
uPesy_wrover.build.variant=uPesy_esp32_wrover_devkit
uPesy_wrover.build.board=uPesy_WROVER
uPesy_wrover.build.f_cpu=240000000L
uPesy_wrover.build.flash_size=4MB
uPesy_wrover.build.flash_freq=80m
uPesy_wrover.build.flash_mode=dio
uPesy_wrover.build.boot=dio
uPesy_wrover.build.partitions=default
uPesy_wrover.build.defines=
uPesy_wrover.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
uPesy_wrover.menu.PartitionScheme.default.build.partitions=default
uPesy_wrover.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
uPesy_wrover.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
uPesy_wrover.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
uPesy_wrover.menu.PartitionScheme.minimal.build.partitions=minimal
uPesy_wrover.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
uPesy_wrover.menu.PartitionScheme.no_ota.build.partitions=no_ota
uPesy_wrover.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
uPesy_wrover.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
uPesy_wrover.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
uPesy_wrover.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
uPesy_wrover.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
uPesy_wrover.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
uPesy_wrover.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
uPesy_wrover.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
uPesy_wrover.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
uPesy_wrover.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
uPesy_wrover.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
uPesy_wrover.menu.PartitionScheme.huge_app.build.partitions=huge_app
uPesy_wrover.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
uPesy_wrover.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
uPesy_wrover.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
uPesy_wrover.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
uPesy_wrover.menu.CPUFreq.240=240MHz
uPesy_wrover.menu.CPUFreq.240.build.f_cpu=240000000L
uPesy_wrover.menu.CPUFreq.160=160MHz
uPesy_wrover.menu.CPUFreq.160.build.f_cpu=160000000L
uPesy_wrover.menu.UploadSpeed.921600=921600
uPesy_wrover.menu.UploadSpeed.921600.upload.speed=921600
uPesy_wrover.menu.UploadSpeed.512000.windows=512000
uPesy_wrover.menu.UploadSpeed.512000.upload.speed=512000
uPesy_wrover.menu.UploadSpeed.460800.linux=460800
uPesy_wrover.menu.UploadSpeed.460800.macosx=460800
uPesy_wrover.menu.UploadSpeed.460800.upload.speed=460800
uPesy_wrover.menu.UploadSpeed.256000.windows=256000
uPesy_wrover.menu.UploadSpeed.256000.upload.speed=256000
uPesy_wrover.menu.UploadSpeed.230400.windows.upload.speed=256000
uPesy_wrover.menu.UploadSpeed.230400=230400
uPesy_wrover.menu.UploadSpeed.230400.upload.speed=230400
uPesy_wrover.menu.UploadSpeed.115200=115200
uPesy_wrover.menu.UploadSpeed.115200.upload.speed=115200
uPesy_wrover.menu.FlashMode.qio=QIO
uPesy_wrover.menu.FlashMode.qio.build.flash_mode=dio
uPesy_wrover.menu.FlashMode.qio.build.boot=qio
uPesy_wrover.menu.FlashMode.dio=DIO
uPesy_wrover.menu.FlashMode.dio.build.flash_mode=dio
uPesy_wrover.menu.FlashMode.dio.build.boot=dio
uPesy_wrover.menu.FlashFreq.80=80MHz
uPesy_wrover.menu.FlashFreq.80.build.flash_freq=80m
uPesy_wrover.menu.FlashFreq.40=40MHz
uPesy_wrover.menu.FlashFreq.40.build.flash_freq=40m
uPesy_wrover.menu.PSRAM.enabled=Enabled
uPesy_wrover.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
uPesy_wrover.menu.PSRAM.enabled.build.extra_libs=
uPesy_wrover.menu.PSRAM.disabled=Disabled
uPesy_wrover.menu.PSRAM.disabled.build.defines=
uPesy_wrover.menu.PSRAM.disabled.build.extra_libs=
uPesy_wrover.menu.DebugLevel.none=None
uPesy_wrover.menu.DebugLevel.none.build.code_debug=0
uPesy_wrover.menu.DebugLevel.error=Error
uPesy_wrover.menu.DebugLevel.error.build.code_debug=1
uPesy_wrover.menu.DebugLevel.warn=Warn
uPesy_wrover.menu.DebugLevel.warn.build.code_debug=2
uPesy_wrover.menu.DebugLevel.info=Info
uPesy_wrover.menu.DebugLevel.info.build.code_debug=3
uPesy_wrover.menu.DebugLevel.debug=Debug
uPesy_wrover.menu.DebugLevel.debug.build.code_debug=4
uPesy_wrover.menu.DebugLevel.verbose=Verbose
uPesy_wrover.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
uPesy_wroom.name=uPesy ESP32 Wroom DevKit
uPesy_wroom.upload.tool=esptool_py
uPesy_wroom.upload.maximum_size=1310720
uPesy_wroom.upload.maximum_data_size=327680
uPesy_wroom.upload.flags=
uPesy_wroom.upload.extra_flags=
uPesy_wroom.serial.disableDTR=true
uPesy_wroom.serial.disableRTS=true
uPesy_wroom.build.tarch=xtensa
uPesy_wroom.build.bootloader_addr=0x1000
uPesy_wroom.build.target=esp32
uPesy_wroom.build.mcu=esp32
uPesy_wroom.build.core=esp32
uPesy_wroom.build.variant=uPesy_esp32_wroom_devkit
uPesy_wroom.build.board=uPesy_WROOM
uPesy_wroom.build.f_cpu=240000000L
uPesy_wroom.build.flash_size=4MB
uPesy_wroom.build.flash_freq=80m
uPesy_wroom.build.flash_mode=dio
uPesy_wroom.build.boot=dio
uPesy_wroom.build.partitions=default
uPesy_wroom.build.defines=
uPesy_wroom.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
uPesy_wroom.menu.PartitionScheme.default.build.partitions=default
uPesy_wroom.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
uPesy_wroom.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
uPesy_wroom.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
uPesy_wroom.menu.PartitionScheme.minimal.build.partitions=minimal
uPesy_wroom.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
uPesy_wroom.menu.PartitionScheme.no_ota.build.partitions=no_ota
uPesy_wroom.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
uPesy_wroom.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
uPesy_wroom.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
uPesy_wroom.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
uPesy_wroom.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
uPesy_wroom.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
uPesy_wroom.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
uPesy_wroom.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
uPesy_wroom.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
uPesy_wroom.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
uPesy_wroom.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
uPesy_wroom.menu.PartitionScheme.huge_app.build.partitions=huge_app
uPesy_wroom.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
uPesy_wroom.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
uPesy_wroom.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
uPesy_wroom.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
uPesy_wroom.menu.CPUFreq.240=240MHz
uPesy_wroom.menu.CPUFreq.240.build.f_cpu=240000000L
uPesy_wroom.menu.CPUFreq.160=160MHz
uPesy_wroom.menu.CPUFreq.160.build.f_cpu=160000000L
uPesy_wroom.menu.UploadSpeed.921600=921600
uPesy_wroom.menu.UploadSpeed.921600.upload.speed=921600
uPesy_wroom.menu.UploadSpeed.512000.windows=512000
uPesy_wroom.menu.UploadSpeed.512000.upload.speed=512000
uPesy_wroom.menu.UploadSpeed.460800.linux=460800
uPesy_wroom.menu.UploadSpeed.460800.macosx=460800
uPesy_wroom.menu.UploadSpeed.460800.upload.speed=460800
uPesy_wroom.menu.UploadSpeed.256000.windows=256000
uPesy_wroom.menu.UploadSpeed.256000.upload.speed=256000
uPesy_wroom.menu.UploadSpeed.230400.windows.upload.speed=256000
uPesy_wroom.menu.UploadSpeed.230400=230400
uPesy_wroom.menu.UploadSpeed.230400.upload.speed=230400
uPesy_wroom.menu.UploadSpeed.115200=115200
uPesy_wroom.menu.UploadSpeed.115200.upload.speed=115200
uPesy_wroom.menu.FlashMode.qio=QIO
uPesy_wroom.menu.FlashMode.qio.build.flash_mode=dio
uPesy_wroom.menu.FlashMode.qio.build.boot=qio
uPesy_wroom.menu.FlashMode.dio=DIO
uPesy_wroom.menu.FlashMode.dio.build.flash_mode=dio
uPesy_wroom.menu.FlashMode.dio.build.boot=dio
uPesy_wroom.menu.FlashFreq.80=80MHz
uPesy_wroom.menu.FlashFreq.80.build.flash_freq=80m
uPesy_wroom.menu.FlashFreq.40=40MHz
uPesy_wroom.menu.FlashFreq.40.build.flash_freq=40m
uPesy_wroom.menu.DebugLevel.none=None
uPesy_wroom.menu.DebugLevel.none.build.code_debug=0
uPesy_wroom.menu.DebugLevel.error=Error
uPesy_wroom.menu.DebugLevel.error.build.code_debug=1
uPesy_wroom.menu.DebugLevel.warn=Warn
uPesy_wroom.menu.DebugLevel.warn.build.code_debug=2
uPesy_wroom.menu.DebugLevel.info=Info
uPesy_wroom.menu.DebugLevel.info.build.code_debug=3
uPesy_wroom.menu.DebugLevel.debug=Debug
uPesy_wroom.menu.DebugLevel.debug.build.code_debug=4
uPesy_wroom.menu.DebugLevel.verbose=Verbose
uPesy_wroom.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
kb32.name=KB32-FT
kb32.upload.tool=esptool_py
kb32.upload.maximum_size=1310720
kb32.upload.maximum_data_size=327680
kb32.upload.wait_for_upload_port=true
kb32.serial.disableDTR=true
kb32.serial.disableRTS=true
kb32.build.mcu=esp32
kb32.build.core=esp32
kb32.build.variant=esp32
kb32.build.board=ESP32_DEV
kb32.build.f_cpu=240000000L
kb32.build.flash_size=4MB
kb32.build.flash_freq=40m
kb32.build.flash_mode=dio
kb32.build.boot=dio
kb32.build.partitions=default
kb32.build.defines=
kb32.menu.PSRAM.disabled=Disabled
kb32.menu.PSRAM.disabled.build.defines=
kb32.menu.PSRAM.disabled.build.extra_libs=
kb32.menu.PSRAM.enabled=Enabled
kb32.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
kb32.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
kb32.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
kb32.menu.PartitionScheme.default.build.partitions=default
kb32.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
kb32.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
kb32.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
kb32.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
kb32.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
kb32.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
kb32.menu.PartitionScheme.minimal.build.partitions=minimal
kb32.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
kb32.menu.PartitionScheme.no_ota.build.partitions=no_ota
kb32.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
kb32.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
kb32.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
kb32.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
kb32.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
kb32.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
kb32.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
kb32.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
kb32.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
kb32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
kb32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
kb32.menu.PartitionScheme.huge_app.build.partitions=huge_app
kb32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
kb32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
kb32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
kb32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
kb32.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
kb32.menu.PartitionScheme.fatflash.build.partitions=ffat
kb32.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
kb32.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
kb32.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
kb32.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
kb32.menu.CPUFreq.240=240MHz (WiFi/BT)
kb32.menu.CPUFreq.240.build.f_cpu=240000000L
kb32.menu.CPUFreq.160=160MHz (WiFi/BT)
kb32.menu.CPUFreq.160.build.f_cpu=160000000L
kb32.menu.CPUFreq.80=80MHz (WiFi/BT)
kb32.menu.CPUFreq.80.build.f_cpu=80000000L
kb32.menu.CPUFreq.40=40MHz (40MHz XTAL)
kb32.menu.CPUFreq.40.build.f_cpu=40000000L
kb32.menu.CPUFreq.26=26MHz (26MHz XTAL)
kb32.menu.CPUFreq.26.build.f_cpu=26000000L
kb32.menu.CPUFreq.20=20MHz (40MHz XTAL)
kb32.menu.CPUFreq.20.build.f_cpu=20000000L
kb32.menu.CPUFreq.13=13MHz (26MHz XTAL)
kb32.menu.CPUFreq.13.build.f_cpu=13000000L
kb32.menu.CPUFreq.10=10MHz (40MHz XTAL)
kb32.menu.CPUFreq.10.build.f_cpu=10000000L
kb32.menu.FlashMode.qio=QIO
kb32.menu.FlashMode.qio.build.flash_mode=dio
kb32.menu.FlashMode.qio.build.boot=qio
kb32.menu.FlashMode.dio=DIO
kb32.menu.FlashMode.dio.build.flash_mode=dio
kb32.menu.FlashMode.dio.build.boot=dio
kb32.menu.FlashMode.qout=QOUT
kb32.menu.FlashMode.qout.build.flash_mode=dout
kb32.menu.FlashMode.qout.build.boot=qout
kb32.menu.FlashMode.dout=DOUT
kb32.menu.FlashMode.dout.build.flash_mode=dout
kb32.menu.FlashMode.dout.build.boot=dout
kb32.menu.FlashFreq.80=80MHz
kb32.menu.FlashFreq.80.build.flash_freq=80m
kb32.menu.FlashFreq.40=40MHz
kb32.menu.FlashFreq.40.build.flash_freq=40m
kb32.menu.FlashSize.4M=4MB (32Mb)
kb32.menu.FlashSize.4M.build.flash_size=4MB
kb32.menu.FlashSize.8M=8MB (64Mb)
kb32.menu.FlashSize.8M.build.flash_size=8MB
kb32.menu.FlashSize.8M.build.partitions=default_8MB
kb32.menu.FlashSize.2M=2MB (16Mb)
kb32.menu.FlashSize.2M.build.flash_size=2MB
kb32.menu.FlashSize.2M.build.partitions=minimal
kb32.menu.FlashSize.16M=16MB (128Mb)
kb32.menu.FlashSize.16M.build.flash_size=16MB
kb32.menu.UploadSpeed.921600=921600
kb32.menu.UploadSpeed.921600.upload.speed=921600
kb32.menu.UploadSpeed.115200=115200
kb32.menu.UploadSpeed.115200.upload.speed=115200
kb32.menu.UploadSpeed.256000.windows=256000
kb32.menu.UploadSpeed.256000.upload.speed=256000
kb32.menu.UploadSpeed.230400.windows.upload.speed=256000
kb32.menu.UploadSpeed.230400=230400
kb32.menu.UploadSpeed.230400.upload.speed=230400
kb32.menu.UploadSpeed.460800.linux=460800
kb32.menu.UploadSpeed.460800.macosx=460800
kb32.menu.UploadSpeed.460800.upload.speed=460800
kb32.menu.UploadSpeed.512000.windows=512000
kb32.menu.UploadSpeed.512000.upload.speed=512000
kb32.menu.DebugLevel.none=None
kb32.menu.DebugLevel.none.build.code_debug=0
kb32.menu.DebugLevel.error=Error
kb32.menu.DebugLevel.error.build.code_debug=1
kb32.menu.DebugLevel.warn=Warn
kb32.menu.DebugLevel.warn.build.code_debug=2
kb32.menu.DebugLevel.info=Info
kb32.menu.DebugLevel.info.build.code_debug=3
kb32.menu.DebugLevel.debug=Debug
kb32.menu.DebugLevel.debug.build.code_debug=4
kb32.menu.DebugLevel.verbose=Verbose
kb32.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
deneyapkart.name=Deneyap Kart
deneyapkart.upload.tool=esptool_py
deneyapkart.upload.maximum_size=1310720
deneyapkart.upload.maximum_data_size=327680
deneyapkart.upload.wait_for_upload_port=true
deneyapkart.serial.disableDTR=true
deneyapkart.serial.disableRTS=true
deneyapkart.build.tarch=xtensa
deneyapkart.build.bootloader_addr=0x1000
deneyapkart.build.target=esp32
deneyapkart.build.mcu=esp32
deneyapkart.build.core=esp32
deneyapkart.build.variant=deneyapkart
deneyapkart.build.board=DYDK
deneyapkart.build.f_cpu=240000000L
deneyapkart.build.flash_size=4MB
deneyapkart.build.flash_freq=40m
deneyapkart.build.flash_mode=dio
deneyapkart.build.boot=dio
deneyapkart.build.partitions=default
deneyapkart.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
deneyapkart.build.extra_libs=
deneyapkart.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
deneyapkart.menu.PartitionScheme.default.build.partitions=default
deneyapkart.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
deneyapkart.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
deneyapkart.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
deneyapkart.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
deneyapkart.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
deneyapkart.menu.PartitionScheme.minimal.build.partitions=minimal
deneyapkart.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
deneyapkart.menu.PartitionScheme.no_ota.build.partitions=no_ota
deneyapkart.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
deneyapkart.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
deneyapkart.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
deneyapkart.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
deneyapkart.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
deneyapkart.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
deneyapkart.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
deneyapkart.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
deneyapkart.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
deneyapkart.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
deneyapkart.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
deneyapkart.menu.PartitionScheme.huge_app.build.partitions=huge_app
deneyapkart.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
deneyapkart.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
deneyapkart.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
deneyapkart.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
deneyapkart.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
deneyapkart.menu.PartitionScheme.fatflash.build.partitions=ffat
deneyapkart.menu.CPUFreq.240=240MHz (WiFi/BT)
deneyapkart.menu.CPUFreq.240.build.f_cpu=240000000L
deneyapkart.menu.CPUFreq.160=160MHz (WiFi/BT)
deneyapkart.menu.CPUFreq.160.build.f_cpu=160000000L
deneyapkart.menu.CPUFreq.80=80MHz (WiFi/BT)
deneyapkart.menu.CPUFreq.80.build.f_cpu=80000000L
deneyapkart.menu.CPUFreq.40=40MHz
deneyapkart.menu.CPUFreq.40.build.f_cpu=40000000L
deneyapkart.menu.CPUFreq.20=20MHz
deneyapkart.menu.CPUFreq.20.build.f_cpu=20000000L
deneyapkart.menu.CPUFreq.10=10MHz
deneyapkart.menu.CPUFreq.10.build.f_cpu=10000000L
deneyapkart.menu.FlashMode.qio=QIO
deneyapkart.menu.FlashMode.qio.build.flash_mode=dio
deneyapkart.menu.FlashMode.qio.build.boot=qio
deneyapkart.menu.FlashMode.dio=DIO
deneyapkart.menu.FlashMode.dio.build.flash_mode=dio
deneyapkart.menu.FlashMode.dio.build.boot=dio
deneyapkart.menu.FlashMode.qout=QOUT
deneyapkart.menu.FlashMode.qout.build.flash_mode=dout
deneyapkart.menu.FlashMode.qout.build.boot=qout
deneyapkart.menu.FlashMode.dout=DOUT
deneyapkart.menu.FlashMode.dout.build.flash_mode=dout
deneyapkart.menu.FlashMode.dout.build.boot=dout
deneyapkart.menu.FlashFreq.80=80MHz
deneyapkart.menu.FlashFreq.80.build.flash_freq=80m
deneyapkart.menu.FlashFreq.40=40MHz
deneyapkart.menu.FlashFreq.40.build.flash_freq=40m
deneyapkart.menu.UploadSpeed.921600=921600
deneyapkart.menu.UploadSpeed.921600.upload.speed=921600
deneyapkart.menu.UploadSpeed.115200=115200
deneyapkart.menu.UploadSpeed.115200.upload.speed=115200
deneyapkart.menu.UploadSpeed.256000.windows=256000
deneyapkart.menu.UploadSpeed.256000.upload.speed=256000
deneyapkart.menu.UploadSpeed.230400.windows.upload.speed=256000
deneyapkart.menu.UploadSpeed.230400=230400
deneyapkart.menu.UploadSpeed.230400.upload.speed=230400
deneyapkart.menu.UploadSpeed.460800.linux=460800
deneyapkart.menu.UploadSpeed.460800.macosx=460800
deneyapkart.menu.UploadSpeed.460800.upload.speed=460800
deneyapkart.menu.UploadSpeed.512000.windows=512000
deneyapkart.menu.UploadSpeed.512000.upload.speed=512000
deneyapkart.menu.DebugLevel.none=None
deneyapkart.menu.DebugLevel.none.build.code_debug=0
deneyapkart.menu.DebugLevel.error=Error
deneyapkart.menu.DebugLevel.error.build.code_debug=1
deneyapkart.menu.DebugLevel.warn=Warn
deneyapkart.menu.DebugLevel.warn.build.code_debug=2
deneyapkart.menu.DebugLevel.info=Info
deneyapkart.menu.DebugLevel.info.build.code_debug=3
deneyapkart.menu.DebugLevel.debug=Debug
deneyapkart.menu.DebugLevel.debug.build.code_debug=4
deneyapkart.menu.DebugLevel.verbose=Verbose
deneyapkart.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
esp32-trueverit-iot-driver.name=Trueverit ESP32 Universal IoT Driver
esp32-trueverit-iot-driver.upload.tool=esptool_py
esp32-trueverit-iot-driver.upload.maximum_size=1310720
esp32-trueverit-iot-driver.upload.maximum_data_size=327680
esp32-trueverit-iot-driver.upload.flags=
esp32-trueverit-iot-driver.upload.extra_flags=
esp32-trueverit-iot-driver.serial.disableDTR=true
esp32-trueverit-iot-driver.serial.disableRTS=true
esp32-trueverit-iot-driver.build.tarch=xtensa
esp32-trueverit-iot-driver.build.bootloader_addr=0x1000
esp32-trueverit-iot-driver.build.target=esp32
esp32-trueverit-iot-driver.build.mcu=esp32
esp32-trueverit-iot-driver.build.core=esp32
esp32-trueverit-iot-driver.build.variant=esp32-trueverit-iot-driver
esp32-trueverit-iot-driver.build.board=Trueverit_ESP32_Universal_IoT_Driver
esp32-trueverit-iot-driver.build.f_cpu=240000000L
esp32-trueverit-iot-driver.build.flash_mode=dio
esp32-trueverit-iot-driver.build.flash_size=4MB
esp32-trueverit-iot-driver.build.boot=dio
esp32-trueverit-iot-driver.build.partitions=default
esp32-trueverit-iot-driver.build.defines=
esp32-trueverit-iot-driver.menu.FlashFreq.80=80MHz
esp32-trueverit-iot-driver.menu.FlashFreq.80.build.flash_freq=80m
esp32-trueverit-iot-driver.menu.FlashFreq.40=40MHz
esp32-trueverit-iot-driver.menu.FlashFreq.40.build.flash_freq=40m
esp32-trueverit-iot-driver.menu.UploadSpeed.115200=115200
esp32-trueverit-iot-driver.menu.UploadSpeed.115200.upload.speed=115200
esp32-trueverit-iot-driver.menu.UploadSpeed.256000.windows=256000
esp32-trueverit-iot-driver.menu.UploadSpeed.256000.upload.speed=256000
esp32-trueverit-iot-driver.menu.UploadSpeed.230400.windows.upload.speed=256000
esp32-trueverit-iot-driver.menu.UploadSpeed.230400=230400
esp32-trueverit-iot-driver.menu.UploadSpeed.230400.upload.speed=230400
esp32-trueverit-iot-driver.menu.UploadSpeed.460800.linux=460800
esp32-trueverit-iot-driver.menu.UploadSpeed.460800.macosx=460800
esp32-trueverit-iot-driver.menu.UploadSpeed.460800.upload.speed=460800
esp32-trueverit-iot-driver.menu.DebugLevel.none=None
esp32-trueverit-iot-driver.menu.DebugLevel.none.build.code_debug=0
esp32-trueverit-iot-driver.menu.DebugLevel.error=Error
esp32-trueverit-iot-driver.menu.DebugLevel.error.build.code_debug=1
esp32-trueverit-iot-driver.menu.DebugLevel.warn=Warn
esp32-trueverit-iot-driver.menu.DebugLevel.warn.build.code_debug=2
esp32-trueverit-iot-driver.menu.DebugLevel.info=Info
esp32-trueverit-iot-driver.menu.DebugLevel.info.build.code_debug=3
esp32-trueverit-iot-driver.menu.DebugLevel.debug=Debug
esp32-trueverit-iot-driver.menu.DebugLevel.debug.build.code_debug=4
esp32-trueverit-iot-driver.menu.DebugLevel.verbose=Verbose
esp32-trueverit-iot-driver.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
esp32-trueverit-iot-driver-mkii.name=Trueverit ESP32 Universal IoT Driver MK II
esp32-trueverit-iot-driver-mkii.upload.tool=esptool_py
esp32-trueverit-iot-driver-mkii.upload.maximum_size=1310720
esp32-trueverit-iot-driver-mkii.upload.maximum_data_size=327680
esp32-trueverit-iot-driver-mkii.upload.flags=
esp32-trueverit-iot-driver-mkii.upload.extra_flags=
esp32-trueverit-iot-driver-mkii.serial.disableDTR=true
esp32-trueverit-iot-driver-mkii.serial.disableRTS=true
esp32-trueverit-iot-driver-mkii.build.tarch=xtensa
esp32-trueverit-iot-driver-mkii.build.bootloader_addr=0x1000
esp32-trueverit-iot-driver-mkii.build.target=esp32
esp32-trueverit-iot-driver-mkii.build.mcu=esp32
esp32-trueverit-iot-driver-mkii.build.core=esp32
esp32-trueverit-iot-driver-mkii.build.variant=esp32-trueverit-iot-driver-mkii
esp32-trueverit-iot-driver-mkii.build.board=Trueverit_ESP32_Universal_IoT_Driver_MK_II
esp32-trueverit-iot-driver-mkii.build.f_cpu=240000000L
esp32-trueverit-iot-driver-mkii.build.flash_mode=dio
esp32-trueverit-iot-driver-mkii.build.flash_size=4MB
esp32-trueverit-iot-driver-mkii.build.boot=dio
esp32-trueverit-iot-driver-mkii.build.partitions=default
esp32-trueverit-iot-driver-mkii.build.defines=
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.80=80MHz
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.80.build.flash_freq=80m
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.40=40MHz
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.40.build.flash_freq=40m
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.115200=115200
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.115200.upload.speed=115200
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.256000.windows=256000
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.256000.upload.speed=256000
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.230400.windows.upload.speed=256000
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.230400=230400
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.230400.upload.speed=230400
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.460800.linux=460800
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.460800.macosx=460800
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.460800.upload.speed=460800
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.none=None
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.none.build.code_debug=0
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.error=Error
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.error.build.code_debug=1
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.warn=Warn
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.warn.build.code_debug=2
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.info=Info
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.info.build.code_debug=3
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.debug=Debug
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.debug.build.code_debug=4
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.verbose=Verbose
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.verbose.build.code_debug=5
##############################################################

View File

@ -99,13 +99,23 @@
#define bit(b) (1UL << (b))
#define _BV(b) (1UL << (b))
#define digitalPinToPort(pin) (((pin)>31)?1:0)
#define digitalPinToBitMask(pin) (1UL << (((pin)>31)?((pin)-32):(pin)))
#define digitalPinToTimer(pin) (0)
#define analogInPinToBit(P) (P)
#if SOC_GPIO_PIN_COUNT <= 32
#define digitalPinToPort(pin) (0)
#define digitalPinToBitMask(pin) (1UL << (pin))
#define portOutputRegister(port) ((volatile uint32_t*)GPIO_OUT_REG)
#define portInputRegister(port) ((volatile uint32_t*)GPIO_IN_REG)
#define portModeRegister(port) ((volatile uint32_t*)GPIO_ENABLE_REG)
#elif SOC_GPIO_PIN_COUNT <= 64
#define digitalPinToPort(pin) (((pin)>31)?1:0)
#define digitalPinToBitMask(pin) (1UL << (((pin)>31)?((pin)-32):(pin)))
#define portOutputRegister(port) ((volatile uint32_t*)((port)?GPIO_OUT1_REG:GPIO_OUT_REG))
#define portInputRegister(port) ((volatile uint32_t*)((port)?GPIO_IN1_REG:GPIO_IN_REG))
#define portModeRegister(port) ((volatile uint32_t*)((port)?GPIO_ENABLE1_REG:GPIO_ENABLE_REG))
#else
#error SOC_GPIO_PIN_COUNT > 64 not implemented
#endif
#define NOT_A_PIN -1
#define NOT_A_PORT -1
@ -165,7 +175,7 @@ using std::min;
using ::round;
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
uint16_t makeWord(uint8_t h, uint8_t l);
#define word(...) makeWord(__VA_ARGS__)

View File

@ -35,15 +35,19 @@ extern "C" {
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#include "esp32/rom/spi_flash.h"
#include "soc/efuse_reg.h"
#define ESP_FLASH_IMAGE_BASE 0x1000 // Flash offset containing flash size and spi mode
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/spi_flash.h"
#define ESP_FLASH_IMAGE_BASE 0x1000
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/spi_flash.h"
#define ESP_FLASH_IMAGE_BASE 0x0000 // Esp32c3 is located at 0x0000
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
#else // ESP32 Before IDF 4.0
#include "rom/spi_flash.h"
#define ESP_FLASH_IMAGE_BASE 0x1000
#endif
/**
@ -289,7 +293,7 @@ const char * EspClass::getSdkVersion(void)
uint32_t EspClass::getFlashChipSize(void)
{
esp_image_header_t fhdr;
if(flashRead(0x1000, (uint32_t*)&fhdr, sizeof(esp_image_header_t)) && fhdr.magic != ESP_IMAGE_HEADER_MAGIC) {
if(flashRead(ESP_FLASH_IMAGE_BASE, (uint32_t*)&fhdr, sizeof(esp_image_header_t)) && fhdr.magic != ESP_IMAGE_HEADER_MAGIC) {
return 0;
}
return magicFlashChipSize(fhdr.spi_size);
@ -298,7 +302,7 @@ uint32_t EspClass::getFlashChipSize(void)
uint32_t EspClass::getFlashChipSpeed(void)
{
esp_image_header_t fhdr;
if(flashRead(0x1000, (uint32_t*)&fhdr, sizeof(esp_image_header_t)) && fhdr.magic != ESP_IMAGE_HEADER_MAGIC) {
if(flashRead(ESP_FLASH_IMAGE_BASE, (uint32_t*)&fhdr, sizeof(esp_image_header_t)) && fhdr.magic != ESP_IMAGE_HEADER_MAGIC) {
return 0;
}
return magicFlashChipSpeed(fhdr.spi_speed);
@ -307,7 +311,7 @@ uint32_t EspClass::getFlashChipSpeed(void)
FlashMode_t EspClass::getFlashChipMode(void)
{
esp_image_header_t fhdr;
if(flashRead(0x1000, (uint32_t*)&fhdr, sizeof(esp_image_header_t)) && fhdr.magic != ESP_IMAGE_HEADER_MAGIC) {
if(flashRead(ESP_FLASH_IMAGE_BASE, (uint32_t*)&fhdr, sizeof(esp_image_header_t)) && fhdr.magic != ESP_IMAGE_HEADER_MAGIC) {
return FM_UNKNOWN;
}
return magicFlashChipMode(fhdr.spi_mode);

View File

@ -22,6 +22,7 @@
#include <Arduino.h>
#include <esp_partition.h>
#include <hal/cpu_hal.h>
/**
* AVR macros for WDT managment
@ -110,9 +111,7 @@ public:
uint32_t ARDUINO_ISR_ATTR EspClass::getCycleCount()
{
uint32_t ccount;
__asm__ __volatile__("esync; rsr %0,ccount":"=a" (ccount));
return ccount;
return cpu_hal_get_cycle_count();
}
extern EspClass ESP;

View File

@ -51,7 +51,7 @@ static uint16_t load_dfu_descriptor(uint8_t * dst, uint8_t * itf)
return TUD_DFU_RT_DESC_LEN;
}
// Invoked on DFU_DETACH request to reboot to the bootloader
void tud_dfu_rt_reboot_to_dfu(void)
void tud_dfu_runtime_reboot_to_dfu_cb(void)
{
usb_persist_restart(RESTART_BOOTLOADER_DFU);
}
@ -121,7 +121,7 @@ ESPUSB::ESPUSB(size_t task_stack_size, uint8_t event_task_priority)
,usb_attributes(TUSB_DESC_CONFIG_ATT_SELF_POWERED)
,usb_power_ma(500)
,webusb_enabled(false)
,webusb_url("espressif.github.io/arduino-esp32/webusb.html")
,webusb_url("https://espressif.github.io/arduino-esp32/webusb.html")
,_started(false)
,_task_stack_size(task_stack_size)
,_event_task_priority(event_task_priority)
@ -282,6 +282,9 @@ uint8_t ESPUSB::usbAttributes(void){
bool ESPUSB::webUSB(bool enabled){
if(!_started){
webusb_enabled = enabled;
if(enabled && usb_version < 0x0210){
usb_version = 0x0210;
}
}
return !_started;
}

View File

@ -38,27 +38,46 @@ static uint16_t load_cdc_descriptor(uint8_t * dst, uint8_t * itf)
return TUD_CDC_DESC_LEN;
}
// Invoked when line state DTR & RTS are changed via SET_CONTROL_LINE_STATE
void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts)
{
//isr_log_v("itf: %u, dtr: %u, rts: %u", itf, dtr, rts);
if(itf < MAX_USB_CDC_DEVICES && devices[itf] != NULL){
devices[itf]->_onLineState(dtr, rts);
}
}
// Invoked when line coding is change via SET_LINE_CODING
void tud_cdc_line_coding_cb(uint8_t itf, cdc_line_coding_t const* p_line_coding)
{
//isr_log_v("itf: %u, bit_rate: %u, data_bits: %u, stop_bits: %u, parity: %u", itf, p_line_coding->bit_rate, p_line_coding->data_bits, p_line_coding->stop_bits, p_line_coding->parity);
if(itf < MAX_USB_CDC_DEVICES && devices[itf] != NULL){
devices[itf]->_onLineCoding(p_line_coding->bit_rate, p_line_coding->stop_bits, p_line_coding->parity, p_line_coding->data_bits);
}
}
// Invoked when received new data
void tud_cdc_rx_cb(uint8_t itf)
{
//isr_log_v("itf: %u", itf);
if(itf < MAX_USB_CDC_DEVICES && devices[itf] != NULL){
devices[itf]->_onRX();
}
}
// Invoked when received send break
void tud_cdc_send_break_cb(uint8_t itf, uint16_t duration_ms){
//isr_log_v("itf: %u, duration_ms: %u", itf, duration_ms);
}
// Invoked when space becomes available in TX buffer
void tud_cdc_tx_complete_cb(uint8_t itf){
//isr_log_v("itf: %u", itf);
if(itf < MAX_USB_CDC_DEVICES && devices[itf] != NULL){
xSemaphoreGive(devices[itf]->tx_sem);
devices[itf]->_onTX();
}
}
static size_t tinyusb_cdc_write(uint8_t itf, const uint8_t *buffer, size_t size){
if(itf >= MAX_USB_CDC_DEVICES){
@ -84,6 +103,7 @@ static size_t tinyusb_cdc_write(uint8_t itf, const uint8_t *buffer, size_t size)
sofar += sent;
tosend -= sent;
tud_cdc_n_write_flush(itf);
xSemaphoreTake(devices[itf]->tx_sem, portMAX_DELAY);
}
return sofar;
}
@ -103,6 +123,7 @@ USBCDC::USBCDC(uint8_t itfn) : itf(itfn), bit_rate(0), stop_bits(0), parity(0),
tinyusb_enable_interface(USB_INTERFACE_CDC, TUD_CDC_DESC_LEN, load_cdc_descriptor);
if(itf < MAX_USB_CDC_DEVICES){
devices[itf] = this;
tx_sem = NULL;
arduino_usb_event_handler_register_with(ARDUINO_USB_EVENTS, ARDUINO_USB_STOPPED_EVENT, usb_unplugged_cb, this);
}
}
@ -128,10 +149,18 @@ size_t USBCDC::setRxBufferSize(size_t rx_queue_len){
void USBCDC::begin(unsigned long baud)
{
setRxBufferSize(256);//default if not preset
if(tx_sem == NULL){
tx_sem = xSemaphoreCreateBinary();
xSemaphoreTake(tx_sem, 0);
}
}
void USBCDC::end()
{
if (tx_sem != NULL) {
vSemaphoreDelete(tx_sem);
tx_sem = NULL;
}
}
void USBCDC::_onUnplugged(void){
@ -198,7 +227,8 @@ void USBCDC::_onLineState(bool _dtr, bool _rts){
void USBCDC::_onLineCoding(uint32_t _bit_rate, uint8_t _stop_bits, uint8_t _parity, uint8_t _data_bits){
if(bit_rate != _bit_rate || data_bits != _data_bits || stop_bits != _stop_bits || parity != _parity){
if(bit_rate == 9600 && _bit_rate == 1200){
// ArduinoIDE sends LineCoding with 1200bps baud to reset the device
if(_bit_rate == 1200){
usb_persist_restart(RESTART_BOOTLOADER);
} else {
bit_rate = _bit_rate;
@ -228,6 +258,11 @@ void USBCDC::_onRX(){
arduino_usb_event_post(ARDUINO_USB_CDC_EVENTS, ARDUINO_USB_CDC_RX_EVENT, &p, sizeof(arduino_usb_cdc_event_data_t), portMAX_DELAY);
}
void USBCDC::_onTX(){
arduino_usb_cdc_event_data_t p = {0};
arduino_usb_event_post(ARDUINO_USB_CDC_EVENTS, ARDUINO_USB_CDC_TX_EVENT, &p, sizeof(arduino_usb_cdc_event_data_t), portMAX_DELAY);
}
void USBCDC::enableReboot(bool enable){
reboot_enable = enable;
}

View File

@ -30,6 +30,7 @@ typedef enum {
ARDUINO_USB_CDC_LINE_STATE_EVENT,
ARDUINO_USB_CDC_LINE_CODING_EVENT,
ARDUINO_USB_CDC_RX_EVENT,
ARDUINO_USB_CDC_TX_EVENT,
ARDUINO_USB_CDC_MAX_EVENT,
} arduino_usb_cdc_event_t;
@ -110,7 +111,9 @@ public:
void _onLineState(bool _dtr, bool _rts);
void _onLineCoding(uint32_t _bit_rate, uint8_t _stop_bits, uint8_t _parity, uint8_t _data_bits);
void _onRX(void);
void _onTX(void);
void _onUnplugged(void);
xSemaphoreHandle tx_sem;
protected:
uint8_t itf;

View File

@ -77,12 +77,12 @@ long map(long x, long in_min, long in_max, long out_min, long out_max) {
return (delta * dividend + (divisor / 2)) / divisor + out_min;
}
unsigned int makeWord(unsigned int w)
uint16_t makeWord(uint16_t w)
{
return w;
}
unsigned int makeWord(unsigned char h, unsigned char l)
uint16_t makeWord(uint8_t h, uint8_t l)
{
return (h << 8) | l;
}

View File

@ -59,9 +59,7 @@ String::String(StringSumHelper &&rval) {
String::String(char c) {
init();
char buf[2];
buf[0] = c;
buf[1] = 0;
char buf[] = { c, '\0' };
*this = buf;
}
@ -290,10 +288,11 @@ String & String::operator =(const char *cstr) {
return *this;
}
String & String::operator = (const __FlashStringHelper *pstr)
{
if (pstr) copy(pstr, strlen_P((PGM_P)pstr));
else invalidate();
String & String::operator =(const __FlashStringHelper *pstr) {
if(pstr)
copy(pstr, strlen_P((PGM_P)pstr));
else
invalidate();
return *this;
}
@ -347,22 +346,18 @@ unsigned char String::concat(const char *cstr) {
}
unsigned char String::concat(char c) {
char buf[2];
buf[0] = c;
buf[1] = 0;
char buf[] = { c, '\0' };
return concat(buf, 1);
}
unsigned char String::concat(unsigned char num) {
char buf[1 + 3 * sizeof(unsigned char)];
sprintf(buf, "%d", num);
return concat(buf, strlen(buf));
return concat(buf, sprintf(buf, "%d", num));
}
unsigned char String::concat(int num) {
char buf[2 + 3 * sizeof(int)];
sprintf(buf, "%d", num);
return concat(buf, strlen(buf));
return concat(buf, sprintf(buf, "%d", num));
}
unsigned char String::concat(unsigned int num) {
@ -373,8 +368,7 @@ unsigned char String::concat(unsigned int num) {
unsigned char String::concat(long num) {
char buf[2 + 3 * sizeof(long)];
sprintf(buf, "%ld", num);
return concat(buf, strlen(buf));
return concat(buf, sprintf(buf, "%ld", num));
}
unsigned char String::concat(unsigned long num) {
@ -555,7 +549,7 @@ unsigned char String::equalsConstantTime(const String &s2) const {
//at this point lengths are the same
if(len() == 0)
return 1;
//at this point lenghts are the same and non-zero
//at this point lengths are the same and non-zero
const char *p1 = buffer();
const char *p2 = s2.buffer();
unsigned int equalchars = 0;

View File

@ -48,6 +48,7 @@ static uint8_t __analogVRefPin = 0;
static uint8_t __analogAttenuation = 3;//11db
static uint8_t __analogWidth = 3;//12 bits
static uint8_t __analogClockDiv = 1;
static adc_attenuation_t __pin_attenuation[SOC_GPIO_PIN_COUNT];
void __analogSetClockDiv(uint8_t clockDiv){
if(!clockDiv){
@ -86,6 +87,9 @@ void __analogInit(){
#if CONFIG_IDF_TARGET_ESP32
__analogSetWidth(__analogWidth + 9);//in bits
#endif
for(int i=0; i<SOC_GPIO_PIN_COUNT; i++){
__pin_attenuation[i] = ADC_ATTENDB_MAX;
}
}
void __analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)
@ -100,6 +104,7 @@ void __analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)
adc1_config_channel_atten(channel, attenuation);
}
__analogInit();
__pin_attenuation[pin] = attenuation;
}
bool __adcAttachPin(uint8_t pin){
@ -129,7 +134,7 @@ bool __adcAttachPin(uint8_t pin){
#endif
pinMode(pin, ANALOG);
__analogSetPinAttenuation(pin, __analogAttenuation);
__analogSetPinAttenuation(pin, (__pin_attenuation[pin] != ADC_ATTENDB_MAX)?__pin_attenuation[pin]:__analogAttenuation);
return true;
}
@ -161,7 +166,7 @@ uint16_t __analogRead(uint8_t pin)
} else if ( r == ESP_ERR_INVALID_STATE ) {
log_e("GPIO%u: %s: ADC2 not initialized yet.", pin, esp_err_to_name(r));
} else if ( r == ESP_ERR_TIMEOUT ) {
log_e("GPIO%u: %s: ADC2 is in use by Wi-Fi.", pin, esp_err_to_name(r));
log_e("GPIO%u: %s: ADC2 is in use by Wi-Fi. Please see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc.html#adc-limitations for more info", pin, esp_err_to_name(r));
} else {
log_e("GPIO%u: %s", pin, esp_err_to_name(r));
}
@ -245,28 +250,12 @@ void __analogSetVRefPin(uint8_t pin){
__analogVRefPin = pin;
}
int __hallRead() //hall sensor without LNA
int __hallRead() //hall sensor using idf read
{
int Sens_Vp0;
int Sens_Vn0;
int Sens_Vp1;
int Sens_Vn1;
pinMode(36, ANALOG);
pinMode(39, ANALOG);
SET_PERI_REG_MASK(SENS_SAR_TOUCH_CTRL1_REG, SENS_XPD_HALL_FORCE_M); // hall sens force enable
SET_PERI_REG_MASK(RTC_IO_HALL_SENS_REG, RTC_IO_XPD_HALL); // xpd hall
SET_PERI_REG_MASK(SENS_SAR_TOUCH_CTRL1_REG, SENS_HALL_PHASE_FORCE_M); // phase force
CLEAR_PERI_REG_MASK(RTC_IO_HALL_SENS_REG, RTC_IO_HALL_PHASE); // hall phase
Sens_Vp0 = __analogRead(36);
Sens_Vn0 = __analogRead(39);
SET_PERI_REG_MASK(RTC_IO_HALL_SENS_REG, RTC_IO_HALL_PHASE);
Sens_Vp1 = __analogRead(36);
Sens_Vn1 = __analogRead(39);
SET_PERI_REG_BITS(SENS_SAR_MEAS_WAIT2_REG, SENS_FORCE_XPD_SAR, 0, SENS_FORCE_XPD_SAR_S);
CLEAR_PERI_REG_MASK(SENS_SAR_TOUCH_CTRL1_REG, SENS_XPD_HALL_FORCE);
CLEAR_PERI_REG_MASK(SENS_SAR_TOUCH_CTRL1_REG, SENS_HALL_PHASE_FORCE);
return (Sens_Vp1 - Sens_Vp0) - (Sens_Vn1 - Sens_Vn0);
__analogSetWidth(12);
return hall_sensor_read();
}
#endif

View File

@ -30,7 +30,8 @@ typedef enum {
ADC_0db,
ADC_2_5db,
ADC_6db,
ADC_11db
ADC_11db,
ADC_ATTENDB_MAX
} adc_attenuation_t;
/*

View File

@ -1,19 +0,0 @@
#ifndef __MY_LOG__
#define __MY_LOG__
#include "stdio.h"
#include "esp32-hal-log.h"
void log_to_esp(char* tag, esp_log_level_t level, const char *format, ...)
{
va_list va_args;
va_start(va_args, format);
char log_buffer[512];
int len = vsnprintf(log_buffer, sizeof(log_buffer), format, va_args);
if (len > 0)
{
ESP_LOG_LEVEL_LOCAL(level, tag, "%s", log_buffer);
}
va_end(va_args);
}
#endif

View File

@ -88,7 +88,7 @@ int log_printf(const char *fmt, ...);
#define log_v(format, ...) log_printf(ARDUHAL_LOG_FORMAT(V, format), ##__VA_ARGS__)
#define isr_log_v(format, ...) ets_printf(ARDUHAL_LOG_FORMAT(V, format), ##__VA_ARGS__)
#else
#define log_v(format, ...) do {log_to_esp(TAG, ESP_LOG_VERBOSE, format, ##__VA_ARGS__);}while(0)
#define log_v(format, ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_VERBOSE, TAG, format, ##__VA_ARGS__);}while(0)
#define isr_log_v(format, ...) do {ets_printf(LOG_FORMAT(V, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
@ -101,7 +101,7 @@ int log_printf(const char *fmt, ...);
#define log_d(format, ...) log_printf(ARDUHAL_LOG_FORMAT(D, format), ##__VA_ARGS__)
#define isr_log_d(format, ...) ets_printf(ARDUHAL_LOG_FORMAT(D, format), ##__VA_ARGS__)
#else
#define log_d(format, ...) do {log_to_esp(TAG, ESP_LOG_DEBUG, format, ##__VA_ARGS__);}while(0)
#define log_d(format, ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, TAG, format, ##__VA_ARGS__);}while(0)
#define isr_log_d(format, ...) do {ets_printf(LOG_FORMAT(D, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
@ -114,7 +114,7 @@ int log_printf(const char *fmt, ...);
#define log_i(format, ...) log_printf(ARDUHAL_LOG_FORMAT(I, format), ##__VA_ARGS__)
#define isr_log_i(format, ...) ets_printf(ARDUHAL_LOG_FORMAT(I, format), ##__VA_ARGS__)
#else
#define log_i(format, ...) do {log_to_esp(TAG, ESP_LOG_INFO, format, ##__VA_ARGS__);}while(0)
#define log_i(format, ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, TAG, format, ##__VA_ARGS__);}while(0)
#define isr_log_i(format, ...) do {ets_printf(LOG_FORMAT(I, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
@ -127,7 +127,7 @@ int log_printf(const char *fmt, ...);
#define log_w(format, ...) log_printf(ARDUHAL_LOG_FORMAT(W, format), ##__VA_ARGS__)
#define isr_log_w(format, ...) ets_printf(ARDUHAL_LOG_FORMAT(W, format), ##__VA_ARGS__)
#else
#define log_w(format, ...) do {log_to_esp(TAG, ESP_LOG_WARN, format, ##__VA_ARGS__);}while(0)
#define log_w(format, ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, TAG, format, ##__VA_ARGS__);}while(0)
#define isr_log_w(format, ...) do {ets_printf(LOG_FORMAT(W, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
@ -153,7 +153,7 @@ int log_printf(const char *fmt, ...);
#define log_n(format, ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
#define isr_log_n(format, ...) ets_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
#else
#define log_n(format, ...) do {log_to_esp(TAG, ESP_LOG_ERROR, format, ##__VA_ARGS__);}while(0)
#define log_n(format, ...) do {ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, TAG, format, ##__VA_ARGS__);}while(0)
#define isr_log_n(format, ...) do {ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
@ -167,7 +167,6 @@ int log_printf(const char *fmt, ...);
#ifndef TAG
#define TAG "ARDUINO"
#endif
void log_to_esp(char* tag, esp_log_level_t level, const char* format, ...);
//#define log_n(format, ...) myLog(ESP_LOG_NONE, format, ##__VA_ARGS__)
#else
#ifdef CONFIG_ARDUHAL_ESP_LOG

View File

@ -47,7 +47,7 @@
#define HWTIMER_LOCK() portENTER_CRITICAL(timer->lock)
#define HWTIMER_UNLOCK() portEXIT_CRITICAL(timer->lock)
typedef struct {
typedef volatile struct {
union {
struct {
uint32_t reserved0: 10;
@ -272,6 +272,12 @@ void timerEnd(hw_timer_t *timer){
}
void timerAttachInterrupt(hw_timer_t *timer, void (*fn)(void), bool edge){
#if CONFIG_IDF_TARGET_ESP32
if(edge){
log_w("EDGE timer interrupt does not work properly on ESP32! Setting to LEVEL...");
edge = false;
}
#endif
static bool initialized = false;
static intr_handle_t intr_handle = NULL;
if(intr_handle){

View File

@ -228,7 +228,7 @@ typedef struct TU_ATTR_PACKED {
static tinyusb_desc_webusb_url_t tinyusb_url_descriptor = {
.bLength = 3,
.bDescriptorType = 3, // WEBUSB URL type
.bScheme = 1, // URL Scheme Prefix: 0: "http://", 1: "https://", 255: ""
.bScheme = 255, // URL Scheme Prefix: 0: "http://", 1: "https://", 255: ""
.url = ""
};
@ -317,42 +317,37 @@ uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid)
*/
uint8_t const * tud_descriptor_bos_cb(void)
{
//log_d("");
//log_v("");
return tinyusb_bos_descriptor;
}
__attribute__ ((weak)) bool tinyusb_vendor_control_request_cb(uint8_t rhport, tusb_control_request_t const * request){ return false; }
__attribute__ ((weak)) bool tinyusb_vendor_control_complete_cb(uint8_t rhport, tusb_control_request_t const * request){ return true; }
__attribute__ ((weak)) bool tinyusb_vendor_control_request_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request){ return false; }
/**
* @brief Handle WebUSB and Vendor requests.
*/
bool tud_vendor_control_request_cb(uint8_t rhport, tusb_control_request_t const * request)
bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request)
{
if(WEBUSB_ENABLED && (request->bRequest == VENDOR_REQUEST_WEBUSB
|| (request->bRequest == VENDOR_REQUEST_MICROSOFT && request->wIndex == 7))){
if(request->bRequest == VENDOR_REQUEST_WEBUSB){
// match vendor request in BOS descriptor
// Get landing page url
tinyusb_url_descriptor.bLength = 3 + strlen(WEBUSB_URL);
snprintf(tinyusb_url_descriptor.url, 127, "%s", WEBUSB_URL);
return tud_control_xfer(rhport, request, (void*) &tinyusb_url_descriptor, tinyusb_url_descriptor.bLength);
// we only care for SETUP stage
if (stage == CONTROL_STAGE_SETUP) {
if(request->bRequest == VENDOR_REQUEST_WEBUSB){
// match vendor request in BOS descriptor
// Get landing page url
tinyusb_url_descriptor.bLength = 3 + strlen(WEBUSB_URL);
snprintf(tinyusb_url_descriptor.url, 127, "%s", WEBUSB_URL);
return tud_control_xfer(rhport, request, (void*) &tinyusb_url_descriptor, tinyusb_url_descriptor.bLength);
}
// Get Microsoft OS 2.0 compatible descriptor
uint16_t total_len;
memcpy(&total_len, tinyusb_ms_os_20_descriptor + 8, 2);
return tud_control_xfer(rhport, request, (void*) tinyusb_ms_os_20_descriptor, total_len);
}
// Get Microsoft OS 2.0 compatible descriptor
uint16_t total_len;
memcpy(&total_len, tinyusb_ms_os_20_descriptor + 8, 2);
return tud_control_xfer(rhport, request, (void*) tinyusb_ms_os_20_descriptor, total_len);
return true;
}
return tinyusb_vendor_control_request_cb(rhport, request);
}
bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_request_t const * request)
{
if(!WEBUSB_ENABLED || !(request->bRequest == VENDOR_REQUEST_WEBUSB
|| (request->bRequest == VENDOR_REQUEST_MICROSOFT && request->wIndex == 7))){
return tinyusb_vendor_control_complete_cb(rhport, request);
}
return true;
log_v("rhport: %u, stage: %u, type: 0x%x, request: 0x%x", rhport, stage, request->bmRequestType_bit.type, request->bRequest);
return tinyusb_vendor_control_request_cb(rhport, stage, request);
}
/*
@ -507,6 +502,15 @@ static void tinyusb_apply_device_config(tinyusb_device_config_t *config){
snprintf(WEBUSB_URL, 126, "%s", config->webusb_url);
}
// Windows 10 will not recognize the CDC device if WebUSB is enabled and USB Class is not 2 (CDC)
if(
(tinyusb_loaded_interfaces_mask & BIT(USB_INTERFACE_CDC))
&& config->webusb_enabled
&& (config->usb_class != TUSB_CLASS_CDC)
){
config->usb_class = TUSB_CLASS_CDC;
}
WEBUSB_ENABLED = config->webusb_enabled;
USB_DEVICE_ATTRIBUTES = config->usb_attributes;
USB_DEVICE_POWER = config->usb_power_ma;
@ -537,6 +541,9 @@ static void IRAM_ATTR usb_persist_shutdown_handler(void)
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT);
} else if (usb_persist_mode == RESTART_BOOTLOADER_DFU) {
//DFU Download
// Reset USB Core
USB0.grstctl |= USB_CSFTRST;
while ((USB0.grstctl & USB_CSFTRST) == USB_CSFTRST){}
chip_usb_set_persist_flags(USBDC_BOOT_DFU);
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT);
} else if (usb_persist_enabled) {

View File

@ -179,7 +179,7 @@ static void uartDetachRx(uart_t* uart, uint8_t rxPin)
if(uart == NULL) {
return;
}
pinMatrixInDetach(rxPin, false, false);
pinMatrixInDetach(UART_RXD_IDX(uart->num), false, false);
uartDisableInterrupt(uart);
}
@ -422,7 +422,7 @@ void uartWrite(uart_t* uart, uint8_t c)
return;
}
UART_MUTEX_LOCK();
while(uart->dev->status.txfifo_cnt == 0x7F);
while(uart->dev->status.txfifo_cnt >= 0x7E);
#if CONFIG_IDF_TARGET_ESP32
uart->dev->fifo.rw_byte = c;
#else
@ -441,7 +441,7 @@ void uartWriteBuf(uart_t* uart, const uint8_t * data, size_t len)
uint32_t fifo_reg = UART_FIFO_AHB_REG(uart->num);
#endif
while(len) {
while(uart->dev->status.txfifo_cnt == 0x7F);
while(uart->dev->status.txfifo_cnt >= 0x7E);
#if CONFIG_IDF_TARGET_ESP32
uart->dev->fifo.rw_byte = *data++;
#else
@ -563,7 +563,7 @@ uint32_t uartGetBaudRate(uart_t* uart)
static void ARDUINO_ISR_ATTR uart0_write_char(char c)
{
#if CONFIG_IDF_TARGET_ESP32
while(((ESP_REG(0x01C+DR_REG_UART_BASE) >> UART_TXFIFO_CNT_S) & 0x7F) == 0x7F);
while(((ESP_REG(0x01C+DR_REG_UART_BASE) >> UART_TXFIFO_CNT_S) & 0x7F) >= 0x7E);
ESP_REG(DR_REG_UART_BASE) = c;
#else
while(UART0.status.txfifo_cnt == 0x7F);
@ -574,7 +574,7 @@ static void ARDUINO_ISR_ATTR uart0_write_char(char c)
static void ARDUINO_ISR_ATTR uart1_write_char(char c)
{
#if CONFIG_IDF_TARGET_ESP32
while(((ESP_REG(0x01C+DR_REG_UART1_BASE) >> UART_TXFIFO_CNT_S) & 0x7F) == 0x7F);
while(((ESP_REG(0x01C+DR_REG_UART1_BASE) >> UART_TXFIFO_CNT_S) & 0x7F) >= 0x7E);
ESP_REG(DR_REG_UART1_BASE) = c;
#else
while(UART1.status.txfifo_cnt == 0x7F);
@ -585,7 +585,7 @@ static void ARDUINO_ISR_ATTR uart1_write_char(char c)
#if CONFIG_IDF_TARGET_ESP32
static void ARDUINO_ISR_ATTR uart2_write_char(char c)
{
while(((ESP_REG(0x01C+DR_REG_UART2_BASE) >> UART_TXFIFO_CNT_S) & 0x7F) == 0x7F);
while(((ESP_REG(0x01C+DR_REG_UART2_BASE) >> UART_TXFIFO_CNT_S) & 0x7F) >= 0x7E);
ESP_REG(DR_REG_UART2_BASE) = c;
}
#endif

View File

@ -6,8 +6,12 @@
#include "USB.h"
#endif
#ifndef ARDUINO_LOOP_STACK_SIZE
#ifndef CONFIG_ARDUINO_LOOP_STACK_SIZE
#define CONFIG_ARDUINO_LOOP_STACK_SIZE 8192
#define ARDUINO_LOOP_STACK_SIZE 8192
#else
#define ARDUINO_LOOP_STACK_SIZE CONFIG_ARDUINO_LOOP_STACK_SIZE
#endif
#endif
TaskHandle_t loopTaskHandle = NULL;
@ -45,10 +49,11 @@ extern "C" void app_main()
{
#if ARDUINO_SERIAL_PORT //Serial used for USB CDC
USB.begin();
Serial.begin();
#endif
loopTaskWDTEnabled = false;
initArduino();
xTaskCreateUniversal(loopTask, "loopTask", CONFIG_ARDUINO_LOOP_STACK_SIZE, NULL, 1, &loopTaskHandle, ARDUINO_RUNNING_CORE);
xTaskCreateUniversal(loopTask, "loopTask", ARDUINO_LOOP_STACK_SIZE, NULL, 1, &loopTaskHandle, ARDUINO_RUNNING_CORE);
}
#endif

View File

@ -28,7 +28,9 @@
#include <stdint.h>
#include <math.h>
#include "stdlib_noniso.h"
#include "esp_system.h"
#if !CONFIG_DSP_ANSI && !CONFIG_DSP_OPTIMIZED
void reverse(char* begin, char* end) {
char *is = begin;
char *ie = end - 1;
@ -40,6 +42,9 @@ void reverse(char* begin, char* end) {
--ie;
}
}
#else
void reverse(char* begin, char* end);
#endif
char* ltoa(long value, char* result, int base) {
if(base < 2 || base > 16) {

View File

@ -0,0 +1,122 @@
# Arduino-ESP32 Example/Library Name ==(REQUIRED)==
==*Add a brief description about this example/library here!*==
This example/library demonstrates how to create a new example README file.
# Supported Targets ==(REQUIRED)==
==*Add the supported devices here!*==
Currently, this example supports the following targets.
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 |
| ----------------- | ----- | -------- | -------- |
## How to Use Example/Library ==(OPTIONAL)==
==*Add a brief description on how to use this example.*==
* How to install the Arduino IDE: [Install Arduino IDE](https://github.com/espressif/arduino-esp32/tree/master/docs/arduino-ide).
### Hardware Connection ==(OPTIONAL)==
==*Add a brief description about wiring or any other hardware specific connection.*==
To use this example, you need to connect the LED to the `GPIOx`.
SDCard GPIO connection scheme:
| SDCard Pin | Function | GPIO |
| ----------- | -------- | ------ |
| 1 | CS | GPIO5 |
| 2 | DI/MOSI | GPIO23 |
| 3 | VSS/GND | GND |
| 4 | VDD/3V3 | 3V3 |
| 5 | SCLK | GPIO18 |
| 6 | VSS/GND | GND |
| 7 | DO/MISO | GPIO19 |
To add images, please create a folder `_asset` inside the example folder to add the relevant images.
### Configure the Project ==(OPTIONAL)==
==*Add a brief description about this example here!*==
Set the LED GPIO by changing the `LED_BUILTIN` value in the function `pinMode(LED_BUILTIN, OUTPUT);`. By default, the GPIO is: `GPIOx`.
#### Example for the GPIO4:
==*Add some code explanation if relevant to the example.*==
```cpp
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 4 as an output.
pinMode(4, OUTPUT);
}
```
#### Using Arduino IDE
To get more information about the Espressif boards see [Espressif Development Kits](https://www.espressif.com/en/products/devkits).
* Before Compile/Verify, select the correct board: `Tools -> Board`.
* Select the COM port: `Tools -> Port: xxx` where the `xxx` is the detected COM port.
#### Using Platform IO
* Select the COM port: `Devices` or setting the `upload_port` option on the `platformio.ini` file.
## Example/Log Output ==(OPTIONAL)==
==*Add the log/serial output here!*==
```
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1412
load:0x40078000,len:13400
load:0x40080400,len:3672
entry 0x400805f8
ESP32 Chip model = ESP32-D0WDQ5 Rev 3
This chip has 2 cores
Chip ID: 3957392
```
## Troubleshooting ==(REQUIRED)==
==*Add specific issues you may find by using this example here!*==
***Important: Make sure you are using a good quality USB cable and that you have a reliable power source***
* **LED not blinking:** Check the wiring connection and the IO selection.
* **Programming Fail:** If the programming/flash procedure fails, try reducing the serial connection speed.
* **COM port not detected:** Check the USB cable and the USB to Serial driver installation.
If the error persist, you can ask for help at the official [ESP32 forum](https://esp32.com) or see [Contribute](#contribute).
## Contribute ==(REQUIRED)==
==*Do not change! Keep as is.*==
To know how to contribute to this project, see [How to contribute.](https://github.com/espressif/arduino-esp32/blob/master/CONTRIBUTING.rst)
If you have any **feedback** or **issue** to report on this example/library, please open an issue or fix it by creating a new PR. Contributions are more than welcome!
Before creating a new issue, be sure to try the Troubleshooting and to check if the same issue was already created by someone else.
## Resources ==(REQUIRED)==
==*Do not change here! Keep as is or add only relevant documents/info for this example. Do not add any purchase link/marketing stuff*==
* Official ESP32 Forum: [Link](https://esp32.com)
* Arduino-ESP32 Official Repository: [espressif/arduino-esp32](https://github.com/espressif/arduino-esp32)
* ESP32 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf)
* ESP32-S2 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf)
* ESP32-C3 Datasheet: [Link to datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf)
* Official ESP-IDF documentation: [ESP-IDF](https://idf.espressif.com)

28
docs/Makefile Normal file
View File

@ -0,0 +1,28 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
LINKCHECKDIR = build/linkcheck
.PHONY: checklinks
checklinks:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(LINKCHECKDIR)
@echo
@echo "Check finished. Report is in $(LINKCHECKDIR)."
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@ -1,59 +0,0 @@
# Over the Air through Web browser
OTAWebUpdate is done with a web browser that can be useful in the following typical scenarios:
- Once the application developed and loading directly from Arduino IDE is inconvenient or not possible
- after deployment if user is unable to expose Firmware for OTA from external update server
- provide updates after deployment to small quantity of modules when setting an update server is not practicable
## Requirements
- The ESP and the computer must be connected to the same network
## Implementation
The sample implementation has been done using:
- example sketch OTAWebUpdater.ino
- ESP32 (Dev Module)
You can use another module also if it meets Flash chip size of the sketch
1-Before you begin, please make sure that you have the following software installed:
- Arduino IDE
- Host software depending on O/S you use:
- Avahi http://avahi.org/ for Linux
- Bonjour http://www.apple.com/support/bonjour/ for Windows
- Mac OSX and iOS - support is already built in / no any extra s/w is required
Prepare the sketch and configuration for initial upload with a serial port
- Start Arduino IDE and load sketch OTAWebUpdater.ino available under File > Examples > OTAWebUpdater.ino
- Update ssid and pass in the sketch so the module can join your Wi-Fi network
- Open File > Preferences, look for “Show verbose output during:” and check out “compilation” option
![verbrose](esp32verbose.PNG)
- Upload sketch (Ctrl+U)
- Now open web browser and enter the url, i.e. http://esp32.local. Once entered, browser should display a form
![login](esp32login.PNG)
> username= admin
> password= admin
**Note**-*If entering “http://ESP32.local” does not work, try replacing “ESP32” with modules IP address.This workaround is useful in case the host software installed does not work*.
Now click on Login button and browser will display a upload form
![upload](esp32upload.PNG)
For Uploading the New Firmware you need to provide the Binary File of your Code.
Exporting Binary file of the Firmware (Code)
- Open up the Arduino IDE
- Open up the Code, for Exporting up Binary file
- Now go to Sketch > export compiled Binary
![export](exportTobinary.PNG)
- Binary file is exported to the same Directory where your code is present
Once you are comfortable with this procedure go ahead and modify OTAWebUpdater.ino sketch to print some additional messages, compile it, Export new binary file and upload it using web browser to see entered changes on a Serial Monitor

View File

@ -1,12 +0,0 @@
## Installation instructions using Arduino IDE Boards Manager
### ==========================================================
- Stable release link: `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json`
- Development release link: `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json`
Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (x86, amd64, armhf and arm64).
- Install the current upstream Arduino IDE at the 1.8 level or later. The current version is at the [Arduino website](http://www.arduino.cc/en/main/software).
- Start Arduino and open Preferences window.
- Enter one of the release links above into *Additional Board Manager URLs* field. You can add multiple URLs, separating them with commas.
- Open Boards Manager from Tools > Board menu and install *esp32* platform (and don't forget to select your ESP32 board from Tools > Board menu after installation).

View File

@ -1,36 +0,0 @@
Installation instructions for Debian / Ubuntu OS
=================================================
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
- Open Terminal and execute the following command (copy->paste and hit enter):
```bash
sudo usermod -a -G dialout $USER && \
sudo apt-get install git && \
wget https://bootstrap.pypa.io/get-pip.py && \
sudo python3 get-pip.py && \
sudo pip3 install pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python3 get.py
```
- Restart Arduino IDE
- If you have Arduino installed to ~/, modify the installation as follows, beginning at `mkdir -p ~/Arduino/hardware`:
```bash
cd ~/Arduino/hardware
mkdir -p espressif && \
cd espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python3 get.py
```

View File

@ -1,18 +0,0 @@
Installation instructions for Fedora
=====================================
- Install the latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software). `$ sudo dnf -y install arduino` will most likely install an older release.
- Open Terminal and execute the following command (copy->paste and hit enter):
```bash
sudo usermod -a -G dialout $USER && \
sudo dnf install git python3-pip python3-pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python get.py
```
- Restart Arduino IDE

View File

@ -1,29 +0,0 @@
Installation instructions for Mac OS
=====================================
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
- Open Terminal and execute the following command (copy->paste and hit enter):
```bash
mkdir -p ~/Documents/Arduino/hardware/espressif && \
cd ~/Documents/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 --depth 1 && \
cd esp32 && \
git submodule update --init --recursive --depth 1 && \
cd tools && \
python get.py
```
Where `~/Documents/Arduino` represents your sketch book location as per "Arduino" > "Preferences" > "Sketchbook location" (in the IDE once started). Adjust the command above accordingly if necessary!
 
- If you get the error below. Install the command line dev tools with xcode-select --install and try the command above again:
```xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun```
```xcode-select --install```
- Try `python3` instead of `python` if you get the error: `IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)` when running `python get.py`
- If you get the following error when running `python get.py` urllib.error.URLError: <urlopen error SSL: CERTIFICATE_VERIFY_FAILED, go to Macintosh HD > Applications > Python3.6 folder (or any other python version), and run the following scripts: Install Certificates.command and Update Shell Profile.command
- Restart Arduino IDE

View File

@ -1,22 +0,0 @@
Installation instructions for openSUSE
======================================
- Install the latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software).
- Open Terminal and execute the following command (copy->paste and hit enter):
```bash
sudo usermod -a -G dialout $USER && \
if [ `python --version 2>&1 | grep '2.7' | wc -l` = "1" ]; then \
sudo zypper install git python-pip python-pyserial; \
else \
sudo zypper install git python3-pip python3-pyserial; \
fi && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python get.py
```
- Restart Arduino IDE

View File

@ -1,49 +0,0 @@
## Steps to install Arduino ESP32 support on Windows
### Tested on 32 and 64 bit Windows 10 machines
1. Download and install the latest Arduino IDE ```Windows Installer``` from [arduino.cc](https://www.arduino.cc/en/Main/Software)
2. Download and install Git from [git-scm.com](https://git-scm.com/download/win)
3. Start ```Git GUI``` and run through the following steps:
- Select ```Clone Existing Repository```
![Step 1](win-screenshots/win-gui-1.png)
- Select source and destination
- Sketchbook Directory: Usually ```C:/Users/[YOUR_USER_NAME]/Documents/Arduino``` and is listed underneath the "Sketchbook location" in Arduino preferences.
- Source Location: ```https://github.com/espressif/arduino-esp32.git```
- Target Directory: ```[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32```
- Click ```Clone``` to start cloning the repository
![Step 2](win-screenshots/win-gui-2.png)
![Step 3](win-screenshots/win-gui-3.png)
- open a `Git Bash` session pointing to ```[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32``` and execute ```git submodule update --init --recursive```
- Open ```[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools``` and double-click ```get.exe```
![Step 4](win-screenshots/win-gui-4.png)
- When ```get.exe``` finishes, you should see the following files in the directory
![Step 5](win-screenshots/win-gui-5.png)
4. Plug your ESP32 board and wait for the drivers to install (or install manually any that might be required)
5. Start Arduino IDE
6. Select your board in ```Tools > Board``` menu
7. Select the COM port that the board is attached to
8. Compile and upload (You might need to hold the boot button while uploading)
![Arduino IDE Example](win-screenshots/arduino-ide.png)
### How to update to the latest code
1. Start ```Git GUI``` and you should see the repository under ```Open Recent Repository```. Click on it!
![Update Step 1](win-screenshots/win-gui-update-1.png)
2. From menu ```Remote``` select ```Fetch from``` > ```origin```
![Update Step 2](win-screenshots/win-gui-update-2.png)
3. Wait for git to pull any changes and close ```Git GUI```
4. Open ```[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools``` and double-click ```get.exe```
![Step 4](win-screenshots/win-gui-4.png)

View File

@ -1,82 +0,0 @@
To use as a component of ESP-IDF
=================================================
## esp32-arduino-lib-builder
For a simplified method, see [lib-builder](lib_builder.md)
## Installation
- Download and install [esp-idf](https://github.com/espressif/esp-idf)
- Create blank idf project (from one of the examples)
- in the project folder, create a folder called components and clone this repository inside
```bash
mkdir -p components && \
cd components && \
git clone https://github.com/espressif/arduino-esp32.git arduino && \
cd arduino && \
git submodule update --init --recursive && \
cd ../.. && \
make menuconfig
```
- ```make menuconfig``` has some Arduino options
- "Autostart Arduino setup and loop on boot"
- If you enable this options, your main.cpp should be formated like any other sketch
```arduino
//file: main.cpp
#include "Arduino.h"
void setup(){
Serial.begin(115200);
}
void loop(){
Serial.println("loop");
delay(1000);
}
```
- Else you need to implement ```app_main()``` and call ```initArduino();``` in it.
Keep in mind that setup() and loop() will not be called in this case.
If you plan to base your code on examples provided in [esp-idf](https://github.com/espressif/esp-idf/tree/master/examples), please make sure move the app_main() function in main.cpp from the files in the example.
```arduino
//file: main.cpp
#include "Arduino.h"
extern "C" void app_main()
{
initArduino();
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);
//do your own thing
}
```
- "Disable mutex locks for HAL"
- If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
- "Autoconnect WiFi on boot"
- If enabled, WiFi will start with the last known configuration
- Else it will wait for WiFi.begin
- ```make flash monitor``` will build, upload and open serial monitor to your board
## Logging To Serial
If you are writing code that does not require Arduino to compile and you want your `ESP_LOGx` macros to work in Arduino IDE, you can enable the compatibility by adding the following lines after your includes:
```cpp
#ifdef ARDUINO_ARCH_ESP32
#include "esp32-hal-log.h"
#endif
```
## FreeRTOS Tick Rate (Hz)
You might notice that Arduino-esp32's `delay()` function will only work in multiples of 10ms. That is because, by default, esp-idf handles task events 100 times per second.
To fix that behavior you need to set FreeRTOS tick rate to 1000Hz in `make menuconfig` -> `Component config` -> `FreeRTOS` -> `Tick rate`.
## Compilation Errors
As commits are made to esp-idf and submodules, the codebases can develop incompatibilities which cause compilation errors. If you have problems compiling, follow the instructions in [Issue #1142](https://github.com/espressif/arduino-esp32/issues/1142) to roll esp-idf back to a known good version.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

View File

@ -1,14 +0,0 @@
## Using esp32-arduino-lib-builder to compile custom libraries
Espressif has provided a [tool](https://github.com/espressif/esp32-arduino-lib-builder) to simplify building your own compiled libraries for use in Arduino IDE (or your favorite IDE).
To use it to generate custom libraries, follow these steps:
1. `git clone https://github.com/espressif/esp32-arduino-lib-builder`
2. `cd esp32-arduino-lib-builder`
3. `./tools/update-components.sh`
4. `./tools/install-esp-idf.sh` (if you already have an $IDF_PATH defined, it will use your local copy of the repository)
5. `make menuconfig` or directly edit sdkconfig.
6. `./build.sh`
The script automates the process of building [arduino as an ESP-IDF component](https://github.com/espressif/arduino-esp32/blob/master/docs/esp-idf_component.md).
Once it is complete, you can cherry pick the needed libraries from `out/tools/sdk/lib`, or run `tools/copy-to-arduino.sh` to copy the entire built system.
`tools/config.sh` contains a number of variables that control the process, particularly the $IDF_BRANCH variable. You can adjust this to try building against newer versions, but there are absolutely no guarantees that any components will work or even successfully compile against a newer IDF.

35
docs/make.bat Normal file
View File

@ -0,0 +1,35 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

View File

@ -1,4 +0,0 @@
To use make
============
[makeEspArduino](https://github.com/plerup/makeEspArduino) is a generic makefile for any ESP8266/ESP32 Arduino project.Using make instead of the Arduino IDE makes it easier to do automated and production builds.

View File

@ -1,11 +0,0 @@
Installation instructions for using PlatformIO
=================================================
- [What is PlatformIO?](https://docs.platformio.org/en/latest/what-is-platformio.html?utm_source=github&utm_medium=arduino-esp32)
- [PlatformIO IDE](https://platformio.org/platformio-ide?utm_source=github&utm_medium=arduino-esp32)
- [PlatformIO Core](https://docs.platformio.org/en/latest/core.html?utm_source=github&utm_medium=arduino-esp32) (command line tool)
- [Advanced usage](https://docs.platformio.org/en/latest/platforms/espressif32.html?utm_source=github&utm_medium=arduino-esp32) -
custom settings, uploading to SPIFFS, Over-the-Air (OTA), staging version
- [Integration with Cloud and Standalone IDEs](https://docs.platformio.org/en/latest/ide.html?utm_source=github&utm_medium=arduino-esp32) -
Cloud9, Codeanywhere, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM, Visual Studio, and VSCode
- [Project Examples](https://docs.platformio.org/en/latest/platforms/espressif32.html?utm_source=github&utm_medium=arduino-esp32#examples)

5
docs/requirements.txt Normal file
View File

@ -0,0 +1,5 @@
# This is a list of python packages used to generate documentation. This file is used with pip:
# pip install --user -r requirements.txt
#
# matplotlib is currently required only by the script generate_chart.py
sphinx-copybutton==0.3.0

View File

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,11 @@
##################
Advanced Utilities
##################
.. toctree::
:maxdepth: 2
Library Builder <lib_builder>
ESP-IDF as Component <esp-idf_component>
OTA Web Update <ota_web_update>
makeEspArduino <make>

View File

@ -0,0 +1,3 @@
#############
Bluetooth API
#############

View File

@ -0,0 +1,3 @@
##########
Deep Sleep
##########

View File

@ -0,0 +1,16 @@
#######
ESP-NOW
#######
ESP-NOW is a fast, connectionless communication technology featuring a short packet transmission.
ESP-NOW is ideal for smart lights, remote control devices, sensors and other applications.
Example
-------
Resources
---------
* `ESP-NOW`_ (User Guide)
.. _ESP-NOW: https://www.espressif.com/sites/default/files/documentation/esp-now_user_guide_en.pdf

3
docs/source/api/gpio.rst Normal file
View File

@ -0,0 +1,3 @@
####
GPIO
####

View File

@ -0,0 +1,3 @@
#########
RainMaker
#########

View File

@ -0,0 +1,3 @@
############
Reset Reason
############

512
docs/source/api/wifi.rst Normal file
View File

@ -0,0 +1,512 @@
#########
Wi-Fi API
#########
About
-----
The Wi-Fi API provides support for the 802.11b/g/n protocol driver. This API includes:
* Station mode (STA mode or Wi-Fi client mode). ESP32 connects to an access point
* AP mode (aka Soft-AP mode or Access Point mode). Devices connect to the ESP32
* Security modes (WPA, WPA2, WEP, etc.)
* Scanning for access points
Working as AP
*************
In this mode, the ESP32 is configured as an Access Point (AP) and it's capable of receiving incoming connections from other devices (stations) by providing
a Wi-Fi network.
.. figure:: ../_static/wifi_esp32_ap.png
:align: center
:width: 520
:figclass: align-center
This mode can be used for serving a HTTP or HTTPS server inside the ESP32, for example.
Working as STA
**************
The STA mode is used to connect the ESP32 to a Wi-Fi network, provided by an Access Point.
.. figure:: ../_static/wifi_esp32_sta.png
:align: center
:width: 520
:figclass: align-center
If you need to connect your project to the Internet, this is the mode you are looking for.
API Description
---------------
Here is the description about the WiFi API.
WiFiAP
------
The ``WiFiAP`` is used to configure and manage the Wi-Fi as an Access Point. This is where you can find the related functions for the AP.
Basic Usage
***********
To start the Wi-Fi as an Access Point.
.. code-block:: arduino
WiFi.softAP(ssid, password);
Please see the full WiFiAP example in: `ap example`_.
AP Configuration
----------------
softAP
******
Use the function ``softAP`` to configure the Wi-Fi AP characteristics:
.. code-block:: arduino
bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4, bool ftm_responder = false);
Where:
* ``ssid`` sets the Wi-Fi network SSID.
* ``passphrase`` sets the Wi-Fi network password. If the network is open, set as ``NULL``.
* ``channel`` configures the Wi-Fi channel.
* ``ssid_hidden`` sets the network as hidden.
* ``max_connection`` sets the maximum number of simultaneous connections. The default is 4.
* ``ftm_responder`` sets the Wi-Fi FTM responder feature. **Only for ESP32-S2 and ESP32-C3 SoC!**
Return ``true`` if the configuration was successful.
softAPConfig
************
Function used to configure the IP as static (fixed) as well as the gateway and subnet.
.. code-block:: arduino
bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
Where:
* ``local_ip`` sets the local IP address.
* ``gateway`` sets the gateway IP.
* ``subnet`` sets the subnet mask.
The function will return ``true`` if the configuration is successful.
AP Connection
-------------
softAPdisconnect
****************
Function used to force the AP disconnection.
.. code-block:: arduino
bool softAPdisconnect(bool wifioff = false);
Where:
* ``wifioff`` sets the Wi-Fi off if ``true``.
The function will return ``true`` if the configuration is successful.
softAPgetStationNum
*******************
This function returns the number of clients connected to the AP.
.. code-block:: arduino
uint8_t softAPgetStationNum();
softAPIP
********
Function to get the AP IPv4 address.
.. code-block:: arduino
IPAddress softAPIP();
The function will return the AP IP address in ``IPAddress`` format.
softAPBroadcastIP
*****************
Function to get the AP IPv4 broadcast address.
.. code-block:: arduino
IPAddress softAPBroadcastIP();
The function will return the AP broadcast address in ``IPAddress`` format.
softAPNetworkID
***************
Get the softAP network ID.
.. code-block:: arduino
IPAddress softAPNetworkID();
The function will return the AP network address in ``IPAddress`` format.
softAPSubnetCIDR
****************
Get the softAP subnet CIDR.
.. code-block:: arduino
uint8_t softAPSubnetCIDR();
softAPenableIpV6
****************
Function used to enable the IPv6 support.
.. code-block:: arduino
bool softAPenableIpV6();
The function will return ``true`` if the configuration is successful.
softAPIPv6
**********
Function to get the IPv6 address.
.. code-block:: arduino
IPv6Address softAPIPv6();
The function will return the AP IPv6 address in ``IPv6Address`` format.
softAPgetHostname
*****************
Function to get the AP hostname.
.. code-block:: arduino
const char * softAPgetHostname();
softAPsetHostname
*****************
Function to set the AP hostname.
.. code-block:: arduino
bool softAPsetHostname(const char * hostname);
Where:
* ``hostname`` sets the device hostname.
The function will return ``true`` if the configuration is successful.
softAPmacAddress
****************
Function to define the AP MAC address.
.. code-block:: arduino
uint8_t* softAPmacAddress(uint8_t* mac);
Where:
* ``mac`` sets the new MAC address.
Function to get the AP MAC address.
.. code-block:: arduino
String softAPmacAddress(void);
softAPSSID
**********
Function to get the AP SSID.
.. code-block:: arduino
String softAPSSID(void) const;
Returns the AP SSID.
WiFiSTA
-------
The ``WiFiSTA`` is used to configure and manage the Wi-Fi as Station. The related functions for the STA are here.
Basic Usage
***********
The following code shows the basic usage of the WifiSTA functionality.
.. code-block:: arduino
WiFi.begin(ssid, password);
Where the ``ssid`` and ``password`` are from the network you want to connect the ESP32.
To check if the connection is successful, you can use:
.. code-block:: arduino
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
After a successful connection, you can print the IP address given by the network.
.. code-block:: arduino
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
Please see the full example of the WiFiSTA in: `sta example`_.
STA Configuration
-----------------
begin
*****
- Functions ``begin`` are used to configure and start the Wi-Fi.
.. code-block:: arduino
wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
Where:
* ``ssid`` sets the AP SSID.
* ``passphrase`` sets the AP password. Set as ``NULL`` for open networks.
* ``channel`` sets the Wi-Fi channel.
* ``uint8_t* bssid`` sets the AP BSSID.
* ``connect`` sets ``true`` to connect to the configured network automatically.
.. code-block:: arduino
wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
Where:
* ``ssid`` sets the AP SSID.
* ``passphrase`` sets the AP password. Set as ``NULL`` for open networks.
* ``channel`` sets the Wi-Fi channel.
* ``bssid`` sets the AP BSSID.
* ``connect`` sets ``true`` to connect to the configured network automatically.
Function to start the connection after being configured.
.. code-block:: arduino
wl_status_t begin();
config
******
Function ``config`` is used to configure Wi-Fi. After configuring, you can call function ``begin`` to start the Wi-Fi process.
.. code-block:: arduino
bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = (uint32_t)0x00000000, IPAddress dns2 = (uint32_t)0x00000000);
Where:
* ``local_ip`` sets the local IP.
* ``gateway`` sets the gateway IP.
* ``subnet`` sets the subnet mask.
* ``dns1`` sets the DNS.
* ``dns2`` sets the DNS alternative option.
The function will return ``true`` if the configuration is successful.
The ``IPAddress`` format is defined by 4 bytes as described here:
.. code-block:: arduino
IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet);
Example:
.. code-block:: arduino
IPAddress local_ip(192, 168, 10, 20);
See the ``WiFiClientStaticIP.ino`` for more details on how to use this feature.
STA Connection
--------------
reconnect
*********
Function used to reconnect the Wi-Fi connection.
.. code-block:: arduino
bool reconnect();
disconnect
**********
Function to force disconnection.
.. code-block:: arduino
bool disconnect(bool wifioff = false, bool eraseap = false);
Where:
* ``wifioff`` use ``true`` to turn the Wi-Fi radio off.
* ``eraseap`` use ``true`` to erase the AP configuration from the NVS memory.
The function will return ``true`` if the configuration is successful.
isConnected
***********
Function used to get the connection state.
.. code-block:: arduino
bool isConnected();
Return the connection state.
setAutoConnect
**************
Function used to set the automatic connection.
.. code-block:: arduino
bool setAutoConnect(bool autoConnect);
Where:
* ``bool autoConnect`` is set to ``true`` to enable this option.
getAutoConnect
**************
Function used to get the automatic connection setting value.
.. code-block:: arduino
bool getAutoConnect();
The function will return ``true`` if the setting is enabled.
setAutoReconnect
****************
Function used to set the automatic reconnection if the connection is lost.
.. code-block:: arduino
bool setAutoReconnect(bool autoReconnect);
Where:
* ``autoConnect`` is set to ``true`` to enable this option.
getAutoReconnect
****************
Function used to get the automatic reconnection if the connection is lost.
.. code-block:: arduino
bool getAutoReconnect();
The function will return ``true`` if this setting is enabled.
WiFiMulti
---------
The ``WiFiMulti`` allows you to add more than one option for the AP connection while running as a station.
To add the AP, use the following function. You can add multiple AP's and this library will handle the connection.
.. code-block:: arduino
bool addAP(const char* ssid, const char *passphrase = NULL);
After adding the AP's, run by the following function.
.. code-block:: arduino
uint8_t run(uint32_t connectTimeout=5000);
To see how to use the ``WiFiMulti``, take a look at the ``WiFiMulti.ino`` example available.
WiFiScan
--------
To perform the Wi-Fi scan for networks, you can use the following functions:
Start scan WiFi networks available.
.. code-block:: arduino
int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300, uint8_t channel = 0);
Called to get the scan state in Async mode.
.. code-block:: arduino
int16_t scanComplete();
Delete last scan result from RAM.
.. code-block:: arduino
void scanDelete();
Loads all infos from a scanned wifi in to the ptr parameters.
.. code-block:: arduino
bool getNetworkInfo(uint8_t networkItem, String &ssid, uint8_t &encryptionType, int32_t &RSSI, uint8_t* &BSSID, int32_t &channel);
To see how to use the ``WiFiScan``, take a look at the ``WiFiScan.ino`` example available.
Examples
--------
.. _ap example:
Wi-Fi AP Example
****************
.. literalinclude:: ../../../libraries/WiFi/examples/WiFiAccessPoint/WiFiAccessPoint.ino
:language: arduino
.. _sta example:
Wi-Fi STA Example
*****************
.. literalinclude:: ../../../libraries/WiFi/examples/WiFiClient/WiFiClient.ino
:language: arduino
References
----------

View File

@ -0,0 +1,120 @@
##################
ESP32-C3-DevKitM-1
##################
The ESP32-C3-DevKitM-1 development board is one of Espressif's official boards. This board is based on the `ESP32-C3-MINI-1`_ module, with the `ESP32-C3`_ as the core.
Specifications
--------------
- Small­ sized 2.4 GHz Wi­Fi (802.11 b/g/n) and Bluetooth® 5 module
- Built around ESP32­C3 series of SoCs, RISC­V single­core microprocessor
- 4 MB flash in chip package
- 15 available GPIOs (module)
- Peripherals
- 22 × programmable GPIOs
- Digital interfaces:
- 3 × SPI
- 2 × UART
- 1 × I2C
- 1 × I2S
- Remote control peripheral, with 2 transmit channels and 2 receive channels
- LED PWM controller, with up to 6 channels
- Full-speed USB Serial/JTAG controller
- General DMA controller (GDMA), with 3 transmit channels and 3 receive channels
- 1 × TWAI® controller (compatible with ISO 11898-1)
- Analog interfaces:
- 2 × 12-bit SAR ADCs, up to 6 channels
- 1 × temperature sensor
- Timers:
- 2 × 54-bit general-purpose timers
- 3 × watchdog timers
- 1 × 52-bit system timer
- On­board PCB antenna or external antenna connector
Header Block
------------
.. note::
Not all of the chip pins are exposed to the pin headers.
J1
^^^
=== ==== ========== ===================================
No. Name Type [1]_ Function
=== ==== ========== ===================================
1 GND G Ground
2 3V3 P 3.3 V power supply
3 3V3 P 3.3 V power supply
4 IO2 I/O/T GPIO2 [2]_, ADC1_CH2, FSPIQ
5 IO3 I/O/T GPIO3, ADC1_CH3
6 GND G Ground
7 RST I CHIP_PU
8 GND G Ground
9 IO0 I/O/T GPIO0, ADC1_CH0, XTAL_32K_P
10 IO1 I/O/T GPIO1, ADC1_CH1, XTAL_32K_N
11 IO10 I/O/T GPIO10, FSPICS0
12 GND G Ground
13 5V P 5 V power supply
14 5V P 5 V power supply
15 GND G Ground
=== ==== ========== ===================================
J3
^^^
=== ==== ========== ====================================
No. Name Type [1]_ Function
=== ==== ========== ====================================
1 GND G Ground
2 TX I/O/T GPIO21, U0TXD
3 RX I/O/T GPIO20, U0RXD
4 GND G Ground
5 IO9 I/O/T GPIO9 [2]_
6 IO8 I/O/T GPIO8 [2]_, RGB LED
7 GND G Ground
8 IO7 I/O/T GPIO7, FSPID, MTDO
9 IO6 I/O/T GPIO6, FSPICLK, MTCK
10 IO5 I/O/T GPIO5, ADC2_CH0, FSPIWP, MTDI
11 IO4 I/O/T GPIO4, ADC1_CH4, FSPIHD, MTMS
12 GND G Ground
13 IO18 I/O/T GPIO18, USB_D-
14 IO19 I/O/T GPIO19, USB_D+
15 GND G Ground
=== ==== ========== ====================================
.. [1] P: Power supply; I: Input; O: Output; T: High impedance.
.. [2] GPIO2, GPIO8, and GPIO9 are strapping pins of the ESP32-C3FN4 chip. During the chip's system reset, the latches of the strapping pins sample the voltage level as strapping bits, and hold these bits until the chip is powered down or shut down.
Pin Layout
----------
.. figure:: ../_static/esp32-c3_devkitM-1_pinlayout.png
:align: center
:width: 600
:alt: ESP32-C3-DevKitM-1 (click to enlarge)
:figclass: align-center
Strapping Pins
--------------
Some of the GPIO's have important features during the booting process. Here is the list of the strapping pins on the `ESP32-C3`_.
==== ========= ===================================================================== ================ =================
GPIO Default Function Pull-up Pull-down
==== ========= ===================================================================== ================ =================
IO2 N/A Booting Mode See `ESP32-C3`_ See `ESP32-C3`_
IO9 Pull-up Booting Mode SPI Boot Download Boot
IO8 N/A Booting Mode Don't Care Download Boot
IO8 Pull-up Enabling/Disabling Log Print See `ESP32-C3`_ See `ESP32-C3`_
==== ========= ===================================================================== ================ =================
For more detailed information, see the `ESP32-C3`_ datasheet.
Resources
---------
* `ESP32-C3`_ (Datasheet)
* `ESP32-C3-MINI-1`_ (Datasheet)
.. _ESP32-C3: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
.. _ESP32-C3-MINI-1: https://www.espressif.com/sites/default/files/documentation/esp32-c3-mini-1_datasheet_en.pdf

View File

@ -0,0 +1,158 @@
###############
ESP32-DevKitC-1
###############
The `ESP32-DevKitC-1`_ development board is one of Espressif's official boards. This board is based on the `ESP32-WROVER-E`_ module, with the `ESP32`_ as the core.
Specifications
--------------
- Wi-Fi 802.11 b/g/n (802.11n up to 150 Mbps)
- Bluetooth v4.2 BR/EDR and BLE specification
- Built around ESP32 series of SoCs
- Integrated 4 MB SPI flash
- Integrated 8 MB PSRAM
- Peripherals
- SD card
- UART
- SPI
- SDIO
- I2C
- LED PWM
- Motor PWM
- I2S
- IR
- Pulse Counter
- GPIO
- Capacitive Touch Sensor
- ADC
- DAC
- Two-Wire Automotive Interface (TWAI®, compatible with ISO11898-1)
- On­board PCB antenna or external antenna connector
Header Block
------------
.. note::
Not all of the chip pins are exposed to the pin headers.
J1
^^^
=== ==== ===== ===================================
No. Name Type Function
=== ==== ===== ===================================
1 3V3 P 3.3 V power supply
2 EN I CHIP_PU, Reset
3 IO36 I GPIO36, ADC1_CH0, S_VP
4 IO39 I GPIO39, ADC1_CH3, S_VN
5 IO34 I GPIO34, ADC1_CH6, VDET_1
6 IO35 I GPIO35, ADC1_CH7, VDET_2
7 IO32 I/O GPIO32, ADC1_CH4, TOUCH_CH9, XTAL_32K_P
8 IO33 I/O GPIO33, ADC1_CH5, TOUCH_CH8, XTAL_32K_N
9 IO25 I/O GPIO25, ADC1_CH8, DAC_1
10 IO26 I/O GPIO26, ADC2_CH9, DAC_2
11 IO27 I/O GPIO27, ADC2_CH7, TOUCH_CH7
12 IO14 I/O GPIO14, ADC2_CH6, TOUCH_CH6, MTMS
13 IO12 I/O GPIO12, ADC2_CH5, TOUCH_CH5, MTDI
14 GND G Ground
15 IO13 I/O GPIO13, ADC2_CH4, TOUCH_CH4, MTCK
16 IO9 I/O GPIO9, D2
17 IO10 I/O GPIO10, D3
18 IO11 I/O GPIO11, CMD
19 5V0 P 5 V power supply
=== ==== ===== ===================================
J3
^^^
=== ==== ===== ====================================
No. Name Type Function
=== ==== ===== ====================================
1 GND G Ground
2 IO23 I/O GPIO23
3 IO22 I/O GPIO22
4 IO1 I/O GPIO1, U0TXD
5 IO3 I/O GPIO3, U0RXD
6 IO21 I/O GPIO21
7 GND G Ground
8 IO19 I/O GPIO19
9 IO18 I/O GPIO18
10 IO5 I/O GPIO5
11 IO17 I/O GPIO17
12 IO16 I/O GPIO16
13 IO4 I/O GPIO4, ADC2_CH0, TOUCH_CH0
14 IO0 I/O GPIO0, ADC2_CH1, TOUCH_CH1, Boot
16 IO2 I/O GPIO2, ADC2_CH2, TOUCH_CH2
17 IO15 I/O GPIO15, ADC2_CH3, TOUCH_CH3, MTDO
17 IO8 I/O GPIO8, D1
18 IO7 I/O GPIO7, D0
19 IO6 I/O GPIO6, SCK
=== ==== ===== ====================================
P: Power supply;
I: Input;
O: Output;
T: High impedance.
Pin Layout
----------
.. figure:: ../_static/esp32_devkitC_pinlayout.png
:align: center
:width: 600
:alt: ESP32-DevKitC-1 (click to enlarge)
:figclass: align-center
Strapping Pins
--------------
Some of the GPIO's have important features during the booting process. Here is the list of the strapping pins on the `ESP32`_.
==== ========= ===================================================================== ============ ==============
GPIO Default Function Pull-up Pull-down
==== ========= ===================================================================== ============ ==============
IO12 Pull-down Voltage of Internal LDO (VDD_SDIO) 1V8 3V3
IO0 Pull-up Booting Mode SPI Boot Download Boot
IO2 Pull-down Booting Mode Don't Care Download Boot
IO15 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent
IO5 Pull-up Timing of SDIO Slave See `ESP32`_ See `ESP32`_
==== ========= ===================================================================== ============ ==============
Be aware when choosing which pins to use.
Restricted Usage GPIO's
-----------------------
Some of the GPIO's are used for the external flash and PSRAM. These GPIO's cannot be used:
==== ===================
GPIO Shared Function
==== ===================
IO6 External SPI Flash
IO7 External SPI Flash
IO8 External SPI Flash
IO9 External SPI Flash
IO10 External SPI Flash
IO11 External SPI Flash
==== ===================
Other GPIO's are `INPUT ONLY` and cannot be used as output pin:
==== =========================
GPIO Function
==== =========================
IO34 GPIO34, ADC1_CH6, VDET_1
IO35 GPIO35, ADC1_CH7, VDET_2
IO36 GPIO36, ADC1_CH0, S_VP
IO39 GPIO39, ADC1_CH3, S_VN
==== =========================
Resources
---------
* `ESP32`_ (Datasheet)
* `ESP32-WROVER-E`_ (Datasheet)
* `ESP32-DevKitC`_ (Schematic)
.. _ESP32: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-WROVER-E: https://www.espressif.com/sites/default/files/documentation/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf
.. _ESP32-DevKitC: https://dl.espressif.com/dl/schematics/esp32_devkitc_v4-sch.pdf

View File

@ -0,0 +1,153 @@
################
ESP32-S2-Saola-1
################
The `ESP32-S2-Saola-1`_ development board is one of Espressif's official boards. This board is based on the `ESP32-S2-WROVER`_ module, with the `ESP32-S2`_ as the core.
Specifications
--------------
- Wi-Fi 802.11 b/g/n (802.11n up to 150 Mbps)
- Built around ESP32-S2 series of SoCs Xtensa® single-core
- Integrated 4 MB SPI flash
- Integrated 2 MB PSRAM
- Peripherals
- 43 × programmable GPIOs
- 2 × 13-bit SAR ADCs, up to 20 channels
- 2 × 8-bit DAC
- 14 × touch sensing IOs
- 4 × SPI
- 1 × I2S
- 2 × I2C
- 2 × UART
- RMT (TX/RX)
- LED PWM controller, up to 8 channels
- 1 × full-speed USB OTG
- 1 × temperature sensor
- 1 × DVP 8/16 camera interface, implemented using the hardware resources of I2S
- 1 × LCD interface (8-bit serial RGB/8080/6800), implemented using the hardware resources of SPI2
- 1 × LCD interface (8/16/24-bit parallel), implemented using the hardware resources of I2S
- 1 × TWAI® controller (compatible with ISO 11898-1)
- On­board PCB antenna or external antenna connector
Header Block
------------
.. note::
Not all of the chip pins are exposed to the pin headers.
J2
^^^
=== ==== ===== ===================================
No. Name Type Function
=== ==== ===== ===================================
1 3V3 P 3.3 V power supply
2 IO0 I/O GPIO0, Boot
3 IO1 I/O GPIO1, ADC1_CH0, TOUCH_CH1
4 IO2 I/O GPIO2, ADC1_CH1, TOUCH_CH2
5 IO3 I/O GPIO3, ADC1_CH2, TOUCH_CH3
6 IO4 I/O GPIO4, ADC1_CH3, TOUCH_CH4
7 IO5 I/O GPIO5, ADC1_CH4, TOUCH_CH5
8 IO6 I/O GPIO6, ADC1_CH5, TOUCH_CH6
9 IO7 I/O GPIO7, ADC1_CH6, TOUCH_CH7
10 IO8 I/O GPIO8, ADC1_CH7, TOUCH_CH8
11 IO9 I/O GPIO9, ADC1_CH8, TOUCH_CH9
12 IO10 I/O GPIO10, ADC1_CH9, TOUCH_CH10
13 IO11 I/O GPIO11, ADC2_CH0, TOUCH_CH11
14 IO12 I/O GPIO12, ADC2_CH1, TOUCH_CH12
15 IO13 I/O GPIO13, ADC2_CH2, TOUCH_CH13
16 IO14 I/O GPIO14, ADC2_CH3, TOUCH_CH14
17 IO15 I/O GPIO15, ADC2_CH4, XTAL_32K_P
18 IO16 I/O GPIO16, ADC2_CH5, XTAL_32K_N
19 IO17 I/O GPIO17, ADC2_CH6, DAC_1
20 5V0 P 5 V power supply
21 GND G Ground
=== ==== ===== ===================================
J3
^^^
=== ==== ===== ====================================
No. Name Type Function
=== ==== ===== ====================================
1 GND G Ground
2 RST I CHIP_PU, Reset
3 IO46 I GPIO46
4 IO45 I/O GPIO45
5 IO44 I/O GPIO44, U0RXD
6 IO43 I/O GPIO43, U0TXD
7 IO42 I/O GPIO42, MTMS
8 IO41 I/O GPIO41, MTDI
9 IO40 I/O GPIO40, MTDO
10 IO39 I/O GPIO39, MTCK
11 IO38 I/O GPIO38
12 IO37 I/O GPIO37
13 IO36 I/O GPIO36
14 IO35 I/O GPIO35
16 IO34 I/O GPIO34
17 IO33 I/O GPIO33
17 IO26 I/O GPIO26
18 IO21 I/O GPIO21
19 IO20 I/O GPIO20, ADC2_CH3, USB_D+
20 IO19 I/O GPIO19, ADC2_CH3, USB_D-
21 IO18 I/O GPIO18, ADC2_CH3, DAC_2
=== ==== ===== ====================================
P: Power supply;
I: Input;
O: Output;
T: High impedance.
Pin Layout
----------
.. figure:: ../_static/esp32-s2_saola1_pinlayout.png
:align: center
:width: 600
:alt: ESP32-S2-Saola-1 (click to enlarge)
:figclass: align-center
Strapping Pins
--------------
Some of the GPIO's have important features during the booting process. Here is the list of the strapping pins on the `ESP32-S2`_.
==== ========= ===================================================================== ============ ==============
GPIO Default Function Pull-up Pull-down
==== ========= ===================================================================== ============ ==============
IO45 Pull-down Voltage of Internal LDO (VDD_SDIO) 1V8 3V3
IO0 Pull-up Booting Mode SPI Boot Download Boot
IO46 Pull-down Booting Mode Don't Care Download Boot
IO46 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent
==== ========= ===================================================================== ============ ==============
For more detailed information, see the `ESP32-S2`_ datasheet.
Restricted Usage GPIOS
----------------------
Some of the GPIO's are used for the external flash and PSRAM. These GPIO's cannot be used:
==== ===================
GPIO Shared Function
==== ===================
IO26 Connected to PSRAM
==== ===================
Other GPIO's are `INPUT ONLY` and cannot be used as output pin:
==== ===========================
GPIO Function
==== ===========================
IO46 GPIO46
==== ===========================
Resources
---------
* `ESP32-S2`_ (Datasheet)
* `ESP32-S2-WROVER`_ (Datasheet)
* `ESP32-S2-Saola-1`_ (Schematics)
.. _ESP32-S2: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-S2-WROVER: https://www.espressif.com/sites/default/files/documentation/esp32-s2-wrover_esp32-s2-wrover-i_datasheet_en.pdf
.. _ESP32-S2-Saola-1: https://dl.espressif.com/dl/schematics/ESP32-S2-SAOLA-1_V1.1_schematics.pdf

View File

@ -0,0 +1,106 @@
######
Boards
######
Development Boards
------------------
You will need a development board or a custom board with the ESP32 (see Supported SoC's) to start playing.
There is a bunch of different types and models widely available on the Internet. You need to choose one that covers all your requirements.
To help you on this selection, we point out some facts about choosing the proper boardsto help you to save money and time.
**One ESP32 to rule them all!**
One important information that usually bring about some confusion is regarding the different models of the ESP32 SoC and modules.
The ESP32 is divided by family:
* ESP32
* Wi-Fi and BLE
* ESP32-S
* Wi-Fi only
* ESP32-C
* Wi-Fi and BLE 5
For each family, we have SoC variants with some differentiation. The differences are more about the embedded flash and its size and the number of the cores (dual or single).
The modules use the SoC internally, including the external flash, PSRAM (in some models) and other essential electronic components. Essentially, all
modules from the same family use the same SoC.
.. figure:: ../_static/soc-module.png
:align: center
:width: 250
:alt: ESP32 SoC and Module (click to enlarge)
:figclass: align-center
**For example:**
The SoC partnumber is the ESP32-D0WD-V3 and it's the same SoC used inside of the ESP32-WROVER (with PSRAM) and ESP32-WROOM modules. This means that the
same characteristics are present in both modules' core.
For more detailed information regarding the SoC's and modules, see the `Espressif Product Selector`_.
Now that you know that the module can be different but the heart is the same, you can choose your development board.
Before buying: Keep in mind that for some "must have" features when choosing the best board for your needs:
- Embedded USB-to-Serial
- This is very convenient for programming and monitoring the logs with the terminal via USB.
- Breadboard friendly
- If you are prototyping, this will be very useful to connect your board directly on the breadboard.
- open-source/open-hardware
- Check if the schematics are available for download. This helps a lot on prototyping.
- Support
- Some of the manufacturers offer a very good level of support, with examples and demo projects.
Espressif
---------
.. figure:: ../_static/logo_espressif.png
:align: center
:width: 250
:alt: Espressif Logo
:figclass: align-center
.. toctree::
:maxdepth: 1
ESP32-DevKitC <ESP32-DevKitC-1>
ESP32-S2-Saola-1 <ESP32-S2-Saola-1>
ESP32-C3-DevKitM-1 <ESP32-C3-DevKitM-1>
Third Party
-----------
Add here the third party boards, listed by vendors.
.. note::
All the information must be provided by the vendor. If your favorite board is not here, consider
creating an `issue on GitHub <https://github.com/espressif/arduino-esp32/issues>`_ and directly
link/mention the vendor in the issue description.
Generic Vendor
**************
.. toctree::
:maxdepth: 1
Generic Board Name <generic>
.. note::
Create one file per board or one file with multiple boards. Do not add board information/description on this file.
Resources
---------
* `ESP32 Datasheet`_ (Datasheet)
* `ESP32-S2 Datasheet`_ (Datasheet)
* `ESP32-C3 Datasheet`_ (Datasheet)
.. _Espressif Systems: https://www.espressif.com
.. _Espressif Product Selector: https://products.espressif.com/
.. _ESP32 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-S2 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-C3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf

View File

@ -0,0 +1,34 @@
####################
Generic ESP32 Boards
####################
Specifications
--------------
Add here the board/kit specifications.
Header Block
------------
Header1
^^^^^^^
=== ==== ===== ===================================
No. Name Type Function
=== ==== ===== ===================================
1 3V3 P 3.3 V power supply
2 IO0 I/O GPIO0, Boot
3 5V0 P 5 V power supply
4 GND G Ground
=== ==== ===== ===================================
Pin Layout
----------
Add here the pin layout image (not required).
Resources
---------
* `ESP32`_ (Datasheet)
.. _ESP32: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf

67
docs/source/conf.py Normal file
View File

@ -0,0 +1,67 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'Arduino-ESP32'
copyright = '2021, Espressif'
author = 'Espressif'
# The full version, including alpha/beta/rc tags
release = '2.0.0'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_copybutton'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_logo = 'logo_espressif.png'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Style
# pygments_style = "sphinx"

View File

@ -0,0 +1,49 @@
###################
Contributions Guide
###################
We welcome contributions to the Arduino ESP32 project!
How to Contribute
-----------------
Contributions to the Arduino ESP32 (fixing bugs, adding features, adding documentation) are welcome.
We accept contributions via `Github Pull Requests <https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests>`_.
Before Contributing
-------------------
Before sending us a Pull Request, please consider this:
* Is the contribution entirely your own work, or is it already licensed under an LGPL 2.1 compatible Open Source License? If not, we unfortunately cannot accept it.
* Is the code adequately commented for people to understand how it is structured?
* Is there documentation or examples that go with code contributions?
* Are comments and documentation written in clear English, with no spelling or grammar errors?
* Example contributions are also welcome.
* If you are contributing by adding a new example, please use the `Arduino style guide`_.
* If the contribution contains multiple commits, are they grouped together into logical changes (one major change per pull request)? Are any commits with names like "fixed typo" `squashed into previous commits <https://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit/>`_?
If you're unsure about any of these points, please open the Pull Request anyhow and then ask us for feedback.
Pull Request Process
--------------------
After you open the Pull Request, there will probably be some discussion in the comments' field of the request itself.
Once the Pull Request is ready to merge, it will first be merged into our internal git system for in-house automated testing.
If this process passes, it will be merged onto the public github repository.
Legal Part
----------
Before a contribution can be accepted, you will need to sign our contributor-agreement. You will be prompted for this automatically as part of the Pull Request process.
.. _Arduino style guide: https://www.arduino.cc/en/Reference/StyleGuide

View File

@ -0,0 +1,92 @@
##############################
Arduino as a ESP-IDF component
##############################
ESP32 Arduino lib-builder
-------------------------
For a simplified method, see `lib-builder <lib_builder>`_.
Installation
------------
- Download and install `ESP-IDF <https://github.com/espressif/esp-idf>`_.
- Create blank idf project (from one of the examples).
- In the project folder, create a new folder called `components` and clone this repository inside the new created folder.
.. code-block:: bash
mkdir -p components && \
cd components && \
git clone https://github.com/espressif/arduino-esp32.git arduino && \
cd arduino && \
git submodule update --init --recursive && \
cd ../.. && \
idf.py menuconfig
- The `idf.py menuconfig` has some Arduino options.
- On `Autostart Arduino setup and loop on boot`.
- If you enable these options, your main.cpp should be formated like any other sketch.
.. code-block:: c
//file: main.cpp
#include "Arduino.h"
void setup(){
Serial.begin(115200);
}
void loop(){
Serial.println("loop");
delay(1000);
}
- Otherwise, you need to implement ```app_main()``` and call ```initArduino();``` in it.
Keep in mind that setup() and loop() will not be called in this case.
If you plan to base your code on examples provided in `examples <https://github.com/espressif/esp-idf/tree/master/examples>`_, please make sure to move the app_main() function in main.cpp from the files in the example.
.. code-block:: cpp
//file: main.cpp
#include "Arduino.h"
extern "C" void app_main()
{
initArduino();
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);
//do your own thing
}
- "Disable mutex locks for HAL"
- If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
- "Autoconnect WiFi on boot"
- If enabled, WiFi will start with the last known configuration
- Otherwise it will wait for WiFi.begin
- ```idf.py -p <your-board-serial-port> flash monitor``` will build, upload and open serial monitor to your board
Logging To Serial
-----------------
If you are writing code that does not require Arduino to compile and you want your `ESP_LOGx` macros to work in Arduino IDE, you can enable the compatibility by adding the following lines after:
.. code-block:: c
#ifdef ARDUINO_ARCH_ESP32
#include "esp32-hal-log.h"
#endif
FreeRTOS Tick Rate (Hz)
-----------------------
You might notice that Arduino-esp32's `delay()` function will only work in multiples of 10ms. That is because, by default, esp-idf handles task events 100 times per second.
To fix that behavior, you need to set FreeRTOS tick rate to 1000Hz in `make menuconfig` -> `Component config` -> `FreeRTOS` -> `Tick rate`.
Compilation Errors
------------------
As commits are made to esp-idf and submodules, the codebases can develop incompatibilities which cause compilation errors. If you have problems compiling, follow the instructions in `Issue #1142 <https://github.com/espressif/arduino-esp32/issues/1142>`_ to roll esp-idf back to a different version.

3
docs/source/faq.rst Normal file
View File

@ -0,0 +1,3 @@
##########################
Frequently Asked Questions
##########################

View File

@ -0,0 +1,133 @@
###############
Getting Started
###############
About Arduino ESP32
-------------------
Welcome to the Arduino ESP32 support documentation! Here you will find important information on how to use the project.
First Things First
------------------
.. note::
Before continuing, we must be clear that this project is supported by `Espressif Systems`_ and the community.
Everyone is more than welcome to contribute back to this project.
ESP32 is a single 2.4 GHz Wi-Fi-and-Bluetooth SoC (System On a Chip) designed by `Espressif Systems`_.
ESP32 is designed for mobile, wearable electronics, and Internet-of-Things (IoT) applications. It features all the state-of-the-art characteristics
of low-power chips, including fine-grained clock gating, multiple power modes,and dynamic power scaling. For instance, in a low-power IoT sensor
hub application scenario, ESP32 is woken-up periodically and only when a specified condition is detected. Low-duty cycle is used to minimize the
amount of energy that the chip expends.
The output of the power amplifier is also adjustable, thus contributing to an optimal trade-off between communication range, data rate and
power consumption.
The ESP32 series is available as a chip or module.
Supported SoC's
---------------
Here are the ESP32 series supported by the Arduino-ESP32 project:
======== ====== =========== ===================================
SoC Stable Development Datasheet
======== ====== =========== ===================================
ESP32 Yes Yes `ESP32 Datasheet`_
ESP32-S2 No Yes `ESP32-S2 Datasheet`_
ESP32-C3 No Yes `ESP32-C3 Datasheet`_
ESP32-S3 No No Not Available Yet
======== ====== =========== ===================================
See `Boards <boards/boards.html>`_ for more details about ESP32 development boards.
Arduino Core Reference
----------------------
This documentation is built on the ESP32 and we are not going to cover the common Arduino API. To see the Arduino reference documentation,
please consider reading the official documentation.
Arduino Official Documentation: `Arduino Reference`_.
Supported Operating Systems
---------------------------
+-------------------+-------------------+-------------------+
| |windows-logo| | |linux-logo| | |macos-logo| |
+-------------------+-------------------+-------------------+
| Windows | Linux | macOS |
+-------------------+-------------------+-------------------+
.. |windows-logo| image:: _static/logo_windows.png
.. |linux-logo| image:: _static/logo_linux.png
.. |macos-logo| image:: _static/logo_macos.png
See `Installing Guides <installing.html>`_ for more details on how to install the Arduino ESP32 support.
Support
-------
This is an open project and it's supported by the community. Fell free to ask for help in one of the community channels.
Community
---------
The Arduino community is huge! You can find a lot of useful content on the Internet.
Here are some community channels where you may find information and ask for some help, if needed.
- `ESP32 Forum`_: Official Espressif Forum.
- `ESP32 Forum - Arduino`_: Official Espressif Forum for Arduino related discussions.
- `ESP32 Forum - Hardware`_: Official Espressif Forum for Hardware related discussions.
- `Gitter`_
- `Espressif MCUs (Discord)`_
- `ESP32 on Reddit`_
Issues Reporting
----------------
Before opening a new issue, please read this:
Be sure to search for a similar reported issue. This avoids duplicating or creating noise in the GitHub Issues reporting.
We also have the troubleshooting guide to save your time on the most common issues reported by users.
For more details, see the `Issue Template <https://github.com/espressif/arduino-esp32/blob/master/docs/ISSUE_TEMPLATE.md>`_.
First Steps
-----------
Here are the first steps to get the Arduino ESP32 support running.
To install Arduino-ESP32, please see the dedicated section on the Installation guide. We recommend you install it using the boards manager.
.. toctree::
:maxdepth: 2
How to Install <installing>
Development Boards <boards/boards>
Examples
--------
After installing the toolchain into your environment, you will be able to see all the dedicated examples for the ESP32. These examples are located
in the examples menu or inside each library folder.
https://github.com/espressif/arduino-esp32/tree/master/libraries
Resources
---------
.. _Espressif Systems: https://www.espressif.com
.. _Espressif Product Selector: https://products.espressif.com/
.. _ESP32 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-S2 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-C3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
.. _Arduino.cc: https://www.arduino.cc/en/Main/Software
.. _Arduino Reference: https://www.arduino.cc/reference/en/
.. _ESP32 Forum: https://esp32.com
.. _ESP32 Forum - Arduino: https://esp32.com/viewforum.php?f=19
.. _ESP32 Forum - Hardware: https://esp32.com/viewforum.php?f=12
.. _Gitter: https://gitter.im/espressif/arduino-esp32
.. _Adafruit (Discord): https://discord.gg/adafruit
.. _Espressif MCUs (Discord): https://discord.gg/nKxMTnkD
.. _ESP32 on Reddit: https://www.reddit.com/r/esp32

20
docs/source/index.rst Normal file
View File

@ -0,0 +1,20 @@
#############################################
Welcome to ESP32 Arduino Core's documentation
#############################################
Here you will find all the relevant information about the project.
.. note::
This is a work in progress documentation and we will appreciate your help! We are looking for contributors!
.. toctree::
:maxdepth: 2
:caption: Contents:
Getting Started <getting_started>
Libraries <libraries>
Tutorials <tutorials/tutorials>
Advanced Utilities <advanced_utils>
FAQ <faq>
Troubleshooting <troubleshooting>
Contributing <contributing>

291
docs/source/installing.rst Normal file
View File

@ -0,0 +1,291 @@
##########
Installing
##########
This guide will show how to install the Arduino-ESP32 support.
Before Installing
-----------------
We recommend you install the support using the Boards Manager, but other options are available depending on your operating system.
To install Arduino-ESP32 support, you can use one of the following options.
Installing using Boards Manager
-------------------------------
This is the preferred and easiest way to install Arduino-ESP32.
.. note::
Currently, the support for new chips (ESP32-S2 and ESP32-C3) is in the development release. Consider installing the development release if you need to test the new supported SoC in beta.
- Stable release link::
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- Development release link::
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
.. note::
Starting with the Arduino IDE version 1.6.4, Arduino allows installation of third-party platform
packages using Boards Manager. We have packages available for Windows, macOS, and Linux (x86, amd64, armhf and arm64).
To start the installation process using the Boards Managaer, follow these steps:
- Install the current upstream Arduino IDE at the 1.8 level or later. The current version is at the `arduino.cc`_ website.
- Start Arduino and open the Preferences window.
.. figure:: _static/install_guide_preferences.png
:align: center
:width: 600
:figclass: align-center
- Enter one of the release links above into *Additional Board Manager URLs* field. You can add multiple URLs, separating them with commas.
.. figure:: _static/install_guide_boards_manager_url.png
:align: center
:width: 600
:figclass: align-center
- Open Boards Manager from Tools > Board menu and install *esp32* platform (and do not forget to select your ESP32 board from Tools > Board menu after installation).
.. figure:: _static/install_guide_boards_manager_esp32.png
:align: center
:width: 600
:figclass: align-center
- Restart Arduino IDE.
Windows
-------
Steps to install Arduino ESP32 support on Windows:
.. note::
Tested on Windows 10 32 and 64 bit machines.
**Step 1**
1. Download and install the latest Arduino IDE ``Windows Installer`` from [arduino.cc](https://www.arduino.cc/en/Main/Software)
2. Download and install Git from [git-scm.com](https://git-scm.com/download/win)
3. Start ``Git GUI`` and do the following steps:
- Select ``Clone Existing Repository``
.. figure:: _static/win-gui-1.png
:align: center
:width: 600
:figclass: align-center
- Select source and destination
- Sketchbook Directory: Usually ``C:/Users/[YOUR_USER_NAME]/Documents/Arduino`` and is listed underneath the "Sketchbook location" in Arduino preferences.
- Source Location: ``https://github.com/espressif/arduino-esp32.git``
- Target Directory: ``[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32``
- Click ``Clone`` to start cloning the repository
**Step 2**
.. figure:: _static/win-gui-2.png
:align: center
:figclass: align-center
**Step 3**
.. figure:: _static/win-gui-3.png
:align: center
:figclass: align-center
- open a `Git Bash` session pointing to ``[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32`` and execute ```git submodule update --init --recursive```
- Open ``[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools`` and double-click ``get.exe``
**Step 4**
.. figure:: _static/win-gui-4.png
:align: center
:figclass: align-center
- When ```get.exe``` finishes, you should see the following files in the directory
**Step 5**
.. figure:: _static/win-gui-5.png
:align: center
:figclass: align-center
1. Plug your ESP32 board and wait for the drivers to install (or install manually any that might be required)
2. Start Arduino IDE
3. Select your board in ``Tools > Board`` menu
4. Select the COM port that the board is attached to
5. Compile and upload (You might need to hold the boot button while uploading)
.. figure:: _static/arduino-ide.png
:align: center
:figclass: align-center
How to update to the latest code
********************************
1. Start ``Git GUI`` and you should see the repository under ``Open Recent Repository``. Click on it!
.. figure:: _static/win-gui-update-1.png
:align: center
:figclass: align-center
1. From menu ``Remote`` select ``Fetch from`` > ``origin``
.. figure:: _static/win-gui-update-2.png
:align: center
:figclass: align-center
1. Wait for git to pull any changes and close ``Git GUI``
2. Open ``[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools`` and double-click ``get.exe``
.. figure:: _static/win-gui-4.png
:align: center
:figclass: align-center
Linux
-----
Debian/Ubuntu
*************
- Install latest Arduino IDE from `arduino.cc`_.
- Open Terminal and execute the following command (copy -> paste and hit enter):
.. code-block:: bash
sudo usermod -a -G dialout $USER && \
sudo apt-get install git && \
wget https://bootstrap.pypa.io/get-pip.py && \
sudo python3 get-pip.py && \
sudo pip3 install pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python3 get.py
- Restart Arduino IDE.
- If you have Arduino installed to ~/, modify the installation as follows, beginning at `mkdir -p ~/Arduino/hardware`:
.. code-block:: bash
cd ~/Arduino/hardware
mkdir -p espressif && \
cd espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python3 get.py
Fedora
******
- Install the latest Arduino IDE from `arduino.cc`_.
.. note::
Command ``$ sudo dnf -y install arduino`` will most likely install an older release.
- Open Terminal and execute the following command (copy -> paste and hit enter):
.. code-block:: bash
sudo usermod -a -G dialout $USER && \
sudo dnf install git python3-pip python3-pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python get.py
- Restart Arduino IDE.
openSUSE
********
- Install the latest Arduino IDE from `arduino.cc`_.
- Open Terminal and execute the following command (copy -> paste and hit enter):
.. code-block:: bash
sudo usermod -a -G dialout $USER && \
if [ `python --version 2>&1 | grep '2.7' | wc -l` = "1" ]; then \
sudo zypper install git python-pip python-pyserial; \
else \
sudo zypper install git python3-pip python3-pyserial; \
fi && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32 && \
git submodule update --init --recursive && \
cd tools && \
python get.py
- Restart Arduino IDE.
macOS
-----
- Install the latest Arduino IDE from `arduino.cc`_.
- Open Terminal and execute the following command (copy -> paste and hit enter):
.. code-block:: bash
mkdir -p ~/Documents/Arduino/hardware/espressif && \
cd ~/Documents/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 --depth 1 && \
cd esp32 && \
git submodule update --init --recursive --depth 1 && \
cd tools && \
python get.py
Where ``~/Documents/Arduino`` represents your sketch book location as per "Arduino" > "Preferences" > "Sketchbook location" (in the IDE once started). Adjust the command above accordingly.
- If you get the error below, install through the command line dev tools with `xcode-select --install` and try the command above again:
.. code-block:: bash
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
- Run the command:
.. code-block:: bash
xcode-select --install
- Try ``python3`` instead of ``python`` if you get the error: ``IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)`` when running ``python get.py``
- If you get the following error when running ``python get.py`` urllib.error.URLError: <urlopen error SSL: CERTIFICATE_VERIFY_FAILED, go to Macintosh HD > Applications > Python3.6 folder (or any other python version), and run the following scripts: Install Certificates.command and Update Shell Profile.command
- Restart Arduino IDE.
PlatformIO
----------
- `What is PlatformIO? <https://docs.platformio.org/en/latest/what-is-platformio.html?utm_source=github&utm_medium=arduino-esp32>`_
- `PlatformIO IDE <https://platformio.org/platformio-ide?utm_source=github&utm_medium=arduino-esp32>`_
- `PlatformIO Core <https://docs.platformio.org/en/latest/core.html?utm_source=github&utm_medium=arduino-esp32>`_
- `Advanced usage <https://docs.platformio.org/en/latest/platforms/espressif32.html?utm_source=github&utm_medium=arduino-esp32>`_: Custom settings, uploading to SPIFFS, Over-the-Air (OTA), staging version
- `Integration with Cloud and Standalone IDEs <https://docs.platformio.org/en/latest/ide.html?utm_source=github&utm_medium=arduino-esp32>`_: Cloud9, Codeanywhere, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM, Visual Studio, and VSCode
- `Project Examples <https://docs.platformio.org/en/latest/platforms/espressif32.html?utm_source=github&utm_medium=arduino-esp32#examples>`_
.. _Arduino.cc: https://www.arduino.cc/en/Main/Software

View File

@ -0,0 +1,38 @@
###############
Library Builder
###############
How to Use Library Builder
--------------------------
Espressif has provided a `tool <https://github.com/espressif/esp32-arduino-lib-builder>`_ to simplify building your own compiled libraries for use in Arduino IDE (or your favorite IDE).
To generate custom libraries, follow these steps:
- Step 1 - Clone the ESP32 Arduino lib builder::
git clone https://github.com/espressif/esp32-arduino-lib-builder
- Step 2 - Go to the ``esp32-arduino-lib-builder`` folder::
cd esp32-arduino-lib-builder
- Step 3 - Run the ``update-components`` script::
./tools/update-components.sh`
- Step 4 - Run ``install-esp-idf`` installation script (if you already have an ``$IDF_PATH`` defined, it will use your local copy of the repository)::
./tools/install-esp-idf.sh
- Step 5 - Copy the configuration (recommended) or directly edit sdkconfig using ``idf.py menuconfig``::
cp sdkconfig.esp32s2 sdkconfig
- Step 6 - Build::
idf.py build
The script automates the process of building `Arduino as an ESP-IDF component <https://github.com/espressif/arduino-esp32/blob/master/docs/esp-idf_component.md>`_.
Once it is complete, you can cherry pick the needed libraries from ``out/tools/sdk/lib``, or run ``tools/copy-to-arduino.sh`` to copy the entire built system.
``tools/config.sh`` contains a number of variables that control the process, particularly the ``$IDF_BRANCH`` variable. You can adjust this to try building against newer versions, but there are absolutely no guarantees that any components will work or even successfully compile against a newer IDF.

17
docs/source/libraries.rst Normal file
View File

@ -0,0 +1,17 @@
#########
Libraries
#########
Here is where the Libraries API's descriptions are located.
.. toctree::
:maxdepth: 1
:caption: API's:
Bluetooth <api/bluetooth>
Deep Sleep <api/deepsleep>
ESPNOW <api/espnow>
GPIO <api/gpio>
RainMaker <api/rainmaker>
Reset Reason <api/reset_reason>
Wi-Fi <api/wifi>

6
docs/source/make.rst Normal file
View File

@ -0,0 +1,6 @@
==============
makeEspArduino
==============
The `makeEspArduino <https://github.com/plerup/makeEspArduino>`_ is a generic makefile for any ESP8266/ESP32 Arduino project.
Using it instead of the Arduino IDE makes it easier to do automated and production builds.

View File

@ -0,0 +1,76 @@
##############
OTA Web Update
##############
OTAWebUpdate is done with a web browser that can be useful in the following typical scenarios:
- Once the application developed and loading directly from Arduino IDE is inconvenient or not possible
- after deployment if user is unable to expose Firmware for OTA from external update server
- provide updates after deployment to small quantity of modules when setting an update server is not practicable
Requirements
------------
- The ESP and the computer must be connected to the same network
Implementation
--------------
The sample implementation has been done using:
- Example sketch ```OTAWebUpdater.ino```.
- ESP32 Board.
You can also use another module if it meets Flash chip size of the sketch
Before you begin, please make sure that you have the following software installed:
- Arduino IDE
- Host software depending on O/S you use
- `Avahi <http://avahi.org/>`_ for Linux
- `Bonjour <http://www.apple.com/support/bonjour/>`_ for Windows
- Mac OSX and iOS - support is already built in / no any extra s/w is required
Prepare the sketch and configuration for initial upload with a serial port
- Start Arduino IDE and load sketch OTAWebUpdater.ino available under File > Examples > OTAWebUpdater.ino
- Update ssid and pass in the sketch so the module can join your Wi-Fi network
- Open File > Preferences, look for “Show verbose output during:” and check out “compilation” option
.. figure:: _static/ota_esp32_verbose.png
:align: center
:figclass: align-center
- Upload sketch (Ctrl+U)
- Now open web browser and enter the url, i.e. http://esp32.local. Once entered, browser should display a form
.. figure:: _static/ota_esp32_login.png
:align: center
:figclass: align-center
* username = admin
* password = admin
.. note::
*If entering “http://ESP32.local” does not work, try replacing “ESP32” with modules IP address. This workaround is useful in case the host software installed does not work*.
Now click on the Login button and browser will display an upload form
.. figure:: _static/ota_esp32_upload.png
:align: center
:figclass: align-center
For Uploading the New Firmware, you need to provide the Binary File of your Code.
Exporting Binary file of the Firmware (Code)
- Open up the Arduino IDE
- Open up the Code, for Exporting up Binary file
- Now go to Sketch > export compiled Binary
.. figure:: _static/ota_export_to_binary.png
:align: center
:figclass: align-center
- Binary file is exported to the same Directory where your code is present
Once you are comfortable with this procedure, go ahead and modify OTAWebUpdater.ino sketch to print some additional messages and compile it. Then, export the new binary file and upload it using web browser to see entered changes on a Serial Monitor.

View File

@ -0,0 +1,27 @@
###############
Troubleshotting
###############
Common Issues
=============
Here are some of the most common issues around the ESP32 development using Arduino.
.. note:: Please consider contributing if you have found any issues with the solution here.
Installing
----------
Building
--------
Flashing
--------
* The board is not flashing.
Hardware
--------
* Power Source
* Bad USB cable or charging only cables

View File

@ -0,0 +1,92 @@
##############
Basic Tutorial
##############
Introduction
------------
This is the basic tutorial and should be used as template for other tutorials.
Requirements
------------
* Arduino IDE
* ESP32 Board
* Good USB Cable
Steps
-----
Here are the steps for this tutorial.
1. Open the Arduino IDE
.. figure:: ../_static/tutorials/basic/tutorial_basic_ide.png
:align: center
:width: 600
:alt: Arduino IDE (click to enlarge)
:figclass: align-center
2. Build and Flash the `blink` project.
Code
----
.. code-block:: arduino
:caption: Blink.ino
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Blink
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Log Output
----------
If the log output from the serial monitor is relevant, please add here:
.. code-block::
I (0) cpu_start: App cpu up.
I (418) cpu_start: Pro cpu start user code
I (418) cpu_start: cpu freq: 160000000
Resources
---------
* `ESP32 Datasheet`_ (Datasheet)
.. _ESP32 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf

View File

@ -0,0 +1,6 @@
###
DFU
###
.. note::
DFU is only supported by the ESP32-S2.

View File

@ -0,0 +1,121 @@
#######################
GPIO Matrix and Pin Mux
#######################
Introduction
------------
This is a basic introduction on how the peripherals work in the ESP32. This tutorial can be used to understand
how to define the peripheral usage and its corresponding pins.
In some microcontrollers' architecture, the peripherals are attached to specific pins and cannot be redefined to another one.
For example.
The *XYZ* MCU defines that the I2C peripheral SDA signal is the IO5 on the physical pin 10 and the SCL is on the IO6 and physical pin 11.
This means that, in your hardware project, you **NEED** to use these pins as the I2C and this cannot be changed due to the internal architecture.
In this case, you must be very careful during the hardware design to not make any mistake by switching the SDA and SCL connections. Firmware will not help you if you do so.
GPIO Matrix and Pin Mux
-----------------------
The ESP32 architecture includes the capability of configuring some peripherals to any of the GPIOs pins, managed by the `IO MUX GPIO`_.
Essentially, this capability means that we can route the internal peripheral into a different physical pin using the IO MUX and the GPIO Matrix.
.. figure:: ../_static/tutorials/peripherals/tutorial_peripheral_diagram.png
:align: center
:width: 600
:figclass: align-center
It means that in the scenario of the *XYZ* MCU, in the ESP32 we can use any of the GPIOs to route the SDA (input/output) and the SCL (output).
To use this functionality, we must be aware of some precautions:
* Some of the GPIOs are **INPUT** only.
* Some peripherals have output signals and must be used on GPIO's capable to be configured as **OUTPUT**.
* Some peripherals, mostly the high speed ones, ADC, DAC, Touch, and JTAG use dedicated GPIOs pins.
.. warning::
Before assigning the peripheral pins in your design, double check if the pins you're using are appropriate.
The input-only pins cannot be used for peripherals that require output or input/output signals.
The greatest advantage of this functionality is the fact that we don't need to be fully dependent on the physical pin, since we can change according to our needs.
This can facilitate the hardware design routing or in some cases, fix some pin swap mistake during the hardware design phase.
Peripherals
-----------
Here is the basic peripherals list present on the `ESP32`_. The peripheral list may vary from each ESP32 SoC family.
To see all peripherals available on the `ESP32-S2`_ and `ESP32-C3`_, check each of the datasheets.
Peripheral Table
****************
============================== ===================================
Type Function
============================== ===================================
ADC Dedicated GPIOs
DAC Dedicated GPIOs
Touch Sensor Dedicated GPIOs
JTAG Dedicated GPIOs
SD/SDIO/MMC HostController Dedicated GPIOs
Motor PWM Any GPIO
SDIO/SPI SlaveController Dedicated GPIOs
UART Any GPIO
I2C Any GPIO
I2S Any GPIO
LED PWM Any GPIO
RMT Any GPIO
GPIO Any GPIO
Parallel QSPI Dedicated GPIOs
EMAC Dedicated GPIOs
Pulse Counter Any GPIO
TWAI Any GPIO
============================== ===================================
This table is present on each datasheet provided by Espressif.
Usage Examples
--------------
In the Arduino Uno, we have the I2C pins defined by hardware, A4 is the SDA and A5 the SCL. In this case, we do not need to set
these pins in the ``Wire.begin();`` function, because they are already into the Wire library.
.. code-block:: arduino
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
}
Now, for the ESP32, the default pins for the I2C are SDA (GPIO21) and SCL (GPIO22). We can use a different pin as alternative for the
default ones if you need to change the pins.
To change the pins, we must call the ``Wire.setPins(int sda, int scl);`` function before calling ``Wire.begin();``.
.. code-block:: arduino
int sda_pin = 16; // GPIO16 as I2C SDA
int scl_pin = 17; // GPIO17 as I2C SCL
void setup()
{
Wire.setPins(sda_pin, scl_pin); // Set the I2C pins before begin
Wire.begin(); // join i2c bus (address optional for master)
}
A similar approach also applies for the other peripherals.
Resources
---------
* `ESP32`_ (Datasheet)
* `ESP32-S2`_ (Datasheet)
* `ESP32-C3`_ (Datasheet)
.. _Espressif Systems: https://www.espressif.com
.. _Espressif Product Selector: https://products.espressif.com/
.. _ESP32: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
.. _ESP32-S2: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf
.. _ESP32-C3: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
.. _IO MUX GPIO: https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf#iomuxgpio

View File

@ -0,0 +1,11 @@
#########
Tutorials
#########
.. toctree::
:maxdepth: 2
:caption: Tutorials:
Basic <basic>
DFU <dfu>
GPIO Matrix and Pin Mux <io_mux>

View File

@ -1,5 +1,5 @@
name=ArduinoOTA
version=1.0
version=2.0.0
author=Ivan Grokhotkov and Hristo Gochkov
maintainer=Hristo Gochkov <hristo@espressif.com>
sentence=Enables Over The Air upgrades, via wifi and espota.py UDP request/TCP download.

Some files were not shown because too many files have changed in this diff Show More