Skip to content

Commit 9b48662

Browse files
authored
Merge branch 'master' into feat/zigbee-multistate
2 parents 233c336 + 42a95ed commit 9b48662

File tree

414 files changed

+19932
-4569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

414 files changed

+19932
-4569
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
# CI
1313
/.github/ @lucasssvaz @me-no-dev @P-R-O-C-H-Y
14+
/.github/codeql/ @lucasssvaz
15+
/.gitlab/ @lucasssvaz
1416
/tests/ @lucasssvaz @P-R-O-C-H-Y
1517

1618
# Tools

.github/ISSUE_TEMPLATE/Issue-report.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ body:
4343
- latest stable Release (if not listed below)
4444
- latest development Release Candidate (RC-X)
4545
- latest master (checkout manually)
46+
- v3.3.0
4647
- v3.2.1
4748
- v3.2.0
4849
- v3.1.3
@@ -79,6 +80,17 @@ body:
7980
- other
8081
validations:
8182
required: true
83+
- type: dropdown
84+
id: type
85+
attributes:
86+
label: Type
87+
description: How would you define the type of the issue? Please select from the types below.
88+
options:
89+
- "Task"
90+
- "Bug"
91+
- "Question"
92+
validations:
93+
required: true
8294
- type: input
8395
id: IDE
8496
attributes:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ contact_links:
33
- name: Arduino Core for Espressif Discord Server
44
url: https://discord.gg/8xY6e9crwv
55
about: Community Discord server for questions and help
6-
- name: ESP32 Forum - Arduino
7-
url: https://esp32.com/viewforum.php?f=19
8-
about: Official Forum for questions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## Description of Change
1414
Please describe your proposed Pull Request and it's impact.
1515

16-
## Tests scenarios
16+
## Test Scenarios
1717
Please describe on what Hardware and Software combinations you have tested this Pull Request and how.
1818

1919
(*eg. I have tested my Pull Request on Arduino-esp32 core v2.0.2 with ESP32 and ESP32-S2 Board with this scenario*)

