Merge branch 'fix/chatgpt_usb_mount' into 'master'
fix(chatgpt_demo): upgrade esp_tinyuf2 to fix usb mount issue See merge request ae_group/esp-box!113
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
espressif/esp_tinyuf2:
|
||||
version: "0.2.*"
|
||||
version: ">=0.2.2"
|
||||
# espressif/esp-box: "~2.2.0"
|
||||
## Required IDF version
|
||||
idf:
|
||||
|
||||
@@ -29,13 +29,14 @@ if(NOT EXISTS ${nvs_src_file})
|
||||
message(FATAL_ERROR "Please ensure that the 'factory_nvs' is built first, and make sure to keep the 'HMI Board Config' consistent.")
|
||||
endif()
|
||||
|
||||
add_custom_target(nvs_uf2_bin ALL)
|
||||
add_custom_command(
|
||||
OUTPUT ${nvs_dst_file}
|
||||
COMMENT "Generate factory_nvs..."
|
||||
COMMAND python ${MV_UF2_BIN_EXE} -d1 ${nvs_src_file} -d2 ${nvs_dst_file}
|
||||
TARGET nvs_uf2_bin
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${build_dir}/uf2
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${nvs_src_file} ${nvs_dst_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Copying factory_nvs.bin to destination if it is different..."
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(nvs_uf2_bin ALL DEPENDS ${nvs_dst_file})
|
||||
add_dependencies(flash nvs_uf2_bin)
|
||||
|
||||
partition_table_get_partition_info(size "--partition-name ota_0" "size")
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import io
|
||||
import os
|
||||
import argparse
|
||||
import shutil
|
||||
import math
|
||||
import sys
|
||||
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
def copy_files(nvs_src_file, nvs_dst_file):
|
||||
dst_folder = os.path.dirname(nvs_dst_file)
|
||||
|
||||
if not os.path.exists(dst_folder):
|
||||
os.makedirs(dst_folder)
|
||||
|
||||
shutil.copyfile(nvs_src_file, nvs_dst_file)
|
||||
print(f"File copied from {nvs_src_file} to {nvs_dst_file}")
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='move uf2 fw')
|
||||
parser.add_argument('-d1', '--nvs_src_file')
|
||||
parser.add_argument('-d2', '--nvs_dst_file')
|
||||
args = parser.parse_args()
|
||||
|
||||
if os.path.exists(args.nvs_src_file):
|
||||
copy_files(args.nvs_src_file, args.nvs_dst_file)
|
||||
Reference in New Issue
Block a user