Compare commits

...

50 Commits

Author SHA1 Message Date
46d5afb17f Quote {build.source.path} to allow spaces in path (#4868)
Previously sketches or examples that had spaces anywhere in their absolute
path caused a total build failure. By adding quotes around the path in
platform.txt, they now build correctly

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2021-03-26 13:24:21 +02:00
66746750a4 IDF release/v3.3.5 85c43024c (#4976)
esp-face: master 420fc7e
esp32-camera: master 488c308
2021-03-26 12:56:06 +02:00
e7a2759b65 Allow STA SSID length of 32
Fixes: https://github.com/espressif/arduino-esp32/issues/3218
2021-03-23 14:30:19 +02:00
2ee66b54f0 IDF release/v3.3 c43efe150 (#4936)
esp-face: master 420fc7e
esp32-camera: master 488c308
FreeRTOS Static
2021-03-20 14:04:35 +02:00
2d3c57635d Fix: WebServer: Digest authentication failed for some clients
Ports: 4d3850e87e
2021-03-19 02:10:16 +02:00
a299ddc99e Change send_ssl_data to use size_t instead of uint16_t
Fixes: https://github.com/espressif/arduino-esp32/issues/4960
2021-03-18 15:02:37 +02:00
93bcf5f250 Allow passing custom HTTPClient to HTTPUpdate (#4959)
This enables customizing HTTP headers which adds some extra flexibility.
This does not break anything of course because this change introduces a new constructor with a new additional HTTPClient argument for HTTPUpdate class.
2021-03-18 13:12:57 +02:00
bd41334265 Fix ETH not enabling DHCP when configured with INADDR_NONE
Fixes: https://github.com/espressif/arduino-esp32/issues/4778
2021-03-18 00:53:53 +02:00
9a0762ad2a [BLE Client] Fix Deadlock when calling writeValue after registerForNotify
Fixes: https://github.com/espressif/arduino-esp32/issues/4952
2021-03-17 18:46:55 +02:00
a451c9ef0d Fix HTTPClient crash on GET() for url with redirects
Fixes: https://github.com/espressif/arduino-esp32/issues/4931
2021-03-16 21:28:19 +02:00
d362e1ee1a [BLE] Allows you to specify which channels are used to advertise. (#4954)
In some use cases getting rssi signal from one channel is more stable (less variance) than rssi from the three advertising channels.

This change allows you to specify which channels are used to advertise.
2021-03-16 11:56:23 +02:00
33d9f4aa19 Update GitHub Pages Builder
Add some debug and allow building from a branch named `pages`
2021-03-16 02:48:17 +02:00
63c51d51fb Update HTTPUpdate.cpp (#4942)
This is a mirror of a change in esp8266 needed to update with a url that redirects.
2021-03-16 02:14:53 +02:00
5b845272ed Fix BluetoothSerial TX Stall
Fixes: https://github.com/espressif/arduino-esp32/issues/4949
2021-03-16 02:11:59 +02:00
5da4a47bdf Update debian_ubuntu.md (#4907)
* Update debian_ubuntu.md

ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/2.7/get-pip.py instead.

* Update debian_ubuntu.md

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2021-03-15 13:22:34 +02:00
3253de8792 added scan_method = WIFI_ALL_CHANNEL_SCAN into wifi config in WiFi.begin() to let the scan choose the nearest / strongest AP in case that there are multiple APs with the same SSID (#4947)
In case you have multiple APs with the same SSID/password and WiFi.begin(ssid, pwd) is called, ESP32 defaults to connect to THE FIRST AP FOUND matching ssid - according to:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html#_CPPv418wifi_scan_method_t

This can cause situations that ESP32 is trying to connect to AP which is far away from it (weak signal) even there is AP close to it, just as in my house - I have AP on channel 6 which is in the 1st floor (quite far from room where I do the programming) and AP on channel 13 in the same room I do the programming (which is in the 2nd floor) - result: ESP32 is trying to connect to the AP on channel 6 because it finds it first and never try the AP on channel 13 in the same room, result of this is very unreliable WiFi connection.

When scan_method is set to WIFI_ALL_CHANNEL_SCAN, ESP32 scans all channels and choose the nearest / strongest AP (matching the ssid of course) as expected - result is no connection problems at all.

Therefore I propose adding this parameter into WiFi.begin, connection problems as described above are quite confusing (especially for beginners), I can imagine that for example Schools there are usually using mutliple APs and this can cause intermittent connection problems without obvious reason.
2021-03-15 13:21:43 +02:00
a31f30529d fix spiTransferBytesNL() writes past end of data_out
Fixes: https://github.com/espressif/arduino-esp32/issues/4935
2021-03-15 10:40:50 +02:00
35643bdd9b adds esp8266-style hostname setting (#4938)
a little step to make esp8266 code compile without changes under esp32
2021-03-15 10:10:30 +02:00
8dc70e0add Revert "Update licenses"
This reverts commit 4b3f5c8ed4.
2021-03-11 12:11:53 +02:00
b42739dfa4 Update howsmyssl.com root certificate 2021-03-10 17:55:40 +02:00
93d5b8c672 Fix String::replace()
Fixes: https://github.com/espressif/arduino-esp32/issues/4920
2021-03-10 17:13:14 +02:00
f815a7c636 Add WiFi.softAPSSID()
Fixes: https://github.com/espressif/arduino-esp32/issues/4922
2021-03-10 16:36:51 +02:00
23f6e81d52 Fix AsyncUDP reporting bad address and port
Fixes: https://github.com/espressif/arduino-esp32/issues/4923
2021-03-10 16:20:18 +02:00
e8311b00ae IDF release/v3.3 0bfff0b25 (#4895)
esp-face: master 420fc7e
esp32-camera: master 770f26a
2021-03-10 14:48:35 +02:00
4d95e3a7ea Fix BT not starting correctly and SPP Coex not working
Fixes: https://github.com/espressif/arduino-esp32/issues/4912
2021-03-09 01:56:47 +02:00
7dc769d81c Board name change (ETBoard -> ET-Board) (#4858)
Co-authored-by: ketri-kjy <jinyoung@ketri.re.kr>
Co-authored-by: ketri2484 <ketri2484@gamil.com>
Co-authored-by: me-no-dev <hristo@espressif.com>
2021-03-09 00:32:02 +02:00
4204d1e60a Handle PSRAM libs in PlatformIO build script (#4911)
This PR adds PSRAM-specific libraries to the final linker command depending on the `BOARD_HAS_PSRAM` macro.

cc @me-no-dev
2021-03-09 00:21:52 +02:00
d7fda910fb Update stale.yml (#4902)
Labels names updated. Not sure if the spaces in label's names are going to work.
2021-03-06 14:15:46 +02:00
f7fc8ab377 Use HTTP method table from ESP-IDF's nghttp (#4900)
Fixes: #4884

* Use HTTP method table from ESP-IDF's nghttp
* Parse methods using IDF's HTTP method list
* Make example's loops to allow the CPU to switch tasks
2021-03-05 13:40:52 +02:00
dd834b3372 Ensure that String::setLen() is always after any memory operation
Since `String::setLen()` is now modifying the buffer, this change is required to ensure that the proper buffer is changed.
2021-03-05 12:00:39 +02:00
0e55f775d3 Fixing issue in String::remove 2021-03-04 22:41:46 +02:00
22a488cf23 Fix String::clear() not clearing the string properly
Fixes: https://github.com/espressif/arduino-esp32/issues/4893
2021-03-04 21:20:27 +02:00
6e7cc5210d Update pins_arduino.h for FireBettle-ESP32 (#4867)
* Update pins_arduino.h

Fix the bug that the IDE show: "Error compiling for the board FireBettle-ESP32" 
Detial"error : redefinition of const uint8_t D0~D9"

* Update pins_arduino.h

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2021-03-04 17:04:18 +02:00
7a6900a1f2 Correct issue 4871 - change space to underscore in boards.txt setting lolin32-lite.build.board (#4885) 2021-03-04 15:31:23 +02:00
0e0a7565e8 Remove tools/sdk/include/nimble from include path (#4891) 2021-03-04 15:30:34 +02:00
bd3addeb8e Fixed use of Bluedroid instead of BT in HAL. (#4879)
Fixed use of CONFIG_BLUEDROID_ENABLED instead of CONFIG_BT_ENABLED in HAL. This prevented compilation with Nimble-only configuration without apparent benefit.
2021-03-01 23:55:04 +02:00
1cf1c8eb79 Fix several SD card issues (#4876)
- File might not eval to false if opened with write/append and SD is gone
- Allow card to be formatted if FAT partition was not found
- Mark card as gone in certain situations
- Fix several logic errors in low level SD API
2021-03-01 23:52:57 +02:00
3fe7c2e8cd Add div by zero check back into WMath::map (#4853)
* Add div by zero check back into WMath::map
* include esp32-hal-log.h

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2021-02-24 19:04:36 +02:00
5d00b6eb16 Fix case where EEPROM will try to return longer string than it should
Fixes: https://github.com/espressif/arduino-esp32/issues/4768
2021-02-24 18:47:11 +02:00
419ba32432 etboard pinmap upload (#4748)
Co-authored-by: ketri-kjy <jinyoung@ketri.re.kr>
Co-authored-by: ketri2484 <ketri2484@gamil.com>
2021-02-23 09:49:38 +02:00
a0ddd8a16e IDF release/v3.3 7a85334d8 (#4813)
esp-face: master 420fc7e
esp32-camera: master a5ccbec
2021-02-23 01:06:41 +02:00
b8dab5ed1a Added possibility to use ESP32-IDF log insted of redefined one (#4845)
With this PR user can select to use the original ESP-IDF log instead of the redefined one.

User can also redefine the log function as per [Logging Library](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/log.html#_CPPv419esp_log_set_vprintf14vprintf_like_t) so he can for example redirect logs to a file.

To enable this change just add -DUSE_ESP32_LOG to build flags.
User can also change the default TAG (that now is ES32) to whatever it wants adding '-DTAG="tag_value"' to build flags
2021-02-23 00:18:15 +02:00
2141313148 Fix PSRAM support (#4850) 2021-02-23 00:15:48 +02:00
44aaf13225 Added BLEAddress operator overload methods (#4839)
Allows BLEAddress to be used as key in std::map etc
2021-02-22 19:37:07 +02:00
560c0f45f5 Fix dropped SSL connection when buffer gets full. (#4820)
mbedTLS requires repeated calls to mbedtls_ssl_write() whenever it returns MBEDTLS_ERR_SSL_WANT_READ or MBEDTLS_ERR_SSL_WANT_WRITE. this happens when the client sends data faster then the server or the connection can handle.
2021-02-22 19:34:56 +02:00
4b3f5c8ed4 Update licenses 2021-02-18 12:14:35 +02:00
c282cd8f5f Remove temp buffer in WiFiClientSecure::lastError (#4822)
The temp buffer serves no purpose here. Also mbedtls_strerror can be called with size == 0 safely.
2021-02-18 11:44:44 +02:00
7e59971d2f Add Lolin32 Lite and TTGO T7 boards (#4819)
Add the Wemos Lolin32 Lite (no longer being produced same as Lolin32) and
the TTGO T7 v1.3 and v1.4 boards (status unknown). All three are rather
generic ESP32 boards the main difference being pin layouts.
2021-02-18 11:43:11 +02:00
f4b17b3033 Allow releases from different branches 2021-02-17 14:06:30 +02:00
1ab550f6f2 Changed BLE notify_callback from raw function pointer to std::function (#4737) 2021-02-16 22:10:04 +02:00
152 changed files with 1181 additions and 248 deletions

View File

@ -87,9 +87,15 @@ function git_safe_upload_to_pages(){
EVENT_JSON=`cat $GITHUB_EVENT_PATH`
echo "GITHUB_EVENT_PATH: $GITHUB_EVENT_PATH"
echo "EVENT_JSON: $EVENT_JSON"
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_added; do
if [[ $page != "README.md" && $page != "docs/"* ]]; then

View File

@ -255,17 +255,30 @@ releasesJson=`curl -sH "Authorization: token $GITHUB_TOKEN" "https://api.github.
if [ $? -ne 0 ]; then echo "ERROR: Get Releases Failed! ($?)"; exit 1; fi
set +e
prev_release=$(echo "$releasesJson" | jq -e -r '. | map(select(.draft == false and .prerelease == false)) | sort_by(.created_at | - fromdateiso8601) | .[0].tag_name')
prev_any_release=$(echo "$releasesJson" | jq -e -r '. | map(select(.draft == false)) | sort_by(.created_at | - fromdateiso8601) | .[0].tag_name')
prev_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false and .prerelease == false)) | sort_by(.published_at | - fromdateiso8601) | .[0].tag_name")
prev_any_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false)) | sort_by(.published_at | - fromdateiso8601) | .[0].tag_name")
prev_branch_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false and .prerelease == false and .target_commitish == \"$RELEASE_BRANCH\")) | sort_by(.published_at | - fromdateiso8601) | .[0].tag_name")
prev_branch_any_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false and .target_commitish == \"$RELEASE_BRANCH\")) | sort_by(.published_at | - fromdateiso8601) | .[0].tag_name")
shopt -s nocasematch
if [ "$prev_any_release" == "$RELEASE_TAG" ]; then
prev_release=$(echo "$releasesJson" | jq -e -r '. | map(select(.draft == false and .prerelease == false)) | sort_by(.created_at | - fromdateiso8601) | .[1].tag_name')
prev_any_release=$(echo "$releasesJson" | jq -e -r '. | map(select(.draft == false)) | sort_by(.created_at | - fromdateiso8601) | .[1].tag_name')
if [ "$prev_release" == "$RELEASE_TAG" ]; then
prev_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false and .prerelease == false)) | sort_by(.published_at | - fromdateiso8601) | .[1].tag_name")
fi
if [ "$prev_any_release" == "$RELEASE_TAG" ]; then
prev_any_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false)) | sort_by(.published_at | - fromdateiso8601) | .[1].tag_name")
fi
if [ "$prev_branch_release" == "$RELEASE_TAG" ]; then
prev_branch_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false and .prerelease == false and .target_commitish == \"$RELEASE_BRANCH\")) | sort_by(.published_at | - fromdateiso8601) | .[1].tag_name")
fi
if [ "$prev_branch_any_release" == "$RELEASE_TAG" ]; then
prev_branch_any_release=$(echo "$releasesJson" | jq -e -r ". | map(select(.draft == false and .target_commitish == \"$RELEASE_BRANCH\")) | sort_by(.published_at | - fromdateiso8601) | .[1].tag_name")
fi
COMMITS_SINCE_RELEASE="$prev_any_release"
shopt -u nocasematch
set -e
echo "Previous Release: $prev_release"
echo "Previous (any)release: $prev_any_release"
echo
# Merge package JSONs with previous releases
if [ ! -z "$prev_any_release" ] && [ "$prev_any_release" != "null" ]; then
echo "Merging with JSON from $prev_any_release ..."
@ -273,17 +286,12 @@ if [ ! -z "$prev_any_release" ] && [ "$prev_any_release" != "null" ]; then
fi
if [ "$RELEASE_PRE" == "false" ]; then
COMMITS_SINCE_RELEASE="$prev_release"
if [ ! -z "$prev_release" ] && [ "$prev_release" != "null" ]; then
echo "Merging with JSON from $prev_release ..."
merge_package_json "$prev_release/$PACKAGE_JSON_REL" "$OUTPUT_DIR/$PACKAGE_JSON_REL"
fi
fi
echo "Previous Release: $prev_release"
echo "Previous (any)release: $prev_any_release"
echo
# Upload package JSONs
echo "Uploading $PACKAGE_JSON_DEV ..."
echo "Download URL: "`git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
@ -328,21 +336,35 @@ if [ $arrLen > 3 ] && [ "${msgArray[0]:0:3}" == "tag" ]; then
fi
# Append Commit Messages
echo
echo "Previous Branch Release: $prev_branch_release"
echo "Previous Branch (any)release: $prev_branch_any_release"
echo
commitFile="$OUTPUT_DIR/commits.txt"
COMMITS_SINCE_RELEASE="$prev_branch_any_release"
if [ "$RELEASE_PRE" == "false" ]; then
COMMITS_SINCE_RELEASE="$prev_branch_release"
fi
if [ ! -z "$COMMITS_SINCE_RELEASE" ] && [ "$COMMITS_SINCE_RELEASE" != "null" ]; then
echo "Getting commits since $COMMITS_SINCE_RELEASE ..."
commitFile=$OUTPUT_DIR/commits.txt
git -C "$GITHUB_WORKSPACE" log --oneline "$COMMITS_SINCE_RELEASE..HEAD" > "$OUTPUT_DIR/commits.txt"
releaseNotes+=$'\r\n##### Commits\r\n'
IFS=$'\n'
for next in `cat $commitFile`
do
IFS=' ' read -r commitId commitMsg <<< "$next"
commitLine="- [$commitId](https://github.com/$GITHUB_REPOSITORY/commit/$commitId) $commitMsg"
releaseNotes+="$commitLine"
releaseNotes+=$'\r\n'
done
rm -f $commitFile
git -C "$GITHUB_WORKSPACE" log --oneline -n 500 "$COMMITS_SINCE_RELEASE..HEAD" > "$commitFile"
elif [ "$RELEASE_BRANCH" != "master" ]; then
echo "Getting all commits on branch '$RELEASE_BRANCH' ..."
git -C "$GITHUB_WORKSPACE" log --oneline -n 500 --cherry-pick --left-only --no-merges HEAD...origin/master > "$commitFile"
else
echo "Getting all commits on master ..."
git -C "$GITHUB_WORKSPACE" log --oneline -n 500 --no-merges > "$commitFile"
fi
releaseNotes+=$'\r\n##### Commits\r\n'
IFS=$'\n'
for next in `cat $commitFile`
do
IFS=' ' read -r commitId commitMsg <<< "$next"
commitLine="- [$commitId](https://github.com/$GITHUB_REPOSITORY/commit/$commitId) $commitMsg"
releaseNotes+="$commitLine"
releaseNotes+=$'\r\n'
done
rm -f $commitFile
# Prepend the original release body
if [ "${RELEASE_BODY: -1}" == $'\r' ]; then

11
.github/stale.yml vendored
View File

@ -12,12 +12,9 @@ onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- "to be implemented"
- "for reference"
- "move to PR"
- "enhancement"
- "Type: For reference"
- "Type: To be implemented"
- "Type: Feature request"
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
@ -29,7 +26,7 @@ exemptMilestones: false
exemptAssignees: false
# Label to use when marking as stale
staleLabel: stale
staleLabel: Status: Stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: >

View File

@ -4,9 +4,12 @@ on:
push:
branches:
- master
- pages
paths:
- 'README.md'
- 'docs/**'
- '.github/scripts/on-pages.sh'
- '.github/workflows/gh-pages.yml'
jobs:

View File

@ -7,6 +7,7 @@ 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

View File

@ -39,8 +39,10 @@ esp32.build.defines=
esp32.menu.PSRAM.disabled=Disabled
esp32.menu.PSRAM.disabled.build.defines=
esp32.menu.PSRAM.disabled.build.extra_libs=
esp32.menu.PSRAM.enabled=Enabled
esp32.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
esp32.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
esp32.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
esp32.menu.PartitionScheme.default.build.partitions=default
@ -174,6 +176,7 @@ esp32wrover.build.flash_mode=dio
esp32wrover.build.boot=dio
esp32wrover.build.partitions=default
esp32wrover.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
esp32wrover.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
esp32wrover.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
esp32wrover.menu.PartitionScheme.default.build.partitions=default
@ -373,8 +376,10 @@ tinypico.menu.FlashFreq.40.build.flash_freq=40m
tinypico.menu.PSRAM.enabled=Enabled
tinypico.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
tinypico.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
tinypico.menu.PSRAM.disabled=Disabled
tinypico.menu.PSRAM.disabled.build.defines=
tinypico.menu.PSRAM.disabled.build.extra_libs=
tinypico.menu.DebugLevel.none=None
tinypico.menu.DebugLevel.none.build.code_debug=0
@ -700,6 +705,238 @@ ttgo-t1.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
ttgo-t7-v13-mini32.name=TTGO T7 V1.3 Mini32
ttgo-t7-v13-mini32.upload.tool=esptool_py
ttgo-t7-v13-mini32.upload.maximum_size=1310720
ttgo-t7-v13-mini32.upload.maximum_data_size=327680
ttgo-t7-v13-mini32.upload.wait_for_upload_port=true
ttgo-t7-v13-mini32.serial.disableDTR=true
ttgo-t7-v13-mini32.serial.disableRTS=true
ttgo-t7-v13-mini32.build.mcu=esp32
ttgo-t7-v13-mini32.build.core=esp32
ttgo-t7-v13-mini32.build.variant=ttgo-t7-v13-mini32
ttgo-t7-v13-mini32.build.board=TTGO_T7_V13_Mini32
ttgo-t7-v13-mini32.build.f_cpu=240000000L
ttgo-t7-v13-mini32.build.flash_size=4MB
ttgo-t7-v13-mini32.build.flash_freq=40m
ttgo-t7-v13-mini32.build.flash_mode=dio
ttgo-t7-v13-mini32.build.boot=dio
ttgo-t7-v13-mini32.build.partitions=default
ttgo-t7-v13-mini32.build.defines=
ttgo-t7-v13-mini32.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.default.build.partitions=default
ttgo-t7-v13-mini32.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
ttgo-t7-v13-mini32.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.minimal.build.partitions=minimal
ttgo-t7-v13-mini32.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.no_ota.build.partitions=no_ota
ttgo-t7-v13-mini32.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
ttgo-t7-v13-mini32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
ttgo-t7-v13-mini32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.huge_app.build.partitions=huge_app
ttgo-t7-v13-mini32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
ttgo-t7-v13-mini32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
ttgo-t7-v13-mini32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
ttgo-t7-v13-mini32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
ttgo-t7-v13-mini32.menu.CPUFreq.240=240MHz (WiFi/BT)
ttgo-t7-v13-mini32.menu.CPUFreq.240.build.f_cpu=240000000L
ttgo-t7-v13-mini32.menu.CPUFreq.160=160MHz (WiFi/BT)
ttgo-t7-v13-mini32.menu.CPUFreq.160.build.f_cpu=160000000L
ttgo-t7-v13-mini32.menu.CPUFreq.80=80MHz (WiFi/BT)
ttgo-t7-v13-mini32.menu.CPUFreq.80.build.f_cpu=80000000L
ttgo-t7-v13-mini32.menu.CPUFreq.40=40MHz (40MHz XTAL)
ttgo-t7-v13-mini32.menu.CPUFreq.40.build.f_cpu=40000000L
ttgo-t7-v13-mini32.menu.CPUFreq.26=26MHz (26MHz XTAL)
ttgo-t7-v13-mini32.menu.CPUFreq.26.build.f_cpu=26000000L
ttgo-t7-v13-mini32.menu.CPUFreq.20=20MHz (40MHz XTAL)
ttgo-t7-v13-mini32.menu.CPUFreq.20.build.f_cpu=20000000L
ttgo-t7-v13-mini32.menu.CPUFreq.13=13MHz (26MHz XTAL)
ttgo-t7-v13-mini32.menu.CPUFreq.13.build.f_cpu=13000000L
ttgo-t7-v13-mini32.menu.CPUFreq.10=10MHz (40MHz XTAL)
ttgo-t7-v13-mini32.menu.CPUFreq.10.build.f_cpu=10000000L
ttgo-t7-v13-mini32.menu.FlashMode.qio=QIO
ttgo-t7-v13-mini32.menu.FlashMode.qio.build.flash_mode=dio
ttgo-t7-v13-mini32.menu.FlashMode.qio.build.boot=qio
ttgo-t7-v13-mini32.menu.FlashMode.dio=DIO
ttgo-t7-v13-mini32.menu.FlashMode.dio.build.flash_mode=dio
ttgo-t7-v13-mini32.menu.FlashMode.dio.build.boot=dio
ttgo-t7-v13-mini32.menu.FlashMode.qout=QOUT
ttgo-t7-v13-mini32.menu.FlashMode.qout.build.flash_mode=dout
ttgo-t7-v13-mini32.menu.FlashMode.qout.build.boot=qout
ttgo-t7-v13-mini32.menu.FlashMode.dout=DOUT
ttgo-t7-v13-mini32.menu.FlashMode.dout.build.flash_mode=dout
ttgo-t7-v13-mini32.menu.FlashMode.dout.build.boot=dout
ttgo-t7-v13-mini32.menu.FlashFreq.80=80MHz
ttgo-t7-v13-mini32.menu.FlashFreq.80.build.flash_freq=80m
ttgo-t7-v13-mini32.menu.FlashFreq.40=40MHz
ttgo-t7-v13-mini32.menu.FlashFreq.40.build.flash_freq=40m
ttgo-t7-v13-mini32.menu.FlashSize.4M=4MB (32Mb)
ttgo-t7-v13-mini32.menu.FlashSize.4M.build.flash_size=4MB
ttgo-t7-v13-mini32.menu.UploadSpeed.921600=921600
ttgo-t7-v13-mini32.menu.UploadSpeed.921600.upload.speed=921600
ttgo-t7-v13-mini32.menu.UploadSpeed.115200=115200
ttgo-t7-v13-mini32.menu.UploadSpeed.115200.upload.speed=115200
ttgo-t7-v13-mini32.menu.UploadSpeed.256000.windows=256000
ttgo-t7-v13-mini32.menu.UploadSpeed.256000.upload.speed=256000
ttgo-t7-v13-mini32.menu.UploadSpeed.230400.windows.upload.speed=256000
ttgo-t7-v13-mini32.menu.UploadSpeed.230400=230400
ttgo-t7-v13-mini32.menu.UploadSpeed.230400.upload.speed=230400
ttgo-t7-v13-mini32.menu.UploadSpeed.460800.linux=460800
ttgo-t7-v13-mini32.menu.UploadSpeed.460800.macosx=460800
ttgo-t7-v13-mini32.menu.UploadSpeed.460800.upload.speed=460800
ttgo-t7-v13-mini32.menu.UploadSpeed.512000.windows=512000
ttgo-t7-v13-mini32.menu.UploadSpeed.512000.upload.speed=512000
ttgo-t7-v13-mini32.menu.DebugLevel.none=None
ttgo-t7-v13-mini32.menu.DebugLevel.none.build.code_debug=0
ttgo-t7-v13-mini32.menu.DebugLevel.error=Error
ttgo-t7-v13-mini32.menu.DebugLevel.error.build.code_debug=1
ttgo-t7-v13-mini32.menu.DebugLevel.warn=Warn
ttgo-t7-v13-mini32.menu.DebugLevel.warn.build.code_debug=2
ttgo-t7-v13-mini32.menu.DebugLevel.info=Info
ttgo-t7-v13-mini32.menu.DebugLevel.info.build.code_debug=3
ttgo-t7-v13-mini32.menu.DebugLevel.debug=Debug
ttgo-t7-v13-mini32.menu.DebugLevel.debug.build.code_debug=4
ttgo-t7-v13-mini32.menu.DebugLevel.verbose=Verbose
ttgo-t7-v13-mini32.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
ttgo-t7-v14-mini32.name=TTGO T7 V1.4 Mini32
ttgo-t7-v14-mini32.upload.tool=esptool_py
ttgo-t7-v14-mini32.upload.maximum_size=1310720
ttgo-t7-v14-mini32.upload.maximum_data_size=327680
ttgo-t7-v14-mini32.upload.wait_for_upload_port=true
ttgo-t7-v14-mini32.serial.disableDTR=true
ttgo-t7-v14-mini32.serial.disableRTS=true
ttgo-t7-v14-mini32.build.mcu=esp32
ttgo-t7-v14-mini32.build.core=esp32
ttgo-t7-v14-mini32.build.variant=ttgo-t7-v14-mini32
ttgo-t7-v14-mini32.build.board=TTGO_T7_V14_Mini32
ttgo-t7-v14-mini32.build.f_cpu=240000000L
ttgo-t7-v14-mini32.build.flash_size=4MB
ttgo-t7-v14-mini32.build.flash_freq=40m
ttgo-t7-v14-mini32.build.flash_mode=dio
ttgo-t7-v14-mini32.build.boot=dio
ttgo-t7-v14-mini32.build.partitions=default
ttgo-t7-v14-mini32.build.defines=
ttgo-t7-v14-mini32.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.default.build.partitions=default
ttgo-t7-v14-mini32.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
ttgo-t7-v14-mini32.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.minimal.build.partitions=minimal
ttgo-t7-v14-mini32.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.no_ota.build.partitions=no_ota
ttgo-t7-v14-mini32.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
ttgo-t7-v14-mini32.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
ttgo-t7-v14-mini32.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.huge_app.build.partitions=huge_app
ttgo-t7-v14-mini32.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
ttgo-t7-v14-mini32.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
ttgo-t7-v14-mini32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
ttgo-t7-v14-mini32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
ttgo-t7-v14-mini32.menu.CPUFreq.240=240MHz (WiFi/BT)
ttgo-t7-v14-mini32.menu.CPUFreq.240.build.f_cpu=240000000L
ttgo-t7-v14-mini32.menu.CPUFreq.160=160MHz (WiFi/BT)
ttgo-t7-v14-mini32.menu.CPUFreq.160.build.f_cpu=160000000L
ttgo-t7-v14-mini32.menu.CPUFreq.80=80MHz (WiFi/BT)
ttgo-t7-v14-mini32.menu.CPUFreq.80.build.f_cpu=80000000L
ttgo-t7-v14-mini32.menu.CPUFreq.40=40MHz (40MHz XTAL)
ttgo-t7-v14-mini32.menu.CPUFreq.40.build.f_cpu=40000000L
ttgo-t7-v14-mini32.menu.CPUFreq.26=26MHz (26MHz XTAL)
ttgo-t7-v14-mini32.menu.CPUFreq.26.build.f_cpu=26000000L
ttgo-t7-v14-mini32.menu.CPUFreq.20=20MHz (40MHz XTAL)
ttgo-t7-v14-mini32.menu.CPUFreq.20.build.f_cpu=20000000L
ttgo-t7-v14-mini32.menu.CPUFreq.13=13MHz (26MHz XTAL)
ttgo-t7-v14-mini32.menu.CPUFreq.13.build.f_cpu=13000000L
ttgo-t7-v14-mini32.menu.CPUFreq.10=10MHz (40MHz XTAL)
ttgo-t7-v14-mini32.menu.CPUFreq.10.build.f_cpu=10000000L
ttgo-t7-v14-mini32.menu.FlashMode.qio=QIO
ttgo-t7-v14-mini32.menu.FlashMode.qio.build.flash_mode=dio
ttgo-t7-v14-mini32.menu.FlashMode.qio.build.boot=qio
ttgo-t7-v14-mini32.menu.FlashMode.dio=DIO
ttgo-t7-v14-mini32.menu.FlashMode.dio.build.flash_mode=dio
ttgo-t7-v14-mini32.menu.FlashMode.dio.build.boot=dio
ttgo-t7-v14-mini32.menu.FlashMode.qout=QOUT
ttgo-t7-v14-mini32.menu.FlashMode.qout.build.flash_mode=dout
ttgo-t7-v14-mini32.menu.FlashMode.qout.build.boot=qout
ttgo-t7-v14-mini32.menu.FlashMode.dout=DOUT
ttgo-t7-v14-mini32.menu.FlashMode.dout.build.flash_mode=dout
ttgo-t7-v14-mini32.menu.FlashMode.dout.build.boot=dout
ttgo-t7-v14-mini32.menu.FlashFreq.80=80MHz
ttgo-t7-v14-mini32.menu.FlashFreq.80.build.flash_freq=80m
ttgo-t7-v14-mini32.menu.FlashFreq.40=40MHz
ttgo-t7-v14-mini32.menu.FlashFreq.40.build.flash_freq=40m
ttgo-t7-v14-mini32.menu.FlashSize.4M=4MB (32Mb)
ttgo-t7-v14-mini32.menu.FlashSize.4M.build.flash_size=4MB
ttgo-t7-v14-mini32.menu.UploadSpeed.921600=921600
ttgo-t7-v14-mini32.menu.UploadSpeed.921600.upload.speed=921600
ttgo-t7-v14-mini32.menu.UploadSpeed.115200=115200
ttgo-t7-v14-mini32.menu.UploadSpeed.115200.upload.speed=115200
ttgo-t7-v14-mini32.menu.UploadSpeed.256000.windows=256000
ttgo-t7-v14-mini32.menu.UploadSpeed.256000.upload.speed=256000
ttgo-t7-v14-mini32.menu.UploadSpeed.230400.windows.upload.speed=256000
ttgo-t7-v14-mini32.menu.UploadSpeed.230400=230400
ttgo-t7-v14-mini32.menu.UploadSpeed.230400.upload.speed=230400
ttgo-t7-v14-mini32.menu.UploadSpeed.460800.linux=460800
ttgo-t7-v14-mini32.menu.UploadSpeed.460800.macosx=460800
ttgo-t7-v14-mini32.menu.UploadSpeed.460800.upload.speed=460800
ttgo-t7-v14-mini32.menu.UploadSpeed.512000.windows=512000
ttgo-t7-v14-mini32.menu.UploadSpeed.512000.upload.speed=512000
ttgo-t7-v14-mini32.menu.DebugLevel.none=None
ttgo-t7-v14-mini32.menu.DebugLevel.none.build.code_debug=0
ttgo-t7-v14-mini32.menu.DebugLevel.error=Error
ttgo-t7-v14-mini32.menu.DebugLevel.error.build.code_debug=1
ttgo-t7-v14-mini32.menu.DebugLevel.warn=Warn
ttgo-t7-v14-mini32.menu.DebugLevel.warn.build.code_debug=2
ttgo-t7-v14-mini32.menu.DebugLevel.info=Info
ttgo-t7-v14-mini32.menu.DebugLevel.info.build.code_debug=3
ttgo-t7-v14-mini32.menu.DebugLevel.debug=Debug
ttgo-t7-v14-mini32.menu.DebugLevel.debug.build.code_debug=4
ttgo-t7-v14-mini32.menu.DebugLevel.verbose=Verbose
ttgo-t7-v14-mini32.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
cw02.name=XinaBox CW02
cw02.upload.tool=esptool_py
@ -1176,8 +1413,10 @@ d32_pro.build.defines=
d32_pro.menu.PSRAM.disabled=Disabled
d32_pro.menu.PSRAM.disabled.build.defines=
d32_pro.menu.PSRAM.disabled.build.extra_libs=
d32_pro.menu.PSRAM.enabled=Enabled
d32_pro.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
d32_pro.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
d32_pro.menu.PartitionScheme.default=Default
d32_pro.menu.PartitionScheme.default.build.partitions=default
@ -1299,6 +1538,76 @@ lolin32.menu.UploadSpeed.512000.upload.speed=512000
##############################################################
lolin32-lite.name=WEMOS LOLIN32 Lite
lolin32-lite.upload.tool=esptool_py
lolin32-lite.upload.maximum_size=1310720
lolin32-lite.upload.maximum_data_size=327680
lolin32-lite.upload.wait_for_upload_port=true
lolin32-lite.serial.disableDTR=true
lolin32-lite.serial.disableRTS=true
lolin32-lite.build.mcu=esp32
lolin32-lite.build.core=esp32
lolin32-lite.build.variant=lolin32-lite
lolin32-lite.build.board=LOLIN32_LITE
lolin32-lite.build.f_cpu=240000000L
lolin32-lite.build.flash_mode=dio
lolin32-lite.build.flash_size=4MB
lolin32-lite.build.boot=dio
lolin32-lite.build.partitions=default
lolin32-lite.build.defines=
lolin32-lite.menu.FlashFreq.80=80MHz
lolin32-lite.menu.FlashFreq.80.build.flash_freq=80m
lolin32-lite.menu.FlashFreq.40=40MHz
lolin32-lite.menu.FlashFreq.40.build.flash_freq=40m
lolin32-lite.menu.PartitionScheme.default=Default
lolin32-lite.menu.PartitionScheme.default.build.partitions=default
lolin32-lite.menu.PartitionScheme.no_ota=No OTA (Large APP)
lolin32-lite.menu.PartitionScheme.no_ota.build.partitions=no_ota
lolin32-lite.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
lolin32-lite.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
lolin32-lite.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
lolin32-lite.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
lolin32-lite.menu.CPUFreq.240=240MHz (WiFi/BT)
lolin32-lite.menu.CPUFreq.240.build.f_cpu=240000000L
lolin32-lite.menu.CPUFreq.160=160MHz (WiFi/BT)
lolin32-lite.menu.CPUFreq.160.build.f_cpu=160000000L
lolin32-lite.menu.CPUFreq.80=80MHz (WiFi/BT)
lolin32-lite.menu.CPUFreq.80.build.f_cpu=80000000L
lolin32-lite.menu.CPUFreq.40=40MHz (40MHz XTAL)
lolin32-lite.menu.CPUFreq.40.build.f_cpu=40000000L
lolin32-lite.menu.CPUFreq.26=26MHz (26MHz XTAL)
lolin32-lite.menu.CPUFreq.26.build.f_cpu=26000000L
lolin32-lite.menu.CPUFreq.20=20MHz (40MHz XTAL)
lolin32-lite.menu.CPUFreq.20.build.f_cpu=20000000L
lolin32-lite.menu.CPUFreq.13=13MHz (26MHz XTAL)
lolin32-lite.menu.CPUFreq.13.build.f_cpu=13000000L
lolin32-lite.menu.CPUFreq.10=10MHz (40MHz XTAL)
lolin32-lite.menu.CPUFreq.10.build.f_cpu=10000000L
lolin32-lite.menu.UploadSpeed.921600=921600
lolin32-lite.menu.UploadSpeed.921600.upload.speed=921600
lolin32-lite.menu.UploadSpeed.115200=115200
lolin32-lite.menu.UploadSpeed.115200.upload.speed=115200
lolin32-lite.menu.UploadSpeed.256000.windows=256000
lolin32-lite.menu.UploadSpeed.256000.upload.speed=256000
lolin32-lite.menu.UploadSpeed.230400.windows.upload.speed=256000
lolin32-lite.menu.UploadSpeed.230400=230400
lolin32-lite.menu.UploadSpeed.230400.upload.speed=230400
lolin32-lite.menu.UploadSpeed.460800.linux=460800
lolin32-lite.menu.UploadSpeed.460800.macosx=460800
lolin32-lite.menu.UploadSpeed.460800.upload.speed=460800
lolin32-lite.menu.UploadSpeed.512000.windows=512000
lolin32-lite.menu.UploadSpeed.512000.upload.speed=512000
##############################################################
pocket_32.name=Dongsen Tech Pocket 32
pocket_32.upload.tool=esptool_py
@ -2566,8 +2875,10 @@ m5stack-fire.build.defines=
m5stack-fire.menu.PSRAM.enabled=Enabled
m5stack-fire.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
m5stack-fire.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
m5stack-fire.menu.PSRAM.disabled=Disabled
m5stack-fire.menu.PSRAM.disabled.build.defines=
m5stack-fire.menu.PSRAM.disabled.build.extra_libs=
m5stack-fire.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS)
m5stack-fire.menu.PartitionScheme.default.build.partitions=default_16MB
@ -2754,8 +3065,10 @@ m5stack-core2.build.defines=
m5stack-core2.menu.PSRAM.enabled=Enabled
m5stack-core2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
m5stack-core2.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
m5stack-core2.menu.PSRAM.disabled=Disabled
m5stack-core2.menu.PSRAM.disabled.build.defines=
m5stack-core2.menu.PSRAM.disabled.build.extra_libs=
m5stack-core2.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS)
m5stack-core2.menu.PartitionScheme.default.build.partitions=default_16MB
@ -2853,8 +3166,10 @@ m5stack-timer-cam.build.defines=
m5stack-timer-cam.menu.PSRAM.enabled=Enabled
m5stack-timer-cam.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
m5stack-timer-cam.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
m5stack-timer-cam.menu.PSRAM.disabled=Disabled
m5stack-timer-cam.menu.PSRAM.disabled.build.defines=
m5stack-timer-cam.menu.PSRAM.disabled.build.extra_libs=
m5stack-timer-cam.menu.PartitionScheme.default=Default(3MB No OTA/1MB SPIFFS)
m5stack-timer-cam.menu.PartitionScheme.default.build.partitions=huge_app
@ -3004,6 +3319,7 @@ odroid_esp32.build.flash_mode=dio
odroid_esp32.build.boot=dio
odroid_esp32.build.partitions=default
odroid_esp32.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
odroid_esp32.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
odroid_esp32.menu.FlashMode.qio=QIO
odroid_esp32.menu.FlashMode.qio.build.flash_mode=dio
@ -3089,8 +3405,10 @@ heltec_wifi_kit_32.build.LoRaWanDebugLevel=0
heltec_wifi_kit_32.menu.PSRAM.disabled=Disabled
heltec_wifi_kit_32.menu.PSRAM.disabled.build.defines=
heltec_wifi_kit_32.menu.PSRAM.disabled.build.extra_libs=
heltec_wifi_kit_32.menu.PSRAM.enabled=Enabled
heltec_wifi_kit_32.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wifi_kit_32.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
heltec_wifi_kit_32.menu.CPUFreq.240=240MHz (WiFi/BT)
heltec_wifi_kit_32.menu.CPUFreq.240.build.f_cpu=240000000L
@ -3153,9 +3471,11 @@ 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.psram=
heltec_wifi_lora_32.menu.PSRAM.disabled.build.defines=
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.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wifi_lora_32.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wifi_lora_32.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
heltec_wifi_lora_32.menu.CPUFreq.240=240MHz (WiFi/BT)
heltec_wifi_lora_32.menu.CPUFreq.240.build.f_cpu=240000000L
@ -3248,9 +3568,11 @@ 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.psram=
heltec_wifi_lora_32_V2.menu.PSRAM.disabled.build.defines=
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.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wifi_lora_32_V2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wifi_lora_32_V2.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
heltec_wifi_lora_32_V2.menu.CPUFreq.240=240MHz (WiFi/BT)
heltec_wifi_lora_32_V2.menu.CPUFreq.240.build.f_cpu=240000000L
@ -3343,9 +3665,11 @@ 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.psram=
heltec_wireless_stick.menu.PSRAM.disabled.build.defines=
heltec_wireless_stick.menu.PSRAM.disabled.build.extra_libs=
heltec_wireless_stick.menu.PSRAM.enabled=Enabled
heltec_wireless_stick.menu.PSRAM.enabled.build.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wireless_stick.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wireless_stick.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
heltec_wireless_stick.menu.CPUFreq.240=240MHz (WiFi/BT)
heltec_wireless_stick.menu.CPUFreq.240.build.f_cpu=240000000L
@ -3438,9 +3762,11 @@ 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.psram=
heltec_wireless_stick_lite.menu.PSRAM.disabled.build.defines=
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.psram=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wireless_stick_lite.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
heltec_wireless_stick_lite.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
heltec_wireless_stick_lite.menu.CPUFreq.240=240MHz (WiFi/BT)
heltec_wireless_stick_lite.menu.CPUFreq.240.build.f_cpu=240000000L
@ -3609,8 +3935,10 @@ CoreESP32.build.defines=
CoreESP32.menu.PSRAM.disabled=Disabled
CoreESP32.menu.PSRAM.disabled.build.defines=
CoreESP32.menu.PSRAM.disabled.build.extra_libs=
CoreESP32.menu.PSRAM.enabled=Enabled
CoreESP32.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
CoreESP32.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
CoreESP32.menu.PartitionScheme.default=Default
CoreESP32.menu.PartitionScheme.default.build.partitions=default
@ -3686,8 +4014,10 @@ alksesp32.build.defines=
alksesp32.menu.PSRAM.disabled=Disabled
alksesp32.menu.PSRAM.disabled.build.defines=
alksesp32.menu.PSRAM.disabled.build.extra_libs=
alksesp32.menu.PSRAM.enabled=Enabled
alksesp32.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
alksesp32.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
alksesp32.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
alksesp32.menu.PartitionScheme.default.build.partitions=default
@ -3971,8 +4301,10 @@ t-beam.build.partitions=default
t-beam.menu.PSRAM.disabled=Disabled
t-beam.menu.PSRAM.disabled.build.defines=
t-beam.menu.PSRAM.disabled.build.extra_libs=
t-beam.menu.PSRAM.enabled=Enabled
t-beam.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
t-beam.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
t-beam.menu.FlashFreq.80=80MHz
t-beam.menu.FlashFreq.80.build.flash_freq=80m
@ -4159,8 +4491,10 @@ lopy4.build.partitions=default
lopy4.menu.PSRAM.disabled=Disabled
lopy4.menu.PSRAM.disabled.build.defines=
lopy4.menu.PSRAM.disabled.build.extra_libs=
lopy4.menu.PSRAM.enabled=Enabled
lopy4.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
lopy4.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
lopy4.menu.FlashFreq.80=80MHz
lopy4.menu.FlashFreq.80.build.flash_freq=80m
@ -4340,8 +4674,10 @@ frogboard.build.defines=
frogboard.menu.PSRAM.disabled=Disabled
frogboard.menu.PSRAM.disabled.build.defines=
frogboard.menu.PSRAM.disabled.build.extra_libs=
frogboard.menu.PSRAM.enabled=Enabled
frogboard.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
frogboard.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
frogboard.menu.PartitionScheme.default=Default
frogboard.menu.PartitionScheme.default.build.partitions=default
@ -4424,6 +4760,7 @@ esp32cam.build.board=ESP32_DEV
esp32cam.build.flash_size=4MB
esp32cam.build.partitions=huge_app
esp32cam.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
esp32cam.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
esp32cam.build.code_debug=0
esp32cam.menu.CPUFreq.240=240MHz (WiFi/BT)
@ -4566,8 +4903,10 @@ twatch.build.defines=
twatch.menu.PSRAM.enabled=Enabled
twatch.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
twatch.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
twatch.menu.PSRAM.disabled=Disabled
twatch.menu.PSRAM.disabled.build.defines=
twatch.menu.PSRAM.disabled.build.extra_libs=
twatch.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS)
twatch.menu.PartitionScheme.default.build.partitions=default_16MB
@ -4907,8 +5246,10 @@ mgbot-iotik32a.build.defines=
mgbot-iotik32a.menu.PSRAM.disabled=Disabled
mgbot-iotik32a.menu.PSRAM.disabled.build.defines=
mgbot-iotik32a.menu.PSRAM.disabled.build.extra_libs=
mgbot-iotik32a.menu.PSRAM.enabled=Enabled
mgbot-iotik32a.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
mgbot-iotik32a.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
mgbot-iotik32a.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
mgbot-iotik32a.menu.PartitionScheme.default.build.partitions=default
@ -5045,8 +5386,10 @@ mgbot-iotik32b.build.defines=
mgbot-iotik32b.menu.PSRAM.disabled=Disabled
mgbot-iotik32b.menu.PSRAM.disabled.build.defines=
mgbot-iotik32b.menu.PSRAM.disabled.build.extra_libs=
mgbot-iotik32b.menu.PSRAM.enabled=Enabled
mgbot-iotik32b.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
mgbot-iotik32b.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
mgbot-iotik32b.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
mgbot-iotik32b.menu.PartitionScheme.default.build.partitions=default
@ -5417,8 +5760,10 @@ mPython.build.defines=
mPython.menu.PSRAM.disabled=Disabled
mPython.menu.PSRAM.disabled.build.defines=
mPython.menu.PSRAM.disabled.build.extra_libs=
mPython.menu.PSRAM.enabled=Enabled
mPython.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
mPython.menu.PSRAM.enabled.build.extra_libs=-lc-psram-workaround -lm-psram-workaround
mPython.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
mPython.menu.PartitionScheme.huge_app.build.partitions=huge_app
@ -5854,3 +6199,69 @@ healthypi4.menu.DebugLevel.debug=Debug
healthypi4.menu.DebugLevel.debug.build.code_debug=4
healthypi4.menu.DebugLevel.verbose=Verbose
healthypi4.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
ET-Board.name=ET-Board
ET-Board.upload.tool=esptool_py
ET-Board.upload.maximum_size=1310720
ET-Board.upload.maximum_data_size=327680
ET-Board.upload.wait_for_upload_port=true
ET-Board.serial.disableDTR=true
ET-Board.serial.disableRTS=true
ET-Board.build.mcu=esp32
ET-Board.build.core=esp32
ET-Board.build.variant=ET-Board
ET-Board.build.board=ET-Board
ET-Board.build.f_cpu=240000000L
ET-Board.build.flash_mode=dio
ET-Board.build.flash_size=4MB
ET-Board.build.boot=dio
ET-Board.build.partitions=default
ET-Board.build.defines=
ET-Board.menu.PartitionScheme.default=Default
ET-Board.menu.PartitionScheme.default.build.partitions=default
ET-Board.menu.PartitionScheme.no_ota=No OTA (Large APP)
ET-Board.menu.PartitionScheme.no_ota.build.partitions=no_ota
ET-Board.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
ET-Board.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
ET-Board.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
ET-Board.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
ET-Board.menu.FlashFreq.80=80MHz
ET-Board.menu.FlashFreq.80.build.flash_freq=80m
ET-Board.menu.FlashFreq.40=40MHz
ET-Board.menu.FlashFreq.40.build.flash_freq=40m
ET-Board.menu.UploadSpeed.921600=921600
ET-Board.menu.UploadSpeed.921600.upload.speed=921600
ET-Board.menu.UploadSpeed.115200=115200
ET-Board.menu.UploadSpeed.115200.upload.speed=115200
ET-Board.menu.UploadSpeed.256000.windows=256000
ET-Board.menu.UploadSpeed.256000.upload.speed=256000
ET-Board.menu.UploadSpeed.230400.windows.upload.speed=256000
ET-Board.menu.UploadSpeed.230400=230400
ET-Board.menu.UploadSpeed.230400.upload.speed=230400
ET-Board.menu.UploadSpeed.460800.linux=460800
ET-Board.menu.UploadSpeed.460800.macosx=460800
ET-Board.menu.UploadSpeed.460800.upload.speed=460800
ET-Board.menu.UploadSpeed.512000.windows=512000
ET-Board.menu.UploadSpeed.512000.upload.speed=512000
ET-Board.menu.DebugLevel.none=None
ET-Board.menu.DebugLevel.none.build.code_debug=0
ET-Board.menu.DebugLevel.error=Error
ET-Board.menu.DebugLevel.error.build.code_debug=1
ET-Board.menu.DebugLevel.warn=Warn
ET-Board.menu.DebugLevel.warn.build.code_debug=2
ET-Board.menu.DebugLevel.info=Info
ET-Board.menu.DebugLevel.info.build.code_debug=3
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

View File

@ -27,6 +27,7 @@ extern "C" {
#include <stdlib.h>
#include "esp_system.h"
}
#include "esp32-hal-log.h"
void randomSeed(unsigned long seed)
{
@ -69,7 +70,10 @@ long map(long x, long in_min, long in_max, long out_min, long out_max) {
const long dividend = out_max - out_min;
const long divisor = in_max - in_min;
const long delta = x - in_min;
if(divisor == 0){
log_e("Invalid map input range, min == max");
return -1; //AVR returns -1, SAM returns 0
}
return (delta * dividend + (divisor / 2)) / divisor + out_min;
}

View File

@ -130,9 +130,9 @@ String::~String() {
inline void String::init(void) {
setSSO(false);
setBuffer(nullptr);
setCapacity(0);
setLen(0);
setBuffer(nullptr);
}
void String::invalidate(void) {
@ -159,7 +159,7 @@ unsigned char String::changeBuffer(unsigned int maxStrLen) {
// Already using SSO, nothing to do
uint16_t oldLen = len();
setSSO(true);
setLen(oldLen);
setLen(oldLen);
return 1;
} else { // if bufptr && !isSSO()
// Using bufptr, need to shrink into sso.buff
@ -168,8 +168,8 @@ unsigned char String::changeBuffer(unsigned int maxStrLen) {
free(wbuffer());
uint16_t oldLen = len();
setSSO(true);
setLen(oldLen);
memcpy(wbuffer(), temp, maxStrLen);
setLen(oldLen);
return 1;
}
}
@ -193,8 +193,8 @@ unsigned char String::changeBuffer(unsigned int maxStrLen) {
}
setSSO(false);
setCapacity(newSize - 1);
setLen(oldLen); // Needed in case of SSO where len() never existed
setBuffer(newbuffer);
setLen(oldLen); // Needed in case of SSO where len() never existed
return 1;
}
return 0;
@ -209,8 +209,8 @@ String & String::copy(const char *cstr, unsigned int length) {
invalidate();
return *this;
}
setLen(length);
memmove(wbuffer(), cstr, length + 1);
setLen(length);
return *this;
}
@ -219,8 +219,8 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length) {
invalidate();
return *this;
}
setLen(length);
memcpy_P(wbuffer(), (PGM_P)pstr, length + 1); // We know wbuffer() cannot ever be in PROGMEM, so memcpy safe here
setLen(length);
return *this;
}
@ -250,8 +250,8 @@ void String::move(String &rhs) {
setLen(rhs.len());
rhs.setSSO(false);
rhs.setCapacity(0);
rhs.setLen(0);
rhs.setBuffer(nullptr);
rhs.setLen(0);
}
#endif
@ -744,6 +744,7 @@ void String::replace(const String& find, const String& replace) {
}
} else if(diff < 0) {
char *writeTo = wbuffer();
unsigned int l = len();
while((foundAt = strstr(readFrom, find.buffer())) != NULL) {
unsigned int n = foundAt - readFrom;
memmove(writeTo, readFrom, n);
@ -751,9 +752,10 @@ void String::replace(const String& find, const String& replace) {
memmove(writeTo, replace.buffer(), replace.len());
writeTo += replace.len();
readFrom = foundAt + find.len();
setLen(len() + diff);
l += diff;
}
memmove(writeTo, readFrom, strlen(readFrom)+1);
setLen(l);
} else {
unsigned int size = len(); // compute size needed for result
while((foundAt = strstr(readFrom, find.buffer())) != NULL) {
@ -768,7 +770,7 @@ void String::replace(const String& find, const String& replace) {
while(index >= 0 && (index = lastIndexOf(find, index)) >= 0) {
readFrom = wbuffer() + index + find.len();
memmove(readFrom + diff, readFrom, len() - (readFrom - buffer()));
int newLen = len() + diff;
int newLen = len() + diff;
memmove(wbuffer() + index, replace.buffer(), replace.len());
setLen(newLen);
wbuffer()[newLen] = 0;
@ -796,8 +798,8 @@ void String::remove(unsigned int index, unsigned int count) {
}
char *writeTo = wbuffer() + index;
unsigned int newlen = len() - count;
setLen(newlen);
memmove(writeTo, wbuffer() + index + count, newlen - index);
setLen(newlen);
wbuffer()[newlen] = 0;
}
@ -827,9 +829,9 @@ void String::trim(void) {
while(isspace(*end) && end >= begin)
end--;
unsigned int newlen = end + 1 - begin;
setLen(newlen);
if(begin > buffer())
memmove(wbuffer(), begin, newlen);
setLen(newlen);
wbuffer()[newlen] = 0;
}

View File

@ -301,9 +301,19 @@ class String {
inline unsigned int len() const { return isSSO() ? sso.len : ptr.len; }
inline unsigned int capacity() const { return isSSO() ? (unsigned int)SSOSIZE - 1 : ptr.cap; } // Size of max string not including terminal NUL
inline void setSSO(bool set) { sso.isSSO = set; }
inline void setLen(int len) { if (isSSO()) sso.len = len; else ptr.len = len; }
inline void setLen(int len) {
if (isSSO()) {
sso.len = len;
sso.buff[len] = 0;
} else {
ptr.len = len;
if (ptr.buff) {
ptr.buff[len] = 0;
}
}
}
inline void setCapacity(int cap) { if (!isSSO()) ptr.cap = cap; }
inline void setBuffer(char *buff) { if (!isSSO()) ptr.buff = buff; }
inline void setBuffer(char *buff) { if (!isSSO()) ptr.buff = buff; }
// Buffer accessor functions
inline const char *buffer() const { return (const char *)(isSSO() ? sso.buff : ptr.buff); }
inline char *wbuffer() const { return isSSO() ? const_cast<char *>(sso.buff) : ptr.buff; } // Writable version of buffer

View File

@ -18,11 +18,12 @@
bool btInUse(){ return true; }
#ifdef CONFIG_BLUEDROID_ENABLED
#include "esp_bt.h"
#ifdef CONFIG_CLASSIC_BT_ENABLED
#ifdef CONFIG_BTDM_CONTROLLER_MODE_BTDM
#define BT_MODE ESP_BT_MODE_BTDM
#elif defined(CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY)
#define BT_MODE ESP_BT_MODE_CLASSIC_BT
#else
#define BT_MODE ESP_BT_MODE_BLE
#endif
@ -79,7 +80,7 @@ bool btStop(){
return false;
}
#else
#else // CONFIG_BT_ENABLED
bool btStarted()
{
return false;
@ -94,6 +95,6 @@ bool btStop()
{
return false;
}
#endif
#endif
#endif // CONFIG_BT_ENABLED

View File

@ -0,0 +1,19 @@
#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

@ -36,6 +36,9 @@ extern "C"
#define ARDUHAL_LOG_LEVEL CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL
#else
#define ARDUHAL_LOG_LEVEL CORE_DEBUG_LEVEL
#ifdef USE_ESP_IDF_LOG
#define LOG_LOCAL_LEVEL CORE_DEBUG_LEVEL
#endif
#endif
#ifndef CONFIG_ARDUHAL_LOG_COLORS
@ -71,6 +74,8 @@ extern "C"
#define ARDUHAL_LOG_RESET_COLOR
#endif
const char * pathToFileName(const char * path);
int log_printf(const char *fmt, ...);
@ -78,55 +83,92 @@ int log_printf(const char *fmt, ...);
#define ARDUHAL_LOG_FORMAT(letter, format) ARDUHAL_LOG_COLOR_ ## letter "[" #letter "][%s:%u] %s(): " format ARDUHAL_LOG_RESET_COLOR "\r\n", pathToFileName(__FILE__), __LINE__, __FUNCTION__
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
#ifndef USE_ESP_IDF_LOG
#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 isr_log_v(format, ...) do {ets_printf(LOG_FORMAT(V, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
#define log_v(format, ...)
#define isr_log_v(format, ...)
#endif
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
#ifndef USE_ESP_IDF_LOG
#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 isr_log_d(format, ...) do {ets_printf(LOG_FORMAT(D, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
#define log_d(format, ...)
#define isr_log_d(format, ...)
#endif
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
#ifndef USE_ESP_IDF_LOG
#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 isr_log_i(format, ...) do {ets_printf(LOG_FORMAT(I, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
#define log_i(format, ...)
#define isr_log_i(format, ...)
#endif
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_WARN
#ifndef USE_ESP_IDF_LOG
#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 isr_log_w(format, ...) do {ets_printf(LOG_FORMAT(W, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
#define log_w(format, ...)
#define isr_log_w(format, ...)
#endif
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
#ifndef USE_ESP_IDF_LOG
#define log_e(format, ...) log_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
#define isr_log_e(format, ...) ets_printf(ARDUHAL_LOG_FORMAT(E, format), ##__VA_ARGS__)
#else
#define log_e(format, ...) do {log_to_esp(TAG, ESP_LOG_ERROR, format, ##__VA_ARGS__);}while(0)
#define isr_log_e(format, ...) do {ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
#define log_e(format, ...)
#define isr_log_e(format, ...)
#endif
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_NONE
#ifndef USE_ESP_IDF_LOG
#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 isr_log_n(format, ...) do {ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), TAG, ##__VA_ARGS__);}while(0)
#endif
#else
#define log_n(format, ...)
#define isr_log_n(format, ...)
#endif
#include "esp_log.h"
#ifdef USE_ESP_IDF_LOG
#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
#undef ESP_LOGE
#undef ESP_LOGW
@ -150,6 +192,7 @@ int log_printf(const char *fmt, ...);
#define ESP_EARLY_LOGD(tag, ...) isr_log_d(__VA_ARGS__)
#define ESP_EARLY_LOGV(tag, ...) isr_log_v(__VA_ARGS__)
#endif
#endif
#ifdef __cplusplus
}

View File

@ -914,8 +914,20 @@ void spiTransferBytesNL(spi_t * spi, const void * data_in, uint8_t * data_out, u
spi->dev->cmd.usr = 1;
while(spi->dev->cmd.usr);
if(result){
for (int i=0; i<c_longs; i++) {
result[i] = spi->dev->data_buf[i];
if(c_len & 3){
for (int i=0; i<(c_longs-1); i++) {
result[i] = spi->dev->data_buf[i];
}
uint32_t last_data = spi->dev->data_buf[c_longs-1];
uint8_t * last_out8 = &result[c_longs-1];
uint8_t * last_data8 = &last_data;
for (int i=0; i<(c_len & 3); i++) {
last_out8[i] = last_data8[i];
}
} else {
for (int i=0; i<c_longs; i++) {
result[i] = spi->dev->data_buf[i];
}
}
}
if(data){

View File

@ -8,8 +8,8 @@ Installation instructions for Debian / Ubuntu OS
sudo usermod -a -G dialout $USER && \
sudo apt-get install git && \
wget https://bootstrap.pypa.io/get-pip.py && \
sudo python get-pip.py && \
sudo pip install pyserial && \
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 && \

View File

@ -285,6 +285,12 @@ AsyncUDPPacket::AsyncUDPPacket(AsyncUDPPacket &packet){
_len = packet._len;
_index = 0;
memcpy(&_remoteIp, &packet._remoteIp, sizeof(ip_addr_t));
memcpy(&_localIp, &packet._localIp, sizeof(ip_addr_t));
_localPort = packet._localPort;
_remotePort = packet._remotePort;
memcpy(_remoteMac, packet._remoteMac, 6);
pbuf_ref(_pb);
}
@ -304,18 +310,18 @@ AsyncUDPPacket::AsyncUDPPacket(AsyncUDP *udp, pbuf *pb, const ip_addr_t *raddr,
_localIp.type = _remoteIp.type;
eth_hdr* eth = NULL;
udp_hdr* udphdr = reinterpret_cast<udp_hdr*>(_data - UDP_HLEN);
udp_hdr* udphdr = (udp_hdr *)(_data - UDP_HLEN);
_localPort = ntohs(udphdr->dest);
_remotePort = ntohs(udphdr->src);
if (_remoteIp.type == IPADDR_TYPE_V4) {
eth = (eth_hdr *)(((uint8_t *)(pb->payload)) - UDP_HLEN - IP_HLEN - SIZEOF_ETH_HDR);
struct ip_hdr * iphdr = (struct ip_hdr *)(((uint8_t *)(pb->payload)) - UDP_HLEN - IP_HLEN);
eth = (eth_hdr *)(_data - UDP_HLEN - IP_HLEN - SIZEOF_ETH_HDR);
struct ip_hdr * iphdr = (struct ip_hdr *)(_data - UDP_HLEN - IP_HLEN);
_localIp.u_addr.ip4.addr = iphdr->dest.addr;
_remoteIp.u_addr.ip4.addr = iphdr->src.addr;
} else {
eth = (eth_hdr *)(((uint8_t *)(pb->payload)) - UDP_HLEN - IP6_HLEN - SIZEOF_ETH_HDR);
struct ip6_hdr * ip6hdr = (struct ip6_hdr *)(((uint8_t *)(pb->payload)) - UDP_HLEN - IP6_HLEN);
eth = (eth_hdr *)(_data - UDP_HLEN - IP6_HLEN - SIZEOF_ETH_HDR);
struct ip6_hdr * ip6hdr = (struct ip6_hdr *)(_data - UDP_HLEN - IP6_HLEN);
memcpy(&_localIp.u_addr.ip6.addr, (uint8_t *)ip6hdr->dest.addr, 16);
memcpy(&_remoteIp.u_addr.ip6.addr, (uint8_t *)ip6hdr->src.addr, 16);
}

View File

@ -59,14 +59,37 @@ BLEAddress::BLEAddress(std::string stringAddress) {
* @return True if the addresses are equal.
*/
bool BLEAddress::equals(BLEAddress otherAddress) {
return memcmp(otherAddress.getNative(), m_address, 6) == 0;
return memcmp(otherAddress.getNative(), m_address, ESP_BD_ADDR_LEN) == 0;
} // equals
bool BLEAddress::operator==(const BLEAddress& otherAddress) const {
return memcmp(otherAddress.m_address, m_address, ESP_BD_ADDR_LEN) == 0;
}
bool BLEAddress::operator!=(const BLEAddress& otherAddress) const {
return !(*this == otherAddress);
}
bool BLEAddress::operator<(const BLEAddress& otherAddress) const {
return memcmp(otherAddress.m_address, m_address, ESP_BD_ADDR_LEN) < 0;
}
bool BLEAddress::operator<=(const BLEAddress& otherAddress) const {
return !(*this > otherAddress);
}
bool BLEAddress::operator>=(const BLEAddress& otherAddress) const {
return !(*this < otherAddress);
}
bool BLEAddress::operator>(const BLEAddress& otherAddress) const {
return memcmp(otherAddress.m_address, m_address, ESP_BD_ADDR_LEN) > 0;
}
/**
* @brief Return the native representation of the address.
* @return The native representation of the address.
*/
*/
esp_bd_addr_t *BLEAddress::getNative() {
return &m_address;
} // getNative

View File

@ -23,6 +23,12 @@ public:
BLEAddress(esp_bd_addr_t address);
BLEAddress(std::string stringAddress);
bool equals(BLEAddress otherAddress);
bool operator==(const BLEAddress& otherAddress) const;
bool operator!=(const BLEAddress& otherAddress) const;
bool operator<(const BLEAddress& otherAddress) const;
bool operator<=(const BLEAddress& otherAddress) const;
bool operator>(const BLEAddress& otherAddress) const;
bool operator>=(const BLEAddress& otherAddress) const;
esp_bd_addr_t* getNative();
std::string toString();

View File

@ -91,6 +91,10 @@ void BLEAdvertising::setAdvertisementType(esp_ble_adv_type_t adv_type){
m_advParams.adv_type = adv_type;
} // setAdvertisementType
void BLEAdvertising::setAdvertisementChannelMap(esp_ble_adv_channel_t channel_map) {
m_advParams.channel_map = channel_map;
} // setAdvertisementChannelMap
void BLEAdvertising::setMinInterval(uint16_t mininterval) {
m_advParams.adv_int_min = mininterval;
} // setMinInterval

View File

@ -53,6 +53,7 @@ public:
void stop();
void setAppearance(uint16_t appearance);
void setAdvertisementType(esp_ble_adv_type_t adv_type);
void setAdvertisementChannelMap(esp_ble_adv_channel_t channel_map);
void setMaxInterval(uint16_t maxinterval);
void setMinInterval(uint16_t mininterval);
void setAdvertisementData(BLEAdvertisementData& advertisementData);

View File

@ -246,6 +246,10 @@ void BLERemoteCharacteristic::gattClientEventHandler(esp_gattc_cb_event_t event,
}
break;
case ESP_GATTC_DISCONNECT_EVT:
m_semaphoreWriteCharEvt.give(1);
break;
default:
break;
} // End switch

View File

@ -11,6 +11,7 @@
#if defined(CONFIG_BT_ENABLED)
#include <string>
#include <functional>
#include <esp_gattc_api.h>
@ -21,8 +22,7 @@
class BLERemoteService;
class BLERemoteDescriptor;
typedef void (*notify_callback)(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify);
typedef std::function<void(BLERemoteCharacteristic* pBLERemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify)> notify_callback;
/**
* @brief A model of a remote %BLE characteristic.
*/

View File

@ -42,6 +42,10 @@ const char * _spp_server_name = "ESP32SPP";
#define RX_QUEUE_SIZE 512
#define TX_QUEUE_SIZE 32
#define SPP_TX_QUEUE_TIMEOUT 1000
#define SPP_TX_DONE_TIMEOUT 1000
#define SPP_CONGESTED_TIMEOUT 1000
static uint32_t _spp_client = 0;
static xQueueHandle _spp_rx_queue = NULL;
static xQueueHandle _spp_tx_queue = NULL;
@ -143,7 +147,7 @@ static esp_err_t _spp_queue_packet(uint8_t *data, size_t len){
}
packet->len = len;
memcpy(packet->data, data, len);
if (xQueueSend(_spp_tx_queue, &packet, portMAX_DELAY) != pdPASS) {
if (!_spp_tx_queue || xQueueSend(_spp_tx_queue, &packet, SPP_TX_QUEUE_TIMEOUT) != pdPASS) {
log_e("SPP TX Queue Send Failed!");
free(packet);
return ESP_FAIL;
@ -156,19 +160,25 @@ static uint8_t _spp_tx_buffer[SPP_TX_MAX];
static uint16_t _spp_tx_buffer_len = 0;
static bool _spp_send_buffer(){
if((xEventGroupWaitBits(_spp_event_group, SPP_CONGESTED, pdFALSE, pdTRUE, portMAX_DELAY) & SPP_CONGESTED) != 0){
if((xEventGroupWaitBits(_spp_event_group, SPP_CONGESTED, pdFALSE, pdTRUE, SPP_CONGESTED_TIMEOUT) & SPP_CONGESTED) != 0){
if(!_spp_client){
log_v("SPP Client Gone!");
return false;
}
log_v("SPP Write %u", _spp_tx_buffer_len);
esp_err_t err = esp_spp_write(_spp_client, _spp_tx_buffer_len, _spp_tx_buffer);
if(err != ESP_OK){
log_e("SPP Write Failed! [0x%X]", err);
return false;
}
_spp_tx_buffer_len = 0;
if(xSemaphoreTake(_spp_tx_done, portMAX_DELAY) != pdTRUE){
if(xSemaphoreTake(_spp_tx_done, SPP_TX_DONE_TIMEOUT) != pdTRUE){
log_e("SPP Ack Failed!");
return false;
}
return true;
}
log_e("SPP Write Congested!");
return false;
}
@ -194,13 +204,18 @@ static void _spp_tx_task(void * arg){
_spp_tx_buffer_len = SPP_TX_MAX;
data += to_send;
len -= to_send;
_spp_send_buffer();
if(!_spp_send_buffer()){
len = 0;
}
while(len >= SPP_TX_MAX){
memcpy(_spp_tx_buffer, data, SPP_TX_MAX);
_spp_tx_buffer_len = SPP_TX_MAX;
data += SPP_TX_MAX;
len -= SPP_TX_MAX;
_spp_send_buffer();
if(!_spp_send_buffer()){
len = 0;
break;
}
}
if(len){
memcpy(_spp_tx_buffer, data, len);
@ -235,26 +250,36 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
break;
case ESP_SPP_SRV_OPEN_EVT://Server connection open
log_i("ESP_SPP_SRV_OPEN_EVT");
if (!_spp_client){
_spp_client = param->open.handle;
if (param->srv_open.status == ESP_SPP_SUCCESS) {
log_i("ESP_SPP_SRV_OPEN_EVT: %u", _spp_client);
if (!_spp_client){
_spp_client = param->srv_open.handle;
_spp_tx_buffer_len = 0;
} else {
secondConnectionAttempt = true;
esp_spp_disconnect(param->srv_open.handle);
}
xEventGroupClearBits(_spp_event_group, SPP_DISCONNECTED);
xEventGroupSetBits(_spp_event_group, SPP_CONNECTED);
} else {
secondConnectionAttempt = true;
esp_spp_disconnect(param->open.handle);
log_e("ESP_SPP_SRV_OPEN_EVT Failed!, status:%d", param->srv_open.status);
}
xEventGroupClearBits(_spp_event_group, SPP_DISCONNECTED);
xEventGroupSetBits(_spp_event_group, SPP_CONNECTED);
break;
case ESP_SPP_CLOSE_EVT://Client connection closed
log_i("ESP_SPP_CLOSE_EVT");
if(secondConnectionAttempt) {
secondConnectionAttempt = false;
if ((param->close.async == false && param->close.status == ESP_SPP_SUCCESS) || param->close.async) {
log_i("ESP_SPP_CLOSE_EVT: %u", secondConnectionAttempt);
if(secondConnectionAttempt) {
secondConnectionAttempt = false;
} else {
_spp_client = 0;
xEventGroupSetBits(_spp_event_group, SPP_DISCONNECTED);
xEventGroupSetBits(_spp_event_group, SPP_CONGESTED);
}
xEventGroupClearBits(_spp_event_group, SPP_CONNECTED);
} else {
_spp_client = 0;
xEventGroupSetBits(_spp_event_group, SPP_DISCONNECTED);
}
xEventGroupClearBits(_spp_event_group, SPP_CONNECTED);
log_e("ESP_SPP_CLOSE_EVT failed!, status:%d", param->close.status);
}
break;
case ESP_SPP_CONG_EVT://connection congestion status changed
@ -267,11 +292,15 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
break;
case ESP_SPP_WRITE_EVT://write operation completed
if(param->write.cong){
xEventGroupClearBits(_spp_event_group, SPP_CONGESTED);
if (param->write.status == ESP_SPP_SUCCESS) {
if(param->write.cong){
xEventGroupClearBits(_spp_event_group, SPP_CONGESTED);
}
log_v("ESP_SPP_WRITE_EVT: %u %s", param->write.len, param->write.cong?"CONGESTED":"");
} else {
log_e("ESP_SPP_WRITE_EVT failed!, status:%d", param->write.status);
}
xSemaphoreGive(_spp_tx_done);//we can try to send another packet
log_v("ESP_SPP_WRITE_EVT: %u %s", param->write.len, param->write.cong?"CONGESTED":"FREE");
break;
case ESP_SPP_DATA_IND_EVT://connection received data
@ -296,6 +325,8 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
if (param->disc_comp.status == ESP_SPP_SUCCESS) {
log_i("ESP_SPP_DISCOVERY_COMP_EVT: spp connect to remote");
esp_spp_connect(ESP_SPP_SEC_AUTHENTICATE, ESP_SPP_ROLE_MASTER, param->disc_comp.scn[0], _peer_bd_addr);
} else {
log_e("ESP_SPP_DISCOVERY_COMP_EVT failed!, status:%d", param->disc_comp.status);
}
break;
@ -309,6 +340,7 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
}
xEventGroupClearBits(_spp_event_group, SPP_DISCONNECTED);
xEventGroupSetBits(_spp_event_group, SPP_CONNECTED);
xEventGroupSetBits(_spp_event_group, SPP_CONGESTED);
break;
case ESP_SPP_START_EVT://server started
@ -532,9 +564,9 @@ static bool _init_bt(const char *deviceName)
return false;
}
if (esp_bt_sleep_disable() != ESP_OK){
log_e("esp_bt_sleep_disable failed");
}
// if (esp_bt_sleep_disable() != ESP_OK){
// log_e("esp_bt_sleep_disable failed");
// }
log_i("device name set");
esp_bt_dev_set_device_name(deviceName);
@ -679,7 +711,7 @@ void BluetoothSerial::flush()
{
if (_spp_tx_queue != NULL){
while(uxQueueMessagesWaiting(_spp_tx_queue) > 0){
delay(5);
delay(100);
}
}
}

View File

@ -382,6 +382,9 @@ size_t EEPROMClass::readString (int address, char* value, size_t maxLen)
if (address + len > _size)
return 0;
if (len > maxLen)
return 0; //Maybe return part of the string instead?
memcpy((uint8_t*) value, _data + address, len);
value[len] = 0;
return len;
@ -400,7 +403,7 @@ String EEPROMClass::readString (int address)
if (address + len > _size)
return String();
char value[len];
char value[len+1];
memcpy((uint8_t*) value, _data + address, len);
value[len] = 0;
return String(value);

View File

@ -25,7 +25,7 @@ using namespace fs;
size_t File::write(uint8_t c)
{
if (!_p) {
if (!*this) {
return 0;
}
@ -34,7 +34,7 @@ size_t File::write(uint8_t c)
time_t File::getLastWrite()
{
if (!_p) {
if (!*this) {
return 0;
}
@ -43,7 +43,7 @@ time_t File::getLastWrite()
size_t File::write(const uint8_t *buf, size_t size)
{
if (!_p) {
if (!*this) {
return 0;
}
@ -52,7 +52,7 @@ size_t File::write(const uint8_t *buf, size_t size)
int File::available()
{
if (!_p) {
if (!*this) {
return false;
}
@ -61,7 +61,7 @@ int File::available()
int File::read()
{
if (!_p) {
if (!*this) {
return -1;
}
@ -75,7 +75,7 @@ int File::read()
size_t File::read(uint8_t* buf, size_t size)
{
if (!_p) {
if (!*this) {
return -1;
}
@ -84,7 +84,7 @@ size_t File::read(uint8_t* buf, size_t size)
int File::peek()
{
if (!_p) {
if (!*this) {
return -1;
}
@ -96,7 +96,7 @@ int File::peek()
void File::flush()
{
if (!_p) {
if (!*this) {
return;
}
@ -105,7 +105,7 @@ void File::flush()
bool File::seek(uint32_t pos, SeekMode mode)
{
if (!_p) {
if (!*this) {
return false;
}
@ -114,7 +114,7 @@ bool File::seek(uint32_t pos, SeekMode mode)
size_t File::position() const
{
if (!_p) {
if (!*this) {
return 0;
}
@ -123,7 +123,7 @@ size_t File::position() const
size_t File::size() const
{
if (!_p) {
if (!*this) {
return 0;
}
@ -140,12 +140,12 @@ void File::close()
File::operator bool() const
{
return !!_p;
return _p != nullptr && *_p != false;
}
const char* File::name() const
{
if (!_p) {
if (!*this) {
return nullptr;
}
@ -155,7 +155,7 @@ const char* File::name() const
//to implement
boolean File::isDirectory(void)
{
if (!_p) {
if (!*this) {
return false;
}
return _p->isDirectory();
@ -163,7 +163,7 @@ boolean File::isDirectory(void)
File File::openNextFile(const char* mode)
{
if (!_p) {
if (!*this) {
return File();
}
return _p->openNextFile(mode);
@ -171,7 +171,7 @@ File File::openNextFile(const char* mode)
void File::rewindDirectory(void)
{
if (!_p) {
if (!*this) {
return;
}
_p->rewindDirectory();

View File

@ -109,6 +109,12 @@ HTTPClient::~HTTPClient()
if(_currentHeaders) {
delete[] _currentHeaders;
}
if(_tcpDeprecated) {
_tcpDeprecated.reset(nullptr);
}
if(_transportTraits) {
_transportTraits.reset(nullptr);
}
}
void HTTPClient::clear()
@ -284,7 +290,7 @@ bool HTTPClient::beginInternal(String url, const char* expectedProtocol)
}
_host = the_host;
_uri = url;
log_d("host: %s port: %d url: %s", _host.c_str(), _port, _uri.c_str());
log_d("protocol: %s, host: %s port: %d url: %s", _protocol.c_str(), _host.c_str(), _port, _uri.c_str());
return true;
}
@ -376,19 +382,19 @@ void HTTPClient::disconnect(bool preserveClient)
}
if(_reuse && _canReuse) {
log_d("tcp keep open for reuse\n");
log_d("tcp keep open for reuse");
} else {
log_d("tcp stop\n");
log_d("tcp stop");
_client->stop();
if(!preserveClient) {
_client = nullptr;
}
#ifdef HTTPCLIENT_1_1_COMPATIBLE
if(_tcpDeprecated) {
_transportTraits.reset(nullptr);
_tcpDeprecated.reset(nullptr);
}
if(_tcpDeprecated) {
_transportTraits.reset(nullptr);
_tcpDeprecated.reset(nullptr);
}
#endif
}
}
} else {
log_d("tcp is closed\n");

View File

@ -35,11 +35,13 @@
HTTPUpdate::HTTPUpdate(void)
: _httpClientTimeout(8000), _ledPin(-1)
{
_followRedirects = HTTPC_DISABLE_FOLLOW_REDIRECTS;
}
HTTPUpdate::HTTPUpdate(int httpClientTimeout)
: _httpClientTimeout(httpClientTimeout), _ledPin(-1)
{
_followRedirects = HTTPC_DISABLE_FOLLOW_REDIRECTS;
}
HTTPUpdate::~HTTPUpdate(void)
@ -56,6 +58,11 @@ HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& url, const
return handleUpdate(http, currentVersion, false);
}
HTTPUpdateResult HTTPUpdate::updateSpiffs(HTTPClient& httpClient, const String& currentVersion)
{
return handleUpdate(httpClient, currentVersion, true);
}
HTTPUpdateResult HTTPUpdate::updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion)
{
HTTPClient http;
@ -66,6 +73,12 @@ HTTPUpdateResult HTTPUpdate::updateSpiffs(WiFiClient& client, const String& url,
return handleUpdate(http, currentVersion, true);
}
HTTPUpdateResult HTTPUpdate::update(HTTPClient& httpClient,
const String& currentVersion)
{
return handleUpdate(httpClient, currentVersion, false);
}
HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& host, uint16_t port, const String& uri,
const String& currentVersion)
{
@ -175,6 +188,7 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient& http, const String& curren
// use HTTP/1.0 for update since the update handler not support any transfer Encoding
http.useHTTP10(true);
http.setTimeout(_httpClientTimeout);
http.setFollowRedirects(_followRedirects);
http.setUserAgent("ESP32-http-Update");
http.addHeader("Cache-Control", "no-cache");
http.addHeader("x-ESP32-STA-MAC", WiFi.macAddress());

View File

@ -63,6 +63,15 @@ public:
{
_rebootOnUpdate = reboot;
}
/**
* set redirect follow mode. See `followRedirects_t` enum for avaliable modes.
* @param follow
*/
void setFollowRedirects(followRedirects_t follow)
{
_followRedirects = follow;
}
void setLedPin(int ledPin = -1, uint8_t ledOn = HIGH)
{
@ -77,6 +86,10 @@ public:
t_httpUpdate_return updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion = "");
t_httpUpdate_return update(HTTPClient& httpClient,
const String& currentVersion = "");
t_httpUpdate_return updateSpiffs(HTTPClient &httpClient, const String &currentVersion = "");
int getLastError(void);
String getLastErrorString(void);
@ -89,6 +102,7 @@ protected:
bool _rebootOnUpdate = true;
private:
int _httpClientTimeout;
followRedirects_t _followRedirects;
int _ledPin;
uint8_t _ledOn;

View File

@ -22,7 +22,7 @@ using namespace fs;
SDFS::SDFS(FSImplPtr impl): FS(impl), _pdrv(0xFF) {}
bool SDFS::begin(uint8_t ssPin, SPIClass &spi, uint32_t frequency, const char * mountpoint, uint8_t max_files)
bool SDFS::begin(uint8_t ssPin, SPIClass &spi, uint32_t frequency, const char * mountpoint, uint8_t max_files, bool format_if_empty)
{
if(_pdrv != 0xFF) {
return true;
@ -35,7 +35,7 @@ bool SDFS::begin(uint8_t ssPin, SPIClass &spi, uint32_t frequency, const char *
return false;
}
if(!sdcard_mount(_pdrv, mountpoint, max_files)){
if(!sdcard_mount(_pdrv, mountpoint, max_files, format_if_empty)){
sdcard_unmount(_pdrv);
sdcard_uninit(_pdrv);
_pdrv = 0xFF;

View File

@ -28,7 +28,7 @@ protected:
public:
SDFS(FSImplPtr impl);
bool begin(uint8_t ssPin=SS, SPIClass &spi=SPI, uint32_t frequency=4000000, const char * mountpoint="/sd", uint8_t max_files=5);
bool begin(uint8_t ssPin=SS, SPIClass &spi=SPI, uint32_t frequency=4000000, const char * mountpoint="/sd", uint8_t max_files=5, bool format_if_empty=false);
void end();
sdcard_type_t cardType();
uint64_t cardSize();

View File

@ -59,6 +59,31 @@ typedef struct {
static ardu_sdcard_t* s_cards[FF_VOLUMES] = { NULL };
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_ERROR
const char * fferr2str[] = {
"(0) Succeeded",
"(1) A hard error occurred in the low level disk I/O layer",
"(2) Assertion failed",
"(3) The physical drive cannot work",
"(4) Could not find the file",
"(5) Could not find the path",
"(6) The path name format is invalid",
"(7) Access denied due to prohibited access or directory full",
"(8) Access denied due to prohibited access",
"(9) The file/directory object is invalid",
"(10) The physical drive is write protected",
"(11) The logical drive number is invalid",
"(12) The volume has no work area",
"(13) There is no valid FAT volume",
"(14) The f_mkfs() aborted due to any problem",
"(15) Could not get a grant to access the volume within defined period",
"(16) The operation is rejected according to the file sharing policy",
"(17) LFN working buffer could not be allocated",
"(18) Number of open files > FF_FS_LOCK",
"(19) Given parameter is invalid"
};
#endif
/*
* SD SPI
* */
@ -72,6 +97,9 @@ bool sdWait(uint8_t pdrv, int timeout)
resp = s_cards[pdrv]->spi->transfer(0xFF);
} while (resp == 0x00 && (millis() - start) < (unsigned int)timeout);
if (!resp) {
log_w("Wait Failed");
}
return (resp > 0x00);
}
@ -90,7 +118,10 @@ bool sdSelectCard(uint8_t pdrv)
{
ardu_sdcard_t * card = s_cards[pdrv];
digitalWrite(card->ssPin, LOW);
sdWait(pdrv, 300);
bool s = sdWait(pdrv, 300);
if (!s) {
log_e("Select Failed");
}
return true;
}
@ -104,10 +135,11 @@ char sdCommand(uint8_t pdrv, char cmd, unsigned int arg, unsigned int* resp)
token = sdCommand(pdrv, APP_CMD, 0, NULL);
sdDeselectCard(pdrv);
if (token > 1) {
return token;
break;
}
if(!sdSelectCard(pdrv)) {
return 0xFF;
token = 0xFF;
break;
}
}
@ -158,7 +190,10 @@ char sdCommand(uint8_t pdrv, char cmd, unsigned int arg, unsigned int* resp)
break;
}
if (token == 0xFF) {
log_e("Card Failed! cmd: 0x%02x", cmd);
card->status = STA_NOINIT;
}
return token;
}
@ -214,7 +249,7 @@ bool sdReadSector(uint8_t pdrv, char* buffer, unsigned long long sector)
{
for (int f = 0; f < 3; f++) {
if(!sdSelectCard(pdrv)) {
break;
return false;
}
if (!sdCommand(pdrv, READ_BLOCK_SINGLE, (s_cards[pdrv]->type == CARD_SDHC) ? sector : sector << 9, NULL)) {
bool success = sdReadBytes(pdrv, buffer, 512);
@ -234,7 +269,7 @@ bool sdReadSectors(uint8_t pdrv, char* buffer, unsigned long long sector, int co
{
for (int f = 0; f < 3;) {
if(!sdSelectCard(pdrv)) {
break;
return false;
}
if (!sdCommand(pdrv, READ_BLOCK_MULTIPLE, (s_cards[pdrv]->type == CARD_SDHC) ? sector : sector << 9, NULL)) {
@ -270,7 +305,7 @@ bool sdWriteSector(uint8_t pdrv, const char* buffer, unsigned long long sector)
{
for (int f = 0; f < 3; f++) {
if(!sdSelectCard(pdrv)) {
break;
return false;
}
if (!sdCommand(pdrv, WRITE_BLOCK_SINGLE, (s_cards[pdrv]->type == CARD_SDHC) ? sector : sector << 9, NULL)) {
char token = sdWriteBytes(pdrv, buffer, 0xFE);
@ -306,12 +341,12 @@ bool sdWriteSectors(uint8_t pdrv, const char* buffer, unsigned long long sector,
for (int f = 0; f < 3;) {
if (card->type != CARD_MMC) {
if (sdTransaction(pdrv, SET_WR_BLK_ERASE_COUNT, currentCount, NULL)) {
break;
return false;
}
}
if(!sdSelectCard(pdrv)) {
break;
return false;
}
if (!sdCommand(pdrv, WRITE_BLOCK_MULTIPLE, (card->type == CARD_SDHC) ? currentSector : currentSector << 9, NULL)) {
@ -343,9 +378,8 @@ bool sdWriteSectors(uint8_t pdrv, const char* buffer, unsigned long long sector,
break;
}
sdDeselectCard(pdrv);
if (token == 0x0A) {
sdDeselectCard(pdrv);
unsigned int writtenBlocks = 0;
if (card->type != CARD_MMC && sdSelectCard(pdrv)) {
if (!sdCommand(pdrv, SEND_NUM_WR_BLOCKS, 0, NULL)) {
@ -364,7 +398,7 @@ bool sdWriteSectors(uint8_t pdrv, const char* buffer, unsigned long long sector,
currentCount = count - writtenBlocks;
continue;
} else {
return false;
break;
}
}
} else {
@ -379,7 +413,7 @@ unsigned long sdGetSectorsCount(uint8_t pdrv)
{
for (int f = 0; f < 3; f++) {
if(!sdSelectCard(pdrv)) {
break;
return false;
}
if (!sdCommand(pdrv, SEND_CSD, 0, NULL)) {
@ -713,7 +747,7 @@ uint8_t sdcard_unmount(uint8_t pdrv)
return 0;
}
bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files)
bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files, bool format_if_empty)
{
ardu_sdcard_t * card = s_cards[pdrv];
if(pdrv >= FF_VOLUMES || card == NULL){
@ -738,9 +772,25 @@ bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files)
FRESULT res = f_mount(fs, drv, 1);
if (res != FR_OK) {
log_e("f_mount failed 0x(%x)", res);
esp_vfs_fat_unregister_path(path);
return false;
log_e("f_mount failed: %s", fferr2str[res]);
if(res == 13 && format_if_empty){
BYTE work[FF_MAX_SS];
res = f_mkfs(drv, FM_ANY, 0, work, sizeof(work));
if (res != FR_OK) {
log_e("f_mkfs failed: %s", fferr2str[res]);
esp_vfs_fat_unregister_path(path);
return false;
}
res = f_mount(fs, drv, 1);
if (res != FR_OK) {
log_e("f_mount failed: %s", fferr2str[res]);
esp_vfs_fat_unregister_path(path);
return false;
}
} else {
esp_vfs_fat_unregister_path(path);
return false;
}
}
AcquireSPI lock(card);
card->sectors = sdGetSectorsCount(pdrv);

View File

@ -21,7 +21,7 @@
uint8_t sdcard_init(uint8_t cs, SPIClass * spi, int hz);
uint8_t sdcard_uninit(uint8_t pdrv);
bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files);
bool sdcard_mount(uint8_t pdrv, const char* path, uint8_t max_files, bool format_if_empty);
uint8_t sdcard_unmount(uint8_t pdrv);
sdcard_type_t sdcard_type(uint8_t pdrv);

View File

@ -35,7 +35,7 @@ SDMMCFS::SDMMCFS(FSImplPtr impl)
: FS(impl), _card(NULL)
{}
bool SDMMCFS::begin(const char * mountpoint, bool mode1bit)
bool SDMMCFS::begin(const char * mountpoint, bool mode1bit, bool format_if_mount_failed)
{
if(_card) {
return true;
@ -68,7 +68,7 @@ bool SDMMCFS::begin(const char * mountpoint, bool mode1bit)
}
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
.format_if_mount_failed = false,
.format_if_mount_failed = format_if_mount_failed,
.max_files = 5,
.allocation_unit_size = 0
};

View File

@ -28,7 +28,7 @@ protected:
public:
SDMMCFS(FSImplPtr impl);
bool begin(const char * mountpoint="/sdcard", bool mode1bit=false);
bool begin(const char * mountpoint="/sdcard", bool mode1bit=false, bool format_if_mount_failed=false);
void end();
sdcard_type_t cardType();
uint64_t cardSize();

View File

@ -125,6 +125,7 @@ void setup(void) {
void loop(void) {
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}
void drawGraph() {

View File

@ -300,4 +300,5 @@ void setup(void) {
void loop(void) {
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -70,4 +70,5 @@ void setup(void) {
void loop(void) {
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -56,4 +56,5 @@ void setup() {
void loop() {
ArduinoOTA.handle();
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -38,4 +38,5 @@ void setup() {
void loop() {
ArduinoOTA.handle();
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -53,4 +53,5 @@ void setup(void) {
void loop(void) {
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -310,4 +310,5 @@ void setup(void) {
void loop(void) {
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -129,4 +129,5 @@ void setup(void) {
void loop(void) {
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -65,5 +65,5 @@ void setup(void) {
void loop(void) {
server.handleClient();
delay(1);
delay(2);//allow the cpu to switch to other tasks
}

View File

@ -1,15 +1,9 @@
#ifndef _HTTP_Method_H_
#define _HTTP_Method_H_
typedef enum {
HTTP_GET = 0b00000001,
HTTP_POST = 0b00000010,
HTTP_DELETE = 0b00000100,
HTTP_PUT = 0b00001000,
HTTP_PATCH = 0b00010000,
HTTP_HEAD = 0b00100000,
HTTP_OPTIONS = 0b01000000,
HTTP_ANY = 0b01111111,
} HTTPMethod;
#include "http_parser.h"
typedef enum http_method HTTPMethod;
#define HTTP_ANY (HTTPMethod)(255)
#endif /* _HTTP_Method_H_ */

View File

@ -30,6 +30,14 @@
#define WEBSERVER_MAX_POST_ARGS 32
#endif
#define __STR(a) #a
#define _STR(a) __STR(a)
const char * _http_method_str[] = {
#define XX(num, name, string) _STR(name),
HTTP_METHOD_MAP(XX)
#undef XX
};
static const char Content_Type[] PROGMEM = "Content-Type";
static const char filename[] PROGMEM = "filename";
@ -96,17 +104,17 @@ bool WebServer::_parseRequest(WiFiClient& client) {
_currentUri = url;
_chunked = false;
HTTPMethod method = HTTP_GET;
if (methodStr == F("POST")) {
method = HTTP_POST;
} else if (methodStr == F("DELETE")) {
method = HTTP_DELETE;
} else if (methodStr == F("OPTIONS")) {
method = HTTP_OPTIONS;
} else if (methodStr == F("PUT")) {
method = HTTP_PUT;
} else if (methodStr == F("PATCH")) {
method = HTTP_PATCH;
HTTPMethod method = HTTP_ANY;
size_t num_methods = sizeof(_http_method_str) / sizeof(const char *);
for (size_t i=0; i<num_methods; i++) {
if (methodStr == _http_method_str[i]) {
method = (HTTPMethod)i;
break;
}
}
if (method == HTTP_ANY) {
log_e("Unknown HTTP Method: %s", methodStr.c_str());
return false;
}
_currentMethod = method;

View File

@ -33,7 +33,8 @@
static const char AUTHORIZATION_HEADER[] = "Authorization";
static const char qop_auth[] = "qop=\"auth\"";
static const char qop_auth[] PROGMEM = "qop=auth";
static const char qop_auth_quoted[] PROGMEM = "qop=\"auth\"";
static const char WWW_Authenticate[] = "WWW-Authenticate";
static const char Content_Length[] = "Content-Length";
@ -185,7 +186,7 @@ bool WebServer::authenticate(const char * username, const char * password){
}
// parameters for the RFC 2617 newer Digest
String _nc,_cnonce;
if(authReq.indexOf(FPSTR(qop_auth)) != -1) {
if(authReq.indexOf(FPSTR(qop_auth)) != -1 || authReq.indexOf(FPSTR(qop_auth_quoted)) != -1) {
_nc = _extractParam(authReq, F("nc="), ',');
_cnonce = _extractParam(authReq, F("cnonce=\""),'\"');
}
@ -205,7 +206,7 @@ bool WebServer::authenticate(const char * username, const char * password){
}
log_v("Hash of GET:uri=%s", _H2.c_str());
String _responsecheck = "";
if(authReq.indexOf(FPSTR(qop_auth)) != -1) {
if(authReq.indexOf(FPSTR(qop_auth)) != -1 || authReq.indexOf(FPSTR(qop_auth_quoted)) != -1) {
_responsecheck = md5str(_H1 + ':' + _nonce + ':' + _nc + ':' + _cnonce + F(":auth:") + _H2);
} else {
_responsecheck = md5str(_H1 + ':' + _nonce + ':' + _H2);

View File

@ -118,7 +118,7 @@ bool ETHClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, I
esp_err_t err = ESP_OK;
tcpip_adapter_ip_info_t info;
if(local_ip != (uint32_t)0x00000000){
if(local_ip != (uint32_t)0x00000000 && local_ip != INADDR_NONE){
info.ip.addr = static_cast<uint32_t>(local_ip);
info.gw.addr = static_cast<uint32_t>(gateway);
info.netmask.addr = static_cast<uint32_t>(subnet);
@ -153,13 +153,13 @@ bool ETHClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, I
ip_addr_t d;
d.type = IPADDR_TYPE_V4;
if(dns1 != (uint32_t)0x00000000) {
if(dns1 != (uint32_t)0x00000000 && dns1 != INADDR_NONE) {
// Set DNS1-Server
d.u_addr.ip4.addr = static_cast<uint32_t>(dns1);
dns_setserver(0, &d);
}
if(dns2 != (uint32_t)0x00000000) {
if(dns2 != (uint32_t)0x00000000 && dns2 != INADDR_NONE) {
// Set DNS2-Server
d.u_addr.ip4.addr = static_cast<uint32_t>(dns2);
dns_setserver(1, &d);

View File

@ -137,6 +137,21 @@ bool WiFiAPClass::softAP(const char* ssid, const char* passphrase, int channel,
return true;
}
/**
* Return the current SSID associated with the network
* @return SSID
*/
String WiFiAPClass::softAPSSID() const
{
if(WiFiGenericClass::getMode() == WIFI_MODE_NULL){
return String();
}
wifi_config_t info;
if(!esp_wifi_get_config(WIFI_IF_AP, &info)) {
return String(reinterpret_cast<char*>(info.ap.ssid));
}
return String();
}
/**
* Configure access point
@ -189,7 +204,7 @@ bool WiFiAPClass::softAPdisconnect(bool wifioff)
wifi_config_t conf;
if(WiFiGenericClass::getMode() == WIFI_MODE_NULL){
return ESP_ERR_INVALID_STATE;
return false;
}
*conf.ap.ssid = 0;

View File

@ -58,6 +58,8 @@ public:
uint8_t* softAPmacAddress(uint8_t* mac);
String softAPmacAddress(void);
String softAPSSID(void) const;
protected:
};

View File

@ -121,7 +121,7 @@ wl_status_t WiFiSTAClass::begin(const char* ssid, const char *passphrase, int32_
return WL_CONNECT_FAILED;
}
if(!ssid || *ssid == 0x00 || strlen(ssid) > 31) {
if(!ssid || *ssid == 0x00 || strlen(ssid) > 32) {
log_e("SSID too long or missing!");
return WL_CONNECT_FAILED;
}
@ -134,6 +134,7 @@ wl_status_t WiFiSTAClass::begin(const char* ssid, const char *passphrase, int32_
wifi_config_t conf;
memset(&conf, 0, sizeof(wifi_config_t));
strcpy(reinterpret_cast<char*>(conf.sta.ssid), ssid);
conf.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; //force full scan to be able to choose the nearest / strongest AP
if(passphrase) {
if (strlen(passphrase) == 64){ // it's not a passphrase, is the PSK

View File

@ -74,6 +74,7 @@ public:
const char * getHostname();
bool setHostname(const char * hostname);
bool hostname(const String& aHostname) { return setHostname(aHostname.c_str()); }
// STA WiFi info
static wl_status_t status();

View File

@ -19,31 +19,24 @@ const char* server = "www.howsmyssl.com"; // Server URL
const char* test_root_ca= \
"-----BEGIN CERTIFICATE-----\n" \
"MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\n" \
"MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/\n" \
"MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\n" \
"DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow\n" \
"SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT\n" \
"GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC\n" \
"AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF\n" \
"q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8\n" \
"SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0\n" \
"Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA\n" \
"a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj\n" \
"/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T\n" \
"AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG\n" \
"CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv\n" \
"bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k\n" \
"c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw\n" \
"VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC\n" \
"ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz\n" \
"MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu\n" \
"Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF\n" \
"AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo\n" \
"uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/\n" \
"wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu\n" \
"X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG\n" \
"PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6\n" \
"KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n" \
"DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow\n" \
"PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD\n" \
"Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\n" \
"AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O\n" \
"rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq\n" \
"OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b\n" \
"xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw\n" \
"7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD\n" \
"aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV\n" \
"HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG\n" \
"SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69\n" \
"ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr\n" \
"AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz\n" \
"R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5\n" \
"JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo\n" \
"Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ\n" \
"-----END CERTIFICATE-----\n";
// You can use x.509 client certificates if you want

View File

@ -333,9 +333,7 @@ int WiFiClientSecure::lastError(char *buf, const size_t size)
if (!_lastError) {
return 0;
}
char error_buf[100];
mbedtls_strerror(_lastError, error_buf, 100);
snprintf(buf, size, "%s", error_buf);
mbedtls_strerror(_lastError, buf, size);
return _lastError;
}

View File

@ -290,16 +290,18 @@ int data_to_read(sslclient_context *ssl_client)
return res;
}
int send_ssl_data(sslclient_context *ssl_client, const uint8_t *data, uint16_t len)
int send_ssl_data(sslclient_context *ssl_client, const uint8_t *data, size_t len)
{
log_v("Writing HTTP request with %d bytes...", len); //for low level debug
int ret = -1;
if ((ret = mbedtls_ssl_write(&ssl_client->ssl_ctx, data, len)) <= 0){
log_v("Handling error %d", ret); //for low level debug
return handle_error(ret);
} else{
log_v("Returning with %d bytes written", ret); //for low level debug
while ((ret = mbedtls_ssl_write(&ssl_client->ssl_ctx, data, len)) <= 0) {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE && ret < 0) {
log_v("Handling error %d", ret); //for low level debug
return handle_error(ret);
}
//wait for space to become available
vTaskDelay(2);
}
return ret;

View File

@ -32,7 +32,7 @@ void ssl_init(sslclient_context *ssl_client);
int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t port, int timeout, const char *rootCABuff, const char *cli_cert, const char *cli_key, const char *pskIdent, const char *psKey, bool insecure);
void stop_ssl_socket(sslclient_context *ssl_client, const char *rootCABuff, const char *cli_cert, const char *cli_key);
int data_to_read(sslclient_context *ssl_client);
int send_ssl_data(sslclient_context *ssl_client, const uint8_t *data, uint16_t len);
int send_ssl_data(sslclient_context *ssl_client, const uint8_t *data, size_t len);
int get_ssl_receive(sslclient_context *ssl_client, uint8_t *data, int length);
bool verify_ssl_fingerprint(sslclient_context *ssl_client, const char* fp, const char* domain_name);
bool verify_ssl_dn(sslclient_context *ssl_client, const char* domain_name);

View File

@ -22,7 +22,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/efuse" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/esp_websocket_client" "-I{compiler.sdk.path}/include/espcoredump" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nimble" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/esp32-camera" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/fb_gfx"
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/efuse" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/esp_websocket_client" "-I{compiler.sdk.path}/include/espcoredump" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/esp32-camera" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/fb_gfx"
compiler.c.cmd=xtensa-esp32-elf-gcc
compiler.c.flags=-std=gnu99 -Os -g3 -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-maybe-uninitialized -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
@ -34,8 +34,8 @@ compiler.S.cmd=xtensa-esp32-elf-gcc
compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception
compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lesp32-camera -lcxx -lxtensa-debug-module -ltcp_transport -lod -lmdns -ldetection -lvfs -lpe -lesp_websocket_client -lespcoredump -lesp_ringbuf -lsoc -lcore -lfb_gfx -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -limage_util -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lface_recognition -lapp_update -lnghttp -ldl -lspiffs -lface_detection -lefuse -lunity -lesp_https_server -lespnow -lnvs_flash -lesp_adc_cal -llog -ldetection_cat_face -lsmartconfig_ack -lexpat -lm -lfr -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lfd -lstdc++
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u esp_app_desc -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception
compiler.c.elf.libs=-lgcc -lesp_websocket_client -lwpa2 -ldetection -lesp_https_server -lwps -lhal -lconsole -lpe -lsoc -lsdmmc -lpthread -llog -lesp_http_client -ljson -lmesh -lesp32-camera -lnet80211 -lwpa_supplicant -lc -lmqtt -lcxx -lesp_https_ota -lulp -lefuse -lpp -lmdns -lbt -lwpa -lspiffs -lheap -limage_util -lunity -lrtc -lmbedtls -lface_recognition -lnghttp -ljsmn -lopenssl -lcore -lfatfs -lm -lprotocomm -lsmartconfig -lxtensa-debug-module -ldl -lesp_event -lesp-tls -lfd -lespcoredump -lesp_http_server -lfr -lsmartconfig_ack -lwear_levelling -ltcp_transport -llwip -lphy -lvfs -lcoap -lesp32 -llibsodium -lbootloader_support -ldriver -lcoexist -lasio -lod -lmicro-ecc -lesp_ringbuf -ldetection_cat_face -lapp_update -lespnow -lface_detection -lapp_trace -lnewlib -lbtdm_app -lwifi_provisioning -lfreertos -lfreemodbus -lethernet -lnvs_flash -lspi_flash -lc_nano -lexpat -lfb_gfx -lprotobuf-c -lesp_adc_cal -ltcpip_adapter -lstdc++
compiler.as.cmd=xtensa-esp32-elf-as
@ -53,6 +53,7 @@ build.boot=bootloader
build.code_debug=0
build.defines=
build.extra_flags=-DESP32 -DCORE_DEBUG_LEVEL={build.code_debug} {build.defines}
build.extra_libs=
# These can be overridden in platform.local.txt
compiler.c.extra_flags=
@ -66,8 +67,8 @@ compiler.libraries.ldflags=
# Build Dir: {build.path}
# Sketch Dir: {build.source.path}
recipe.hooks.prebuild.1.pattern=bash -c "[ ! -f {build.source.path}/partitions.csv ] || cp -f {build.source.path}/partitions.csv {build.path}/partitions.csv"
recipe.hooks.prebuild.2.pattern=bash -c "[ -f {build.path}/partitions.csv ] || cp {runtime.platform.path}/tools/partitions/{build.partitions}.csv {build.path}/partitions.csv"
recipe.hooks.prebuild.1.pattern=bash -c "[ ! -f "{build.source.path}"/partitions.csv ] || cp -f "{build.source.path}"/partitions.csv "{build.path}"/partitions.csv"
recipe.hooks.prebuild.2.pattern=bash -c "[ -f "{build.path}"/partitions.csv ] || cp "{runtime.platform.path}"/tools/partitions/{build.partitions}.csv "{build.path}"/partitions.csv"
recipe.hooks.prebuild.1.pattern.windows=cmd /c if exist "{build.source.path}\partitions.csv" copy /y "{build.source.path}\partitions.csv" "{build.path}\partitions.csv"
recipe.hooks.prebuild.2.pattern.windows=cmd /c if not exist "{build.path}\partitions.csv" copy "{runtime.platform.path}\tools\partitions\{build.partitions}.csv" "{build.path}\partitions.csv"
@ -84,7 +85,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.fla
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {compiler.libraries.ldflags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {compiler.libraries.ldflags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {build.extra_libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
## Create partitions.bin
recipe.objcopy.partitions.bin.pattern={tools.gen_esp32part.cmd} -q "{build.path}/partitions.csv" "{build.path}/{build.project_name}.partitions.bin"

View File

@ -138,7 +138,6 @@ env.Append(
join(FRAMEWORK_DIR, "tools", "sdk", "include", "mqtt"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "newlib"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nghttp"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nimble"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nvs_flash"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "openssl"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "protobuf-c"),
@ -171,7 +170,7 @@ env.Append(
],
LIBS=[
"-lgcc", "-lopenssl", "-lbtdm_app", "-lfatfs", "-lwps", "-lcoexist", "-lwear_levelling", "-lesp_http_client", "-lprotobuf-c", "-lhal", "-lnewlib", "-ldriver", "-lbootloader_support", "-lpp", "-lfreemodbus", "-lmesh", "-lsmartconfig", "-ljsmn", "-lwpa", "-lethernet", "-lphy", "-lapp_trace", "-lconsole", "-lulp", "-lwpa_supplicant", "-lfreertos", "-lbt", "-lmicro-ecc", "-lesp32-camera", "-lcxx", "-lxtensa-debug-module", "-ltcp_transport", "-lod", "-lmdns", "-ldetection", "-lvfs", "-lpe", "-lesp_websocket_client", "-lespcoredump", "-lesp_ringbuf", "-lsoc", "-lcore", "-lfb_gfx", "-lsdmmc", "-llibsodium", "-lcoap", "-ltcpip_adapter", "-lprotocomm", "-lesp_event", "-limage_util", "-lc_nano", "-lesp-tls", "-lasio", "-lrtc", "-lspi_flash", "-lwpa2", "-lwifi_provisioning", "-lesp32", "-lface_recognition", "-lapp_update", "-lnghttp", "-ldl", "-lspiffs", "-lface_detection", "-lefuse", "-lunity", "-lesp_https_server", "-lespnow", "-lnvs_flash", "-lesp_adc_cal", "-llog", "-ldetection_cat_face", "-lsmartconfig_ack", "-lexpat", "-lm", "-lfr", "-lmqtt", "-lc", "-lheap", "-lmbedtls", "-llwip", "-lnet80211", "-lesp_http_server", "-lpthread", "-ljson", "-lesp_https_ota", "-lfd", "-lstdc++"
"-lgcc", "-lesp_websocket_client", "-lwpa2", "-ldetection", "-lesp_https_server", "-lwps", "-lhal", "-lconsole", "-lpe", "-lsoc", "-lsdmmc", "-lpthread", "-llog", "-lesp_http_client", "-ljson", "-lmesh", "-lesp32-camera", "-lnet80211", "-lwpa_supplicant", "-lc", "-lmqtt", "-lcxx", "-lesp_https_ota", "-lulp", "-lefuse", "-lpp", "-lmdns", "-lbt", "-lwpa", "-lspiffs", "-lheap", "-limage_util", "-lunity", "-lrtc", "-lmbedtls", "-lface_recognition", "-lnghttp", "-ljsmn", "-lopenssl", "-lcore", "-lfatfs", "-lm", "-lprotocomm", "-lsmartconfig", "-lxtensa-debug-module", "-ldl", "-lesp_event", "-lesp-tls", "-lfd", "-lespcoredump", "-lesp_http_server", "-lfr", "-lsmartconfig_ack", "-lwear_levelling", "-ltcp_transport", "-llwip", "-lphy", "-lvfs", "-lcoap", "-lesp32", "-llibsodium", "-lbootloader_support", "-ldriver", "-lcoexist", "-lasio", "-lod", "-lmicro-ecc", "-lesp_ringbuf", "-ldetection_cat_face", "-lapp_update", "-lespnow", "-lface_detection", "-lapp_trace", "-lnewlib", "-lbtdm_app", "-lwifi_provisioning", "-lfreertos", "-lfreemodbus", "-lethernet", "-lnvs_flash", "-lspi_flash", "-lc_nano", "-lexpat", "-lfb_gfx", "-lprotobuf-c", "-lesp_adc_cal", "-ltcpip_adapter", "-lstdc++"
],
LIBSOURCE_DIRS=[
@ -188,6 +187,14 @@ env.Append(
if not env.BoardConfig().get("build.ldscript", ""):
env.Replace(LDSCRIPT_PATH=env.BoardConfig().get("build.arduino.ldscript", ""))
#
# Add PSRAM-specific libraries
#
flatten_cppdefines = env.Flatten(env["CPPDEFINES"])
if "BOARD_HAS_PSRAM" in flatten_cppdefines:
env.Append(LIBS=["c-psram-workaround", "m-psram-workaround"])
#
# Target: Build Core Library
#

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -331,12 +331,6 @@ esp_err_t esp_bt_controller_disable(void);
*/
esp_bt_controller_status_t esp_bt_controller_get_status(void);
/**
* @brief Get BT MAC address.
* @return Array pointer of length 6 storing MAC address value.
*/
uint8_t* esp_bt_get_mac(void);
/** @brief esp_vhci_host_callback
* used for vhci call host function to notify what host need to do
*/

View File

@ -361,6 +361,7 @@
#define CONFIG_BT_ACL_CONNECTIONS 4
#define CONFIG_FATFS_MAX_LFN 255
#define CONFIG_ESP32_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_SUPPORT_STATIC_ALLOCATION 1
#define CONFIG_ESPTOOLPY_BAUD_921600B 1
#define CONFIG_BOOTLOADER_WDT_ENABLE 1
#define CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED 1
@ -396,5 +397,5 @@
#define CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG 1
#define CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR 1
#define CONFIG_FATFS_API_ENCODING_ANSI_OEM 1
#define CONFIG_ARDUINO_IDF_COMMIT "d8082b7f3"
#define CONFIG_ARDUINO_IDF_COMMIT "85c43024c"
#define CONFIG_ARDUINO_IDF_BRANCH "release/v3.3"

View File

@ -62,7 +62,8 @@ bool frame2jpg_cb(camera_fb_t * fb, uint8_t quality, jpg_out_cb cb, void * arg);
* @param height Height in pixels of the source image
* @param format Format of the source image
* @param quality JPEG quality of the resulting image
* @param out Pointer to be populated with the address of the resulting buffer
* @param out Pointer to be populated with the address of the resulting buffer.
* You MUST free the pointer once you are done with it.
* @param out_len Pointer to be populated with the length of the output buffer
*
* @return true on success

View File

@ -23,7 +23,7 @@ extern "C" {
/** Minor version number (x.X.x) */
#define ESP_IDF_VERSION_MINOR 3
/** Patch version number (x.x.X) */
#define ESP_IDF_VERSION_PATCH 4
#define ESP_IDF_VERSION_PATCH 5
/**
* Macro to convert IDF version number into an integer

View File

@ -33,10 +33,10 @@ typedef enum {
WIFI_MODE_MAX
} wifi_mode_t;
typedef enum {
WIFI_IF_STA = ESP_IF_WIFI_STA,
WIFI_IF_AP = ESP_IF_WIFI_AP,
} wifi_interface_t;
typedef esp_interface_t wifi_interface_t;
#define WIFI_IF_STA ESP_IF_WIFI_STA
#define WIFI_IF_AP ESP_IF_WIFI_AP
typedef enum {
WIFI_COUNTRY_POLICY_AUTO, /**< Country policy is auto, use the country info of AP to which the station is connected */

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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