From 1329b6e76dbe8f826e1f6b99a897316db1245804 Mon Sep 17 00:00:00 2001 From: Xu Chun Guang Date: Fri, 21 Feb 2020 14:27:24 +0800 Subject: [PATCH] feat: Solve some compile and ci problem --- .gitlab-ci.yml | 23 ++- CMakeLists.txt | 8 +- .../customized_partitions/CMakeLists.txt | 16 +- .../generation_tools/factory_param.sh | 4 +- .../generation_tools/fatfs.sh | 6 +- .../raw_data/at_customized_partition_gen.py | 58 +++++++ ...en.py => at_customized_partition_parse.py} | 13 +- examples/at_http_webserver/Makefile | 8 +- .../components/atparse/cmdparse.c | 2 +- .../components/atparse/esp_parse_at.c | 4 +- .../module_wrover-32/sdkconfig.defaults | 1 - .../sdkconfig_silence.defaults | 1 - tools/esp_at_factory_bin_combine.py | 2 +- tools/mkfatfs/CMakeLists.txt | 0 tools/mkfatfs/Makefile | 107 +++++++++++++ tools/mkfatfs/Makefile.projbuild | 14 -- tools/mkfatfs/{src => }/README.md | 0 tools/mkfatfs/component.mk | 8 - .../mkfatfs/{src => }/fatfs/FatPartition.cpp | 0 tools/mkfatfs/{src => }/fatfs/FatPartition.h | 0 tools/mkfatfs/{src => }/fatfs/ccsbcs.c | 0 tools/mkfatfs/{src => }/fatfs/crc.cpp | 0 tools/mkfatfs/{src => }/fatfs/fatfs.c | 0 tools/mkfatfs/{src => }/fatfs/fatfs.h | 0 tools/mkfatfs/{src => }/fatfs/mkfatfs.txt | 0 .../idf/modified/driver/include/driver/gpio.h | 0 .../driver/include/driver/sdspi_host.h | 0 .../{src => }/idf/modified/fatfs/src/ff.c | 0 .../idf/modified/fatfs/src/integer.h | 0 .../idf/modified/fatfs/src/vfs_fat.c | 0 .../freertos/include/freertos/FreeRTOS.h | 0 .../freertos/include/freertos/queue.h | 0 .../freertos/include/freertos/semphr.c | 0 .../freertos/include/freertos/semphr.h | 0 .../idf/modified/log/include/esp_log.h | 0 .../idf/modified/newlib/include/sys/errno.c | 0 .../idf/modified/newlib/include/sys/errno.h | 0 .../modified/newlib/include/sys/idf_reent.c | 0 .../modified/newlib/include/sys/idf_reent.h | 0 .../idf/modified/newlib/include/sys/lock.c | 0 .../idf/modified/newlib/include/sys/lock.h | 0 .../idf/modified/spi_flash/partition.c | 0 .../idf/modified/vfs/include/esp_vfs.h | 0 .../idf/modified/vfs/include/sys/idf_dirent.h | 0 .../mkfatfs/{src => }/idf/modified/vfs/vfs.c | 0 .../wear_levelling/wear_levelling.cpp | 0 .../orig/driver/include/driver/sdmmc_host.h | 0 .../orig/driver/include/driver/sdmmc_types.h | 0 .../orig/driver/include/driver/spi_master.h | 0 .../idf/orig/esp32/include/esp_err.h | 0 .../idf/orig/esp32/include/rom/crc.h | 0 .../{src => }/idf/orig/fatfs/src/diskio.c | 0 .../{src => }/idf/orig/fatfs/src/diskio.h | 0 .../idf/orig/fatfs/src/diskio_spiflash.c | 0 .../idf/orig/fatfs/src/diskio_spiflash.h | 0 .../idf/orig/fatfs/src/esp_vfs_fat.h | 0 .../mkfatfs/{src => }/idf/orig/fatfs/src/ff.h | 0 .../{src => }/idf/orig/fatfs/src/ffconf.h | 0 .../idf/orig/fatfs/src/option/syscall.c | 0 .../idf/orig/sdmmc/include/sdmmc_cmd.h | 0 .../orig/spi_flash/include/esp_partition.h | 0 .../orig/spi_flash/include/esp_spi_flash.h | 0 .../idf/orig/wear_levelling/WL_Ext_Perf.cpp | 0 .../idf/orig/wear_levelling/WL_Ext_Safe.cpp | 0 .../idf/orig/wear_levelling/WL_Flash.cpp | 0 .../idf/orig/wear_levelling/crc32.cpp | 0 .../{src => }/idf/orig/wear_levelling/crc32.h | 0 .../wear_levelling/include/wear_levelling.h | 0 .../private_include/Flash_Access.h | 0 .../private_include/SPI_Flash.h | 0 .../private_include/WL_Config.h | 0 .../private_include/WL_Ext_Cfg.h | 0 .../private_include/WL_Ext_Perf.h | 0 .../private_include/WL_Ext_Safe.h | 0 .../wear_levelling/private_include/WL_Flash.h | 0 .../wear_levelling/private_include/WL_State.h | 0 tools/mkfatfs/{src => }/main.cpp | 0 tools/mkfatfs/src/Makefile | 146 ------------------ tools/mkfatfs/{src => }/tclap/Arg.h | 0 tools/mkfatfs/{src => }/tclap/ArgException.h | 0 tools/mkfatfs/{src => }/tclap/ArgTraits.h | 0 tools/mkfatfs/{src => }/tclap/COPYING | 0 tools/mkfatfs/{src => }/tclap/CmdLine.h | 0 .../{src => }/tclap/CmdLineInterface.h | 0 tools/mkfatfs/{src => }/tclap/CmdLineOutput.h | 0 tools/mkfatfs/{src => }/tclap/Constraint.h | 0 tools/mkfatfs/{src => }/tclap/DocBookOutput.h | 0 tools/mkfatfs/{src => }/tclap/HelpVisitor.h | 0 .../{src => }/tclap/IgnoreRestVisitor.h | 0 tools/mkfatfs/{src => }/tclap/MultiArg.h | 0 .../mkfatfs/{src => }/tclap/MultiSwitchArg.h | 0 .../tclap/OptionalUnlabeledTracker.h | 0 .../mkfatfs/{src => }/tclap/StandardTraits.h | 0 tools/mkfatfs/{src => }/tclap/StdOutput.h | 0 tools/mkfatfs/{src => }/tclap/SwitchArg.h | 0 .../{src => }/tclap/UnlabeledMultiArg.h | 0 .../{src => }/tclap/UnlabeledValueArg.h | 0 tools/mkfatfs/{src => }/tclap/ValueArg.h | 0 .../{src => }/tclap/ValuesConstraint.h | 0 .../mkfatfs/{src => }/tclap/VersionVisitor.h | 0 tools/mkfatfs/{src => }/tclap/Visitor.h | 0 tools/mkfatfs/{src => }/tclap/XorHandler.h | 0 .../{src => }/tclap/ZshCompletionOutput.h | 0 103 files changed, 222 insertions(+), 199 deletions(-) create mode 100644 components/customized_partitions/raw_data/at_customized_partition_gen.py rename components/customized_partitions/raw_data/{raw_data_bin_gen.py => at_customized_partition_parse.py} (86%) delete mode 100644 tools/mkfatfs/CMakeLists.txt create mode 100644 tools/mkfatfs/Makefile delete mode 100644 tools/mkfatfs/Makefile.projbuild rename tools/mkfatfs/{src => }/README.md (100%) delete mode 100644 tools/mkfatfs/component.mk rename tools/mkfatfs/{src => }/fatfs/FatPartition.cpp (100%) rename tools/mkfatfs/{src => }/fatfs/FatPartition.h (100%) rename tools/mkfatfs/{src => }/fatfs/ccsbcs.c (100%) rename tools/mkfatfs/{src => }/fatfs/crc.cpp (100%) rename tools/mkfatfs/{src => }/fatfs/fatfs.c (100%) rename tools/mkfatfs/{src => }/fatfs/fatfs.h (100%) rename tools/mkfatfs/{src => }/fatfs/mkfatfs.txt (100%) rename tools/mkfatfs/{src => }/idf/modified/driver/include/driver/gpio.h (100%) rename tools/mkfatfs/{src => }/idf/modified/driver/include/driver/sdspi_host.h (100%) rename tools/mkfatfs/{src => }/idf/modified/fatfs/src/ff.c (100%) rename tools/mkfatfs/{src => }/idf/modified/fatfs/src/integer.h (100%) rename tools/mkfatfs/{src => }/idf/modified/fatfs/src/vfs_fat.c (100%) rename tools/mkfatfs/{src => }/idf/modified/freertos/include/freertos/FreeRTOS.h (100%) rename tools/mkfatfs/{src => }/idf/modified/freertos/include/freertos/queue.h (100%) rename tools/mkfatfs/{src => }/idf/modified/freertos/include/freertos/semphr.c (100%) rename tools/mkfatfs/{src => }/idf/modified/freertos/include/freertos/semphr.h (100%) rename tools/mkfatfs/{src => }/idf/modified/log/include/esp_log.h (100%) rename tools/mkfatfs/{src => }/idf/modified/newlib/include/sys/errno.c (100%) rename tools/mkfatfs/{src => }/idf/modified/newlib/include/sys/errno.h (100%) rename tools/mkfatfs/{src => }/idf/modified/newlib/include/sys/idf_reent.c (100%) rename tools/mkfatfs/{src => }/idf/modified/newlib/include/sys/idf_reent.h (100%) rename tools/mkfatfs/{src => }/idf/modified/newlib/include/sys/lock.c (100%) rename tools/mkfatfs/{src => }/idf/modified/newlib/include/sys/lock.h (100%) rename tools/mkfatfs/{src => }/idf/modified/spi_flash/partition.c (100%) rename tools/mkfatfs/{src => }/idf/modified/vfs/include/esp_vfs.h (100%) rename tools/mkfatfs/{src => }/idf/modified/vfs/include/sys/idf_dirent.h (100%) rename tools/mkfatfs/{src => }/idf/modified/vfs/vfs.c (100%) rename tools/mkfatfs/{src => }/idf/modified/wear_levelling/wear_levelling.cpp (100%) rename tools/mkfatfs/{src => }/idf/orig/driver/include/driver/sdmmc_host.h (100%) rename tools/mkfatfs/{src => }/idf/orig/driver/include/driver/sdmmc_types.h (100%) rename tools/mkfatfs/{src => }/idf/orig/driver/include/driver/spi_master.h (100%) rename tools/mkfatfs/{src => }/idf/orig/esp32/include/esp_err.h (100%) rename tools/mkfatfs/{src => }/idf/orig/esp32/include/rom/crc.h (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/diskio.c (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/diskio.h (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/diskio_spiflash.c (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/diskio_spiflash.h (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/esp_vfs_fat.h (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/ff.h (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/ffconf.h (100%) rename tools/mkfatfs/{src => }/idf/orig/fatfs/src/option/syscall.c (100%) rename tools/mkfatfs/{src => }/idf/orig/sdmmc/include/sdmmc_cmd.h (100%) rename tools/mkfatfs/{src => }/idf/orig/spi_flash/include/esp_partition.h (100%) rename tools/mkfatfs/{src => }/idf/orig/spi_flash/include/esp_spi_flash.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/WL_Ext_Perf.cpp (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/WL_Ext_Safe.cpp (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/WL_Flash.cpp (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/crc32.cpp (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/crc32.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/include/wear_levelling.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/Flash_Access.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/SPI_Flash.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/WL_Config.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/WL_Ext_Cfg.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/WL_Ext_Perf.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/WL_Ext_Safe.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/WL_Flash.h (100%) rename tools/mkfatfs/{src => }/idf/orig/wear_levelling/private_include/WL_State.h (100%) rename tools/mkfatfs/{src => }/main.cpp (100%) delete mode 100644 tools/mkfatfs/src/Makefile rename tools/mkfatfs/{src => }/tclap/Arg.h (100%) rename tools/mkfatfs/{src => }/tclap/ArgException.h (100%) rename tools/mkfatfs/{src => }/tclap/ArgTraits.h (100%) rename tools/mkfatfs/{src => }/tclap/COPYING (100%) rename tools/mkfatfs/{src => }/tclap/CmdLine.h (100%) rename tools/mkfatfs/{src => }/tclap/CmdLineInterface.h (100%) rename tools/mkfatfs/{src => }/tclap/CmdLineOutput.h (100%) rename tools/mkfatfs/{src => }/tclap/Constraint.h (100%) rename tools/mkfatfs/{src => }/tclap/DocBookOutput.h (100%) rename tools/mkfatfs/{src => }/tclap/HelpVisitor.h (100%) rename tools/mkfatfs/{src => }/tclap/IgnoreRestVisitor.h (100%) rename tools/mkfatfs/{src => }/tclap/MultiArg.h (100%) rename tools/mkfatfs/{src => }/tclap/MultiSwitchArg.h (100%) rename tools/mkfatfs/{src => }/tclap/OptionalUnlabeledTracker.h (100%) rename tools/mkfatfs/{src => }/tclap/StandardTraits.h (100%) rename tools/mkfatfs/{src => }/tclap/StdOutput.h (100%) rename tools/mkfatfs/{src => }/tclap/SwitchArg.h (100%) rename tools/mkfatfs/{src => }/tclap/UnlabeledMultiArg.h (100%) rename tools/mkfatfs/{src => }/tclap/UnlabeledValueArg.h (100%) rename tools/mkfatfs/{src => }/tclap/ValueArg.h (100%) rename tools/mkfatfs/{src => }/tclap/ValuesConstraint.h (100%) rename tools/mkfatfs/{src => }/tclap/VersionVisitor.h (100%) rename tools/mkfatfs/{src => }/tclap/Visitor.h (100%) rename tools/mkfatfs/{src => }/tclap/XorHandler.h (100%) rename tools/mkfatfs/{src => }/tclap/ZshCompletionOutput.h (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 626faeaf..d863a19b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,6 +61,8 @@ esp32_wroom_at: - time ./tools/ci/get-full-sources.sh - git submodule update --init - cd - + - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP32 + - export ESP_AT_MODULE_NAME=WROOM-32 - export ESP_AT_PROJECT_PATH=$(pwd) - ./esp-idf/tools/idf.py build - cp build/flash_project_args build/download.config @@ -127,6 +129,7 @@ esp32_wrover_at: - git submodule update --init - cd - + - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP32 - export ESP_AT_MODULE_NAME=WROVER-32 - export ESP_AT_PROJECT_PATH=$(pwd) - ./esp-idf/tools/idf.py build -DSILENCE=1 @@ -194,9 +197,10 @@ pico_d4_at: - git submodule update --init - cd - + - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP32 - export ESP_AT_MODULE_NAME=PICO-D4 - export ESP_AT_PROJECT_PATH=$(pwd) - - ./esp-idf/tools/idf.py build -DSILENCE=1 + - ./esp-idf/tools/idf.py build - cp build/flash_project_args build/download.config # - make print_flash_cmd | tail -n 1 > build/download.config # - make factory_bin @@ -262,9 +266,10 @@ solo_1_at: - git submodule update --init - cd - + - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP32 - export ESP_AT_MODULE_NAME=SOLO-1 - export ESP_AT_PROJECT_PATH=$(pwd) - - ./esp-idf/tools/idf.py build -DSILENCE=1 + - ./esp-idf/tools/idf.py build - cp build/flash_project_args build/download.config # - make print_flash_cmd | tail -n 1 > build/download.config # - make factory_bin @@ -329,11 +334,12 @@ esp8266_wroom_02_at: - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP8266 - export ESP_AT_MODULE_NAME=WROOM-02 - export ESP_AT_PROJECT_PATH=$(pwd) - - ./esp-idf/tools/idf.py build -DSILENCE=1 + - ./esp-idf/tools/idf.py build - cp build/flash_project_args build/download.config # - make print_flash_cmd | tail -n 1 > build/download.config # - make factory_bin + esp8266_wroom_5V2L_at: stage: build image: $CI_DOCKER_REGISTRY/esp8266-ci-env-new @@ -393,7 +399,7 @@ esp8266_wroom_5V2L_at: - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP8266 - export ESP_AT_MODULE_NAME=WROOM-5V2L - export ESP_AT_PROJECT_PATH=$(pwd) - - ./esp-idf/tools/idf.py build -DSILENCE=1 + - ./esp-idf/tools/idf.py build - cp build/flash_project_args build/download.config # - make print_flash_cmd | tail -n 1 > build/download.config # - make factory_bin @@ -456,8 +462,14 @@ esp32_demo: - cd - - cd examples/at_http_webserver + - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP32 + - export ESP_AT_MODULE_NAME=WROOM-32 + - export ESP_AT_PROJECT_PATH=$(pwd)/../.. - make defconfig - make -j8 + - unset ESP_AT_PROJECT_PLATFORM + - unset ESP_AT_MODULE_NAME + - unset ESP_AT_PROJECT_PATH - cd - - cd examples/at_sdio_host @@ -545,9 +557,10 @@ wrover32_all_function_at: - git submodule update --init - cd - + - export ESP_AT_PROJECT_PLATFORM=PLATFORM_ESP32 - export ESP_AT_MODULE_NAME=WROVER-32 - export ESP_AT_PROJECT_PATH=$(pwd) - - ./esp-idf/tools/idf.py build -DSILENCE=1 + - ./esp-idf/tools/idf.py build - cp build/flash_project_args build/download.config # - make print_flash_cmd | tail -n 1 > build/download.config # - make factory_bin \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 34cd7aca..992e24c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,10 +14,16 @@ endif() set(IDF_PATH ${CMAKE_SOURCE_DIR}/esp-idf) +string(TOLOWER $ENV{ESP_AT_MODULE_NAME} LOWER_NAME) + +set(ESP_AT_MODULE_CONFIG_DIR ${CMAKE_SOURCE_DIR}/module_config/module_${LOWER_NAME}) +if (NOT EXISTS "${ESP_AT_MODULE_CONFIG_DIR}") string(SUBSTRING "$ENV{ESP_AT_PROJECT_PLATFORM}" 9 31 PLATFORM_NAME) # remove PLATFORM_ string(TOLOWER ${PLATFORM_NAME} LOWER_NAME) set(ESP_AT_MODULE_CONFIG_DIR ${CMAKE_SOURCE_DIR}/module_config/module_${LOWER_NAME}_default ) +endif() + SET(ENV{ESP_AT_PROJECT_PATH} ${CMAKE_SOURCE_DIR} ) if (NOT DEFINED SILENCE) @@ -87,7 +93,7 @@ include(${IDF_PATH}/tools/cmake/project.cmake) project(esp-at) -add_custom_target(factory_bin ALL DEPENDS app) +add_custom_target(factory_bin ALL DEPENDS customized_bin) add_custom_command(TARGET factory_bin POST_BUILD COMMAND mkdir -p $ENV{ESP_AT_PROJECT_PATH}/build/factory diff --git a/components/customized_partitions/CMakeLists.txt b/components/customized_partitions/CMakeLists.txt index 0dc44969..ad355e13 100644 --- a/components/customized_partitions/CMakeLists.txt +++ b/components/customized_partitions/CMakeLists.txt @@ -4,6 +4,7 @@ idf_build_get_property(build_dir BUILD_DIR) idf_build_get_property(project_dir PROJECT_DIR) set(flash_customized_partition_args ${build_dir}/flash_customized_partition_args) +set(module_info ${build_dir}/module_info) STRING(REGEX REPLACE ".*/(.*)\.csv" "\\1" customize_bin ${CONFIG_AT_CUSTOMIZED_PARTITION_TABLE_FILE}) set(customize_bin_full_name ${customize_bin}.bin) @@ -14,11 +15,10 @@ execute_process ( esptool_py_flash_project_args(${customize_bin} ${CONFIG_AT_CUSTOMIZED_PARTITION_TABLE_OFFSET} ${build_dir}/${customize_bin_full_name} FLASH_IN_PROJECT) execute_process ( - COMMAND ${PYTHON} ${COMPONENT_DIR}/raw_data/raw_data_bin_gen.py + COMMAND ${PYTHON} ${COMPONENT_DIR}/raw_data/at_customized_partition_parse.py --sdkconfig_file ${project_dir}/sdkconfig --dependency_file ${COMPONENT_DIR}/AT_partition_dependency --partition_file ${project_dir}/${CONFIG_AT_CUSTOMIZED_PARTITION_TABLE_FILE} - --tools_dir ${COMPONENT_DIR}/generation_tools --output_dir ${build_dir}/${COMPONENT_NAME} --flash_args_file ${flash_customized_partition_args} ) @@ -35,3 +35,15 @@ foreach(partition_args ${customized_partition_args}) esptool_py_flash_project_args(${file_name} ${offset} ${file_path} FLASH_IN_PROJECT) endforeach(partition_args) + +add_custom_target(customized_bin ALL DEPENDS app) +add_custom_command(TARGET customized_bin + POST_BUILD + COMMAND mkdir -p ${build_dir}/include + COMMAND cp ${build_dir}/config/sdkconfig.h ${build_dir}/include/sdkconfig.h + COMMAND ${PYTHON} ${COMPONENT_DIR}/raw_data/at_customized_partition_gen.py + --tools_dir ${COMPONENT_DIR}/generation_tools + --output_dir ${build_dir}/${COMPONENT_NAME} + --flash_args_file ${flash_customized_partition_args} + COMMENT "Create customized_bin..." +) \ No newline at end of file diff --git a/components/customized_partitions/generation_tools/factory_param.sh b/components/customized_partitions/generation_tools/factory_param.sh index 0ca748d7..201095de 100755 --- a/components/customized_partitions/generation_tools/factory_param.sh +++ b/components/customized_partitions/generation_tools/factory_param.sh @@ -31,8 +31,8 @@ RAW_DATA_FOLDER=$ESP_AT_PROJECT_PATH/components/customized_partitions/raw_data/f MODULE_FILE=$(ls $RAW_DATA_FOLDER/factory_param_data.csv | awk '{print $1}') DEFINE_FILE=$(ls $RAW_DATA_FOLDER/factory_param_type.csv | awk '{print $1}') -LOG_FILE=$ESP_AT_PROJECT_PATH/build/factory/factory_parameter.log +LOG_FILE=$(dirname ${TARGET_FOLDER})/factory/factory_parameter.log -echo "generating factory_param.bin($MODULE_NAME): python $TOOL_PATH -t $TARGET_FOLDER/$PARTITION_NAME.bin $MODULE_FILE" +echo "generating factory_param.bin($ESP_AT_MODULE_NAME): python $TOOL_PATH -t $TARGET_FOLDER/$PARTITION_NAME.bin $MODULE_FILE" python $TOOL_PATH --platform $ESP_AT_PROJECT_PLATFORM --module $ESP_AT_MODULE_NAME --bin_name $TARGET_FOLDER/$PARTITION_NAME.bin --define_file $DEFINE_FILE --module_file $MODULE_FILE --log_file $LOG_FILE diff --git a/components/customized_partitions/generation_tools/fatfs.sh b/components/customized_partitions/generation_tools/fatfs.sh index cbcd5f61..a1597f68 100755 --- a/components/customized_partitions/generation_tools/fatfs.sh +++ b/components/customized_partitions/generation_tools/fatfs.sh @@ -23,6 +23,7 @@ # ESP_AT_IMAGE_SIZE_STR=$3 +BUILD_DIR_BASE=$(dirname $2) if [ ${ESP_AT_IMAGE_SIZE_STR: -1} == K ] then @@ -32,6 +33,7 @@ else let ESP_AT_IMAGE_SIZE=$[ESP_AT_IMAGE_SIZE_STR] fi -make mkfatfs +# make mkfatfs +make -C $ESP_AT_PROJECT_PATH/tools/mkfatfs BUILD_DIR_BASE=${BUILD_DIR_BASE} -"$ESP_AT_PROJECT_PATH"/tools/mkfatfs/src/mkfatfs -c "$ESP_AT_IMAGE_DIR" -s $ESP_AT_IMAGE_SIZE $2/$1.bin \ No newline at end of file +${BUILD_DIR_BASE}/mkfatfs/mkfatfs -c "$ESP_AT_IMAGE_DIR" -s $ESP_AT_IMAGE_SIZE $2/$1.bin diff --git a/components/customized_partitions/raw_data/at_customized_partition_gen.py b/components/customized_partitions/raw_data/at_customized_partition_gen.py new file mode 100644 index 00000000..b1fb9056 --- /dev/null +++ b/components/customized_partitions/raw_data/at_customized_partition_gen.py @@ -0,0 +1,58 @@ +# +# ESPRESSIF MIT License +# +# Copyright (c) 2020 +# +# Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP32 only, in which case, +# it is free of charge, to any person obtaining a copy of this software and associated +# documentation files (the "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the Software is furnished +# to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or +# substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +import os +import sys +import stat +import argparse +import subprocess + +def main(): + """ main """ + parser = argparse.ArgumentParser() + parser.add_argument("--tools_dir", default=".", help="the tools directory") + parser.add_argument("--output_dir", default="output", help="the output bin directory") + parser.add_argument("--flash_args_file", default="flash_args_file", help="the file to store flash args") + args = parser.parse_args() + + tools_dir = args.tools_dir + output_dir = args.output_dir + flash_args_file = args.flash_args_file + + if os.path.exists(output_dir) == False: + os.mkdir(output_dir) + + with open(flash_args_file, 'r') as args_file: + for line in args_file.readlines(): + line_str = line.strip() + str_list = line_str.split(' ') + full_filename = str_list[1] + file_size = str_list[2] + file_name = os.path.basename(full_filename) + partition_name = os.path.splitext(file_name)[0] + tool_name = os.path.join(tools_dir, ''.join([partition_name, '.sh'])) + if not os.access(tool_name, os.X_OK): + os.chmod(tool_name, stat.S_IRUSR | stat.S_IXUSR) + subprocess.call([tool_name, partition_name, output_dir, file_size], shell = False) + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/components/customized_partitions/raw_data/raw_data_bin_gen.py b/components/customized_partitions/raw_data/at_customized_partition_parse.py similarity index 86% rename from components/customized_partitions/raw_data/raw_data_bin_gen.py rename to components/customized_partitions/raw_data/at_customized_partition_parse.py index 7e599841..1ecf88ec 100644 --- a/components/customized_partitions/raw_data/raw_data_bin_gen.py +++ b/components/customized_partitions/raw_data/at_customized_partition_parse.py @@ -48,7 +48,7 @@ def parse_partition_tables (partition_file): if str_list[0] in generation_tools: offset = str_list[3] size = str_list[4] - generation_tools.update({str_list[0] : {'offset' : offset}}) + generation_tools.update({str_list[0] : {'offset' : offset, 'size' : size}}) def main(): """ main """ @@ -56,7 +56,6 @@ def main(): parser.add_argument("--dependency_file", help="dependency") parser.add_argument("--sdkconfig_file", help="sdkconfig") parser.add_argument("--partition_file", help="at_customize.csv") - parser.add_argument("--tools_dir", default=".", help="the tools directory") parser.add_argument("--output_dir", default="output", help="the output bin directory") parser.add_argument("--flash_args_file", default="flash_args_file", help="the file to store flash args") args = parser.parse_args() @@ -64,7 +63,6 @@ def main(): sdkconfig_file = args.sdkconfig_file dependency_file = args.dependency_file partition_file = args.partition_file - tools_dir = args.tools_dir output_dir = args.output_dir flash_args_file = args.flash_args_file parse_generation_tools(dependency_file, sdkconfig_file) @@ -75,14 +73,9 @@ def main(): with open(flash_args_file, 'w+') as args_file: for partition in generation_tools: - script = ''.join([partition, '.sh']) - tool = os.path.join(tools_dir, script) - if not os.access(tool, os.X_OK): - os.chmod(tool, stat.S_IRUSR | stat.S_IXUSR) - cmd = ' '.join([tool, partition, output_dir, generation_tools[partition]['offset']]) - subprocess.call([tool, partition, output_dir], shell = False) args_file.write(''.join([generation_tools[partition]['offset'], ' '])) - args_file.write(''.join([os.path.join(output_dir, partition), '.bin\r\n'])) + args_file.write(''.join([os.path.join(output_dir, partition), ''.join(['.bin', ' '])])) + args_file.write(''.join([generation_tools[partition]['size'], '\r\n'])) if __name__ == '__main__': main() \ No newline at end of file diff --git a/examples/at_http_webserver/Makefile b/examples/at_http_webserver/Makefile index 113825e7..8095a7c8 100644 --- a/examples/at_http_webserver/Makefile +++ b/examples/at_http_webserver/Makefile @@ -18,9 +18,11 @@ EXTRA_CFLAGS += -DSDK_GIT=IDF_VER include $(IDF_PATH)/make/project.mk factory_bin: - $(PYTHON) $(ESP_AT_PROJECT_PATH)/tools/esp32_at_combine.py \ - --bin_directory $(ESP_AT_PROJECT_PATH)/build \ + $(PYTHON) $(ESP_AT_PROJECT_PATH)/tools/esp_at_factory_bin_combine.py \ + --module_name $(ESP_AT_MODULE_NAME) \ + --bin_directory $(PWD)/build \ --flash_mode $(CONFIG_ESPTOOLPY_FLASHMODE) \ --flash_size $(CONFIG_ESPTOOLPY_FLASHSIZE) \ - --flash_speed $(CONFIG_ESPTOOLPY_FLASHFREQ) + --flash_speed $(CONFIG_ESPTOOLPY_FLASHFREQ) \ + --download_config $(PWD)/build/download.config diff --git a/examples/at_http_webserver/components/atparse/cmdparse.c b/examples/at_http_webserver/components/atparse/cmdparse.c index 63081b34..9fdc2570 100644 --- a/examples/at_http_webserver/components/atparse/cmdparse.c +++ b/examples/at_http_webserver/components/atparse/cmdparse.c @@ -1232,7 +1232,7 @@ static int8_t at_bledisconn_pack(at_cmd_arg* cmd_arg) static int8_t at_bleadvparam_pack(at_cmd_arg* cmd_arg) { uint32_t cmd_len = 0; - char cmd_tmp[30]; + char cmd_tmp[60]; if (cmd_arg->bleadvparam.adv_filter_policy != -1 && cmd_arg->bleadvparam.peer_addr_type != -1 && strlen(cmd_arg->bleadvparam.peer_address) > 0) { cmd_len = snprintf(cmd_tmp, sizeof(cmd_tmp), "AT+BLEADVPARAM=%d,%d,%d,%d,%d,%d,%d,%s\r\n", cmd_arg->bleadvparam.adv_int_min, cmd_arg->bleadvparam.adv_int_max, cmd_arg->bleadvparam.adv_type, cmd_arg->bleadvparam.addr_type, cmd_arg->bleadvparam.channel, cmd_arg->bleadvparam.adv_filter_policy, cmd_arg->bleadvparam.peer_addr_type, cmd_arg->bleadvparam.peer_address); diff --git a/examples/at_http_webserver/components/atparse/esp_parse_at.c b/examples/at_http_webserver/components/atparse/esp_parse_at.c index fe4cf3de..86d69ae0 100644 --- a/examples/at_http_webserver/components/atparse/esp_parse_at.c +++ b/examples/at_http_webserver/components/atparse/esp_parse_at.c @@ -1432,8 +1432,8 @@ esp_err_t esp_at_init_parse(void) #if CONFIG_ESP_WIFI_MODE_AP // set softAP ssid: AT_HTTP_WEBSERVER, password: 12345678 memset(&cmd_arg, 0x0, sizeof(at_cmd_arg)); - strncpy(cmd_arg.cwsap.ssid, CONFIG_ESP_WIFI_SSID, strlen(CONFIG_ESP_WIFI_SSID)); - strncpy(cmd_arg.cwsap.pwd, CONFIG_ESP_WIFI_PASSWORD, strlen(CONFIG_ESP_WIFI_PASSWORD)); + strncpy(cmd_arg.cwsap.ssid, CONFIG_ESP_WIFI_SSID, sizeof(cmd_arg.cwsap.ssid)); + strncpy(cmd_arg.cwsap.pwd, CONFIG_ESP_WIFI_PASSWORD, sizeof(cmd_arg.cwsap.pwd)); cmd_arg.cwsap.chl = 8; cmd_arg.cwsap.ecn = 4; at_result = at_add_cmd(AT_CWSAP, &cmd_arg); diff --git a/module_config/module_wrover-32/sdkconfig.defaults b/module_config/module_wrover-32/sdkconfig.defaults index 2b060e0e..4d1852c9 100644 --- a/module_config/module_wrover-32/sdkconfig.defaults +++ b/module_config/module_wrover-32/sdkconfig.defaults @@ -132,7 +132,6 @@ CONFIG_FATFS_LFN_HEAP=y #### CONFIG_VFS_SUPPORT_TERMIOS=n -CONFIG_NEWLIB_NANO_FORMAT=y CONFIG_ESP32_DEBUG_OCDAWARE=n CONFIG_ESP32_DEBUG_STUBS_ENABLE=n CONFIG_ESP_ERR_TO_NAME_LOOKUP=n diff --git a/module_config/module_wrover-32/sdkconfig_silence.defaults b/module_config/module_wrover-32/sdkconfig_silence.defaults index d0f454f3..d0cd2514 100644 --- a/module_config/module_wrover-32/sdkconfig_silence.defaults +++ b/module_config/module_wrover-32/sdkconfig_silence.defaults @@ -132,7 +132,6 @@ CONFIG_FATFS_LFN_HEAP=y #### CONFIG_VFS_SUPPORT_TERMIOS=n -CONFIG_NEWLIB_NANO_FORMAT=y CONFIG_ESP32_DEBUG_OCDAWARE=n CONFIG_ESP32_DEBUG_STUBS_ENABLE=n CONFIG_ESP_ERR_TO_NAME_LOOKUP=n diff --git a/tools/esp_at_factory_bin_combine.py b/tools/esp_at_factory_bin_combine.py index 6c07dfaf..25f2399e 100755 --- a/tools/esp_at_factory_bin_combine.py +++ b/tools/esp_at_factory_bin_combine.py @@ -75,7 +75,7 @@ def esp32_at_combine_bin(modlule, flash_mode, flash_size, flash_speed, build_dir print("Create %s for %s finished"%(factory_bin, modlule_name)) else: - factory_bin = os.path.join(os.path.dirname(parameter_file), 'factory.bin') + factory_bin = os.path.join(build_dir, 'factory.bin') with open(factory_bin, 'wb') as f: f.write(bin_data) print("Create %s finished"%(factory_bin)) diff --git a/tools/mkfatfs/CMakeLists.txt b/tools/mkfatfs/CMakeLists.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/mkfatfs/Makefile b/tools/mkfatfs/Makefile new file mode 100644 index 00000000..0e629250 --- /dev/null +++ b/tools/mkfatfs/Makefile @@ -0,0 +1,107 @@ +#CFLAGS ?= -std=gnu99 -Os -Wall +#CXXFLAGS ?= -std=gnu++11 -Os -Wall +# BUILD_DIR_BASE ?= $(ESP_AT_PROJECT_PATH)/build +IDF_INCLUDES = -I $(BUILD_DIR_BASE)/include + +BIN_DIR = $(BUILD_DIR_BASE)/mkfatfs + +IDF_MODIFIED_DIR = idf/modified +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR) +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/driver/include +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/fatfs/src +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/freertos/include +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/log/include +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/newlib/include +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/vfs/include +IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/vfs/include/sys + +IDF_ORIG_DIR = idf/orig +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/driver/include +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/driver/include/driver +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/esp32/include +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/fatfs/src +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/sdmmc/include +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/spi_flash/include +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/wear_levelling/include +IDF_INCLUDES += -I $(IDF_ORIG_DIR)/wear_levelling/private_include + +ifdef OS +ifeq ($(OS),Windows_NT) + OS_IS_WIN = 1 +endif +endif + +ifdef OS_IS_WIN + TARGET_OS := WINDOWS + DIST_SUFFIX := windows + ARCHIVE_CMD := 7z a + ARCHIVE_EXTENSION := zip + TARGET := mkfatfs.exe + CC=gcc.exe + CXX=g++.exe + #MVA TARGET_CFLAGS := -mno-ms-bitfields + CPATH := $(COMPONENT_INCLUDES) + #TARGET_CFLAGS := -mno-ms-bitfields -std=gnu99 -Os -Wall -I $(COMPONENT_INCLUDES) -Itclap -Ifatfs -I. -D$(TARGET_OS) + TARGET_CFLAGS := -mno-ms-bitfields -std=gnu99 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) $(IDF_INCLUDES) + TARGET_CXXFLAGS := -std=gnu++11 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) $(IDF_INCLUDES) + TARGET_LDFLAGS := -Wl,-static -static-libgcc + +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + TARGET_OS := LINUX + UNAME_P := $(shell uname -p) + ifeq ($(UNAME_P),x86_64) + DIST_SUFFIX := linux64 + endif + ifneq ($(filter %86,$(UNAME_P)),) + DIST_SUFFIX := linux32 + endif + CC=gcc + CXX=g++ + TARGET_CFLAGS = -std=gnu99 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ $(IDF_INCLUDES) + TARGET_CXXFLAGS = -std=gnu++11 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ $(IDF_INCLUDES) + TARGET_LDFLAGS = + endif + ifeq ($(UNAME_S),Darwin) + TARGET_OS := OSX + DIST_SUFFIX := osx + CC=clang + CXX=clang++ + TARGET_CFLAGS = -std=gnu99 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ -mmacosx-version-min=10.7 -arch x86_64 $(IDF_INCLUDES) + TARGET_CXXFLAGS = -std=gnu++11 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ -mmacosx-version-min=10.7 -arch x86_64 -stdlib=libc++ $(IDF_INCLUDES) + TARGET_LDFLAGS = -arch x86_64 -stdlib=libc++ + endif + + ARCHIVE_CMD := tar czf + ARCHIVE_EXTENSION := tar.gz + TARGET := mkfatfs +endif + + +VERSION ?= $(shell git describe --always) + +C_SRCS = $(shell find . -name "*.c") +CPP_SRCS = $(shell find . -name "*.cpp") + +C_OBJS = $(patsubst %.c, %.o, $(C_SRCS)) +CPP_OBJS = $(patsubst %.cpp, %.o, $(CPP_SRCS)) + +.PHONY: all clean + +all: $(TARGET) + +%.o : %.c + @mkdir -p $(dir $(BIN_DIR)/$@) + $(CC) $(TARGET_CFLAGS) -c $< -o $(BIN_DIR)/$@ + +%.o : %.cpp + @mkdir -p $(dir $(BIN_DIR)/$@) + $(CXX) $(TARGET_CXXFLAGS) -c $< -o $(BIN_DIR)/$@ + +$(TARGET): $(C_OBJS) $(CPP_OBJS) + @echo "Building mkfatfs ..." + $(CXX) $(TARGET_CFLAGS) -o $(BIN_DIR)/$(TARGET) $(addprefix $(BIN_DIR)/,$(C_OBJS) $(CPP_OBJS)) $(TARGET_LDFLAGS) + +clean: + @rm -rf $(BIN_DIR)/* diff --git a/tools/mkfatfs/Makefile.projbuild b/tools/mkfatfs/Makefile.projbuild deleted file mode 100644 index b0cc2db6..00000000 --- a/tools/mkfatfs/Makefile.projbuild +++ /dev/null @@ -1,14 +0,0 @@ -MKFATFS_COMPONENT_PATH := $(COMPONENT_PATH) -MKFATFS_BUILD_DIR=$(abspath $(MKFATFS_COMPONENT_PATH)/mkfatfs) - -# Custom recursive make for mkfatfs sub-project -MKFATFS_MAKE = +$(MAKE) -C $(MKFATFS_COMPONENT_PATH)/src - -.PHONY: mkfatfs clean - -mkfatfs: $(SDKCONFIG_MAKEFILE) - $(MKFATFS_MAKE) all - -clean: $(SDKCONFIG_MAKEFILE) - $(MKFATFS_MAKE) clean - diff --git a/tools/mkfatfs/src/README.md b/tools/mkfatfs/README.md similarity index 100% rename from tools/mkfatfs/src/README.md rename to tools/mkfatfs/README.md diff --git a/tools/mkfatfs/component.mk b/tools/mkfatfs/component.mk deleted file mode 100644 index 29a506b2..00000000 --- a/tools/mkfatfs/component.mk +++ /dev/null @@ -1,8 +0,0 @@ -# -# Component Makefile -# - -COMPONENT_SRCDIRS := -COMPONENT_ADD_INCLUDEDIRS := - - diff --git a/tools/mkfatfs/src/fatfs/FatPartition.cpp b/tools/mkfatfs/fatfs/FatPartition.cpp similarity index 100% rename from tools/mkfatfs/src/fatfs/FatPartition.cpp rename to tools/mkfatfs/fatfs/FatPartition.cpp diff --git a/tools/mkfatfs/src/fatfs/FatPartition.h b/tools/mkfatfs/fatfs/FatPartition.h similarity index 100% rename from tools/mkfatfs/src/fatfs/FatPartition.h rename to tools/mkfatfs/fatfs/FatPartition.h diff --git a/tools/mkfatfs/src/fatfs/ccsbcs.c b/tools/mkfatfs/fatfs/ccsbcs.c similarity index 100% rename from tools/mkfatfs/src/fatfs/ccsbcs.c rename to tools/mkfatfs/fatfs/ccsbcs.c diff --git a/tools/mkfatfs/src/fatfs/crc.cpp b/tools/mkfatfs/fatfs/crc.cpp similarity index 100% rename from tools/mkfatfs/src/fatfs/crc.cpp rename to tools/mkfatfs/fatfs/crc.cpp diff --git a/tools/mkfatfs/src/fatfs/fatfs.c b/tools/mkfatfs/fatfs/fatfs.c similarity index 100% rename from tools/mkfatfs/src/fatfs/fatfs.c rename to tools/mkfatfs/fatfs/fatfs.c diff --git a/tools/mkfatfs/src/fatfs/fatfs.h b/tools/mkfatfs/fatfs/fatfs.h similarity index 100% rename from tools/mkfatfs/src/fatfs/fatfs.h rename to tools/mkfatfs/fatfs/fatfs.h diff --git a/tools/mkfatfs/src/fatfs/mkfatfs.txt b/tools/mkfatfs/fatfs/mkfatfs.txt similarity index 100% rename from tools/mkfatfs/src/fatfs/mkfatfs.txt rename to tools/mkfatfs/fatfs/mkfatfs.txt diff --git a/tools/mkfatfs/src/idf/modified/driver/include/driver/gpio.h b/tools/mkfatfs/idf/modified/driver/include/driver/gpio.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/driver/include/driver/gpio.h rename to tools/mkfatfs/idf/modified/driver/include/driver/gpio.h diff --git a/tools/mkfatfs/src/idf/modified/driver/include/driver/sdspi_host.h b/tools/mkfatfs/idf/modified/driver/include/driver/sdspi_host.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/driver/include/driver/sdspi_host.h rename to tools/mkfatfs/idf/modified/driver/include/driver/sdspi_host.h diff --git a/tools/mkfatfs/src/idf/modified/fatfs/src/ff.c b/tools/mkfatfs/idf/modified/fatfs/src/ff.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/fatfs/src/ff.c rename to tools/mkfatfs/idf/modified/fatfs/src/ff.c diff --git a/tools/mkfatfs/src/idf/modified/fatfs/src/integer.h b/tools/mkfatfs/idf/modified/fatfs/src/integer.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/fatfs/src/integer.h rename to tools/mkfatfs/idf/modified/fatfs/src/integer.h diff --git a/tools/mkfatfs/src/idf/modified/fatfs/src/vfs_fat.c b/tools/mkfatfs/idf/modified/fatfs/src/vfs_fat.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/fatfs/src/vfs_fat.c rename to tools/mkfatfs/idf/modified/fatfs/src/vfs_fat.c diff --git a/tools/mkfatfs/src/idf/modified/freertos/include/freertos/FreeRTOS.h b/tools/mkfatfs/idf/modified/freertos/include/freertos/FreeRTOS.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/freertos/include/freertos/FreeRTOS.h rename to tools/mkfatfs/idf/modified/freertos/include/freertos/FreeRTOS.h diff --git a/tools/mkfatfs/src/idf/modified/freertos/include/freertos/queue.h b/tools/mkfatfs/idf/modified/freertos/include/freertos/queue.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/freertos/include/freertos/queue.h rename to tools/mkfatfs/idf/modified/freertos/include/freertos/queue.h diff --git a/tools/mkfatfs/src/idf/modified/freertos/include/freertos/semphr.c b/tools/mkfatfs/idf/modified/freertos/include/freertos/semphr.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/freertos/include/freertos/semphr.c rename to tools/mkfatfs/idf/modified/freertos/include/freertos/semphr.c diff --git a/tools/mkfatfs/src/idf/modified/freertos/include/freertos/semphr.h b/tools/mkfatfs/idf/modified/freertos/include/freertos/semphr.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/freertos/include/freertos/semphr.h rename to tools/mkfatfs/idf/modified/freertos/include/freertos/semphr.h diff --git a/tools/mkfatfs/src/idf/modified/log/include/esp_log.h b/tools/mkfatfs/idf/modified/log/include/esp_log.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/log/include/esp_log.h rename to tools/mkfatfs/idf/modified/log/include/esp_log.h diff --git a/tools/mkfatfs/src/idf/modified/newlib/include/sys/errno.c b/tools/mkfatfs/idf/modified/newlib/include/sys/errno.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/newlib/include/sys/errno.c rename to tools/mkfatfs/idf/modified/newlib/include/sys/errno.c diff --git a/tools/mkfatfs/src/idf/modified/newlib/include/sys/errno.h b/tools/mkfatfs/idf/modified/newlib/include/sys/errno.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/newlib/include/sys/errno.h rename to tools/mkfatfs/idf/modified/newlib/include/sys/errno.h diff --git a/tools/mkfatfs/src/idf/modified/newlib/include/sys/idf_reent.c b/tools/mkfatfs/idf/modified/newlib/include/sys/idf_reent.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/newlib/include/sys/idf_reent.c rename to tools/mkfatfs/idf/modified/newlib/include/sys/idf_reent.c diff --git a/tools/mkfatfs/src/idf/modified/newlib/include/sys/idf_reent.h b/tools/mkfatfs/idf/modified/newlib/include/sys/idf_reent.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/newlib/include/sys/idf_reent.h rename to tools/mkfatfs/idf/modified/newlib/include/sys/idf_reent.h diff --git a/tools/mkfatfs/src/idf/modified/newlib/include/sys/lock.c b/tools/mkfatfs/idf/modified/newlib/include/sys/lock.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/newlib/include/sys/lock.c rename to tools/mkfatfs/idf/modified/newlib/include/sys/lock.c diff --git a/tools/mkfatfs/src/idf/modified/newlib/include/sys/lock.h b/tools/mkfatfs/idf/modified/newlib/include/sys/lock.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/newlib/include/sys/lock.h rename to tools/mkfatfs/idf/modified/newlib/include/sys/lock.h diff --git a/tools/mkfatfs/src/idf/modified/spi_flash/partition.c b/tools/mkfatfs/idf/modified/spi_flash/partition.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/spi_flash/partition.c rename to tools/mkfatfs/idf/modified/spi_flash/partition.c diff --git a/tools/mkfatfs/src/idf/modified/vfs/include/esp_vfs.h b/tools/mkfatfs/idf/modified/vfs/include/esp_vfs.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/vfs/include/esp_vfs.h rename to tools/mkfatfs/idf/modified/vfs/include/esp_vfs.h diff --git a/tools/mkfatfs/src/idf/modified/vfs/include/sys/idf_dirent.h b/tools/mkfatfs/idf/modified/vfs/include/sys/idf_dirent.h similarity index 100% rename from tools/mkfatfs/src/idf/modified/vfs/include/sys/idf_dirent.h rename to tools/mkfatfs/idf/modified/vfs/include/sys/idf_dirent.h diff --git a/tools/mkfatfs/src/idf/modified/vfs/vfs.c b/tools/mkfatfs/idf/modified/vfs/vfs.c similarity index 100% rename from tools/mkfatfs/src/idf/modified/vfs/vfs.c rename to tools/mkfatfs/idf/modified/vfs/vfs.c diff --git a/tools/mkfatfs/src/idf/modified/wear_levelling/wear_levelling.cpp b/tools/mkfatfs/idf/modified/wear_levelling/wear_levelling.cpp similarity index 100% rename from tools/mkfatfs/src/idf/modified/wear_levelling/wear_levelling.cpp rename to tools/mkfatfs/idf/modified/wear_levelling/wear_levelling.cpp diff --git a/tools/mkfatfs/src/idf/orig/driver/include/driver/sdmmc_host.h b/tools/mkfatfs/idf/orig/driver/include/driver/sdmmc_host.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/driver/include/driver/sdmmc_host.h rename to tools/mkfatfs/idf/orig/driver/include/driver/sdmmc_host.h diff --git a/tools/mkfatfs/src/idf/orig/driver/include/driver/sdmmc_types.h b/tools/mkfatfs/idf/orig/driver/include/driver/sdmmc_types.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/driver/include/driver/sdmmc_types.h rename to tools/mkfatfs/idf/orig/driver/include/driver/sdmmc_types.h diff --git a/tools/mkfatfs/src/idf/orig/driver/include/driver/spi_master.h b/tools/mkfatfs/idf/orig/driver/include/driver/spi_master.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/driver/include/driver/spi_master.h rename to tools/mkfatfs/idf/orig/driver/include/driver/spi_master.h diff --git a/tools/mkfatfs/src/idf/orig/esp32/include/esp_err.h b/tools/mkfatfs/idf/orig/esp32/include/esp_err.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/esp32/include/esp_err.h rename to tools/mkfatfs/idf/orig/esp32/include/esp_err.h diff --git a/tools/mkfatfs/src/idf/orig/esp32/include/rom/crc.h b/tools/mkfatfs/idf/orig/esp32/include/rom/crc.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/esp32/include/rom/crc.h rename to tools/mkfatfs/idf/orig/esp32/include/rom/crc.h diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/diskio.c b/tools/mkfatfs/idf/orig/fatfs/src/diskio.c similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/diskio.c rename to tools/mkfatfs/idf/orig/fatfs/src/diskio.c diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/diskio.h b/tools/mkfatfs/idf/orig/fatfs/src/diskio.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/diskio.h rename to tools/mkfatfs/idf/orig/fatfs/src/diskio.h diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/diskio_spiflash.c b/tools/mkfatfs/idf/orig/fatfs/src/diskio_spiflash.c similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/diskio_spiflash.c rename to tools/mkfatfs/idf/orig/fatfs/src/diskio_spiflash.c diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/diskio_spiflash.h b/tools/mkfatfs/idf/orig/fatfs/src/diskio_spiflash.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/diskio_spiflash.h rename to tools/mkfatfs/idf/orig/fatfs/src/diskio_spiflash.h diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/esp_vfs_fat.h b/tools/mkfatfs/idf/orig/fatfs/src/esp_vfs_fat.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/esp_vfs_fat.h rename to tools/mkfatfs/idf/orig/fatfs/src/esp_vfs_fat.h diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/ff.h b/tools/mkfatfs/idf/orig/fatfs/src/ff.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/ff.h rename to tools/mkfatfs/idf/orig/fatfs/src/ff.h diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/ffconf.h b/tools/mkfatfs/idf/orig/fatfs/src/ffconf.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/ffconf.h rename to tools/mkfatfs/idf/orig/fatfs/src/ffconf.h diff --git a/tools/mkfatfs/src/idf/orig/fatfs/src/option/syscall.c b/tools/mkfatfs/idf/orig/fatfs/src/option/syscall.c similarity index 100% rename from tools/mkfatfs/src/idf/orig/fatfs/src/option/syscall.c rename to tools/mkfatfs/idf/orig/fatfs/src/option/syscall.c diff --git a/tools/mkfatfs/src/idf/orig/sdmmc/include/sdmmc_cmd.h b/tools/mkfatfs/idf/orig/sdmmc/include/sdmmc_cmd.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/sdmmc/include/sdmmc_cmd.h rename to tools/mkfatfs/idf/orig/sdmmc/include/sdmmc_cmd.h diff --git a/tools/mkfatfs/src/idf/orig/spi_flash/include/esp_partition.h b/tools/mkfatfs/idf/orig/spi_flash/include/esp_partition.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/spi_flash/include/esp_partition.h rename to tools/mkfatfs/idf/orig/spi_flash/include/esp_partition.h diff --git a/tools/mkfatfs/src/idf/orig/spi_flash/include/esp_spi_flash.h b/tools/mkfatfs/idf/orig/spi_flash/include/esp_spi_flash.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/spi_flash/include/esp_spi_flash.h rename to tools/mkfatfs/idf/orig/spi_flash/include/esp_spi_flash.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/WL_Ext_Perf.cpp b/tools/mkfatfs/idf/orig/wear_levelling/WL_Ext_Perf.cpp similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/WL_Ext_Perf.cpp rename to tools/mkfatfs/idf/orig/wear_levelling/WL_Ext_Perf.cpp diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/WL_Ext_Safe.cpp b/tools/mkfatfs/idf/orig/wear_levelling/WL_Ext_Safe.cpp similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/WL_Ext_Safe.cpp rename to tools/mkfatfs/idf/orig/wear_levelling/WL_Ext_Safe.cpp diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/WL_Flash.cpp b/tools/mkfatfs/idf/orig/wear_levelling/WL_Flash.cpp similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/WL_Flash.cpp rename to tools/mkfatfs/idf/orig/wear_levelling/WL_Flash.cpp diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/crc32.cpp b/tools/mkfatfs/idf/orig/wear_levelling/crc32.cpp similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/crc32.cpp rename to tools/mkfatfs/idf/orig/wear_levelling/crc32.cpp diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/crc32.h b/tools/mkfatfs/idf/orig/wear_levelling/crc32.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/crc32.h rename to tools/mkfatfs/idf/orig/wear_levelling/crc32.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/include/wear_levelling.h b/tools/mkfatfs/idf/orig/wear_levelling/include/wear_levelling.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/include/wear_levelling.h rename to tools/mkfatfs/idf/orig/wear_levelling/include/wear_levelling.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/Flash_Access.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/Flash_Access.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/Flash_Access.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/Flash_Access.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/SPI_Flash.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/SPI_Flash.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/SPI_Flash.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/SPI_Flash.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Config.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Config.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Config.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Config.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Ext_Cfg.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Ext_Cfg.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Ext_Cfg.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Ext_Cfg.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Ext_Perf.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Ext_Perf.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Ext_Perf.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Ext_Perf.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Ext_Safe.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Ext_Safe.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Ext_Safe.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Ext_Safe.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Flash.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Flash.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_Flash.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_Flash.h diff --git a/tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_State.h b/tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_State.h similarity index 100% rename from tools/mkfatfs/src/idf/orig/wear_levelling/private_include/WL_State.h rename to tools/mkfatfs/idf/orig/wear_levelling/private_include/WL_State.h diff --git a/tools/mkfatfs/src/main.cpp b/tools/mkfatfs/main.cpp similarity index 100% rename from tools/mkfatfs/src/main.cpp rename to tools/mkfatfs/main.cpp diff --git a/tools/mkfatfs/src/Makefile b/tools/mkfatfs/src/Makefile deleted file mode 100644 index c076b1b5..00000000 --- a/tools/mkfatfs/src/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -#CFLAGS ?= -std=gnu99 -Os -Wall -#CXXFLAGS ?= -std=gnu++11 -Os -Wall - -IDF_INCLUDES = -I $(BUILD_DIR_BASE)/include - -IDF_MODIFIED_DIR = idf/modified -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR) -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/driver/include -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/fatfs/src -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/freertos/include -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/log/include -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/newlib/include -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/vfs/include -IDF_INCLUDES += -I $(IDF_MODIFIED_DIR)/vfs/include/sys - -IDF_ORIG_DIR = idf/orig -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/driver/include -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/driver/include/driver -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/esp32/include -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/fatfs/src -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/sdmmc/include -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/spi_flash/include -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/wear_levelling/include -IDF_INCLUDES += -I $(IDF_ORIG_DIR)/wear_levelling/private_include - -ifdef OS -ifeq ($(OS),Windows_NT) - OS_IS_WIN = 1 -endif -endif - -ifdef OS_IS_WIN - TARGET_OS := WINDOWS - DIST_SUFFIX := windows - ARCHIVE_CMD := 7z a - ARCHIVE_EXTENSION := zip - TARGET := mkfatfs.exe - CC=gcc.exe - CXX=g++.exe - #MVA TARGET_CFLAGS := -mno-ms-bitfields - CPATH := $(COMPONENT_INCLUDES) - #TARGET_CFLAGS := -mno-ms-bitfields -std=gnu99 -Os -Wall -I $(COMPONENT_INCLUDES) -Itclap -Ifatfs -I. -D$(TARGET_OS) - TARGET_CFLAGS := -mno-ms-bitfields -std=gnu99 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) $(IDF_INCLUDES) - TARGET_CXXFLAGS := -std=gnu++11 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) $(IDF_INCLUDES) - TARGET_LDFLAGS := -Wl,-static -static-libgcc - -else - UNAME_S := $(shell uname -s) - ifeq ($(UNAME_S),Linux) - TARGET_OS := LINUX - UNAME_P := $(shell uname -p) - ifeq ($(UNAME_P),x86_64) - DIST_SUFFIX := linux64 - endif - ifneq ($(filter %86,$(UNAME_P)),) - DIST_SUFFIX := linux32 - endif - CC=gcc - CXX=g++ - TARGET_CFLAGS = -std=gnu99 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ $(IDF_INCLUDES) - TARGET_CXXFLAGS = -std=gnu++11 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ $(IDF_INCLUDES) - TARGET_LDFLAGS = - endif - ifeq ($(UNAME_S),Darwin) - TARGET_OS := OSX - DIST_SUFFIX := osx - CC=clang - CXX=clang++ - TARGET_CFLAGS = -std=gnu99 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ -mmacosx-version-min=10.7 -arch x86_64 $(IDF_INCLUDES) - TARGET_CXXFLAGS = -std=gnu++11 -Os -Wall -Itclap -Ifatfs -I. -D$(TARGET_OS) -DVERSION=\"$(VERSION)\" -D__NO_INLINE__ -mmacosx-version-min=10.7 -arch x86_64 -stdlib=libc++ $(IDF_INCLUDES) - TARGET_LDFLAGS = -arch x86_64 -stdlib=libc++ - endif - ARCHIVE_CMD := tar czf - ARCHIVE_EXTENSION := tar.gz - TARGET := mkfatfs -endif - -OBJ := main.o \ - fatfs/fatfs.o \ - fatfs/ccsbcs.o \ - fatfs/crc.o \ - fatfs/FatPartition.o \ - $(IDF_MODIFIED_DIR)/fatfs/src/ff.o \ - $(IDF_MODIFIED_DIR)/fatfs/src/vfs_fat.o \ - $(IDF_MODIFIED_DIR)/freertos/include/freertos/semphr.o \ - $(IDF_MODIFIED_DIR)/newlib/include/sys/lock.o \ - $(IDF_MODIFIED_DIR)/newlib/include/sys/idf_reent.o \ - $(IDF_MODIFIED_DIR)/newlib/include/sys/errno.o \ - $(IDF_MODIFIED_DIR)/spi_flash/partition.o \ - $(IDF_MODIFIED_DIR)/vfs/vfs.o \ - $(IDF_MODIFIED_DIR)/wear_levelling/wear_levelling.o \ - $(IDF_ORIG_DIR)/fatfs/src/diskio.o \ - $(IDF_ORIG_DIR)/fatfs/src/diskio_spiflash.o \ - $(IDF_ORIG_DIR)/fatfs/src/option/syscall.o \ - $(IDF_ORIG_DIR)/wear_levelling/crc32.o \ - $(IDF_ORIG_DIR)/wear_levelling/WL_Flash.o \ - $(IDF_ORIG_DIR)/wear_levelling/WL_Ext_Perf.o \ - $(IDF_ORIG_DIR)/wear_levelling/WL_Ext_Safe.o \ - - -VERSION ?= $(shell git describe --always) - -.PHONY: all clean - -all: $(TARGET) - -$(TARGET): - @echo "Building mkfatfs ..." - $(CXX) $(TARGET_CXXFLAGS) -c main.cpp -o main.o - $(CC) $(TARGET_CFLAGS) -c fatfs/fatfs.c -o fatfs/fatfs.o - $(CC) $(TARGET_CFLAGS) -c fatfs/ccsbcs.c -o fatfs/ccsbcs.o - $(CXX) $(TARGET_CXXFLAGS) -c fatfs/crc.cpp -o fatfs/crc.o - $(CXX) $(TARGET_CXXFLAGS) -c fatfs/FatPartition.cpp -o fatfs/FatPartition.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/fatfs/src/ff.c -o $(IDF_MODIFIED_DIR)/fatfs/src/ff.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/fatfs/src/vfs_fat.c -o $(IDF_MODIFIED_DIR)/fatfs/src/vfs_fat.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/freertos/include/freertos/semphr.c -o $(IDF_MODIFIED_DIR)/freertos/include/freertos/semphr.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/newlib/include/sys/lock.c -o $(IDF_MODIFIED_DIR)/newlib/include/sys/lock.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/newlib/include/sys/idf_reent.c -o $(IDF_MODIFIED_DIR)/newlib/include/sys/idf_reent.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/newlib/include/sys/errno.c -o $(IDF_MODIFIED_DIR)/newlib/include/sys/errno.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/spi_flash/partition.c -o $(IDF_MODIFIED_DIR)/spi_flash/partition.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_MODIFIED_DIR)/vfs/vfs.c -o $(IDF_MODIFIED_DIR)/vfs/vfs.o - $(CXX) $(TARGET_CXXFLAGS) -c $(IDF_MODIFIED_DIR)/wear_levelling/wear_levelling.cpp -o $(IDF_MODIFIED_DIR)/wear_levelling/wear_levelling.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_ORIG_DIR)/fatfs/src/diskio.c -o $(IDF_ORIG_DIR)/fatfs/src/diskio.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_ORIG_DIR)/fatfs/src/diskio_spiflash.c -o $(IDF_ORIG_DIR)/fatfs/src/diskio_spiflash.o - $(CC) $(TARGET_CFLAGS) -c $(IDF_ORIG_DIR)/fatfs/src/option/syscall.c -o $(IDF_ORIG_DIR)/fatfs/src/option/syscall.o - $(CXX) $(TARGET_CXXFLAGS) -c $(IDF_ORIG_DIR)/wear_levelling/crc32.cpp -o $(IDF_ORIG_DIR)/wear_levelling/crc32.o - $(CXX) $(TARGET_CXXFLAGS) -c $(IDF_ORIG_DIR)/wear_levelling/WL_Flash.cpp -o $(IDF_ORIG_DIR)/wear_levelling/WL_Flash.o - $(CXX) $(TARGET_CXXFLAGS) -Wno-sign-compare -c $(IDF_ORIG_DIR)/wear_levelling/WL_Ext_Perf.cpp -o $(IDF_ORIG_DIR)/wear_levelling/WL_Ext_Perf.o - $(CXX) $(TARGET_CXXFLAGS) -Wno-sign-compare -c $(IDF_ORIG_DIR)/wear_levelling/WL_Ext_Safe.cpp -o $(IDF_ORIG_DIR)/wear_levelling/WL_Ext_Safe.o - $(CXX) $(TARGET_CFLAGS) -o $(TARGET) $(OBJ) $(TARGET_LDFLAGS) - - - -clean: - @rm -f *.o - @rm -f fatfs/*.o - @rm -f $(IDF_MODIFIED_DIR)/fatfs/src/*.o - @rm -f $(IDF_MODIFIED_DIR)/freertos/include/freertos/*.o - @rm -f $(IDF_MODIFIED_DIR)/newlib/include/sys/*.o - @rm -f $(IDF_MODIFIED_DIR)/spi_flash/*.o - @rm -f $(IDF_MODIFIED_DIR)/vfs/*.o - @rm -f $(IDF_MODIFIED_DIR)/wear_levelling/*.o - @rm -f $(IDF_ORIG_DIR)/fatfs/src/*.o - @rm -f $(IDF_ORIG_DIR)/fatfs/src/option/*.o - @rm -f $(IDF_ORIG_DIR)/wear_levelling/*.o - @rm -f $(TARGET) diff --git a/tools/mkfatfs/src/tclap/Arg.h b/tools/mkfatfs/tclap/Arg.h similarity index 100% rename from tools/mkfatfs/src/tclap/Arg.h rename to tools/mkfatfs/tclap/Arg.h diff --git a/tools/mkfatfs/src/tclap/ArgException.h b/tools/mkfatfs/tclap/ArgException.h similarity index 100% rename from tools/mkfatfs/src/tclap/ArgException.h rename to tools/mkfatfs/tclap/ArgException.h diff --git a/tools/mkfatfs/src/tclap/ArgTraits.h b/tools/mkfatfs/tclap/ArgTraits.h similarity index 100% rename from tools/mkfatfs/src/tclap/ArgTraits.h rename to tools/mkfatfs/tclap/ArgTraits.h diff --git a/tools/mkfatfs/src/tclap/COPYING b/tools/mkfatfs/tclap/COPYING similarity index 100% rename from tools/mkfatfs/src/tclap/COPYING rename to tools/mkfatfs/tclap/COPYING diff --git a/tools/mkfatfs/src/tclap/CmdLine.h b/tools/mkfatfs/tclap/CmdLine.h similarity index 100% rename from tools/mkfatfs/src/tclap/CmdLine.h rename to tools/mkfatfs/tclap/CmdLine.h diff --git a/tools/mkfatfs/src/tclap/CmdLineInterface.h b/tools/mkfatfs/tclap/CmdLineInterface.h similarity index 100% rename from tools/mkfatfs/src/tclap/CmdLineInterface.h rename to tools/mkfatfs/tclap/CmdLineInterface.h diff --git a/tools/mkfatfs/src/tclap/CmdLineOutput.h b/tools/mkfatfs/tclap/CmdLineOutput.h similarity index 100% rename from tools/mkfatfs/src/tclap/CmdLineOutput.h rename to tools/mkfatfs/tclap/CmdLineOutput.h diff --git a/tools/mkfatfs/src/tclap/Constraint.h b/tools/mkfatfs/tclap/Constraint.h similarity index 100% rename from tools/mkfatfs/src/tclap/Constraint.h rename to tools/mkfatfs/tclap/Constraint.h diff --git a/tools/mkfatfs/src/tclap/DocBookOutput.h b/tools/mkfatfs/tclap/DocBookOutput.h similarity index 100% rename from tools/mkfatfs/src/tclap/DocBookOutput.h rename to tools/mkfatfs/tclap/DocBookOutput.h diff --git a/tools/mkfatfs/src/tclap/HelpVisitor.h b/tools/mkfatfs/tclap/HelpVisitor.h similarity index 100% rename from tools/mkfatfs/src/tclap/HelpVisitor.h rename to tools/mkfatfs/tclap/HelpVisitor.h diff --git a/tools/mkfatfs/src/tclap/IgnoreRestVisitor.h b/tools/mkfatfs/tclap/IgnoreRestVisitor.h similarity index 100% rename from tools/mkfatfs/src/tclap/IgnoreRestVisitor.h rename to tools/mkfatfs/tclap/IgnoreRestVisitor.h diff --git a/tools/mkfatfs/src/tclap/MultiArg.h b/tools/mkfatfs/tclap/MultiArg.h similarity index 100% rename from tools/mkfatfs/src/tclap/MultiArg.h rename to tools/mkfatfs/tclap/MultiArg.h diff --git a/tools/mkfatfs/src/tclap/MultiSwitchArg.h b/tools/mkfatfs/tclap/MultiSwitchArg.h similarity index 100% rename from tools/mkfatfs/src/tclap/MultiSwitchArg.h rename to tools/mkfatfs/tclap/MultiSwitchArg.h diff --git a/tools/mkfatfs/src/tclap/OptionalUnlabeledTracker.h b/tools/mkfatfs/tclap/OptionalUnlabeledTracker.h similarity index 100% rename from tools/mkfatfs/src/tclap/OptionalUnlabeledTracker.h rename to tools/mkfatfs/tclap/OptionalUnlabeledTracker.h diff --git a/tools/mkfatfs/src/tclap/StandardTraits.h b/tools/mkfatfs/tclap/StandardTraits.h similarity index 100% rename from tools/mkfatfs/src/tclap/StandardTraits.h rename to tools/mkfatfs/tclap/StandardTraits.h diff --git a/tools/mkfatfs/src/tclap/StdOutput.h b/tools/mkfatfs/tclap/StdOutput.h similarity index 100% rename from tools/mkfatfs/src/tclap/StdOutput.h rename to tools/mkfatfs/tclap/StdOutput.h diff --git a/tools/mkfatfs/src/tclap/SwitchArg.h b/tools/mkfatfs/tclap/SwitchArg.h similarity index 100% rename from tools/mkfatfs/src/tclap/SwitchArg.h rename to tools/mkfatfs/tclap/SwitchArg.h diff --git a/tools/mkfatfs/src/tclap/UnlabeledMultiArg.h b/tools/mkfatfs/tclap/UnlabeledMultiArg.h similarity index 100% rename from tools/mkfatfs/src/tclap/UnlabeledMultiArg.h rename to tools/mkfatfs/tclap/UnlabeledMultiArg.h diff --git a/tools/mkfatfs/src/tclap/UnlabeledValueArg.h b/tools/mkfatfs/tclap/UnlabeledValueArg.h similarity index 100% rename from tools/mkfatfs/src/tclap/UnlabeledValueArg.h rename to tools/mkfatfs/tclap/UnlabeledValueArg.h diff --git a/tools/mkfatfs/src/tclap/ValueArg.h b/tools/mkfatfs/tclap/ValueArg.h similarity index 100% rename from tools/mkfatfs/src/tclap/ValueArg.h rename to tools/mkfatfs/tclap/ValueArg.h diff --git a/tools/mkfatfs/src/tclap/ValuesConstraint.h b/tools/mkfatfs/tclap/ValuesConstraint.h similarity index 100% rename from tools/mkfatfs/src/tclap/ValuesConstraint.h rename to tools/mkfatfs/tclap/ValuesConstraint.h diff --git a/tools/mkfatfs/src/tclap/VersionVisitor.h b/tools/mkfatfs/tclap/VersionVisitor.h similarity index 100% rename from tools/mkfatfs/src/tclap/VersionVisitor.h rename to tools/mkfatfs/tclap/VersionVisitor.h diff --git a/tools/mkfatfs/src/tclap/Visitor.h b/tools/mkfatfs/tclap/Visitor.h similarity index 100% rename from tools/mkfatfs/src/tclap/Visitor.h rename to tools/mkfatfs/tclap/Visitor.h diff --git a/tools/mkfatfs/src/tclap/XorHandler.h b/tools/mkfatfs/tclap/XorHandler.h similarity index 100% rename from tools/mkfatfs/src/tclap/XorHandler.h rename to tools/mkfatfs/tclap/XorHandler.h diff --git a/tools/mkfatfs/src/tclap/ZshCompletionOutput.h b/tools/mkfatfs/tclap/ZshCompletionOutput.h similarity index 100% rename from tools/mkfatfs/src/tclap/ZshCompletionOutput.h rename to tools/mkfatfs/tclap/ZshCompletionOutput.h