Unverified Commit bdbfc45c authored by Me No Dev's avatar Me No Dev Committed by GitHub

Merge branch 'master' into release/v2.x

parents 483bebf8 6b1cc413
#!/bin/bash
# Get inputs from command
owner_repository=$1
pr_number=$2
url="https://api.github.com/repos/$owner_repository/pulls/$pr_number/files"
echo $url
# Get changes in boards.txt file from PR
Patch=$(curl $url | jq -r '.[] | select(.filename == "boards.txt") | .patch ')
# Extract only changed lines number and count
substring_patch=$(echo "$Patch" | grep -o '@@[^@]*@@')
params_array=()
IFS=$'\n' read -d '' -ra params <<< $(echo "$substring_patch" | grep -oE '[-+][0-9]+,[0-9]+')
for param in "${params[@]}"
do
echo "The parameter is $param"
params_array+=("$param")
done
boards_array=()
previous_board=""
file="boards.txt"
# Loop through boards.txt file and extract all boards that were added
for (( c=0; c<${#params_array[@]}; c+=2 ))
do
deletion_count=$( echo "${params_array[c]}" | cut -d',' -f2 | cut -d' ' -f1 )
addition_line=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f1 )
addition_count=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f2 | cut -d' ' -f1 )
addition_end=$(($addition_line+$addition_count))
addition_line=$(($addition_line + 3))
addition_end=$(($addition_end - $deletion_count))
echo $addition_line
echo $addition_end
i=0
while read -r line
do
i=$((i+1))
if [ $i -lt $addition_line ]
then
continue
elif [ $i -gt $addition_end ]
then
break
fi
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
if [ "$board_name" != "" ]
then
if [ "$board_name" != "$previous_board" ]
then
boards_array+=("espressif:esp32:$board_name")
previous_board="$board_name"
echo "Added 'espressif:esp32:$board_name' to array"
fi
fi
done < "$file"
done
# Create JSON like string with all boards found and pass it to env variable
board_count=${#boards_array[@]}
if [ $board_count -gt 0 ]
then
json_matrix='{"fqbn": ['
for board in ${boards_array[@]}
do
json_matrix+='"'$board'"'
if [ $board_count -gt 1 ]
then
json_matrix+=","
fi
board_count=$(($board_count - 1))
done
json_matrix+=']}'
echo $json_matrix
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
else
echo "FQBNS=''" >> $GITHUB_ENV
fi
\ No newline at end of file
name: New Board Test
# The workflow will run on schedule and labeled pull requests
on:
pull_request:
env:
# It's convenient to set variables for values used multiple times in the workflow
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
find-boards:
runs-on: ubuntu-latest
outputs:
fqbns: ${{ env.FQBNS }}
steps:
# This step makes the contents of the repository available to the workflow
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup jq
uses: dcarbone/install-jq-action@v1.0.1
- name: Get board name
run:
bash .github/scripts/find_new_boards.sh ${{ github.repository }} ${{github.event.number}}
test-boards:
needs: find-boards
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.services != '' }}
env:
REPOSITORY: |
- source-path: '.'
name: "espressif:esp32"
strategy:
matrix: ${{ fromJson(needs.find-boards.outputs.fqbns) }}
steps:
# This step makes the contents of the repository available to the workflow
- name: Checkout repository
uses: actions/checkout@v3
- name: Compile sketch
uses: P-R-O-C-H-Y/compile-sketches@main
with:
platforms: |
${{ env.REPOSITORY }}
fqbn: ${{ matrix.fqbn }}
use-json-file: false
enable-deltas-report: false
enable-warnings-report: false
cli-compile-flags: |
- --warnings="all"
exit-on-fail: true
sketch-paths:
"- ./libraries/ESP32/examples/ChipID/GetChipID/GetChipID.ino"
...@@ -15,6 +15,8 @@ env: ...@@ -15,6 +15,8 @@ env:
SKETCHES_REPORTS_ARTIFACT_NAME: libraries-report SKETCHES_REPORTS_ARTIFACT_NAME: libraries-report
RESULT_LIBRARY_TEST_FILE: LIBRARIES_TEST.md RESULT_LIBRARY_TEST_FILE: LIBRARIES_TEST.md
JSON_LIBRARY_LIST_FILE: .github/workflows/lib.json JSON_LIBRARY_LIST_FILE: .github/workflows/lib.json
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs: jobs:
compile-sketch: compile-sketch:
if: | if: |
...@@ -80,6 +82,13 @@ jobs: ...@@ -80,6 +82,13 @@ jobs:
# Check out repository # Check out repository
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
token: ${{ env.GITHUB_TOKEN }}
fetch-depth: '0'
- name: Switch branch
run:
git checkout remotes/origin/gh-pages
# This step is needed to get the size data produced by the compile jobs # This step is needed to get the size data produced by the compile jobs
- name: Download sketches reports artifact - name: Download sketches reports artifact
...@@ -95,12 +104,8 @@ jobs: ...@@ -95,12 +104,8 @@ jobs:
destination-file: ${{ env.RESULT_LIBRARY_TEST_FILE }} destination-file: ${{ env.RESULT_LIBRARY_TEST_FILE }}
- name: Append file with action URL - name: Append file with action URL
uses: DamianReeves/write-file-action@master run:
with: echo "/ [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})" >> ${{ env.RESULT_LIBRARY_TEST_FILE }}
path: ${{ env.RESULT_LIBRARY_TEST_FILE }}
contents: |
/ [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
write-mode: append
- name: Push to github repo - name: Push to github repo
run: | run: |
...@@ -108,8 +113,8 @@ jobs: ...@@ -108,8 +113,8 @@ jobs:
git config user.email github-actions@github.com git config user.email github-actions@github.com
git add ${{ env.RESULT_LIBRARY_TEST_FILE }} git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
git commit -m "Generated External Libraries Test Results" git commit -m "Generated External Libraries Test Results"
git push git push origin HEAD:gh-pages
event_file: event_file:
name: "Event File" name: "Event File"
if: | if: |
...@@ -121,4 +126,4 @@ jobs: ...@@ -121,4 +126,4 @@ jobs:
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: Event File name: Event File
path: ${{github.event_path}} path: ${{github.event_path}}
\ No newline at end of file
Empty file
\ No newline at end of file
...@@ -54,7 +54,7 @@ Finally, if you are sure no one else had the issue, follow the **Issue template* ...@@ -54,7 +54,7 @@ Finally, if you are sure no one else had the issue, follow the **Issue template*
### External libraries compilation test ### External libraries compilation test
We have set-up CI testing for external libraries for ESP32 Arduino core. You can check test results in the file [LIBRARIES_TEST](https://github.com/espressif/arduino-esp32/blob/master/LIBRARIES_TEST.md). We have set-up CI testing for external libraries for ESP32 Arduino core. You can check test results in the file [LIBRARIES_TEST](https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md).
For more information and how to add your library to the test see [external library testing](https://docs.espressif.com/projects/arduino-esp32/en/latest/external_libraries_test.html) in the documentation. For more information and how to add your library to the test see [external library testing](https://docs.espressif.com/projects/arduino-esp32/en/latest/external_libraries_test.html) in the documentation.
### Contributing ### Contributing
......
...@@ -990,6 +990,7 @@ esp32wrover.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1. ...@@ -990,6 +990,7 @@ esp32wrover.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.
esp32wrover.menu.PartitionScheme.defaultffat.build.partitions=default_ffat esp32wrover.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
esp32wrover.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) esp32wrover.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS)
esp32wrover.menu.PartitionScheme.default_8MB.build.partitions=default_8MB esp32wrover.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
esp32wrover.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
esp32wrover.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) esp32wrover.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
esp32wrover.menu.PartitionScheme.minimal.build.partitions=minimal esp32wrover.menu.PartitionScheme.minimal.build.partitions=minimal
esp32wrover.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) esp32wrover.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
...@@ -1012,6 +1013,7 @@ esp32wrover.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ...@@ -1012,6 +1013,7 @@ esp32wrover.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32wrover.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32wrover.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
esp32wrover.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) esp32wrover.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS)
esp32wrover.menu.PartitionScheme.fatflash.build.partitions=ffat esp32wrover.menu.PartitionScheme.fatflash.build.partitions=ffat
esp32wrover.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
esp32wrover.menu.PartitionScheme.rainmaker=RainMaker esp32wrover.menu.PartitionScheme.rainmaker=RainMaker
esp32wrover.menu.PartitionScheme.rainmaker.build.partitions=rainmaker esp32wrover.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
esp32wrover.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 esp32wrover.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
...@@ -1608,6 +1610,7 @@ esp32s2usb.menu.EraseFlash.all.upload.erase_cmd=-e ...@@ -1608,6 +1610,7 @@ esp32s2usb.menu.EraseFlash.all.upload.erase_cmd=-e
############################################################## ##############################################################
esp32wroverkit.name=ESP32 Wrover Kit (all versions) esp32wroverkit.name=ESP32 Wrover Kit (all versions)
esp32wroverkit.bootloader.tool=esptool_py esp32wroverkit.bootloader.tool=esptool_py
esp32wroverkit.bootloader.tool.default=esptool_py esp32wroverkit.bootloader.tool.default=esptool_py
...@@ -1619,8 +1622,10 @@ esp32wroverkit.upload.maximum_size=1310720 ...@@ -1619,8 +1622,10 @@ esp32wroverkit.upload.maximum_size=1310720
esp32wroverkit.upload.maximum_data_size=327680 esp32wroverkit.upload.maximum_data_size=327680
esp32wroverkit.upload.flags= esp32wroverkit.upload.flags=
esp32wroverkit.upload.extra_flags= esp32wroverkit.upload.extra_flags=
esp32wroverkit.serial.disableDTR=true esp32wroverkit.serial.disableDTR=true
esp32wroverkit.serial.disableRTS=true esp32wroverkit.serial.disableRTS=true
esp32wroverkit.build.tarch=xtensa esp32wroverkit.build.tarch=xtensa
esp32wroverkit.build.bootloader_addr=0x1000 esp32wroverkit.build.bootloader_addr=0x1000
esp32wroverkit.build.target=esp32 esp32wroverkit.build.target=esp32
...@@ -1628,25 +1633,14 @@ esp32wroverkit.build.mcu=esp32 ...@@ -1628,25 +1633,14 @@ esp32wroverkit.build.mcu=esp32
esp32wroverkit.build.core=esp32 esp32wroverkit.build.core=esp32
esp32wroverkit.build.variant=esp32 esp32wroverkit.build.variant=esp32
esp32wroverkit.build.board=ESP32_WROVER_KIT esp32wroverkit.build.board=ESP32_WROVER_KIT
esp32wroverkit.build.f_cpu=240000000L esp32wroverkit.build.f_cpu=240000000L
esp32wroverkit.menu.CPUFreq.240=240MHz (WiFi/BT)
esp32wroverkit.menu.CPUFreq.240.build.f_cpu=240000000L
esp32wroverkit.menu.CPUFreq.160=160MHz (WiFi/BT)
esp32wroverkit.menu.CPUFreq.160.build.f_cpu=160000000L
esp32wroverkit.menu.CPUFreq.80=80MHz (WiFi/BT)
esp32wroverkit.menu.CPUFreq.80.build.f_cpu=80000000L
esp32wroverkit.menu.CPUFreq.40=40MHz (40MHz XTAL)
esp32wroverkit.menu.CPUFreq.40.build.f_cpu=40000000L
esp32wroverkit.menu.CPUFreq.26=26MHz (26MHz XTAL)
esp32wroverkit.menu.CPUFreq.26.build.f_cpu=26000000L
esp32wroverkit.menu.CPUFreq.20=20MHz (40MHz XTAL)
esp32wroverkit.menu.CPUFreq.20.build.f_cpu=20000000L
esp32wroverkit.menu.CPUFreq.13=13MHz (26MHz XTAL)
esp32wroverkit.menu.CPUFreq.13.build.f_cpu=13000000L
esp32wroverkit.menu.CPUFreq.10=10MHz (40MHz XTAL)
esp32wroverkit.menu.CPUFreq.10.build.f_cpu=10000000L
esp32wroverkit.build.flash_size=4MB esp32wroverkit.build.flash_size=4MB
esp32wroverkit.build.flash_freq=40m esp32wroverkit.build.flash_freq=40m
esp32wroverkit.build.flash_mode=dio
esp32wroverkit.build.boot=dio
esp32wroverkit.build.partitions=default
esp32wroverkit.menu.FlashSize.4M=4MB (32Mb) esp32wroverkit.menu.FlashSize.4M=4MB (32Mb)
esp32wroverkit.menu.FlashSize.4M.build.flash_size=4MB esp32wroverkit.menu.FlashSize.4M.build.flash_size=4MB
esp32wroverkit.menu.FlashSize.8M=8MB (64Mb) esp32wroverkit.menu.FlashSize.8M=8MB (64Mb)
...@@ -1657,19 +1651,19 @@ esp32wroverkit.menu.FlashSize.2M.build.flash_size=2MB ...@@ -1657,19 +1651,19 @@ esp32wroverkit.menu.FlashSize.2M.build.flash_size=2MB
esp32wroverkit.menu.FlashSize.2M.build.partitions=minimal esp32wroverkit.menu.FlashSize.2M.build.partitions=minimal
esp32wroverkit.menu.FlashSize.16M=16MB (128Mb) esp32wroverkit.menu.FlashSize.16M=16MB (128Mb)
esp32wroverkit.menu.FlashSize.16M.build.flash_size=16MB esp32wroverkit.menu.FlashSize.16M.build.flash_size=16MB
esp32wroverkit.build.flash_mode=dio
esp32wroverkit.build.boot=dio
esp32wroverkit.build.partitions=default
esp32wroverkit.menu.PSRAM.enabled=Enabled esp32wroverkit.menu.PSRAM.enabled=Enabled
esp32wroverkit.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw esp32wroverkit.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw
esp32wroverkit.menu.PSRAM.disabled=Disabled esp32wroverkit.menu.PSRAM.disabled=Disabled
esp32wroverkit.menu.PSRAM.disabled.build.defines= esp32wroverkit.menu.PSRAM.disabled.build.defines=
esp32wroverkit.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) esp32wroverkit.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
esp32wroverkit.menu.PartitionScheme.default.build.partitions=default esp32wroverkit.menu.PartitionScheme.default.build.partitions=default
esp32wroverkit.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) esp32wroverkit.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
esp32wroverkit.menu.PartitionScheme.defaultffat.build.partitions=default_ffat esp32wroverkit.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
esp32wroverkit.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) esp32wroverkit.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS)
esp32wroverkit.menu.PartitionScheme.default_8MB.build.partitions=default_8MB esp32wroverkit.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
esp32wroverkit.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
esp32wroverkit.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) esp32wroverkit.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
esp32wroverkit.menu.PartitionScheme.minimal.build.partitions=minimal esp32wroverkit.menu.PartitionScheme.minimal.build.partitions=minimal
esp32wroverkit.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) esp32wroverkit.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
...@@ -1692,9 +1686,28 @@ esp32wroverkit.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs ...@@ -1692,9 +1686,28 @@ esp32wroverkit.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32wroverkit.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 esp32wroverkit.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
esp32wroverkit.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS) esp32wroverkit.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS)
esp32wroverkit.menu.PartitionScheme.fatflash.build.partitions=ffat esp32wroverkit.menu.PartitionScheme.fatflash.build.partitions=ffat
esp32wroverkit.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
esp32wroverkit.menu.PartitionScheme.rainmaker=RainMaker esp32wroverkit.menu.PartitionScheme.rainmaker=RainMaker
esp32wroverkit.menu.PartitionScheme.rainmaker.build.partitions=rainmaker esp32wroverkit.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
esp32wroverkit.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728 esp32wroverkit.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
esp32wroverkit.menu.CPUFreq.240=240MHz (WiFi/BT)
esp32wroverkit.menu.CPUFreq.240.build.f_cpu=240000000L
esp32wroverkit.menu.CPUFreq.160=160MHz (WiFi/BT)
esp32wroverkit.menu.CPUFreq.160.build.f_cpu=160000000L
esp32wroverkit.menu.CPUFreq.80=80MHz (WiFi/BT)
esp32wroverkit.menu.CPUFreq.80.build.f_cpu=80000000L
esp32wroverkit.menu.CPUFreq.40=40MHz (40MHz XTAL)
esp32wroverkit.menu.CPUFreq.40.build.f_cpu=40000000L
esp32wroverkit.menu.CPUFreq.26=26MHz (26MHz XTAL)
esp32wroverkit.menu.CPUFreq.26.build.f_cpu=26000000L
esp32wroverkit.menu.CPUFreq.20=20MHz (40MHz XTAL)
esp32wroverkit.menu.CPUFreq.20.build.f_cpu=20000000L
esp32wroverkit.menu.CPUFreq.13=13MHz (26MHz XTAL)
esp32wroverkit.menu.CPUFreq.13.build.f_cpu=13000000L
esp32wroverkit.menu.CPUFreq.10=10MHz (40MHz XTAL)
esp32wroverkit.menu.CPUFreq.10.build.f_cpu=10000000L
esp32wroverkit.menu.FlashMode.qio=QIO esp32wroverkit.menu.FlashMode.qio=QIO
esp32wroverkit.menu.FlashMode.qio.build.flash_mode=dio esp32wroverkit.menu.FlashMode.qio.build.flash_mode=dio
esp32wroverkit.menu.FlashMode.qio.build.boot=qio esp32wroverkit.menu.FlashMode.qio.build.boot=qio
...@@ -1711,6 +1724,7 @@ esp32wroverkit.menu.FlashFreq.80=80MHz ...@@ -1711,6 +1724,7 @@ esp32wroverkit.menu.FlashFreq.80=80MHz
esp32wroverkit.menu.FlashFreq.80.build.flash_freq=80m esp32wroverkit.menu.FlashFreq.80.build.flash_freq=80m
esp32wroverkit.menu.FlashFreq.40=40MHz esp32wroverkit.menu.FlashFreq.40=40MHz
esp32wroverkit.menu.FlashFreq.40.build.flash_freq=40m esp32wroverkit.menu.FlashFreq.40.build.flash_freq=40m
esp32wroverkit.menu.UploadSpeed.921600=921600 esp32wroverkit.menu.UploadSpeed.921600=921600
esp32wroverkit.menu.UploadSpeed.921600.upload.speed=921600 esp32wroverkit.menu.UploadSpeed.921600.upload.speed=921600
esp32wroverkit.menu.UploadSpeed.115200=115200 esp32wroverkit.menu.UploadSpeed.115200=115200
...@@ -1725,6 +1739,7 @@ esp32wroverkit.menu.UploadSpeed.460800.macosx=460800 ...@@ -1725,6 +1739,7 @@ esp32wroverkit.menu.UploadSpeed.460800.macosx=460800
esp32wroverkit.menu.UploadSpeed.460800.upload.speed=460800 esp32wroverkit.menu.UploadSpeed.460800.upload.speed=460800
esp32wroverkit.menu.UploadSpeed.512000.windows=512000 esp32wroverkit.menu.UploadSpeed.512000.windows=512000
esp32wroverkit.menu.UploadSpeed.512000.upload.speed=512000 esp32wroverkit.menu.UploadSpeed.512000.upload.speed=512000
esp32wroverkit.menu.DebugLevel.none=None esp32wroverkit.menu.DebugLevel.none=None
esp32wroverkit.menu.DebugLevel.none.build.code_debug=0 esp32wroverkit.menu.DebugLevel.none.build.code_debug=0
esp32wroverkit.menu.DebugLevel.error=Error esp32wroverkit.menu.DebugLevel.error=Error
...@@ -6080,6 +6095,158 @@ lolin_s3.menu.EraseFlash.all.upload.erase_cmd=-e ...@@ -6080,6 +6095,158 @@ lolin_s3.menu.EraseFlash.all.upload.erase_cmd=-e
############################################################## ##############################################################
lolin_s3_pro.name=LOLIN S3 Pro
lolin_s3_pro.vid.0=0x303a
lolin_s3_pro.pid.0=0x8161
lolin_s3_pro.bootloader.tool=esptool_py
lolin_s3_pro.bootloader.tool.default=esptool_py
lolin_s3_pro.upload.tool=esptool_py
lolin_s3_pro.upload.tool.default=esptool_py
lolin_s3_pro.upload.tool.network=esp_ota
lolin_s3_pro.upload.maximum_size=1310720
lolin_s3_pro.upload.maximum_data_size=327680
lolin_s3_pro.upload.flags=
lolin_s3_pro.upload.extra_flags=
lolin_s3_pro.upload.use_1200bps_touch=false
lolin_s3_pro.upload.wait_for_upload_port=false
lolin_s3_pro.serial.disableDTR=false
lolin_s3_pro.serial.disableRTS=false
lolin_s3_pro.build.tarch=xtensa
lolin_s3_pro.build.bootloader_addr=0x0
lolin_s3_pro.build.target=esp32s3
lolin_s3_pro.build.mcu=esp32s3
lolin_s3_pro.build.core=esp32
lolin_s3_pro.build.variant=lolin_s3_pro
lolin_s3_pro.build.board=LOLIN_S3_PRO
lolin_s3_pro.build.usb_mode=1
lolin_s3_pro.build.cdc_on_boot=0
lolin_s3_pro.build.msc_on_boot=0
lolin_s3_pro.build.dfu_on_boot=0
lolin_s3_pro.build.f_cpu=240000000L
lolin_s3_pro.build.flash_size=16MB
lolin_s3_pro.build.flash_freq=80m
lolin_s3_pro.build.flash_mode=dio
lolin_s3_pro.build.boot=qio
lolin_s3_pro.build.boot_freq=80m
lolin_s3_pro.build.partitions=default
lolin_s3_pro.build.defines=-DBOARD_HAS_PSRAM
lolin_s3_pro.build.loop_core=
lolin_s3_pro.build.event_core=
lolin_s3_pro.build.psram_type=opi
lolin_s3_pro.build.memory_type={build.boot}_{build.psram_type}
lolin_s3_pro.menu.FlashMode.qio=QIO 80MHz
lolin_s3_pro.menu.FlashMode.qio.build.flash_mode=dio
lolin_s3_pro.menu.FlashMode.qio.build.boot=qio
lolin_s3_pro.menu.FlashMode.qio.build.boot_freq=80m
lolin_s3_pro.menu.FlashMode.qio.build.flash_freq=80m
lolin_s3_pro.menu.FlashMode.qio120=QIO 120MHz
lolin_s3_pro.menu.FlashMode.qio120.build.flash_mode=dio
lolin_s3_pro.menu.FlashMode.qio120.build.boot=qio
lolin_s3_pro.menu.FlashMode.qio120.build.boot_freq=120m
lolin_s3_pro.menu.FlashMode.qio120.build.flash_freq=80m
lolin_s3_pro.menu.LoopCore.1=Core 1
lolin_s3_pro.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
lolin_s3_pro.menu.LoopCore.0=Core 0
lolin_s3_pro.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
lolin_s3_pro.menu.EventsCore.1=Core 1
lolin_s3_pro.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
lolin_s3_pro.menu.EventsCore.0=Core 0
lolin_s3_pro.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
lolin_s3_pro.menu.USBMode.hwcdc=Hardware CDC and JTAG
lolin_s3_pro.menu.USBMode.hwcdc.build.usb_mode=1
lolin_s3_pro.menu.USBMode.default=USB-OTG (TinyUSB)
lolin_s3_pro.menu.USBMode.default.build.usb_mode=0
lolin_s3_pro.menu.CDCOnBoot.default=Disabled
lolin_s3_pro.menu.CDCOnBoot.default.build.cdc_on_boot=0
lolin_s3_pro.menu.CDCOnBoot.cdc=Enabled
lolin_s3_pro.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
lolin_s3_pro.menu.MSCOnBoot.default=Disabled
lolin_s3_pro.menu.MSCOnBoot.default.build.msc_on_boot=0
lolin_s3_pro.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
lolin_s3_pro.menu.MSCOnBoot.msc.build.msc_on_boot=1
lolin_s3_pro.menu.DFUOnBoot.default=Disabled
lolin_s3_pro.menu.DFUOnBoot.default.build.dfu_on_boot=0
lolin_s3_pro.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
lolin_s3_pro.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
lolin_s3_pro.menu.UploadMode.default=UART0 / Hardware CDC
lolin_s3_pro.menu.UploadMode.default.upload.use_1200bps_touch=false
lolin_s3_pro.menu.UploadMode.default.upload.wait_for_upload_port=false
lolin_s3_pro.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
lolin_s3_pro.menu.UploadMode.cdc.upload.use_1200bps_touch=true
lolin_s3_pro.menu.UploadMode.cdc.upload.wait_for_upload_port=true
lolin_s3_pro.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS)
lolin_s3_pro.menu.PartitionScheme.fatflash.build.partitions=ffat
lolin_s3_pro.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
lolin_s3_pro.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS)
lolin_s3_pro.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
lolin_s3_pro.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
lolin_s3_pro.menu.PartitionScheme.rainmaker=RainMaker
lolin_s3_pro.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
lolin_s3_pro.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
lolin_s3_pro.menu.CPUFreq.240=240MHz (WiFi)
lolin_s3_pro.menu.CPUFreq.240.build.f_cpu=240000000L
lolin_s3_pro.menu.CPUFreq.160=160MHz (WiFi)
lolin_s3_pro.menu.CPUFreq.160.build.f_cpu=160000000L
lolin_s3_pro.menu.CPUFreq.80=80MHz (WiFi)
lolin_s3_pro.menu.CPUFreq.80.build.f_cpu=80000000L
lolin_s3_pro.menu.CPUFreq.40=40MHz
lolin_s3_pro.menu.CPUFreq.40.build.f_cpu=40000000L
lolin_s3_pro.menu.CPUFreq.20=20MHz
lolin_s3_pro.menu.CPUFreq.20.build.f_cpu=20000000L
lolin_s3_pro.menu.CPUFreq.10=10MHz
lolin_s3_pro.menu.CPUFreq.10.build.f_cpu=10000000L
lolin_s3_pro.menu.UploadSpeed.921600=921600
lolin_s3_pro.menu.UploadSpeed.921600.upload.speed=921600
lolin_s3_pro.menu.UploadSpeed.115200=115200
lolin_s3_pro.menu.UploadSpeed.115200.upload.speed=115200
lolin_s3_pro.menu.UploadSpeed.256000.windows=256000
lolin_s3_pro.menu.UploadSpeed.256000.upload.speed=256000
lolin_s3_pro.menu.UploadSpeed.230400.windows.upload.speed=256000
lolin_s3_pro.menu.UploadSpeed.230400=230400
lolin_s3_pro.menu.UploadSpeed.230400.upload.speed=230400
lolin_s3_pro.menu.UploadSpeed.460800.linux=460800
lolin_s3_pro.menu.UploadSpeed.460800.macosx=460800
lolin_s3_pro.menu.UploadSpeed.460800.upload.speed=460800
lolin_s3_pro.menu.UploadSpeed.512000.windows=512000
lolin_s3_pro.menu.UploadSpeed.512000.upload.speed=512000
lolin_s3_pro.menu.DebugLevel.none=None
lolin_s3_pro.menu.DebugLevel.none.build.code_debug=0
lolin_s3_pro.menu.DebugLevel.error=Error
lolin_s3_pro.menu.DebugLevel.error.build.code_debug=1
lolin_s3_pro.menu.DebugLevel.warn=Warn
lolin_s3_pro.menu.DebugLevel.warn.build.code_debug=2
lolin_s3_pro.menu.DebugLevel.info=Info
lolin_s3_pro.menu.DebugLevel.info.build.code_debug=3
lolin_s3_pro.menu.DebugLevel.debug=Debug
lolin_s3_pro.menu.DebugLevel.debug.build.code_debug=4
lolin_s3_pro.menu.DebugLevel.verbose=Verbose
lolin_s3_pro.menu.DebugLevel.verbose.build.code_debug=5
lolin_s3_pro.menu.EraseFlash.none=Disabled
lolin_s3_pro.menu.EraseFlash.none.upload.erase_cmd=
lolin_s3_pro.menu.EraseFlash.all=Enabled
lolin_s3_pro.menu.EraseFlash.all.upload.erase_cmd=-e
##############################################################
lolin32.name=WEMOS LOLIN32 lolin32.name=WEMOS LOLIN32
lolin32.bootloader.tool=esptool_py lolin32.bootloader.tool=esptool_py
......
...@@ -128,5 +128,5 @@ In the table the results are in order ``BEFORE -> AFTER``. ...@@ -128,5 +128,5 @@ In the table the results are in order ``BEFORE -> AFTER``.
:height: 2ex :height: 2ex
:class: no-scaled-link :class: no-scaled-link
.. _LIBRARIES_TEST.md: https://github.com/espressif/arduino-esp32/LIBRARIES_TEST.md .. _LIBRARIES_TEST.md: https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md
.. _lib.json: https://github.com/espressif/arduino-esp32/.github/workflow/lib.json .. _lib.json: https://github.com/espressif/arduino-esp32/.github/workflow/lib.json
\ No newline at end of file
/*
Simple Sketch for testing HardwareSerial with different CPU Frequencies
Changing the CPU Frequency may affect peripherals and Wireless functionality
In ESP32 Arduino, UART shall work correctly in order to let the user see DGB info
and other application messages.
CPU Frequency is usually lowered in sleep modes
and some other Low Power configurations
*/
int cpufreqs[6] = {240, 160, 80, 40, 20, 10};
#define NUM_CPU_FREQS (sizeof(cpufreqs) / sizeof(int))
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("\n Starting...\n");
Serial.flush();
// initial information
uint32_t Freq = getCpuFrequencyMhz();
Serial.print("CPU Freq = ");
Serial.print(Freq);
Serial.println(" MHz");
Freq = getXtalFrequencyMhz();
Serial.print("XTAL Freq = ");
Serial.print(Freq);
Serial.println(" MHz");
Freq = getApbFrequency();
Serial.print("APB Freq = ");
Serial.print(Freq);
Serial.println(" Hz");
delay(500);
// ESP32-C3 and other RISC-V target may not support 240MHz
#ifdef CONFIG_IDF_TARGET_ESP32C3
uint8_t firstFreq = 1;
#else
uint8_t firstFreq = 0;
#endif
// testing HardwareSerial for all possible CPU/APB Frequencies
for (uint8_t i = firstFreq; i < NUM_CPU_FREQS; i++) {
Serial.printf("\n------- Trying CPU Freq = %d ---------\n", cpufreqs[i]);
Serial.flush(); // wait to empty the UART FIFO before changing the CPU Freq.
setCpuFrequencyMhz(cpufreqs[i]);
Serial.updateBaudRate(115200);
Freq = getCpuFrequencyMhz();
Serial.print("CPU Freq = ");
Serial.print(Freq);
Serial.println(" MHz");
Freq = getXtalFrequencyMhz();
Serial.print("XTAL Freq = ");
Serial.print(Freq);
Serial.println(" MHz");
Freq = getApbFrequency();
Serial.print("APB Freq = ");
Serial.print(Freq);
Serial.println(" Hz");
if (i < NUM_CPU_FREQS - 1) {
Serial.println("Moving to the next frequency after a pause of 2 seconds.");
delay(2000);
}
}
Serial.println("\n-------------------\n");
Serial.println("End of testing...");
Serial.println("\n-------------------\n");
}
void loop() {
// Nothing here so far
}
...@@ -203,6 +203,15 @@ String File::getNextFileName(void) ...@@ -203,6 +203,15 @@ String File::getNextFileName(void)
} }
String File::getNextFileName(bool *isDir)
{
if (!_p) {
return "";
}
return _p->getNextFileName(isDir);
}
void File::rewindDirectory(void) void File::rewindDirectory(void)
{ {
if (!*this) { if (!*this) {
......
...@@ -81,6 +81,7 @@ public: ...@@ -81,6 +81,7 @@ public:
boolean seekDir(long position); boolean seekDir(long position);
File openNextFile(const char* mode = FILE_READ); File openNextFile(const char* mode = FILE_READ);
String getNextFileName(void); String getNextFileName(void);
String getNextFileName(boolean *isDir);
void rewindDirectory(void); void rewindDirectory(void);
protected: protected:
......
...@@ -45,6 +45,7 @@ public: ...@@ -45,6 +45,7 @@ public:
virtual FileImplPtr openNextFile(const char* mode) = 0; virtual FileImplPtr openNextFile(const char* mode) = 0;
virtual boolean seekDir(long position); virtual boolean seekDir(long position);
virtual String getNextFileName(void); virtual String getNextFileName(void);
virtual String getNextFileName(bool *isDir);
virtual void rewindDirectory(void) = 0; virtual void rewindDirectory(void) = 0;
virtual operator bool() = 0; virtual operator bool() = 0;
}; };
......
...@@ -540,6 +540,32 @@ String VFSFileImpl::getNextFileName() ...@@ -540,6 +540,32 @@ String VFSFileImpl::getNextFileName()
return name; return name;
} }
String VFSFileImpl::getNextFileName(bool *isDir)
{
if (!_isDirectory || !_d) {
return "";
}
struct dirent *file = readdir(_d);
if (file == NULL) {
return "";
}
if (file->d_type != DT_REG && file->d_type != DT_DIR) {
return "";
}
String fname = String(file->d_name);
String name = String(_path);
if (!fname.startsWith("/") && !name.endsWith("/")) {
name += "/";
}
name += fname;
// check entry is a directory
if (isDir) {
*isDir = (file->d_type == DT_DIR);
}
return name;
}
void VFSFileImpl::rewindDirectory(void) void VFSFileImpl::rewindDirectory(void)
{ {
if(!_isDirectory || !_d) { if(!_isDirectory || !_d) {
......
...@@ -73,6 +73,7 @@ public: ...@@ -73,6 +73,7 @@ public:
boolean isDirectory(void) override; boolean isDirectory(void) override;
boolean seekDir(long position) override; boolean seekDir(long position) override;
String getNextFileName(void) override; String getNextFileName(void) override;
String getNextFileName(bool *isDir) override;
FileImplPtr openNextFile(const char* mode) override; FileImplPtr openNextFile(const char* mode) override;
void rewindDirectory(void) override; void rewindDirectory(void) override;
operator bool(); operator bool();
......
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x8161
#define EXTERNAL_NUM_INTERRUPTS 46
#define NUM_DIGITAL_PINS 48
#define NUM_ANALOG_INPUTS 18
static const uint8_t LED_BUILTIN = 38;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46)
static const uint8_t TX = 43;
static const uint8_t RX = 44;
static const uint8_t SDA = 9;
static const uint8_t SCL = 10;
static const uint8_t SS = 0;
static const uint8_t MOSI = 11;
static const uint8_t MISO = 13;
static const uint8_t SCK = 12;
static const uint8_t TF_CS = 46;
static const uint8_t TS_CS = 45;
static const uint8_t TFT_CS = 48;
static const uint8_t TFT_DC = 47;
static const uint8_t TFT_RST = 21;
static const uint8_t TFT_LED = 14;
static const uint8_t A0 = 1;
static const uint8_t A1 = 2;
static const uint8_t A2 = 3;
static const uint8_t A3 = 4;
static const uint8_t A4 = 5;
static const uint8_t A5 = 6;
static const uint8_t A6 = 7;
static const uint8_t A7 = 8;
static const uint8_t A8 = 9;
static const uint8_t A9 = 10;
static const uint8_t A10 = 11;
static const uint8_t A11 = 12;
static const uint8_t A12 = 13;
static const uint8_t A13 = 14;
static const uint8_t A14 = 15;
static const uint8_t A15 = 16;
static const uint8_t A16 = 17;
static const uint8_t A17 = 18;
static const uint8_t T1 = 1;
static const uint8_t T2 = 2;
static const uint8_t T3 = 3;
static const uint8_t T4 = 4;
static const uint8_t T5 = 5;
static const uint8_t T6 = 6;
static const uint8_t T7 = 7;
static const uint8_t T8 = 8;
static const uint8_t T9 = 9;
static const uint8_t T10 = 10;
static const uint8_t T11 = 11;
static const uint8_t T12 = 12;
static const uint8_t T13 = 13;
static const uint8_t T14 = 14;
#endif /* Pins_Arduino_h */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment