Skip to content

Commit 666c66d

Browse files
authored
IDF release/v4.4 (#6910)
* Add changes required for the new memory configs * IDF release/v4.4 6c5fb29c2c * IDF release/v4.4 c9140caf8c
1 parent 9a9e3e5 commit 666c66d

File tree

1,058 files changed

+77478
-8287
lines changed

Some content is hidden

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

1,058 files changed

+77478
-8287
lines changed

Diff for: boards.txt

+1-6
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ esp32s3.build.partitions=default
6565
esp32s3.build.defines=
6666
esp32s3.build.loop_core=
6767
esp32s3.build.event_core=
68-
esp32s3.build.flash_type=qspi
6968
esp32s3.build.psram_type=qspi
70-
esp32s3.build.memory_type={build.flash_type}_{build.psram_type}
69+
esp32s3.build.memory_type={build.boot}_{build.psram_type}
7170

7271
esp32s3.menu.PSRAM.disabled=Disabled
7372
esp32s3.menu.PSRAM.disabled.build.defines=
@@ -84,25 +83,21 @@ esp32s3.menu.FlashMode.qio.build.flash_mode=dio
8483
esp32s3.menu.FlashMode.qio.build.boot=qio
8584
esp32s3.menu.FlashMode.qio.build.boot_freq=80m
8685
esp32s3.menu.FlashMode.qio.build.flash_freq=80m
87-
esp32s3.menu.FlashMode.qio.build.flash_type=qspi
8886
esp32s3.menu.FlashMode.qio120=QIO 120MHz
8987
esp32s3.menu.FlashMode.qio120.build.flash_mode=dio
9088
esp32s3.menu.FlashMode.qio120.build.boot=qio
9189
esp32s3.menu.FlashMode.qio120.build.boot_freq=120m
9290
esp32s3.menu.FlashMode.qio120.build.flash_freq=80m
93-
esp32s3.menu.FlashMode.qio120.build.flash_type=qspi
9491
esp32s3.menu.FlashMode.dio=DIO 80MHz
9592
esp32s3.menu.FlashMode.dio.build.flash_mode=dio
9693
esp32s3.menu.FlashMode.dio.build.boot=dio
9794
esp32s3.menu.FlashMode.dio.build.boot_freq=80m
9895
esp32s3.menu.FlashMode.dio.build.flash_freq=80m
99-
esp32s3.menu.FlashMode.dio.build.flash_type=qspi
10096
esp32s3.menu.FlashMode.opi=OPI 80MHz
10197
esp32s3.menu.FlashMode.opi.build.flash_mode=dout
10298
esp32s3.menu.FlashMode.opi.build.boot=opi
10399
esp32s3.menu.FlashMode.opi.build.boot_freq=80m
104100
esp32s3.menu.FlashMode.opi.build.flash_freq=80m
105-
esp32s3.menu.FlashMode.opi.build.flash_type=opi
106101

107102
esp32s3.menu.FlashSize.4M=4MB (32Mb)
108103
esp32s3.menu.FlashSize.4M.build.flash_size=4MB

Diff for: platform.txt

+12-12
Large diffs are not rendered by default.

Diff for: tools/esptool.py

+173-121
Large diffs are not rendered by default.

Diff for: tools/gen_esp32part.py

+16-20
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,9 @@
77
# See https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/partition-tables.html
88
# for explanation of partition table structure and uses.
99
#
10-
# Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
11-
#
12-
# Licensed under the Apache License, Version 2.0 (the "License");
13-
# you may not use this file except in compliance with the License.
14-
# You may obtain a copy of the License at
15-
#
16-
# http:#www.apache.org/licenses/LICENSE-2.0
17-
#
18-
# Unless required by applicable law or agreed to in writing, software
19-
# distributed under the License is distributed on an "AS IS" BASIS,
20-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21-
# See the License for the specific language governing permissions and
22-
# limitations under the License.
10+
# SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
11+
# SPDX-License-Identifier: Apache-2.0
12+
2313
from __future__ import division, print_function, unicode_literals
2414

2515
import argparse
@@ -261,6 +251,17 @@ def flash_size(self):
261251
return 0 # empty table!
262252
return last.offset + last.size
263253

254+
def verify_size_fits(self, flash_size_bytes: int) -> None:
255+
""" Check that partition table fits into the given flash size.
256+
Raises InputError otherwise.
257+
"""
258+
table_size = self.flash_size()
259+
if flash_size_bytes < table_size:
260+
mb = 1024 * 1024
261+
raise InputError('Partitions tables occupies %.1fMB of flash (%d bytes) which does not fit in configured '
262+
"flash size %dMB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu." %
263+
(table_size / mb, table_size, flash_size_bytes / mb))
264+
264265
@classmethod
265266
def from_binary(cls, b):
266267
md5 = hashlib.md5()
@@ -505,7 +506,7 @@ def main():
505506
parser = argparse.ArgumentParser(description='ESP32 partition table utility')
506507

507508
parser.add_argument('--flash-size', help='Optional flash size limit, checks partition table fits in flash',
508-
nargs='?', choices=['1MB', '2MB', '4MB', '8MB', '16MB'])
509+
nargs='?', choices=['1MB', '2MB', '4MB', '8MB', '16MB', '32MB', '64MB', '128MB'])
509510
parser.add_argument('--disable-md5sum', help='Disable md5 checksum for the partition table', default=False, action='store_true')
510511
parser.add_argument('--no-verify', help="Don't verify partition table fields", action='store_true')
511512
parser.add_argument('--verify', '-v', help='Verify partition table fields (deprecated, this behaviour is '
@@ -531,12 +532,7 @@ def main():
531532

532533
if args.flash_size:
533534
size_mb = int(args.flash_size.replace('MB', ''))
534-
size = size_mb * 1024 * 1024 # flash memory uses honest megabytes!
535-
table_size = table.flash_size()
536-
if size < table_size:
537-
raise InputError("Partitions defined in '%s' occupy %.1fMB of flash (%d bytes) which does not fit in configured "
538-
"flash size %dMB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu." %
539-
(args.input.name, table_size / 1024.0 / 1024.0, table_size, size_mb))
535+
table.verify_size_fits(size_mb * 1024 * 1024)
540536

541537
# Make sure that the output directory is created
542538
output_dir = os.path.abspath(os.path.dirname(args.output))

Diff for: tools/platformio-build-esp32.py

+22-6
Large diffs are not rendered by default.

Diff for: tools/platformio-build-esp32c3.py

+22-4
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)