Compare commits

...

21 Commits

Author SHA1 Message Date
07390157df Fix Camera Example (#3202)
* Update app_httpd.cpp

* Stop LWIP from using PSRAM and enable OV7725
2019-09-13 01:19:53 +03:00
bab3a70f54 Added timeout to WiFiScan.cpp to prevent getting stuck at WIFI_SCAN_RUNNING (#3197)
* Added timeout to WiFiScan class to prevent haning at stucking at WIFI_SCAN_RUNNING when scan fails internally

* fixed tabs and returns, connected scanTimeout to max_scan_per_channel timeout

* Corrected tabs two

* Added static vars scanTimeout und scanStarted to WiFiScan.h protected section

* Fixed missing ; in line 64
2019-09-11 15:58:34 +03:00
cd4f9038ee Fix WiFi disconnect event not being propageted. (#3085)
Relative to #3006
2019-09-11 15:12:15 +03:00
7fe2812f7f Inline ESP::getCycleCount() to make it safe to call from ISRs (#3165)
* Inline ESP::getCycleCount() to make it safe to call from ISRs

* Attribute IRAM_ATTR ISR-safe function in addition to inlining.
2019-09-11 14:29:53 +03:00
Luc
9710fedaf0 Fix wrong values in .cvs files (#3196)
* Fix wrong values in .cvs files

Add missing upload size for partitions bigger than default one

* Add new partion to generic

Fix hardcoded partition for 16M flash
2019-09-10 22:52:51 +03:00
f5cacfee1a Remove extra connects from Client.h (#3191) 2019-09-09 09:36:22 +03:00
f71a4bd406 Bugfix/detect baudrate (#3188)
* Expose uartStartDetectBaudrate(uart_t *) in esp32-hal-uart.h and call it from HardwareSerial::begin() if baudrate detection is requested (by passing a baudrate of 0) to solve baudrate detection problems

* Avoid a division by zero error in uartGetBaudRate()
2019-09-09 00:59:32 +03:00
5f77b0108b Fix return of Print::print(timeinfo, format) (#3189) 2019-09-09 00:36:30 +03:00
717ca79ecb #3181 printf double vsnprintf() fix, malloc, va_end (#3184)
* Use loc_buf for small strings, check for error return from vsnprintf

* cleanup arg when bailing out of new

* Use malloc/free instead of new/delete in printf

* Return actual bytes written in printf

* FIX: write before free
2019-09-08 23:49:32 +03:00
07613b3158 Update URL to point to upstream repository (#3187)
Pointing to an old fork is misleading.
2019-09-08 23:15:46 +03:00
80ea521940 Add support for 160MHz rated CPUs (#3135)
Some ESP32 chips are rated only to 160MHz. This change adds support for them and does not allow frequency to be switched to 240MHz
2019-09-05 12:30:43 +03:00
5c04de6f39 Fix packager 2019-09-05 11:22:40 +03:00
0d163a1ce2 Update IDF 3.2 to 7dd492319 + WiFi fix (#3177) 2019-09-05 11:08:45 +03:00
2a7e509978 Fix long Ticker period conversion: cast ms to uint64_t when calculating us (#3175)
* Fix long Ticker period conversion

* Simplify long Ticker period conversion fix by using 1000ULL
2019-09-05 10:34:47 +03:00
1b8c7e34f9 Try bash only examples build (#3164) 2019-09-01 18:45:55 +03:00
7a574399b1 Rework the sketch builder to match the IDE (#3146)
* Rework the sketch builder to match the IDE

* Link the board to the home folder

* Rename files for clarity

* move ci files to own subfolder

* Update Github CI to use the new script locations
2019-08-28 01:28:11 +03:00
fd089d8fd3 Pull in ESP8266 String::replace() fixes, others (#3143)
Pull in bugfixes from the ESP8266 repo for problems in the SSO
implementation of replace().  See the following patches for full
details:

54240d2cc5 (diff-8d9e71e16d437343017df828f0528f63)
78a1a66e6d (diff-8d9e71e16d437343017df828f0528f63)
4e9358445a (diff-8d9e71e16d437343017df828f0528f63)

Fixes #3140
2019-08-27 20:05:36 +03:00
f356ccd54a Added the pragma line to the top (#3139)
* Removed pragme in BLERemoteService.cpp

* Added the line at the top and changed to warning
2019-08-27 10:21:27 +03:00
6daf773464 Fix travis deploy generating bad json 2019-08-21 03:29:23 +03:00
70a896481d Update Both CIs to run parallel jobs (#3120) 2019-08-21 01:56:05 +03:00
390da0d090 bump CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM to improve RX performance (#3119) 2019-08-20 22:07:56 +03:00
113 changed files with 343 additions and 368 deletions

View File

@ -1,6 +1,11 @@
name: ESP32 Arduino CI
on: [pull_request]
on:
push:
branches:
- master
- release/*
pull_request:
jobs:
@ -13,18 +18,17 @@ jobs:
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
run: ./tools/ci/check-cmakelists.sh
- name: Install Arduino IDE
env:
ESP32_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
#ESP32_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 0 18
run: ./tools/ci/test-arduino-ide.sh 0 18
- name: Sketch Sizes
run: cat size.log
@ -36,17 +40,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 1 18
run: ./tools/ci/test-arduino-ide.sh 1 18
- name: Sketch Sizes
run: cat size.log
@ -58,17 +59,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 2 18
run: ./tools/ci/test-arduino-ide.sh 2 18
- name: Sketch Sizes
run: cat size.log
@ -80,17 +78,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 3 18
run: ./tools/ci/test-arduino-ide.sh 3 18
- name: Sketch Sizes
run: cat size.log
@ -102,17 +97,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 4 18
run: ./tools/ci/test-arduino-ide.sh 4 18
- name: Sketch Sizes
run: cat size.log
@ -124,17 +116,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 5 18
run: ./tools/ci/test-arduino-ide.sh 5 18
- name: Sketch Sizes
run: cat size.log
@ -146,17 +135,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 6 18
run: ./tools/ci/test-arduino-ide.sh 6 18
- name: Sketch Sizes
run: cat size.log
@ -168,17 +154,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 7 18
run: ./tools/ci/test-arduino-ide.sh 7 18
- name: Sketch Sizes
run: cat size.log
@ -190,17 +173,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 8 18
run: ./tools/ci/test-arduino-ide.sh 8 18
- name: Sketch Sizes
run: cat size.log
@ -212,17 +192,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 9 18
run: ./tools/ci/test-arduino-ide.sh 9 18
- name: Sketch Sizes
run: cat size.log
@ -234,17 +211,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 10 18
run: ./tools/ci/test-arduino-ide.sh 10 18
- name: Sketch Sizes
run: cat size.log
@ -256,17 +230,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 11 18
run: ./tools/ci/test-arduino-ide.sh 11 18
- name: Sketch Sizes
run: cat size.log
@ -278,17 +249,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 12 18
run: ./tools/ci/test-arduino-ide.sh 12 18
- name: Sketch Sizes
run: cat size.log
@ -300,17 +268,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 13 18
run: ./tools/ci/test-arduino-ide.sh 13 18
- name: Sketch Sizes
run: cat size.log
@ -322,17 +287,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 14 18
run: ./tools/ci/test-arduino-ide.sh 14 18
- name: Sketch Sizes
run: cat size.log
@ -344,17 +306,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 15 18
run: ./tools/ci/test-arduino-ide.sh 15 18
- name: Sketch Sizes
run: cat size.log
@ -366,17 +325,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 16 18
run: ./tools/ci/test-arduino-ide.sh 16 18
- name: Sketch Sizes
run: cat size.log
@ -388,17 +344,14 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-arduino-ide.sh
run: ./tools/ci/prep-arduino-ide.sh
- name: Test Arduino IDE
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/test-arduino-ide.sh 17 18
run: ./tools/ci/test-arduino-ide.sh 17 18
- name: Sketch Sizes
run: cat size.log
@ -411,9 +364,6 @@ jobs:
- uses: actions/checkout@v1
- name: Pull submodules
run: git submodule update --init --recursive
- name: Run CMake Check
run: ./tools/check_cmakelists.sh
- name: Install Python Wheel
run: pip install wheel
- name: Install GCC Toolchain
@ -421,6 +371,6 @@ jobs:
- name: Install PlatformIO
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
run: ./tools/prep-platformio.sh
run: ./tools/ci/prep-platformio.sh
- name: Test PlatformIO
run: ./tools/test-platformio.sh
run: ./tools/ci/test-platformio.sh

View File

@ -1,8 +1,6 @@
sudo: false
language: python
python:
- "2.7"
os:
- linux
@ -10,22 +8,55 @@ os:
git:
depth: false
env:
global:
before_install:
- git submodule update --init --recursive
stages:
- build
- deploy
jobs:
include:
- name: "Build Arduino 0"
if: tag IS blank AND (type = pull_request OR (type = push AND branch = master))
stage: build
script: $TRAVIS_BUILD_DIR/tools/ci/build-tests.sh 0 4
- name: "Build Arduino 1"
if: tag IS blank AND (type = pull_request OR (type = push AND branch = master))
stage: build
script: $TRAVIS_BUILD_DIR/tools/ci/build-tests.sh 1 4
- name: "Build Arduino 2"
if: tag IS blank AND (type = pull_request OR (type = push AND branch = master))
stage: build
script: $TRAVIS_BUILD_DIR/tools/ci/build-tests.sh 2 4
- name: "Build Arduino 3"
if: tag IS blank AND (type = pull_request OR (type = push AND branch = master))
stage: build
script: $TRAVIS_BUILD_DIR/tools/ci/build-tests.sh 3 4
- name: "Build PlatformIO"
if: tag IS blank AND (type = pull_request OR (type = push AND branch = master))
stage: build
script: $TRAVIS_BUILD_DIR/tools/ci/build-tests.sh 4 4
- name: "Package & Deploy"
if: tag IS present
stage: deploy
env:
- secure: "l/4Dt+KQ/mACtGAHDUsPr66fUte840PZoQ4xpPikqWZI0uARu4l+Ym7+sHinnT6fBqrj8AJeBYGz4nFa8NK4LutZn9mSD40w+sxl0wSV4oHV8rzKe3Cd8+sMG3+o33yWoikMNjSvqa73Q0rm+SgrlInNdZbuAyixL+a2alaWSnGPm4F2xwUGj+S33TOy5P/Xp77CYtCV5S8vzyk/eEdNhoF0GYePJVdfuzCOUjXMyT5OWxORkzzQ7Hnn/Ka/RDfV8Si4HgujLQBrK5q6iPnNBFqBSqilYBepSMn4opnOBpIm0SCgePz7XQEFC83buA7GUcnCnfg38bf+dCwHaODf1d1PmqVRYt2QmfinexXtM4afAtL0iBUDtvrfnXHzwW9w82VeZhpbJSVh9DUQvB0IlsZeCz9J9PUBAi3N+SMX+9l+BomYwRUlPuKY+Ef2JKk9q6mxtUkky5R0daAlVxEhpVdQks1rT+T+NMoDMemxQ3SKEiqAHh6EgHecruszffmZ71uLX9MpERpew0qN+UFiafws+jkTjx+3yF9yut0Hf9sMbeAYzzkGzRqJTUEBJ6B29Cql8M0yRXCNN/8wuuTHhG8esstozga4ZQoIVrq7mEAgup376PTcNfr1+imbbWVQ7lJdYIuDe6OS5V3OX6np11vgK/DbhfyzvQv9Z1zAGnM="
- REMOTE_URL=https://github.com/$TRAVIS_REPO_SLUG/releases/download/$TRAVIS_TAG
script:
- bash $TRAVIS_BUILD_DIR/tools/build.sh
deploy:
provider: script
skip_cleanup: true
script: bash $TRAVIS_BUILD_DIR/tools/deploy.sh -t$TRAVIS_TAG -a$ESP32_GITHUB_TOKEN -s$TRAVIS_REPO_SLUG -drelease
on:
tags: true
script: bash $TRAVIS_BUILD_DIR/tools/ci/build-release.sh -a$ESP32_GITHUB_TOKEN
before_deploy: git submodule update --init
deploy:
- provider: script
skip_cleanup: true
script: bash $TRAVIS_BUILD_DIR/tools/ci/deploy-release.sh -t$TRAVIS_TAG -a$ESP32_GITHUB_TOKEN -s$TRAVIS_REPO_SLUG -drelease
on:
tags: true
notifications:
email:

View File

@ -46,6 +46,7 @@ esp32.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FA
esp32.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
esp32.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
esp32.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
esp32.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
esp32.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
esp32.menu.PartitionScheme.minimal.build.partitions=minimal
esp32.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
@ -68,6 +69,10 @@ esp32.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
esp32.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
esp32.menu.PartitionScheme.fatflash.build.partitions=ffat
esp32.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
esp32.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
esp32.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
esp32.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
esp32.menu.CPUFreq.240=240MHz (WiFi/BT)
esp32.menu.CPUFreq.240.build.f_cpu=240000000L
@ -114,7 +119,6 @@ esp32.menu.FlashSize.2M.build.flash_size=2MB
esp32.menu.FlashSize.2M.build.partitions=minimal
esp32.menu.FlashSize.16M=16MB (128Mb)
esp32.menu.FlashSize.16M.build.flash_size=16MB
esp32.menu.FlashSize.16M.build.partitions=ffat
esp32.menu.UploadSpeed.921600=921600
esp32.menu.UploadSpeed.921600.upload.speed=921600
@ -2329,6 +2333,7 @@ m5stack-fire.menu.PSRAM.disabled.build.defines=
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
m5stack-fire.menu.PartitionScheme.default.upload.maximum_size=6553600
m5stack-fire.menu.PartitionScheme.large_spiffs=Large SPIFFS (7 MB)
m5stack-fire.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB
m5stack-fire.menu.PartitionScheme.large_spiffs.upload.maximum_size=4685824
@ -2758,6 +2763,7 @@ heltec_wifi_lora_32_V2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-
heltec_wifi_lora_32_V2.menu.PartitionScheme.default=default_8MB
heltec_wifi_lora_32_V2.menu.PartitionScheme.default.build.partitions=default_8MB
heltec_wifi_lora_32_V2.menu.PartitionScheme.default.upload.maximum_size=3342336
heltec_wifi_lora_32_V2.menu.PartitionScheme.minimal=Minimal (2MB FLASH)
heltec_wifi_lora_32_V2.menu.PartitionScheme.minimal.build.partitions=minimal
heltec_wifi_lora_32_V2.menu.PartitionScheme.no_ota=No OTA (Large APP)
@ -2875,6 +2881,7 @@ heltec_wireless_stick.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-e
heltec_wireless_stick.menu.PartitionScheme.default=default_8MB
heltec_wireless_stick.menu.PartitionScheme.default.build.partitions=default_8MB
heltec_wireless_stick.menu.PartitionScheme.default.upload.maximum_size=3342336
heltec_wireless_stick.menu.PartitionScheme.minimal=Minimal (2MB FLASH)
heltec_wireless_stick.menu.PartitionScheme.minimal.build.partitions=minimal
heltec_wireless_stick.menu.PartitionScheme.no_ota=No OTA (Large APP)
@ -3955,6 +3962,7 @@ ttgo-t-watch.menu.PSRAM.disabled.build.defines=
ttgo-t-watch.menu.PartitionScheme.default=Default (2 x 6.5 MB app, 3.6 MB SPIFFS)
ttgo-t-watch.menu.PartitionScheme.default.build.partitions=default_16MB
ttgo-t-watch.menu.PartitionScheme.default.upload.maximum_size=6553600
ttgo-t-watch.menu.PartitionScheme.large_spiffs=Large SPIFFS (7 MB)
ttgo-t-watch.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB
ttgo-t-watch.menu.PartitionScheme.large_spiffs.upload.maximum_size=4685824

View File

@ -28,8 +28,6 @@ class Client: public Stream
public:
virtual int connect(IPAddress ip, uint16_t port) =0;
virtual int connect(const char *host, uint16_t port) =0;
virtual int connect(IPAddress ip, uint16_t port, int timeout) =0;
virtual int connect(const char *host, uint16_t port, int timeout) =0;
virtual size_t write(uint8_t) =0;
virtual size_t write(const uint8_t *buf, size_t size) =0;
virtual int available() = 0;

View File

@ -92,13 +92,6 @@ void EspClass::deepSleep(uint32_t time_us)
esp_deep_sleep(time_us);
}
uint32_t EspClass::getCycleCount()
{
uint32_t ccount;
__asm__ __volatile__("esync; rsr %0,ccount":"=a" (ccount));
return ccount;
}
void EspClass::restart(void)
{
esp_restart();

View File

@ -76,7 +76,7 @@ public:
uint8_t getChipRevision();
uint32_t getCpuFreqMHz(){ return getCpuFrequencyMhz(); }
uint32_t getCycleCount();
inline uint32_t getCycleCount() __attribute__((always_inline));
const char * getSdkVersion();
void deepSleep(uint32_t time_us);
@ -101,6 +101,13 @@ public:
};
uint32_t IRAM_ATTR EspClass::getCycleCount()
{
uint32_t ccount;
__asm__ __volatile__("esync; rsr %0,ccount":"=a" (ccount));
return ccount;
}
extern EspClass ESP;
#endif //ESP_H

View File

@ -55,6 +55,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
_uart = uartBegin(_uart_nr, baud ? baud : 9600, config, rxPin, txPin, 256, invert);
if(!baud) {
uartStartDetectBaudrate(_uart);
time_t startMillis = millis();
unsigned long detectedBaudRate = 0;
while(millis() - startMillis < timeout_ms && !(detectedBaudRate = uartDetectBaudrate(_uart))) {

View File

@ -52,19 +52,24 @@ size_t Print::printf(const char *format, ...)
va_list copy;
va_start(arg, format);
va_copy(copy, arg);
size_t len = vsnprintf(NULL, 0, format, copy);
int len = vsnprintf(temp, sizeof(loc_buf), format, copy);
va_end(copy);
if(len < 0) {
va_end(arg);
return 0;
};
if(len >= sizeof(loc_buf)){
temp = new char[len+1];
temp = (char*) malloc(len+1);
if(temp == NULL) {
va_end(arg);
return 0;
}
len = vsnprintf(temp, len+1, format, arg);
}
len = vsnprintf(temp, len+1, format, arg);
write((uint8_t*)temp, len);
va_end(arg);
if(len >= sizeof(loc_buf)){
delete[] temp;
len = write((uint8_t*)temp, len);
if(temp != loc_buf){
free(temp);
}
return len;
}
@ -154,8 +159,10 @@ size_t Print::print(struct tm * timeinfo, const char * format)
}
char buf[64];
size_t written = strftime(buf, 64, f, timeinfo);
print(buf);
return written;
if(written == 0){
return written;
}
return print(buf);
}
size_t Print::println(void)

View File

@ -31,7 +31,7 @@
String::String(const char *cstr) {
init();
if(cstr)
if (cstr)
copy(cstr, strlen(cstr));
}
@ -136,7 +136,7 @@ inline void String::init(void) {
}
void String::invalidate(void) {
if(!sso() && wbuffer())
if(!isSSO() && wbuffer())
free(wbuffer());
init();
}
@ -154,17 +154,21 @@ unsigned char String::reserve(unsigned int size) {
unsigned char String::changeBuffer(unsigned int maxStrLen) {
// Can we use SSO here to avoid allocation?
if (maxStrLen < sizeof(sso_buf)) {
if (sso() || !buffer()) {
if (maxStrLen < sizeof(sso.buff) - 1) {
if (isSSO() || !buffer()) {
// Already using SSO, nothing to do
uint16_t oldLen = len();
setSSO(true);
setLen(oldLen);
return 1;
} else { // if bufptr && !sso()
// Using bufptr, need to shrink into sso_buff
char temp[sizeof(sso_buf)];
} else { // if bufptr && !isSSO()
// Using bufptr, need to shrink into sso.buff
char temp[sizeof(sso.buff)];
memcpy(temp, buffer(), maxStrLen);
free(wbuffer());
uint16_t oldLen = len();
setSSO(true);
setLen(oldLen);
memcpy(wbuffer(), temp, maxStrLen);
return 1;
}
@ -176,12 +180,12 @@ unsigned char String::changeBuffer(unsigned int maxStrLen) {
return false;
}
uint16_t oldLen = len();
char *newbuffer = (char *) realloc(sso() ? nullptr : wbuffer(), newSize);
if(newbuffer) {
char *newbuffer = (char *) realloc(isSSO() ? nullptr : wbuffer(), newSize);
if (newbuffer) {
size_t oldSize = capacity() + 1; // include NULL.
if (sso()) {
if (isSSO()) {
// Copy the SSO buffer into allocated space
memcpy(newbuffer, sso_buf, sizeof(sso_buf));
memmove(newbuffer, sso.buff, sizeof(sso.buff));
}
if (newSize > oldSize)
{
@ -206,7 +210,7 @@ String & String::copy(const char *cstr, unsigned int length) {
return *this;
}
setLen(length);
strcpy(wbuffer(), cstr);
memmove(wbuffer(), cstr, length + 1);
return *this;
}
@ -216,7 +220,7 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length) {
return *this;
}
setLen(length);
strcpy_P(wbuffer(), (PGM_P)pstr);
memcpy_P(wbuffer(), (PGM_P)pstr, length + 1); // We know wbuffer() cannot ever be in PROGMEM, so memcpy safe here
return *this;
}
@ -224,20 +228,20 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length) {
void String::move(String &rhs) {
if(buffer()) {
if(capacity() >= rhs.len()) {
strcpy(wbuffer(), rhs.buffer());
memmove(wbuffer(), rhs.buffer(), rhs.length() + 1);
setLen(rhs.len());
rhs.invalidate();
return;
} else {
if (!sso()) {
if (!isSSO()) {
free(wbuffer());
setBuffer(nullptr);
}
}
}
if (rhs.sso()) {
if (rhs.isSSO()) {
setSSO(true);
memmove(sso_buf, rhs.sso_buf, sizeof(sso_buf));
memmove(sso.buff, rhs.sso.buff, sizeof(sso.buff));
} else {
setSSO(false);
setBuffer(rhs.wbuffer());
@ -309,7 +313,7 @@ unsigned char String::concat(const String &s) {
return 1;
if (!reserve(newlen))
return 0;
memcpy(wbuffer() + len(), buffer(), len());
memmove(wbuffer() + len(), buffer(), len());
setLen(newlen);
wbuffer()[len()] = 0;
return 1;
@ -326,7 +330,12 @@ unsigned char String::concat(const char *cstr, unsigned int length) {
return 1;
if(!reserve(newlen))
return 0;
strcpy(wbuffer() + len(), cstr);
if (cstr >= wbuffer() && cstr < wbuffer() + len())
// compatible with SSO in ram #6155 (case "x += x.c_str()")
memmove(wbuffer() + len(), cstr, length + 1);
else
// compatible with source in flash #6367
memcpy_P(wbuffer() + len(), cstr, length + 1);
setLen(newlen);
return 1;
}
@ -392,7 +401,7 @@ unsigned char String::concat(const __FlashStringHelper * str) {
if (length == 0) return 1;
unsigned int newlen = len() + length;
if (!reserve(newlen)) return 0;
strcpy_P(wbuffer() + len(), (PGM_P)str);
memcpy_P(wbuffer() + len(), (PGM_P)str, length + 1);
setLen(newlen);
return 1;
}

View File

@ -83,6 +83,12 @@ class String {
return 0;
}
}
inline void clear(void) {
setLen(0);
}
inline bool isEmpty(void) const {
return length() == 0;
}
// creates a copy of the assigned value. if the value is null or
// invalid, or if the memory allocation fails, the string will be
@ -99,7 +105,7 @@ class String {
// returns true on success, false on failure (in which case, the string
// is left unchanged). if the argument is null or invalid, the
// concatenation is considered unsucessful.
// concatenation is considered unsuccessful.
unsigned char concat(const String &str);
unsigned char concat(const char *cstr);
unsigned char concat(char c);
@ -200,7 +206,7 @@ class String {
unsigned char startsWith(const String &prefix, unsigned int offset) const;
unsigned char endsWith(const String &suffix) const;
// character acccess
// character access
char charAt(unsigned int index) const;
void setCharAt(unsigned int index, char c);
char operator [](unsigned int index) const;
@ -251,27 +257,29 @@ class String {
uint16_t cap;
uint16_t len;
};
// SSO is handled by checking the last byte of sso_buff.
// When not in SSO mode, that byte is set to 0xff, while when in SSO mode it is always 0x00 (so it can serve as the string terminator as well as a flag)
// This allows strings up up to 12 (11 + \0 termination) without any extra space.
enum { SSOSIZE = sizeof(struct _ptr) + 4 }; // Characters to allocate space for SSO, must be 12 or more
enum { CAPACITY_MAX = 65535 }; // If size of capacity changed, be sure to update this enum
// This allows strings up up to 11 (10 + \0 termination) without any extra space.
enum { SSOSIZE = sizeof(struct _ptr) + 4 - 1 }; // Characters to allocate space for SSO, must be 12 or more
struct _sso {
char buff[SSOSIZE];
unsigned char len : 7; // Ensure only one byte is allocated by GCC for the bitfields
unsigned char isSSO : 1;
} __attribute__((packed)); // Ensure that GCC doesn't expand the flag byte to a 32-bit word for alignment issues
enum { CAPACITY_MAX = 65535 }; // If typeof(cap) changed from uint16_t, be sure to update this enum to the max value storable in the type
union {
struct _ptr ptr;
char sso_buf[SSOSIZE];
struct _sso sso;
};
// Accessor functions
inline bool sso() const { return sso_buf[SSOSIZE - 1] == 0; }
inline unsigned int len() const { return sso() ? strlen(sso_buf) : ptr.len; }
inline unsigned int capacity() const { return sso() ? SSOSIZE - 1 : ptr.cap; }
inline void setSSO(bool sso) { sso_buf[SSOSIZE - 1] = sso ? 0x00 : 0xff; }
inline void setLen(int len) { if (!sso()) ptr.len = len; }
inline void setCapacity(int cap) { if (!sso()) ptr.cap = cap; }
inline void setBuffer(char *buff) { if (!sso()) ptr.buff = buff; }
inline bool isSSO() const { return sso.isSSO; }
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 setCapacity(int cap) { if (!isSSO()) ptr.cap = cap; }
inline void setBuffer(char *buff) { if (!isSSO()) ptr.buff = buff; }
// Buffer accessor functions
inline const char *buffer() const { return (const char *)(sso() ? sso_buf : ptr.buff); }
inline char *wbuffer() const { return sso() ? const_cast<char *>(sso_buf) : ptr.buff; } // Writable version of buffer
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
protected:
void init(void);

View File

@ -23,6 +23,7 @@
#include "soc/rtc_cntl_reg.h"
#include "rom/rtc.h"
#include "soc/apb_ctrl_reg.h"
#include "soc/efuse_reg.h"
#include "esp32-hal.h"
#include "esp32-hal-cpu.h"
@ -150,6 +151,15 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz){
}
return false;
}
//check if cpu supports the frequency
if(cpu_freq_mhz == 240){
//Check if ESP32 is rated for a CPU frequency of 160MHz only
if (REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_RATED) &&
REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_LOW)) {
log_e("Can not switch to 240 MHz! Chip CPU frequency rated for 160MHz.");
cpu_freq_mhz = 160;
}
}
//Get current CPU clock configuration
rtc_clk_cpu_freq_get_config(&cconf);
//return if frequency has not changed

View File

@ -401,7 +401,12 @@ uint32_t uartGetBaudRate(uart_t* uart)
if(uart == NULL) {
return 0;
}
uint32_t clk_div = (uart->dev->clk_div.div_int << 4) | (uart->dev->clk_div.div_frag & 0x0F);
if(!clk_div) {
return 0;
}
return ((getApbFrequency()<<4)/clk_div);
}
@ -522,6 +527,14 @@ unsigned long uartBaudrateDetect(uart_t *uart, bool flg)
* detected calling uartBadrateDetect(). The raw baudrate is computed using the UART_CLK_FREQ. The raw baudrate is
* rounded to the closed real baudrate.
*/
void uartStartDetectBaudrate(uart_t *uart) {
if(!uart) return;
uart->dev->auto_baud.glitch_filt = 0x08;
uart->dev->auto_baud.en = 0;
uart->dev->auto_baud.en = 1;
}
unsigned long
uartDetectBaudrate(uart_t *uart)
{

View File

@ -72,6 +72,7 @@ size_t uartResizeRxBuffer(uart_t* uart, size_t new_size);
void uartSetDebug(uart_t* uart);
int uartGetDebug();
void uartStartDetectBaudrate(uart_t *uart);
unsigned long uartDetectBaudrate(uart_t *uart);
bool uartRxActive(uart_t* uart);

View File

@ -14,6 +14,8 @@
#include <esp_err.h>
#include "esp32-hal-log.h"
#pragma GCC diagnostic warning "-Wunused-but-set-parameter"
BLERemoteService::BLERemoteService(
esp_gatt_id_t srvcId,
BLEClient* pClient,
@ -228,7 +230,6 @@ std::map<std::string, BLERemoteCharacteristic*>* BLERemoteService::getCharacteri
* @brief This function is designed to get characteristics map when we have multiple characteristics with the same UUID
*/
void BLERemoteService::getCharacteristics(std::map<uint16_t, BLERemoteCharacteristic*>* pCharacteristicMap) {
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
pCharacteristicMap = &m_characteristicMapByHandle;
} // Get the characteristics map.

View File

@ -229,6 +229,7 @@ static esp_err_t capture_handler(httpd_req_t *req){
httpd_resp_set_type(req, "image/jpeg");
httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.jpg");
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
size_t out_len, out_width, out_height;
uint8_t * out_buf;
@ -282,6 +283,7 @@ static esp_err_t capture_handler(httpd_req_t *req){
face_id = run_face_recognition(image_matrix, net_boxes);
}
draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes->score);
free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes);
@ -325,6 +327,8 @@ static esp_err_t stream_handler(httpd_req_t *req){
return res;
}
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
while(true){
detected = false;
face_id = 0;
@ -378,6 +382,7 @@ static esp_err_t stream_handler(httpd_req_t *req){
}
fr_recognize = esp_timer_get_time();
draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes->score);
free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes);
@ -624,15 +629,18 @@ void startCameraServer(){
ra_filter_init(&ra_filter, 20);
mtmn_config.type = FAST;
mtmn_config.min_face = 80;
mtmn_config.pyramid = 0.7;
mtmn_config.pyramid = 0.707;
mtmn_config.pyramid_times = 4;
mtmn_config.p_threshold.score = 0.6;
mtmn_config.p_threshold.nms = 0.7;
mtmn_config.p_threshold.candidate_number = 20;
mtmn_config.r_threshold.score = 0.7;
mtmn_config.r_threshold.nms = 0.7;
mtmn_config.r_threshold.candidate_number = 4;
mtmn_config.r_threshold.candidate_number = 10;
mtmn_config.o_threshold.score = 0.7;
mtmn_config.o_threshold.nms = 0.4;
mtmn_config.o_threshold.nms = 0.7;
mtmn_config.o_threshold.candidate_number = 1;
face_id_init(&id_list, FACE_ID_SAVE_NUMBER, ENROLL_CONFIRM_TIMES);

View File

@ -2,8 +2,8 @@ name=HTTPClient
version=1.2
author=Markus Sattler
maintainer=Markus Sattler
sentence=http Client for ESP32
sentence=HTTP Client for ESP32
paragraph=
category=Communication
url=https://github.com/Links2004/Arduino/tree/libraries/ESP8266HTTPClient
url=https://github.com/espressif/arduino-esp32/tree/master/libraries/HTTPClient
architectures=esp32

View File

@ -43,9 +43,9 @@ void Ticker::_attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t
}
esp_timer_create(&_timerConfig, &_timer);
if (repeat) {
esp_timer_start_periodic(_timer, milliseconds * 1000);
esp_timer_start_periodic(_timer, milliseconds * 1000ULL);
} else {
esp_timer_start_once(_timer, milliseconds * 1000);
esp_timer_start_once(_timer, milliseconds * 1000ULL);
}
}

View File

@ -367,7 +367,7 @@ esp_err_t WiFiGenericClass::_eventCallback(void *arg, system_event_t *event)
(reason >= WIFI_REASON_BEACON_TIMEOUT && reason != WIFI_REASON_AUTH_FAIL)) &&
WiFi.getAutoReconnect())
{
WiFi.disconnect(true);
WiFi.disconnect();
WiFi.begin();
}
} else if(event->event_id == SYSTEM_EVENT_STA_GOT_IP) {

View File

@ -22,6 +22,7 @@
*/
#include "WiFi.h"
#include "WiFiGeneric.h"
#include "WiFiScan.h"
@ -42,7 +43,8 @@ extern "C" {
}
bool WiFiScanClass::_scanAsync = false;
uint32_t WiFiScanClass::_scanStarted = 0;
uint32_t WiFiScanClass::_scanTimeout = 10000;
uint16_t WiFiScanClass::_scanCount = 0;
void* WiFiScanClass::_scanResult = 0;
@ -58,6 +60,7 @@ int16_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive,
return WIFI_SCAN_RUNNING;
}
WiFiScanClass::_scanTimeout = max_ms_per_chan * 20;
WiFiScanClass::_scanAsync = async;
WiFi.enableSTA(true);
@ -78,6 +81,11 @@ int16_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive,
config.scan_time.active.max = max_ms_per_chan;
}
if(esp_wifi_scan_start(&config, false) == ESP_OK) {
_scanStarted = millis();
if (!_scanStarted) { //Prevent 0 from millis overflow
++_scanStarted;
}
WiFiGenericClass::clearStatusBits(WIFI_SCAN_DONE_BIT);
WiFiGenericClass::setStatusBits(WIFI_SCANNING_BIT);
@ -107,6 +115,7 @@ void WiFiScanClass::_scanDone()
WiFiScanClass::_scanCount = 0;
}
}
WiFiScanClass::_scanStarted=0; //Reset after a scan is completed for normal behavior
WiFiGenericClass::setStatusBits(WIFI_SCAN_DONE_BIT);
WiFiGenericClass::clearStatusBits(WIFI_SCANNING_BIT);
}
@ -132,6 +141,11 @@ void * WiFiScanClass::_getScanInfoByIndex(int i)
*/
int16_t WiFiScanClass::scanComplete()
{
if (WiFiScanClass::_scanStarted && (millis()-WiFiScanClass::_scanStarted) > WiFiScanClass::_scanTimeout) { //Check is scan was started and if the delay expired, return WIFI_SCAN_FAILED in this case
WiFiGenericClass::clearStatusBits(WIFI_SCANNING_BIT);
return WIFI_SCAN_FAILED;
}
if(WiFiGenericClass::getStatusBits() & WIFI_SCAN_DONE_BIT) {
return WiFiScanClass::_scanCount;
}

View File

@ -50,8 +50,11 @@ public:
protected:
static bool _scanAsync;
static uint32_t _scanStarted;
static uint32_t _scanTimeout;
static uint16_t _scanCount;
static void* _scanResult;
static void * _getScanInfoByIndex(int i);

6
package/merge_packages.py Normal file → Executable file
View File

@ -36,7 +36,11 @@ def pkgVersionNormalized(versionString):
verParts = re.split('\.|-rc', verStr, flags=re.IGNORECASE)
if len(verParts) == 3:
verStr = str(versionString) + '-rc' + str(sys.maxint)
if (sys.version_info > (3, 0)): # Python 3
verStr = str(versionString) + '-rc' + str(sys.maxsize)
else: # Python 2
verStr = str(versionString) + '-rc' + str(sys.maxint)
elif len(verParts) != 4:
print("pkgVersionNormalized WARNING: unexpected version format: {0})".format(verStr), file=sys.stderr)

View File

@ -1,33 +0,0 @@
#!/bin/bash
# CMake Test
echo -e "travis_fold:start:check_cmakelists"
tools/check_cmakelists.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:check_cmakelists"
# ArduinoIDE Test
echo -e "travis_fold:start:prep_arduino_ide"
tools/prep-arduino-ide.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:prep_arduino_ide"
echo -e "travis_fold:start:test_arduino_ide"
tools/test-arduino-ide.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:test_arduino_ide"
echo -e "travis_fold:start:size_report"
cat size.log
echo -e "travis_fold:end:size_report"
# PlatformIO Test
echo -e "travis_fold:start:prep_platformio"
tools/prep-platformio.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:prep_platformio"
echo -e "travis_fold:start:test_platformio"
tools/test-platformio.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:test_platformio"

View File

@ -1,131 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# build.py — build a sketch using arduino-builder
#
# Wrapper script around arduino-builder which accepts some ESP8266-specific
# options and translates them into FQBN
#
# Copyright © 2016 Ivan Grokhotkov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
#
from __future__ import print_function
import sys
import os
import argparse
import subprocess
import tempfile
import shutil
def compile(tmp_dir, sketch, tools_dir, hardware_dir, ide_path, f, args):
cmd = ide_path + '/arduino-builder '
cmd += '-compile -logger=human '
cmd += '-build-path "' + tmp_dir + '" '
cmd += '-tools "' + ide_path + '/tools-builder" '
if args.library_path:
for lib_dir in args.library_path:
cmd += '-libraries "' + lib_dir + '" '
cmd += '-hardware "' + ide_path + '/hardware" '
if args.hardware_dir:
for hw_dir in args.hardware_dir:
cmd += '-hardware "' + hw_dir + '" '
else:
cmd += '-hardware "' + hardware_dir + '" '
# Debug=Serial,DebugLevel=Core____
cmd += '-fqbn=espressif:esp32:{board_name}:' \
'FlashFreq={flash_freq},' \
'PartitionScheme=huge_app,' \
'UploadSpeed=921600'.format(**vars(args))
cmd += ' '
cmd += '-ide-version=10607 '
cmd += '-warnings={warnings} '.format(**vars(args))
if args.verbose:
cmd += '-verbose '
cmd += sketch
if args.verbose:
print('Building: ' + cmd, file=f)
cmds = cmd.split(' ')
p = subprocess.Popen(cmds, stdout=f, stderr=subprocess.STDOUT)
p.wait()
return p.returncode
def parse_args():
parser = argparse.ArgumentParser(description='Sketch build helper')
parser.add_argument('-v', '--verbose', help='Enable verbose output',
action='store_true')
parser.add_argument('-i', '--ide_path', help='Arduino IDE path')
parser.add_argument('-p', '--build_path', help='Build directory')
parser.add_argument('-l', '--library_path', help='Additional library path',
action='append')
parser.add_argument('-d', '--hardware_dir', help='Additional hardware path',
action='append')
parser.add_argument('-b', '--board_name', help='Board name', default='esp32')
parser.add_argument('-w', '--warnings', help='Compilation warnings level',
default='none', choices=['none', 'all', 'more'])
parser.add_argument('-o', '--output_binary', help='File name for output binary')
parser.add_argument('-k', '--keep', action='store_true',
help='Don\'t delete temporary build directory')
parser.add_argument('--flash_freq', help='Flash frequency', default=40,
type=int, choices=[40, 80])
parser.add_argument('sketch_path', help='Sketch file path')
return parser.parse_args()
def main():
args = parse_args()
ide_path = args.ide_path
if not ide_path:
ide_path = os.environ.get('ARDUINO_IDE_PATH')
if not ide_path:
print("Please specify Arduino IDE path via --ide_path option"
"or ARDUINO_IDE_PATH environment variable.", file=sys.stderr)
return 2
sketch_path = args.sketch_path
tmp_dir = args.build_path
created_tmp_dir = False
if not tmp_dir:
tmp_dir = tempfile.mkdtemp()
created_tmp_dir = True
tools_dir = os.path.dirname(os.path.realpath(__file__)) + '/../tools'
# this is not the correct hardware folder to add.
hardware_dir = os.path.dirname(os.path.realpath(__file__)) + '/../cores'
output_name = tmp_dir + '/' + os.path.basename(sketch_path) + '.bin'
if args.verbose:
print("Sketch: ", sketch_path)
print("Build dir: ", tmp_dir)
print("Output: ", output_name)
if args.verbose:
f = sys.stdout
else:
f = open(tmp_dir + '/build.log', 'w')
res = compile(tmp_dir, sketch_path, tools_dir, hardware_dir, ide_path, f, args)
if res != 0:
return res
if args.output_binary is not None:
shutil.copy(output_name, args.output_binary)
if created_tmp_dir and not args.keep:
shutil.rmtree(tmp_dir, ignore_errors=True)
if __name__ == '__main__':
sys.exit(main())

View File

@ -1,9 +0,0 @@
#!/bin/bash
if [ ! -z "$TRAVIS_TAG" ]; then
# zip the package if tagged build
tools/build-release.sh -a$ESP32_GITHUB_TOKEN
#else
# run cmake and sketch tests
#tools/build-tests.sh
fi

View File

@ -1,5 +1,10 @@
#!/bin/bash
if [ -z "$TRAVIS_TAG" ]; then
echo "Skipping Packaging: Regular build"
exit 0
fi
############################################################
# $1 - download link
# $2 - JSON output file

64
tools/ci/build-tests.sh Executable file
View File

@ -0,0 +1,64 @@
#!/bin/bash
if [ ! -z "$TRAVIS_TAG" ]; then
echo "Skipping Test: Tagged build"
exit 0
fi
CHUNK_INDEX=$1
CHUNKS_CNT=$2
BUILD_PIO=0
if [ "$#" -lt 2 ]; then
echo "Building all sketches"
CHUNK_INDEX=0
CHUNKS_CNT=1
BUILD_PIO=1
fi
if [ "$CHUNKS_CNT" -le 0 ]; then
CHUNK_INDEX=0
CHUNKS_CNT=1
BUILD_PIO=1
fi
if [ "$CHUNK_INDEX" -gt "$CHUNKS_CNT" ]; then
CHUNK_INDEX=$CHUNKS_CNT
fi
if [ "$CHUNK_INDEX" -eq "$CHUNKS_CNT" ]; then
BUILD_PIO=1
fi
# CMake Test
if [ "$CHUNK_INDEX" -eq 0 ]; then
echo -e "travis_fold:start:check_cmakelists"
tools/ci/check-cmakelists.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:check_cmakelists"
fi
if [ "$BUILD_PIO" -eq 0 ]; then
# ArduinoIDE Test
echo -e "travis_fold:start:prep_arduino_ide"
tools/ci/prep-arduino-ide.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:prep_arduino_ide"
echo -e "travis_fold:start:test_arduino_ide"
tools/ci/test-arduino-ide.sh $CHUNK_INDEX $CHUNKS_CNT
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:test_arduino_ide"
echo -e "travis_fold:start:size_report"
cat size.log
echo -e "travis_fold:end:size_report"
else
# PlatformIO Test
echo -e "travis_fold:start:prep_platformio"
cd tools && python get.py && cd ..
tools/ci/prep-platformio.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:prep_platformio"
echo -e "travis_fold:start:test_platformio"
tools/ci/test-platformio.sh
if [ $? -ne 0 ]; then exit 1; fi
echo -e "travis_fold:end:test_platformio"
fi

View File

@ -5,10 +5,9 @@ wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-li
tar xf arduino.tar.xz
mv arduino-nightly $HOME/arduino_ide
mkdir -p $HOME/Arduino/libraries
mkdir -p $HOME/Arduino/hardware/espressif
cd $HOME/Arduino/hardware/espressif
cd $HOME/arduino_ide/hardware
mkdir espressif
cd espressif
ln -s $TRAVIS_BUILD_DIR esp32
cd esp32/tools
python get.py

View File

@ -16,11 +16,15 @@ if [ "$CHUNK_INDEX" -ge "$CHUNKS_CNT" ]; then
exit 1
fi
export ARDUINO_BOARD_FQBN="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none"
export ARDUINO_IDE_PATH=$HOME/arduino_ide
export ARDUINO_LIB_PATH=$HOME/Arduino/libraries
export ARDUINO_USR_PATH=$HOME/Arduino
export EXAMPLES_PATH=$TRAVIS_BUILD_DIR/libraries
export EXAMPLES_BUILD_DIR=$TRAVIS_BUILD_DIR/build.tmp
export EXAMPLES_BUILD_CMD="python tools/build.py -b esp32 -v -k -p $EXAMPLES_BUILD_DIR -l $ARDUINO_LIB_PATH "
export EXAMPLES_BUILD_DIR=$HOME/build.tmp
export EXAMPLES_CACHE_DIR=$HOME/cache.tmp
export EXAMPLES_BUILD_CMD="$ARDUINO_IDE_PATH/arduino-builder -compile -logger=human -core-api-version=\"10810\" -hardware \"$ARDUINO_IDE_PATH/hardware\" -hardware \"$ARDUINO_USR_PATH/hardware\" -tools \"$ARDUINO_IDE_PATH/tools-builder\" -built-in-libraries \"$ARDUINO_IDE_PATH/libraries\" -libraries \"$ARDUINO_USR_PATH/libraries\" -fqbn=$ARDUINO_BOARD_FQBN -warnings=\"all\" -build-cache \"$EXAMPLES_CACHE_DIR\" -build-path \"$EXAMPLES_BUILD_DIR\" -verbose"
export EXAMPLES_SIZE_BIN=$TRAVIS_BUILD_DIR/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-size
function print_size_info()
@ -93,6 +97,10 @@ function count_sketches()
function build_sketches()
{
mkdir -p $EXAMPLES_BUILD_DIR
mkdir -p $EXAMPLES_CACHE_DIR
mkdir -p $ARDUINO_USR_PATH/libraries
mkdir -p $ARDUINO_USR_PATH/hardware
local chunk_idex=$1
local chunks_num=$2
count_sketches

View File

@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
app1, app, ota_1, 0x310000,0x300000,
ffat, data, fat, 0x610000,0x9F0000,
# to create/use ffat, see https://github.com/marcmerlin/esp32_fatfsimage
1 # Name, Type, SubType, Offset, Size, Flags
2 nvs, data, nvs, 0x9000, 0x5000,
3 otadata, data, ota, 0xe000, 0x2000,
4 app0, app, ota_0, 0x10000, 0x300000,
5 app1, app, ota_1, 0x310000,0x300000,
6 ffat, data, fat, 0x610000,0x9F0000,
7 # to create/use ffat, see https://github.com/marcmerlin/esp32_fatfsimage

View File

@ -3,4 +3,4 @@ nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x140000,
app1, app, ota_1, 0x150000,0x140000,
ffat, data, fat, 0x291000,0x170000,
ffat, data, fat, 0x290000,0x170000,

1 # Name Type SubType Offset Size Flags
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x140000
5 app1 app ota_1 0x150000 0x140000
6 ffat data fat 0x291000 0x290000 0x170000

View File

@ -3,5 +3,5 @@ nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
app1, app, ota_1, 0x210000,0x200000,
ffat, data, fat, 0x410000,0xBEF000,
ffat, data, fat, 0x410000,0xBF0000,
# to create/use ffat, see https://github.com/marcmerlin/esp32_fatfsimage

1 # Name, Type, SubType, Offset, Size, Flags
3 otadata, data, ota, 0xe000, 0x2000,
4 app0, app, ota_0, 0x10000, 0x200000,
5 app1, app, ota_1, 0x210000,0x200000,
6 ffat, data, fat, 0x410000,0xBEF000, ffat, data, fat, 0x410000,0xBF0000,
7 # to create/use ffat, see https://github.com/marcmerlin/esp32_fatfsimage

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -60,7 +60,7 @@
#define CONFIG_SPIRAM_USE_CAPS_ALLOC 1
#define CONFIG_FRMN1_QUANT 1
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE 1
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 16
#define CONFIG_MBEDTLS_SSL_ALPN 1
#define CONFIG_MBEDTLS_PEM_WRITE_C 1
#define CONFIG_BT_SPP_ENABLED 1
@ -130,6 +130,7 @@
#define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO 1
#define CONFIG_LWIP_DHCPS_LEASE_UNIT 60
#define CONFIG_SPIFFS_USE_MAGIC 1
#define CONFIG_OV7725_SUPPORT 1
#define CONFIG_TCPIP_TASK_STACK_SIZE 2560
#define CONFIG_BLUEDROID_PINNED_TO_CORE_0 1
#define CONFIG_FATFS_CODEPAGE_850 1
@ -291,7 +292,6 @@
#define CONFIG_ESP32_DEBUG_STUBS_ENABLE 1
#define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT 30
#define CONFIG_TCPIP_LWIP 1
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST 1
#define CONFIG_REDUCE_PHY_TX_POWER 1
#define CONFIG_BOOTLOADER_WDT_TIME_MS 9000
#define CONFIG_FREERTOS_CORETIMER_0 1

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.

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