Skip to content

Commit 6f27cc4

Browse files
authored
Merge branch 'master' into brent/autosportLabs-esp32-can-x2_board_support
2 parents ffe3b28 + d45f35a commit 6f27cc4

File tree

15 files changed

+123
-89
lines changed

15 files changed

+123
-89
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v3.0.0
45+
- v2.0.17
46+
- v2.0.16
47+
- v2.0.15
4448
- v2.0.14
4549
- v2.0.13
4650
- v2.0.12

.github/scripts/merge_packages.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# Written by Ivan Grokhotkov, 2015
66
#
77
from __future__ import print_function
8-
from distutils.version import LooseVersion
8+
#from distutils.version import LooseVersion
9+
from packaging.version import Version
910
import re
1011
import json
1112
import sys
@@ -33,7 +34,7 @@ def merge_objects(versions, obj):
3334
def pkgVersionNormalized(versionString):
3435

3536
verStr = str(versionString)
36-
verParts = re.split('\.|-rc', verStr, flags=re.IGNORECASE)
37+
verParts = re.split('\.|-rc|-alpha', verStr, flags=re.IGNORECASE)
3738

3839
if len(verParts) == 3:
3940
if (sys.version_info > (3, 0)): # Python 3
@@ -74,7 +75,8 @@ def main(args):
7475
print("Adding platform {0}-{1}".format(name, version), file=sys.stderr)
7576
pkg1['platforms'].append(platforms[name][version])
7677

77-
pkg1['platforms'] = sorted(pkg1['platforms'], key=lambda k: LooseVersion(pkgVersionNormalized(k['version'])), reverse=True)
78+
#pkg1['platforms'] = sorted(pkg1['platforms'], key=lambda k: LooseVersion(pkgVersionNormalized(k['version'])), reverse=True)
79+
pkg1['platforms'] = sorted(pkg1['platforms'], key=lambda k: Version(pkgVersionNormalized(k['version'])), reverse=True)
7880

7981
json.dump({'packages':[pkg1]}, sys.stdout, indent=2)
8082

.github/scripts/tests_run.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ function run_test() {
77
local erase_flash=$4
88
local sketchdir=$(dirname $sketch)
99
local sketchname=$(basename $sketchdir)
10+
local result=0
1011

1112
if [[ -f "$sketchdir/.skip.$platform" ]] || [[ -f "$sketchdir/.skip.$target" ]] || [[ -f "$sketchdir/.skip.$platform.$target" ]]; then
1213
echo "Skipping $sketchname test for $target, platform: $platform"
@@ -61,11 +62,18 @@ function run_test() {
6162
extra_args="--embedded-services esp,arduino"
6263
fi
6364

65+
result=0
6466
echo "pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args"
65-
bash -c "pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args"
67+
bash -c "set +e; pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args; exit \$?" || result=$?
6668
result=$?
6769
if [ $result -ne 0 ]; then
68-
return $result
70+
result=0
71+
echo "Retrying test: $sketchname -- Config: $i"
72+
bash -c "set +e; pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args; exit \$?" || result=$?
73+
result=$?
74+
if [ $result -ne 0 ]; then
75+
exit $result
76+
fi
6977
fi
7078
done
7179
}

.github/workflows/hil.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ jobs:
5959
echo "test_folder=${test_folder}" >> $GITHUB_OUTPUT
6060
echo "test_type=${test_type}" >> $GITHUB_OUTPUT
6161
62+
- name: Upload Event file
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: event_file
66+
path: ${{github.event_path}}
67+
6268
build:
6369
needs: gen_chunks
6470
name: ${{matrix.chip}}-Build#${{matrix.chunks}}
@@ -267,13 +273,3 @@ jobs:
267273
path: |
268274
tests/**/*.xml
269275
tests/**/result_*.json
270-
271-
event_file:
272-
name: "Event File"
273-
runs-on: ubuntu-latest
274-
steps:
275-
- name: Upload
276-
uses: actions/upload-artifact@v4
277-
with:
278-
name: event_file
279-
path: ${{github.event_path}}

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- uses: actions/setup-python@v5
1717
with:
1818
python-version: '3.x'
19+
- run: pip install packaging
1920
- name: Build Release
2021
env:
2122
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/wokwi.yml

+3
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ jobs:
9595
- name: Install Wokwi CLI
9696
run: curl -L https://wokwi.com/ci/install.sh | sh
9797

98+
- name: Wokwi CI Server
99+
uses: wokwi/wokwi-ci-server-action@v1
100+
98101
- name: Install dependencies
99102
run: |
100103
pip install -U pip

Kconfig.projbuild

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ config ARDUINO_SELECTIVE_FFat
311311
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_FS
312312
default y
313313

314-
config ARDUINO_SELECTIVE_LITTLEFS
315-
bool "Enable LITTLEFS"
314+
config ARDUINO_SELECTIVE_LittleFS
315+
bool "Enable LittleFS"
316316
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_FS
317317
default y
318318

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Here are the ESP32 series supported by the Arduino-ESP32 project:
5757
| ESP32-S2 | Yes | Yes | [ESP32-S2](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf) |
5858
| ESP32-C3 | Yes | Yes | [ESP32-C3](https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf) |
5959
| ESP32-S3 | Yes | Yes | [ESP32-S3](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf) |
60-
| ESP32-C6 | No | Yes | [ESP32-C6](https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf) |
61-
| ESP32-H2 | No | Yes | [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) |
60+
| ESP32-C6 | Yes | Yes | [ESP32-C6](https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf) |
61+
| ESP32-H2 | Yes | Yes | [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) |
6262

6363
> [!NOTE]
6464
> ESP32-C2 is also supported by Arduino-ESP32 but requires rebuilding the static libraries. This is not trivial and requires a good understanding of the ESP-IDF

boards.txt

+4-7
Original file line numberDiff line numberDiff line change
@@ -19365,7 +19365,7 @@ m5stack_unit_cams3.build.partitions=default
1936519365
m5stack_unit_cams3.build.defines=
1936619366
m5stack_unit_cams3.build.loop_core=
1936719367
m5stack_unit_cams3.build.event_core=
19368-
m5stack_unit_cams3.build.psram_type=qspi
19368+
m5stack_unit_cams3.build.psram_type=opi
1936919369
m5stack_unit_cams3.build.memory_type={build.boot}_{build.psram_type}
1937019370

1937119371
## IDE 2.0 Seems to not update the value
@@ -19381,15 +19381,12 @@ m5stack_unit_cams3.menu.JTAGAdapter.bridge=ESP USB Bridge
1938119381
m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg
1938219382
m5stack_unit_cams3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1
1938319383

19384-
m5stack_unit_cams3.menu.PSRAM.enabled=QSPI PSRAM
19385-
m5stack_unit_cams3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
19386-
m5stack_unit_cams3.menu.PSRAM.enabled.build.psram_type=qspi
19387-
m5stack_unit_cams3.menu.PSRAM.disabled=Disabled
19388-
m5stack_unit_cams3.menu.PSRAM.disabled.build.defines=
19389-
m5stack_unit_cams3.menu.PSRAM.disabled.build.psram_type=qspi
1939019384
m5stack_unit_cams3.menu.PSRAM.opi=OPI PSRAM
1939119385
m5stack_unit_cams3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM
1939219386
m5stack_unit_cams3.menu.PSRAM.opi.build.psram_type=opi
19387+
m5stack_unit_cams3.menu.PSRAM.disabled=Disabled
19388+
m5stack_unit_cams3.menu.PSRAM.disabled.build.defines=
19389+
m5stack_unit_cams3.menu.PSRAM.disabled.build.psram_type=qspi
1939319390

1939419391
m5stack_unit_cams3.menu.FlashMode.qio=QIO 80MHz
1939519392
m5stack_unit_cams3.menu.FlashMode.qio.build.flash_mode=dio

cores/esp32/esp32-hal-adc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ esp_err_t __analogContinuousInit(adc_channel_t *channel, uint8_t channel_num, ad
440440
dig_cfg.pattern_num = channel_num;
441441
for (int i = 0; i < channel_num; i++) {
442442
adc_pattern[i].atten = __adcContinuousAtten;
443-
adc_pattern[i].channel = channel[i] & 0x7;
443+
adc_pattern[i].channel = channel[i];
444444
adc_pattern[i].unit = ADC_UNIT_1;
445445
adc_pattern[i].bit_width = __adcContinuousWidth;
446446
}

cores/esp32/esp32-hal-log.h

+61-60
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ extern "C" {
8080
#define ARDUHAL_LOG_COLOR_PRINT_END
8181
#endif
8282

83+
#ifdef USE_ESP_IDF_LOG
84+
#ifndef ARDUHAL_ESP_LOG_TAG
85+
#define ARDUHAL_ESP_LOG_TAG "ARDUINO"
86+
#endif
87+
#endif
88+
8389
const char *pathToFileName(const char *path);
8490
int log_printf(const char *fmt, ...);
8591
void log_print_buf(const uint8_t *b, size_t len);
@@ -102,17 +108,17 @@ void log_print_buf(const uint8_t *b, size_t len);
102108
ARDUHAL_LOG_COLOR_PRINT_END; \
103109
} while (0)
104110
#else
105-
#define log_v(format, ...) \
106-
do { \
107-
ESP_LOG_LEVEL_LOCAL(ESP_LOG_VERBOSE, TAG, format, ##__VA_ARGS__); \
111+
#define log_v(format, ...) \
112+
do { \
113+
ESP_LOG_LEVEL_LOCAL(ESP_LOG_VERBOSE, ARDUHAL_ESP_LOG_TAG, format, ##__VA_ARGS__); \
108114
} while (0)
109-
#define isr_log_v(format, ...) \
110-
do { \
111-
ets_printf(LOG_FORMAT(V, format), esp_log_timestamp(), TAG, ##__VA_ARGS__); \
115+
#define isr_log_v(format, ...) \
116+
do { \
117+
ets_printf(LOG_FORMAT(V, format), esp_log_timestamp(), ARDUHAL_ESP_LOG_TAG, ##__VA_ARGS__); \
112118
} while (0)
113-
#define log_buf_v(b, l) \
114-
do { \
115-
ESP_LOG_BUFFER_HEXDUMP(TAG, b, l, ESP_LOG_VERBOSE); \
119+
#define log_buf_v(b, l) \
120+
do { \
121+
ESP_LOG_BUFFER_HEXDUMP(ARDUHAL_ESP_LOG_TAG, b, l, ESP_LOG_VERBOSE); \
116122
} while (0)
117123
#endif
118124
#else
@@ -138,17 +144,17 @@ void log_print_buf(const uint8_t *b, size_t len);
138144
ARDUHAL_LOG_COLOR_PRINT_END; \
139145
} while (0)
140146
#else
141-
#define log_d(format, ...) \
142-
do { \
143-
ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, TAG, format, ##__VA_ARGS__); \
147+
#define log_d(format, ...) \
148+
do { \
149+
ESP_LOG_LEVEL_LOCAL(ESP_LOG_DEBUG, ARDUHAL_ESP_LOG_TAG, format, ##__VA_ARGS__); \
144150
} while (0)
145-
#define isr_log_d(format, ...) \
146-
do { \
147-
ets_printf(LOG_FORMAT(D, format), esp_log_timestamp(), TAG, ##__VA_ARGS__); \
151+
#define isr_log_d(format, ...) \
152+
do { \
153+
ets_printf(LOG_FORMAT(D, format), esp_log_timestamp(), ARDUHAL_ESP_LOG_TAG, ##__VA_ARGS__); \
148154
} while (0)
149-
#define log_buf_d(b, l) \
150-
do { \
151-
ESP_LOG_BUFFER_HEXDUMP(TAG, b, l, ESP_LOG_DEBUG); \
155+
#define log_buf_d(b, l) \
156+
do { \
157+
ESP_LOG_BUFFER_HEXDUMP(ARDUHAL_ESP_LOG_TAG, b, l, ESP_LOG_DEBUG); \
152158
} while (0)
153159
#endif
154160
#else
@@ -174,17 +180,17 @@ void log_print_buf(const uint8_t *b, size_t len);
174180
ARDUHAL_LOG_COLOR_PRINT_END; \
175181
} while (0)
176182
#else
177-
#define log_i(format, ...) \
178-
do { \
179-
ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, TAG, format, ##__VA_ARGS__); \
183+
#define log_i(format, ...) \
184+
do { \
185+
ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, ARDUHAL_ESP_LOG_TAG, format, ##__VA_ARGS__); \
180186
} while (0)
181-
#define isr_log_i(format, ...) \
182-
do { \
183-
ets_printf(LOG_FORMAT(I, format), esp_log_timestamp(), TAG, ##__VA_ARGS__); \
187+
#define isr_log_i(format, ...) \
188+
do { \
189+
ets_printf(LOG_FORMAT(I, format), esp_log_timestamp(), ARDUHAL_ESP_LOG_TAG, ##__VA_ARGS__); \
184190
} while (0)
185-
#define log_buf_i(b, l) \
186-
do { \
187-
ESP_LOG_BUFFER_HEXDUMP(TAG, b, l, ESP_LOG_INFO); \
191+
#define log_buf_i(b, l) \
192+
do { \
193+
ESP_LOG_BUFFER_HEXDUMP(ARDUHAL_ESP_LOG_TAG, b, l, ESP_LOG_INFO); \
188194
} while (0)
189195
#endif
190196
#else
@@ -210,17 +216,17 @@ void log_print_buf(const uint8_t *b, size_t len);
210216
ARDUHAL_LOG_COLOR_PRINT_END; \
211217
} while (0)
212218
#else
213-
#define log_w(format, ...) \
214-
do { \
215-
ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, TAG, format, ##__VA_ARGS__); \
219+
#define log_w(format, ...) \
220+
do { \
221+
ESP_LOG_LEVEL_LOCAL(ESP_LOG_WARN, ARDUHAL_ESP_LOG_TAG, format, ##__VA_ARGS__); \
216222
} while (0)
217-
#define isr_log_w(format, ...) \
218-
do { \
219-
ets_printf(LOG_FORMAT(W, format), esp_log_timestamp(), TAG, ##__VA_ARGS__); \
223+
#define isr_log_w(format, ...) \
224+
do { \
225+
ets_printf(LOG_FORMAT(W, format), esp_log_timestamp(), ARDUHAL_ESP_LOG_TAG, ##__VA_ARGS__); \
220226
} while (0)
221-
#define log_buf_w(b, l) \
222-
do { \
223-
ESP_LOG_BUFFER_HEXDUMP(TAG, b, l, ESP_LOG_WARN); \
227+
#define log_buf_w(b, l) \
228+
do { \
229+
ESP_LOG_BUFFER_HEXDUMP(ARDUHAL_ESP_LOG_TAG, b, l, ESP_LOG_WARN); \
224230
} while (0)
225231
#endif
226232
#else
@@ -246,17 +252,17 @@ void log_print_buf(const uint8_t *b, size_t len);
246252
ARDUHAL_LOG_COLOR_PRINT_END; \
247253
} while (0)
248254
#else
249-
#define log_e(format, ...) \
250-
do { \
251-
ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, TAG, format, ##__VA_ARGS__); \
255+
#define log_e(format, ...) \
256+
do { \
257+
ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, ARDUHAL_ESP_LOG_TAG, format, ##__VA_ARGS__); \
252258
} while (0)
253-
#define isr_log_e(format, ...) \
254-
do { \
255-
ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), TAG, ##__VA_ARGS__); \
259+
#define isr_log_e(format, ...) \
260+
do { \
261+
ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), ARDUHAL_ESP_LOG_TAG, ##__VA_ARGS__); \
256262
} while (0)
257-
#define log_buf_e(b, l) \
258-
do { \
259-
ESP_LOG_BUFFER_HEXDUMP(TAG, b, l, ESP_LOG_ERROR); \
263+
#define log_buf_e(b, l) \
264+
do { \
265+
ESP_LOG_BUFFER_HEXDUMP(ARDUHAL_ESP_LOG_TAG, b, l, ESP_LOG_ERROR); \
260266
} while (0)
261267
#endif
262268
#else
@@ -282,17 +288,17 @@ void log_print_buf(const uint8_t *b, size_t len);
282288
ARDUHAL_LOG_COLOR_PRINT_END; \
283289
} while (0)
284290
#else
285-
#define log_n(format, ...) \
286-
do { \
287-
ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, TAG, format, ##__VA_ARGS__); \
291+
#define log_n(format, ...) \
292+
do { \
293+
ESP_LOG_LEVEL_LOCAL(ESP_LOG_ERROR, ARDUHAL_ESP_LOG_TAG, format, ##__VA_ARGS__); \
288294
} while (0)
289-
#define isr_log_n(format, ...) \
290-
do { \
291-
ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), TAG, ##__VA_ARGS__); \
295+
#define isr_log_n(format, ...) \
296+
do { \
297+
ets_printf(LOG_FORMAT(E, format), esp_log_timestamp(), ARDUHAL_ESP_LOG_TAG, ##__VA_ARGS__); \
292298
} while (0)
293-
#define log_buf_n(b, l) \
294-
do { \
295-
ESP_LOG_BUFFER_HEXDUMP(TAG, b, l, ESP_LOG_ERROR); \
299+
#define log_buf_n(b, l) \
300+
do { \
301+
ESP_LOG_BUFFER_HEXDUMP(ARDUHAL_ESP_LOG_TAG, b, l, ESP_LOG_ERROR); \
296302
} while (0)
297303
#endif
298304
#else
@@ -309,12 +315,7 @@ void log_print_buf(const uint8_t *b, size_t len);
309315

310316
#include "esp_log.h"
311317

312-
#ifdef USE_ESP_IDF_LOG
313-
//#ifndef TAG
314-
//#define TAG "ARDUINO"
315-
//#endif
316-
//#define log_n(format, ...) myLog(ESP_LOG_NONE, format, ##__VA_ARGS__)
317-
#else
318+
#ifndef USE_ESP_IDF_LOG
318319
#ifdef CONFIG_ARDUHAL_ESP_LOG
319320
#undef ESP_LOGE
320321
#undef ESP_LOGW

docs/en/api/ledc.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ This function is used to set duty for the LEDC pin.
6868

6969
.. code-block:: arduino
7070
71-
void ledcWrite(uint8_t pin, uint32_t duty);
71+
bool ledcWrite(uint8_t pin, uint32_t duty);
7272
7373
* ``pin`` select LEDC pin.
7474
* ``duty`` select duty to be set for selected LEDC pin.

libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
2222
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
2323
//#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
24+
//#define CAMERA_MODEL_M5STACK_CAMS3_UNIT // Has PSRAM
2425
//#define CAMERA_MODEL_AI_THINKER // Has PSRAM
2526
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
2627
//#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM

0 commit comments

Comments
 (0)