Skip to content

Commit

Permalink
IDF release/v4.4 (#6910)
Browse files Browse the repository at this point in the history
* Add changes required for the new memory configs

* IDF release/v4.4 6c5fb29c2c

* IDF release/v4.4 c9140caf8c
  • Loading branch information
me-no-dev committed Jul 6, 2022
1 parent 9a9e3e5 commit 666c66d
Show file tree
Hide file tree
Showing 1,058 changed files with 77,478 additions and 8,287 deletions.
7 changes: 1 addition & 6 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ esp32s3.build.partitions=default
esp32s3.build.defines=
esp32s3.build.loop_core=
esp32s3.build.event_core=
esp32s3.build.flash_type=qspi
esp32s3.build.psram_type=qspi
esp32s3.build.memory_type={build.flash_type}_{build.psram_type}
esp32s3.build.memory_type={build.boot}_{build.psram_type}

esp32s3.menu.PSRAM.disabled=Disabled
esp32s3.menu.PSRAM.disabled.build.defines=
Expand All @@ -84,25 +83,21 @@ esp32s3.menu.FlashMode.qio.build.flash_mode=dio
esp32s3.menu.FlashMode.qio.build.boot=qio
esp32s3.menu.FlashMode.qio.build.boot_freq=80m
esp32s3.menu.FlashMode.qio.build.flash_freq=80m
esp32s3.menu.FlashMode.qio.build.flash_type=qspi
esp32s3.menu.FlashMode.qio120=QIO 120MHz
esp32s3.menu.FlashMode.qio120.build.flash_mode=dio
esp32s3.menu.FlashMode.qio120.build.boot=qio
esp32s3.menu.FlashMode.qio120.build.boot_freq=120m
esp32s3.menu.FlashMode.qio120.build.flash_freq=80m
esp32s3.menu.FlashMode.qio120.build.flash_type=qspi
esp32s3.menu.FlashMode.dio=DIO 80MHz
esp32s3.menu.FlashMode.dio.build.flash_mode=dio
esp32s3.menu.FlashMode.dio.build.boot=dio
esp32s3.menu.FlashMode.dio.build.boot_freq=80m
esp32s3.menu.FlashMode.dio.build.flash_freq=80m
esp32s3.menu.FlashMode.dio.build.flash_type=qspi
esp32s3.menu.FlashMode.opi=OPI 80MHz
esp32s3.menu.FlashMode.opi.build.flash_mode=dout
esp32s3.menu.FlashMode.opi.build.boot=opi
esp32s3.menu.FlashMode.opi.build.boot_freq=80m
esp32s3.menu.FlashMode.opi.build.flash_freq=80m
esp32s3.menu.FlashMode.opi.build.flash_type=opi

esp32s3.menu.FlashSize.4M=4MB (32Mb)
esp32s3.menu.FlashSize.4M.build.flash_size=4MB
Expand Down
24 changes: 12 additions & 12 deletions platform.txt

Large diffs are not rendered by default.

294 changes: 173 additions & 121 deletions tools/esptool.py

Large diffs are not rendered by default.

36 changes: 16 additions & 20 deletions tools/gen_esp32part.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,9 @@
# See https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/partition-tables.html
# for explanation of partition table structure and uses.
#
# Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0

from __future__ import division, print_function, unicode_literals

import argparse
Expand Down Expand Up @@ -261,6 +251,17 @@ def flash_size(self):
return 0 # empty table!
return last.offset + last.size

def verify_size_fits(self, flash_size_bytes: int) -> None:
""" Check that partition table fits into the given flash size.
Raises InputError otherwise.
"""
table_size = self.flash_size()
if flash_size_bytes < table_size:
mb = 1024 * 1024
raise InputError('Partitions tables occupies %.1fMB of flash (%d bytes) which does not fit in configured '
"flash size %dMB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu." %
(table_size / mb, table_size, flash_size_bytes / mb))

@classmethod
def from_binary(cls, b):
md5 = hashlib.md5()
Expand Down Expand Up @@ -505,7 +506,7 @@ def main():
parser = argparse.ArgumentParser(description='ESP32 partition table utility')

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

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

# Make sure that the output directory is created
output_dir = os.path.abspath(os.path.dirname(args.output))
Expand Down
28 changes: 22 additions & 6 deletions tools/platformio-build-esp32.py

Large diffs are not rendered by default.

26 changes: 22 additions & 4 deletions tools/platformio-build-esp32c3.py

Large diffs are not rendered by default.

0 comments on commit 666c66d

Please sign in to comment.