Skip to content

Commit 63aacba

Browse files
Jason2866kohlschuetterme-no-devstrid3r21egnor
authored
Espressif master (#28)
* Enable configuring target variants (espressif#7019) This change enables picking the right board configuration from the variants/ folder. Previously, we would always pick the default configuration (e.g., "esp32" instead of "heltec_wifi_lora_32_V2"). * Update .gitignore (espressif#7021) Add entries to gitignore * Update esptool to version 4.2.1 (espressif#7127) * Update esptool to version 4.2.1 * Fix esptool for MacOS * Esptool v4.2.1 for CI Platformio (espressif#7147) to complete the test. Co-authored-by: Jason2866 <[email protected]> * Update get.py to support python 3.10+ (espressif#7166) * Update get.py to support python 3.10+ * Use try/except to remove version check * fixed names on the VID and PID for boards (espressif#7144) somehow had duplicated the same name across all my boards. the PID's and VID's were correct, but the name was the same for all of them. that is fixed now. * Compile error if CONFIG_FREERTOS_HZ != 1000 (espressif#6955) * Compile error if CONFIG_FREERTOS_HZ != 1000 * add a check at the CMake level, per feedback * Set CONFIG_FREERTOS_HZ=1000 in CI test of Arduino-as-component * Adding u-blox NORA-W10 series (ESP32-S3) (espressif#7191) * Create pins_arduino.h * Update boards.txt * Update boards.txt * Fixed espressif/esp-rainmaker#152 (espressif#7171) * Update PlatformIO build scripts (espressif#7200) This update includes the following: - Implemented an additional build step that produces an adjusted bootloader image with updated headers according to selected flash mode and size values. This step is only executed for debugging or uploading via debug probes. - Implemented a basic mechanism to dynamically add an extra UF2 bootloader image if corresponding partition is selected (e.g. for Adafruit targets) - Minor code formatting Co-authored-by: Dr. Christian Kohlschütter <[email protected]> Co-authored-by: Me No Dev <[email protected]> Co-authored-by: Paul Price <[email protected]> Co-authored-by: Daniel Egnor <[email protected]> Co-authored-by: Michael Ammann <[email protected]> Co-authored-by: Sanket Wadekar <[email protected]> Co-authored-by: Valerii Koval <[email protected]>
1 parent c944566 commit 63aacba

File tree

13 files changed

+584
-122
lines changed

13 files changed

+584
-122
lines changed

Diff for: .github/scripts/on-push.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ else
108108
replace_script+="data['packages']['toolchain-xtensa-esp32']['optional']=True;"
109109
replace_script+="data['packages']['toolchain-xtensa-esp32s3']['optional']=False;"
110110
replace_script+="data['packages']['tool-esptoolpy']['owner']='tasmota';"
111-
replace_script+="data['packages']['tool-esptoolpy']['version']='https://github.com/tasmota/esptool/releases/download/v3.3/esptool-3.3.zip';"
111+
replace_script+="data['packages']['tool-esptoolpy']['version']='https://github.com/tasmota/esptool/releases/download/v4.2.1/esptool-4.2.1.zip';"
112112
replace_script+="fp.seek(0);fp.truncate();json.dump(data, fp, indent=2);fp.close()"
113113
python -c "$replace_script"
114114

Diff for: .github/workflows/push.yml

+1
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,5 @@ jobs:
104104
run: |
105105
. ${IDF_PATH}/export.sh
106106
idf.py create-project test
107+
echo CONFIG_FREERTOS_HZ=1000 > test/sdkconfig.defaults
107108
idf.py -C test -DEXTRA_COMPONENT_DIRS=$PWD/components build

Diff for: .gitignore

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ tools/esptool.exe
88
tools/mkspiffs
99
tools/mklittlefs
1010
tools/mkfatfs.exe
11+
12+
# Ignore editor backup files and macOS system metadata
1113
.DS_Store
14+
.*.swp
15+
.*.swo
16+
*~
17+
18+
# Ignore build folder
19+
/build
1220

13-
#Ignore files built by Visual Studio/Visual Micro
21+
# Ignore files built by Visual Studio/Visual Micro
1422
[Dd]ebug*/
1523
[Rr]elease*/
1624
.vs/

Diff for: CMakeLists.txt

+9-3
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ set(BLE_SRCS
161161
)
162162

163163
set(includedirs
164-
variants/${IDF_TARGET}/
164+
variants/${CONFIG_ARDUINO_VARIANT}/
165165
cores/esp32/
166166
libraries/ArduinoOTA/src
167167
libraries/AsyncUDP/src
@@ -202,13 +202,19 @@ set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support openssl b
202202

203203
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})
204204

205-
string(TOUPPER ${CONFIG_IDF_TARGET} idf_target_caps)
205+
if(NOT CONFIG_FREERTOS_HZ EQUAL 1000 AND NOT "$ENV{ARDUINO_SKIP_TICK_CHECK}")
206+
# See delay() in cores/esp32/esp32-hal-misc.c.
207+
message(FATAL_ERROR "esp32-arduino requires CONFIG_FREERTOS_HZ=1000 "
208+
"(currently ${CONFIG_FREERTOS_HZ})")
209+
endif()
210+
211+
string(TOUPPER ${CONFIG_ARDUINO_VARIANT} idf_target_caps)
206212
target_compile_options(${COMPONENT_TARGET} PUBLIC
207213
-DARDUINO=10812
208214
-DARDUINO_${idf_target_caps}_DEV
209215
-DARDUINO_ARCH_ESP32
210216
-DARDUINO_BOARD="${idf_target_caps}_DEV"
211-
-DARDUINO_VARIANT="${CONFIG_IDF_TARGET}"
217+
-DARDUINO_VARIANT="${CONFIG_ARDUINO_VARIANT}"
212218
-DESP32)
213219

214220
if(CONFIG_AUTOSTART_ARDUINO)

Diff for: Kconfig.projbuild

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
menu "Arduino Configuration"
22

3+
config ARDUINO_VARIANT
4+
string "Arduino target variant (board)"
5+
default IDF_TARGET
6+
help
7+
The name of a target variant (e.g., a specific board) in the variants/
8+
folder, e.g. "heltec_wifi_lora_32_V2". The name is case sensitive.
9+
Specifying a variant name different from the target enables additional
10+
customization, for example the definition of GPIO pins.
11+
312
config ENABLE_ARDUINO_DEPENDS
413
bool
514
select LWIP_SO_RCVBUF

Diff for: boards.txt

+210-6
Original file line numberDiff line numberDiff line change
@@ -4831,6 +4831,210 @@ nina_w10.menu.EraseFlash.all.upload.erase_cmd=-e
48314831

48324832
##############################################################
48334833

4834+
nora_w10.name=u-blox NORA-W10 series (ESP32-S3)
4835+
nora_w10.vid.0=0x303a
4836+
nora_w10.pid.0=0x1001
4837+
4838+
nora_w10.bootloader.tool=esptool_py
4839+
nora_w10.bootloader.tool.default=esptool_py
4840+
4841+
nora_w10.upload.tool=esptool_py
4842+
nora_w10.upload.tool.default=esptool_py
4843+
nora_w10.upload.tool.network=esp_ota
4844+
4845+
nora_w10.upload.maximum_size=1310720
4846+
nora_w10.upload.maximum_data_size=327680
4847+
nora_w10.upload.flags=
4848+
nora_w10.upload.extra_flags=
4849+
nora_w10.upload.use_1200bps_touch=false
4850+
nora_w10.upload.wait_for_upload_port=false
4851+
4852+
nora_w10.serial.disableDTR=false
4853+
nora_w10.serial.disableRTS=false
4854+
4855+
nora_w10.build.tarch=xtensa
4856+
nora_w10.build.bootloader_addr=0x0
4857+
nora_w10.build.target=esp32s3
4858+
nora_w10.build.mcu=esp32s3
4859+
nora_w10.build.core=esp32
4860+
nora_w10.build.variant=nora_w10
4861+
nora_w10.build.board=UBLOX_NORA_W10
4862+
4863+
nora_w10.build.usb_mode=1
4864+
nora_w10.build.cdc_on_boot=0
4865+
nora_w10.build.msc_on_boot=0
4866+
nora_w10.build.dfu_on_boot=0
4867+
nora_w10.build.f_cpu=240000000L
4868+
nora_w10.build.flash_size=4MB
4869+
nora_w10.build.flash_freq=80m
4870+
nora_w10.build.flash_mode=dio
4871+
nora_w10.build.boot=qio
4872+
nora_w10.build.boot_freq=80m
4873+
nora_w10.build.partitions=default
4874+
nora_w10.build.defines=
4875+
nora_w10.build.loop_core=
4876+
nora_w10.build.event_core=
4877+
nora_w10.build.psram_type=qspi
4878+
nora_w10.build.memory_type={build.boot}_{build.psram_type}
4879+
4880+
nora_w10.menu.PSRAM.disabled=Disabled
4881+
nora_w10.menu.PSRAM.disabled.build.defines=
4882+
nora_w10.menu.PSRAM.disabled.build.psram_type=qspi
4883+
nora_w10.menu.PSRAM.enabled=QSPI PSRAM
4884+
nora_w10.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
4885+
nora_w10.menu.PSRAM.enabled.build.psram_type=qspi
4886+
nora_w10.menu.PSRAM.opi=OPI PSRAM
4887+
nora_w10.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM
4888+
nora_w10.menu.PSRAM.opi.build.psram_type=opi
4889+
4890+
nora_w10.menu.FlashMode.qio=QIO 80MHz
4891+
nora_w10.menu.FlashMode.qio.build.flash_mode=dio
4892+
nora_w10.menu.FlashMode.qio.build.boot=qio
4893+
nora_w10.menu.FlashMode.qio.build.boot_freq=80m
4894+
nora_w10.menu.FlashMode.qio.build.flash_freq=80m
4895+
nora_w10.menu.FlashMode.qio120=QIO 120MHz
4896+
nora_w10.menu.FlashMode.qio120.build.flash_mode=dio
4897+
nora_w10.menu.FlashMode.qio120.build.boot=qio
4898+
nora_w10.menu.FlashMode.qio120.build.boot_freq=120m
4899+
nora_w10.menu.FlashMode.qio120.build.flash_freq=80m
4900+
nora_w10.menu.FlashMode.dio=DIO 80MHz
4901+
nora_w10.menu.FlashMode.dio.build.flash_mode=dio
4902+
nora_w10.menu.FlashMode.dio.build.boot=dio
4903+
nora_w10.menu.FlashMode.dio.build.boot_freq=80m
4904+
nora_w10.menu.FlashMode.dio.build.flash_freq=80m
4905+
nora_w10.menu.FlashMode.opi=OPI 80MHz
4906+
nora_w10.menu.FlashMode.opi.build.flash_mode=dout
4907+
nora_w10.menu.FlashMode.opi.build.boot=opi
4908+
nora_w10.menu.FlashMode.opi.build.boot_freq=80m
4909+
nora_w10.menu.FlashMode.opi.build.flash_freq=80m
4910+
4911+
nora_w10.menu.FlashSize.4M=4MB (32Mb)
4912+
nora_w10.menu.FlashSize.4M.build.flash_size=4MB
4913+
nora_w10.menu.FlashSize.8M=8MB (64Mb)
4914+
nora_w10.menu.FlashSize.8M.build.flash_size=8MB
4915+
nora_w10.menu.FlashSize.8M.build.partitions=default_8MB
4916+
#nora_w10.menu.FlashSize.16M=16MB (128Mb)
4917+
#nora_w10.menu.FlashSize.16M.build.flash_size=16MB
4918+
#nora_w10.menu.FlashSize.32M=32MB (256Mb)
4919+
#nora_w10.menu.FlashSize.32M.build.flash_size=32MB
4920+
4921+
nora_w10.menu.LoopCore.1=Core 1
4922+
nora_w10.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
4923+
nora_w10.menu.LoopCore.0=Core 0
4924+
nora_w10.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
4925+
4926+
nora_w10.menu.EventsCore.1=Core 1
4927+
nora_w10.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
4928+
nora_w10.menu.EventsCore.0=Core 0
4929+
nora_w10.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
4930+
4931+
nora_w10.menu.USBMode.hwcdc=Hardware CDC and JTAG
4932+
nora_w10.menu.USBMode.hwcdc.build.usb_mode=1
4933+
nora_w10.menu.USBMode.default=USB-OTG (TinyUSB)
4934+
nora_w10.menu.USBMode.default.build.usb_mode=0
4935+
4936+
nora_w10.menu.CDCOnBoot.default=Disabled
4937+
nora_w10.menu.CDCOnBoot.default.build.cdc_on_boot=0
4938+
nora_w10.menu.CDCOnBoot.cdc=Enabled
4939+
nora_w10.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
4940+
4941+
nora_w10.menu.MSCOnBoot.default=Disabled
4942+
nora_w10.menu.MSCOnBoot.default.build.msc_on_boot=0
4943+
nora_w10.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
4944+
nora_w10.menu.MSCOnBoot.msc.build.msc_on_boot=1
4945+
4946+
nora_w10.menu.DFUOnBoot.default=Disabled
4947+
nora_w10.menu.DFUOnBoot.default.build.dfu_on_boot=0
4948+
nora_w10.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
4949+
nora_w10.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
4950+
4951+
nora_w10.menu.UploadMode.default=UART0 / Hardware CDC
4952+
nora_w10.menu.UploadMode.default.upload.use_1200bps_touch=false
4953+
nora_w10.menu.UploadMode.default.upload.wait_for_upload_port=false
4954+
nora_w10.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
4955+
nora_w10.menu.UploadMode.cdc.upload.use_1200bps_touch=true
4956+
nora_w10.menu.UploadMode.cdc.upload.wait_for_upload_port=true
4957+
4958+
nora_w10.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
4959+
nora_w10.menu.PartitionScheme.default.build.partitions=default
4960+
nora_w10.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
4961+
nora_w10.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
4962+
nora_w10.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
4963+
nora_w10.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
4964+
nora_w10.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
4965+
nora_w10.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
4966+
nora_w10.menu.PartitionScheme.minimal.build.partitions=minimal
4967+
nora_w10.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
4968+
nora_w10.menu.PartitionScheme.no_ota.build.partitions=no_ota
4969+
nora_w10.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
4970+
nora_w10.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
4971+
nora_w10.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
4972+
nora_w10.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
4973+
nora_w10.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
4974+
nora_w10.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
4975+
nora_w10.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
4976+
nora_w10.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
4977+
nora_w10.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
4978+
nora_w10.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
4979+
nora_w10.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
4980+
nora_w10.menu.PartitionScheme.huge_app.build.partitions=huge_app
4981+
nora_w10.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
4982+
nora_w10.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
4983+
nora_w10.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
4984+
nora_w10.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
4985+
#nora_w10.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
4986+
#nora_w10.menu.PartitionScheme.fatflash.build.partitions=ffat
4987+
#nora_w10.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
4988+
#nora_w10.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
4989+
#nora_w10.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
4990+
#nora_w10.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
4991+
nora_w10.menu.PartitionScheme.rainmaker=RainMaker
4992+
nora_w10.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
4993+
nora_w10.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
4994+
4995+
nora_w10.menu.CPUFreq.240=240MHz (WiFi)
4996+
nora_w10.menu.CPUFreq.240.build.f_cpu=240000000L
4997+
nora_w10.menu.CPUFreq.160=160MHz (WiFi)
4998+
nora_w10.menu.CPUFreq.160.build.f_cpu=160000000L
4999+
nora_w10.menu.CPUFreq.80=80MHz (WiFi)
5000+
nora_w10.menu.CPUFreq.80.build.f_cpu=80000000L
5001+
nora_w10.menu.CPUFreq.40=40MHz
5002+
nora_w10.menu.CPUFreq.40.build.f_cpu=40000000L
5003+
nora_w10.menu.CPUFreq.20=20MHz
5004+
nora_w10.menu.CPUFreq.20.build.f_cpu=20000000L
5005+
nora_w10.menu.CPUFreq.10=10MHz
5006+
nora_w10.menu.CPUFreq.10.build.f_cpu=10000000L
5007+
5008+
nora_w10.menu.UploadSpeed.921600=921600
5009+
nora_w10.menu.UploadSpeed.921600.upload.speed=921600
5010+
nora_w10.menu.UploadSpeed.115200=115200
5011+
nora_w10.menu.UploadSpeed.115200.upload.speed=115200
5012+
nora_w10.menu.UploadSpeed.256000.windows=256000
5013+
nora_w10.menu.UploadSpeed.256000.upload.speed=256000
5014+
nora_w10.menu.UploadSpeed.230400.windows.upload.speed=256000
5015+
nora_w10.menu.UploadSpeed.230400=230400
5016+
nora_w10.menu.UploadSpeed.230400.upload.speed=230400
5017+
nora_w10.menu.UploadSpeed.460800.linux=460800
5018+
nora_w10.menu.UploadSpeed.460800.macosx=460800
5019+
nora_w10.menu.UploadSpeed.460800.upload.speed=460800
5020+
nora_w10.menu.UploadSpeed.512000.windows=512000
5021+
nora_w10.menu.UploadSpeed.512000.upload.speed=512000
5022+
5023+
nora_w10.menu.DebugLevel.none=None
5024+
nora_w10.menu.DebugLevel.none.build.code_debug=0
5025+
nora_w10.menu.DebugLevel.error=Error
5026+
nora_w10.menu.DebugLevel.error.build.code_debug=1
5027+
nora_w10.menu.DebugLevel.warn=Warn
5028+
nora_w10.menu.DebugLevel.warn.build.code_debug=2
5029+
nora_w10.menu.DebugLevel.info=Info
5030+
nora_w10.menu.DebugLevel.info.build.code_debug=3
5031+
nora_w10.menu.DebugLevel.debug=Debug
5032+
nora_w10.menu.DebugLevel.debug.build.code_debug=4
5033+
nora_w10.menu.DebugLevel.verbose=Verbose
5034+
nora_w10.menu.DebugLevel.verbose.build.code_debug=5
5035+
5036+
##############################################################
5037+
48345038
widora-air.name=Widora AIR
48355039

48365040
widora-air.bootloader.tool=esptool_py
@@ -17114,8 +17318,8 @@ department_of_alchemy_minimain_esp32s2.menu.EraseFlash.all.upload.erase_cmd=-e
1711417318
##############################################################
1711517319

1711617320
Bee_Motion_S3.name=Bee Motion S3
17117-
Bee_Motion_Mini.vid.0=0x303a
17118-
Bee_Motion_Mini.pid.0=0x8113
17321+
Bee_Motion_S3.vid.0=0x303a
17322+
Bee_Motion_S3.pid.0=0x8113
1711917323

1712017324
Bee_Motion_S3.bootloader.tool=esptool_py
1712117325
Bee_Motion_S3.bootloader.tool.default=esptool_py
@@ -17223,8 +17427,8 @@ Bee_Motion_S3.menu.EraseFlash.all.upload.erase_cmd=-e
1722317427
########################################################################
1722417428

1722517429
Bee_Motion.name=Bee Motion
17226-
Bee_Motion_Mini.vid.0=0x303a
17227-
Bee_Motion_Mini.pid.0=0x810D
17430+
Bee_Motion.vid.0=0x303a
17431+
Bee_Motion.pid.0=0x810D
1722817432

1722917433
Bee_Motion.bootloader.tool=esptool_py
1723017434
Bee_Motion.bootloader.tool.default=esptool_py
@@ -17440,8 +17644,8 @@ Bee_Motion_Mini.menu.EraseFlash.all.upload.erase_cmd=-e
1744017644
###############################################################
1744117645

1744217646
Bee_S3.name=Bee S3
17443-
Bee_Motion_Mini.vid.0=0x303a
17444-
Bee_Motion_Mini.pid.0=0x8110
17647+
Bee_S3.vid.0=0x303a
17648+
Bee_S3.pid.0=0x8110
1744517649

1744617650
Bee_S3.bootloader.tool=esptool_py
1744717651
Bee_S3.bootloader.tool.default=esptool_py

Diff for: docs/source/esp-idf_component.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ If you are writing code that does not require Arduino to compile and you want yo
140140
FreeRTOS Tick Rate (Hz)
141141
-----------------------
142142

143-
You might notice that Arduino-esp32's `delay()` function will only work in multiples of 10ms. That is because, by default, esp-idf handles task events 100 times per second.
144-
To fix that behavior, you need to set FreeRTOS tick rate to 1000Hz in `make menuconfig` -> `Component config` -> `FreeRTOS` -> `Tick rate`.
143+
The Arduino component requires the FreeRTOS tick rate `CONFIG_FREERTOS_HZ` set to 1000Hz in `make menuconfig` -> `Component config` -> `FreeRTOS` -> `Tick rate`.
145144

146145
Compilation Errors
147146
------------------

0 commit comments

Comments
 (0)