.github/codeql/codeql-config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "CodeQL config"
2+
3+
packs:
4+
- trailofbits/cpp-queries
5+
- githubsecuritylab/codeql-cpp-queries
6+
- githubsecuritylab/codeql-python-queries
7+
8+
queries:
9+
- uses: security-extended
10+
- uses: security-and-quality
11+
12+
query-filters:
13+
- exclude:
14+
query path:
15+
- /^experimental\/.*/
16+
- exclude:
17+
tags contain:
18+
- experimental
19+
- exclude:
20+
problem.severity:
21+
- recommendation
22+
- exclude:
23+
id: tob/cpp/use-of-legacy-algorithm # We use legacy algorithms in many places for integrity checks
24+
- exclude:
25+
id: cpp/dead-code-goto # Too many false positives in no-build mode
26+
27+
paths-ignore:
28+
- tests/**

.github/scripts/merge_packages.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Usage:
55
# python merge_packages.py package_esp8266com_index.json version/new/package_esp8266com_index.json
66
# Written by Ivan Grokhotkov, 2015
7+
# Updated by lucasssvaz to handle Chinese version sorting, 2025
78
#
89

910
from __future__ import print_function
@@ -36,20 +37,19 @@ def merge_objects(versions, obj):
3637

3738

3839
# Normalize ESP release version string (x.x.x) by adding '-rc<MAXINT>' (x.x.x-rc9223372036854775807)
39-
# to ensure having REL above any RC
40+
# to ensure having REL above any RC. CN version will be sorted after the official version if they happen
41+
# to be mixed (normally, CN and non-CN versions should not be mixed)
4042
# Dummy approach, functional anyway for current ESP package versioning
4143
# (unlike NormalizedVersion/LooseVersion/StrictVersion & similar crap)
4244
def pkgVersionNormalized(versionString):
43-
44-
verStr = str(versionString)
45+
verStr = str(versionString).replace("-cn", "")
4546
verParts = re.split(r"\.|-rc|-alpha", verStr, flags=re.IGNORECASE)
4647

4748
if len(verParts) == 3:
48-
if sys.version_info > (3, 0): # Python 3
49-
verStr = str(versionString) + "-rc" + str(sys.maxsize)
50-
else: # Python 2
51-
verStr = str(versionString) + "-rc" + str(sys.maxint)
52-
49+
if "-cn" in str(versionString):
50+
verStr = verStr + "-rc" + str(sys.maxsize // 2)
51+
else:
52+
verStr = verStr + "-rc" + str(sys.maxsize)
5353
elif len(verParts) != 4:
5454
print("pkgVersionNormalized WARNING: unexpected version format: {0})".format(verStr), file=sys.stderr)
5555

.github/scripts/on-push.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ if [ "$BUILD_LOG" -eq 1 ]; then
9090
fi
9191

9292
#build sketches for different targets
93+
build "esp32c5" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
9394
build "esp32p4" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
9495
build "esp32s3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"
9596
build "esp32s2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$LOG_LEVEL" "$SKETCHES_FILE" "${SKETCHES_ESP32[@]}"

.github/scripts/process_sarif.py

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
#!/usr/bin/env python3
2+
3+
# This script is used to process the SARIF file generated by CodeQL and
4+
# to rename files back to .ino and adjust line numbers to match the original .ino files.
5+
6+
import json
7+
import sys
8+
import os
9+
10+
def process_artifact_location(artifact_location, renamed_files):
11+
"""
12+
Process a single artifact location to rename .cpp files back to .ino
13+
"""
14+
if 'uri' in artifact_location:
15+
uri = artifact_location['uri']
16+
if uri in renamed_files:
17+
print(f"Renaming file: {uri} -> {renamed_files[uri]}")
18+
artifact_location['uri'] = renamed_files[uri]
19+
return True
20+
return False
21+
22+
def process_region(region):
23+
"""
24+
Adjust line numbers in a region by decreasing them by 1
25+
"""
26+
if 'startLine' in region:
27+
region['startLine'] = max(1, region['startLine'] - 1)
28+
if 'endLine' in region:
29+
region['endLine'] = max(1, region['endLine'] - 1)
30+
31+
def process_physical_location(physical_location, renamed_files):
32+
"""
33+
Process a physical location to rename files and adjust line numbers
34+
"""
35+
file_renamed = False
36+
37+
if 'artifactLocation' in physical_location:
38+
if process_artifact_location(physical_location['artifactLocation'], renamed_files):
39+
file_renamed = True
40+
41+
# Adjust line numbers if the file was renamed
42+
if file_renamed and 'region' in physical_location:
43+
process_region(physical_location['region'])
44+
45+
return file_renamed
46+
47+
48+
def process_sarif_file(sarif_file, renamed_files_file):
49+
"""
50+
Process SARIF file to rename files back to .ino and adjust line numbers
51+
"""
52+
# Read the renamed files mapping
53+
with open(renamed_files_file, 'r') as f:
54+
renamed_files = json.load(f)
55+
56+
print(f"Loaded {len(renamed_files)} file mappings:")
57+
for cpp_file, ino_file in renamed_files.items():
58+
print(f" {cpp_file} -> {ino_file}")
59+
60+
61+
# Read the SARIF file
62+
with open(sarif_file, 'r') as f:
63+
sarif_data = json.load(f)
64+
65+
files_processed = 0
66+
67+
# Process each run
68+
if 'runs' in sarif_data:
69+
for run in sarif_data['runs']:
70+
# Process results
71+
if 'results' in run:
72+
for result in run['results']:
73+
# Process all locations in the result
74+
if 'locations' in result:
75+
for location in result['locations']:
76+
if 'physicalLocation' in location:
77+
if process_physical_location(location['physicalLocation'], renamed_files):
78+
files_processed += 1
79+
80+
# Process related locations if they exist
81+
if 'relatedLocations' in result:
82+
for location in result['relatedLocations']:
83+
if 'physicalLocation' in location:
84+
if process_physical_location(location['physicalLocation'], renamed_files):
85+
files_processed += 1
86+
87+
# Process artifacts if they exist
88+
if 'artifacts' in run:
89+
for artifact in run['artifacts']:
90+
if 'location' in artifact and 'uri' in artifact['location']:
91+
uri = artifact['location']['uri']
92+
if uri in renamed_files:
93+
artifact['location']['uri'] = renamed_files[uri]
94+
files_processed += 1
95+
96+
print(f"Processed {files_processed} file references")
97+
98+
# Write the processed SARIF file
99+
with open(sarif_file, 'w') as f:
100+
json.dump(sarif_data, f, indent=2)
101+
102+
def main():
103+
if len(sys.argv) != 3:
104+
print("Usage: python3 sarif_nobuild.py <sarif_file> <renamed_files_file>")
105+
sys.exit(1)
106+
107+
sarif_file = sys.argv[1]
108+
renamed_files_file = sys.argv[2]
109+
110+
# Check if files exist
111+
if not os.path.exists(sarif_file):
112+
print(f"SARIF file not found: {sarif_file}")
113+
sys.exit(1)
114+
115+
if not os.path.exists(renamed_files_file):
116+
print(f"Renamed files mapping not found: {renamed_files_file}")
117+
sys.exit(1)
118+
119+
try:
120+
process_sarif_file(sarif_file, renamed_files_file)
121+
print("SARIF file processed successfully")
122+
except Exception as e:
123+
print(f"Error processing SARIF file: {e}")
124+
import traceback
125+
traceback.print_exc()
126+
sys.exit(1)
127+
128+
if __name__ == "__main__":
129+
main()

.github/scripts/release_append_cn.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717

1818
def append_cn_to_versions(obj):
1919
if isinstance(obj, dict):
20-
# dfu-util comes from arduino.cc and not from the Chinese mirrors, so we skip it
21-
if obj.get("name") == "dfu-util":
20+
# Skip tools that are not from the esp32 package
21+
packager = obj.get("packager")
22+
if packager is not None and packager != "esp32":
2223
return
2324

2425
for key, value in obj.items():

.github/scripts/set_push_chunks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ chunks+="]"
7878
echo "build_all=$build_all"
7979
echo "build_libraries=$BUILD_LIBRARIES"
8080
echo "build_static_sketches=$BUILD_STATIC_SKETCHES"
81-
echo "build_idf=$BUILD_IDF"
8281
echo "chunk_count=$chunks_count"
8382
echo "chunks=$chunks"
8483
} >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)