ESP32

[esp-idf] idf.py 사용법 (build,flash,monitor,create-project,....., )

하니_즐거운하루 2023. 11. 30. 16:24

: idf.py 는 파이션 프로그램으로 프로젝트에 대한 빌드/다운로드/모니터링 ....등을 명령창에서 할수 있는 유틸로  파일위치는 esp-idf/tools/ 아래에 있습니다.

사용법만 한번 정리해 봤습니다.

 

목차

    ▶ ubuntu 상에서 esp-idf 환경설정

      : esp-idf 설치폴더의  export.sh 파일을 실행해 줍니다.

       $ source  path/to/your/direcotory/export.sh

     

    < idf.py 사용법>

    ▶build

         build

          :  현재 디렉토리안의 프로젝트 빌드

    더보기
    xxx@ubuntu22:~/Project/esp32/myApp1$ idf.py build
    Setting IDF_PATH environment variable: /home/xxx/esp/esp-idf
    Executing action: all (aliases: build)
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja all"...
    [1/4] cd /home/xxx/Project/esp32/myApp1/build/app1.bin
    app1.bin binary size 0xe2160 bytes. 
    Smallest app partition is 0x100000 bytes. 0x1dea0 bytes (12%) free.
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
    Bootloader binary size 0x5310 bytes. 0x2cf0 bytes (35%) free.
    
    Project build complete. To flash, run this command:
    /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
       ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py 
         -p (PORT) 
         -b 460800 
         --before default_reset 
         --after hard_reset 
         --chip esp32c6  write_flash 
         --flash_mode dio 
         --flash_size 2MB 
         --flash_freq 80m 0x0 build/bootloader/bootloader.bin 
                          0x8000 build/partition_table/partition-table.bin 
                          0x10000 build/app1.bin
    or run 'idf.py -p (PORT) flash'

     

       build -C  Project/esp32/myApp1/

       : 지정된 프로젝트 경로 지정해 빌드하기

    더보기
    ~$ idf.py build -C Project/esp32/myApp1/
    Executing action: all (aliases: build)
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja all"...
    [1/4] cd /home/xxx/Project/esp32/myApp1/myApp1/build/myApp1.bin 
    binary size 0xf5920 bytes. 
    Smallest app partition is 0x180000 bytes. 0x8a6e0 bytes (36%) free.
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
    Bootloader binary size 0x5340 bytes. 
    0x2cc0 bytes (35%) free.
    
    Project build complete. To flash, run this command:
    /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
       esp/esp-idf/components/esptool_py/esptool/esptool.py 
          -p /dev/ttyACM0 -b 460800 
          --before default_reset --after hard_reset --chip esp32c6  
          write_flash --flash_mode dio --flash_size 4MB 
          --flash_freq 80m 0x0 Project/esp32/myApp1/build/bootloader/bootloader.bin 0x8000 
                               Project/esp32/myApp1/build/partition_table/partition-table.bin 0x10000 
                               Project/esp32/myApp1/build/myApp1.bin
    or run 'idf.py -p /dev/ttyACM0 flash'

     

    ▶ clean

      : build 디렉토리 지우기

    더보기
    $ idf.py clean
    Executing action: clean
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja clean"...
    [0/1] Re-running CMake...
    -- Building ESP-IDF components for target esp32c6
    -- Project sdkconfig file /home/xxx/Project/esp32/myApp1/sdkconfig
    Loading defaults file /home/xxx/Project/esp32/myApp1/sdkconfig.defaults...
    -- App "myApp1" version: 94c0e67-dirty
    -- Adding linker script /home/xxx/Project/esp32/myApp1/build/esp-idf/esp_system/ld/memory.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_system/ld/esp32c6/sections.ld.in
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.coexist.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib-normal.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.heap.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
    -- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx 
                   driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth 
                   esp_event esp_gdbstub esp_hid esp_http_client esp_http_server 
                   esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl 
                   esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram 
                   esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py 
                   fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip 
                   main mbedtls mqtt newlib nvs_flash openthread partition_table protobuf-c 
                   protocomm pthread riscv sdmmc soc spi_flash spiffs tcp_transport ulp unity 
                   usb vfs wear_levelling wifi_provisioning wpa_supplicant
    -- Component paths: /home/xxx/esp/esp-idf/components/app_trace 
                        /home/xxx/esp/esp-idf/components/app_update 
                        /home/xxx/esp/esp-idf/components/bootloader 
                        /home/xxx/esp/esp-idf/components/bootloader_support 
                        /home/xxx/esp/esp-idf/components/bt 
                        /home/xxx/esp/esp-idf/components/cmock 
                        /home/xxx/esp/esp-idf/components/console 
                        /home/xxx/esp/esp-idf/components/cxx 
                        /home/xxx/esp/esp-idf/components/driver 
                        /home/xxx/esp/esp-idf/components/efuse 
                        /home/xxx/esp/esp-idf/components/esp-tls 
                        /home/xxx/esp/esp-idf/components/esp_adc 
                        /home/xxx/esp/esp-idf/components/esp_app_format 
                        /home/xxx/esp/esp-idf/components/esp_coex 
                        /home/xxx/esp/esp-idf/components/esp_common 
                        /home/xxx/esp/esp-idf/components/esp_eth 
                        /home/xxx/esp/esp-idf/components/esp_event 
                        /home/xxx/esp/esp-idf/components/esp_gdbstub 
                        /home/xxx/esp/esp-idf/components/esp_hid 
                        /home/xxx/esp/esp-idf/components/esp_http_client 
                        /home/xxx/esp/esp-idf/components/esp_http_server 
                        /home/xxx/esp/esp-idf/components/esp_https_ota 
                        /home/xxx/esp/esp-idf/components/esp_https_server 
                        /home/xxx/esp/esp-idf/components/esp_hw_support 
                        /home/xxx/esp/esp-idf/components/esp_lcd 
                        /home/xxx/esp/esp-idf/components/esp_local_ctrl 
                        /home/xxx/esp/esp-idf/components/esp_mm 
                        /home/xxx/esp/esp-idf/components/esp_netif 
                        home/xxx/esp/esp-idf/components/esp_netif_stack 
                        /home/xxx/esp/esp-idf/components/esp_partition 
                        /home/xxx/esp/esp-idf/components/esp_phy 
                        /home/xxx/esp/esp-idf/components/esp_pm 
                        /home/xxx/esp/esp-idf/components/esp_psram 
                        /home/xxx/esp/esp-idf/components/esp_ringbuf 
                        /home/xxx/esp/esp-idf/components/esp_rom 
                        /home/xxx/esp/esp-idf/components/esp_system 
                        /home/xxx/esp/esp-idf/components/esp_timer /
                        home/xxx/esp/esp-idf/components/esp_wifi 
                        /home/xxx/esp/esp-idf/components/espcoredump 
                        /home/xxx/esp/esp-idf/components/esptool_py 
                        /home/xxx/esp/esp-idf/components/fatfs 
                        /home/xxx/esp/esp-idf/components/freertos 
              ~~ 중략 ~~                    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/xxx/Project/esp32/myApp1/build
    [1/2] Cleaning additional files...
    [2/2] Cleaning all built files...
    Cleaning... 0 files.
    Done

     

    create-project

      : 프로젝트를 새로 만들때 사용 > 프로젝트 루트로 이동후 다음 처럼 사용

    더보기
    $ idf.py create-project --help
    Usage: idf.py create-project [OPTIONS] NAME
    
      Create a new project with the name NAME specified as argument. For example: `idf.py create-project new_proj` will create a new
      project in subdirectory called `new_proj` of the current working directory. For specifying the new project's path, use either the
      option --path for specifying the destination directory, or the global option -C if the project should be created as a
      subdirectory of the specified directory. If the target path does not exist it will be created. If the target folder is not empty
      then the operation will fail with return code 3. If the target path is not a folder, the script will fail with return code 4.
      After the execution idf.py terminates so this operation should be used alone.
    
    Options:
      -C, --project-dir PATH  Project directory.
      -p, --path TEXT         Set the path for the new project. The project will be created directly in the given folder if it does not
                              contain anything
      --help                  Show this message and exit.
    
    
    $ idf.py create-project hello_world
    Executing action: create-project
    The project was created in /home/xxx/Project/hello_world
    
    $ tree hello_world/
    hello_world/
    ├── CMakeLists.txt
    └── main
        ├── CMakeLists.txt
        └── hello_world.c
        
    >> test 디렉토리 안에 프로젝트 생성시
    $ idf.py create-project --path "/home/xxx/Project/test" hello_world2
    Executing action: create-project
    The project was created in /home/xxx/Project/test
    
    ~/Project/test$ tree
    .
    ├── CMakeLists.txt
    └── main
        ├── CMakeLists.txt
        └── hello_world2.c
    
    1 directory, 3 files
    
    >> -C 옵션 사용하기
    $ idf.py create-project -C /home/xxx/Project/hello_world2 hello_world2
    Executing action: create-project
    The project was created in /home/xxx/Project/hello_world2/hello_world2

      > hello_world 디렉토리 생성후 4개의 디렉토리 또는 파일이 생성됩니다.

     

     create-component

      : 프로젝트 만든후 프로젝트 디렉토리 안에 컴포넌트를 추가시 사용

    더보기
    >> hello_world 프로젝트 안으로 이동후 create-component 명령을 이용 sub_com2 생성하기
    :~/Project/hello_world$ idf.py create-component sub_com2
    Executing action: create-component
    The component was created in /home/xxx/Project/hello_world/sub_com2
    
    
    ~/Project/hello_world$ tree
    .
    ├── CMakeLists.txt
    ├── main
    │   ├── CMakeLists.txt
    │   └── hello_world.c
    └── sub_com2
        ├── CMakeLists.txt
        ├── include
        │   └── sub_com2.h
        └── sub_com2.c
    
    3 directories, 6 files
    >> sub_com2 디렉토리만 추가되고 다른 파일은 수정사항 없음

     

    ▶ flash

       ↓ flash -p /dev/ttyACM0

     :  지정된포트를 통해 타겟장치에 이미지를 다운로드 합니다. (bootloader  + application + partitiontable)

       > 각각만 flash 할려면

        app-flash , bootloader-flash , partition-table-flash 명령을 사용합니다.

    더보기
    xxx@ubuntu22:~/Project/esp32/myApp1$ idf.py -p /dev/ttyACM0 flash
    Setting IDF_PATH environment variable: /home/xxx/esp/esp-idf
    Executing action: flash
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja flash"...
    [1/5] cd /home/xxx/Project/esp32/myApp1/build/esp-idf/esptool_py 
          && /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
             /home/xxx/esp/esp-idf/components/partition_table/check_sizes.py 
          --offset 0x8000 partition 
          --type app /home/xxx/Project/esp32/myApp1/build/partition_table/partition-table.bin 
             /home/xxx/Project/esp32/myApp1/build/myApp1.bin
    myApp1.bin binary size 0xe2160 bytes. 
    Smallest app partition is 0x100000 bytes. 0x1dea0 bytes (12%) free.
    [2/5] Performing build step for 'bootloader'
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/esp-idf/esptool_py 
          && /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
          /home/xxx/esp/esp-idf/components/partition_table/check_sizes.py 
             --offset 0x8000 bootloader 
                      0x0 /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
    Bootloader binary size 0x5310 bytes. 0x2cf0 bytes (35%) free.
    [2/3] cd /home/xxx/esp/esp-idf/components/esptool_py 
          && /usr/bin/cmake 
             -D IDF_PATH=/home/xxx/esp/esp-idf 
             -D "SERIAL_TOOL=/home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python;;
                 /home/xxx/esp/esp-idf/components/esptool_py/esptool/esptool.py; 
                --chip;esp32c6" 
             -D "SERIAL_TOOL_ARGS=--before=default_reset;
                 --after=hard_reset;write_flash;@flash_args" 
             -D WORKING_DIRECTORY=/home/xxx/Project/esp32/myApp1/build 
             -P /home/xxx/esp/esp-idf/components/esptool_py/run_serial_tool.cmake
    esptool.py --chip esp32c6 -p /dev/ttyACM0 
               -b 460800 
               --before=default_reset 
               --after=hard_reset write_flash 
               --flash_mode dio 
               --flash_freq 80m 
               --flash_size 2MB 0x0 bootloader/bootloader.bin 
                                0x10000 myApp1.bin 
                                0x8000 partition_table/partition-table.bin
    esptool.py v4.7.dev2
    Serial port /dev/ttyACM0
    Connecting...
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00000000 to 0x00005fff...
    Flash will be erased from 0x00010000 to 0x000f2fff...
    Flash will be erased from 0x00008000 to 0x00008fff...
    Compressed 21264 bytes to 12898...
    Writing at 0x00000000... (100 %)
    Wrote 21264 bytes (12898 compressed) at 0x00000000 in 0.3 seconds (effective 590.1 kbit/s)...
    Hash of data verified.
    Compressed 926048 bytes to 496607...
    Writing at 0x00010000... (3 %)
    Writing at 0x0001d3f3... (6 %)
    Writing at 0x0002b35a... (9 %)
    Writing at 0x00033456... (12 %)
    Writing at 0x00038eab... (16 %)
    Writing at 0x0003fe71... (19 %)
    Writing at 0x00046c90... (22 %)
    Writing at 0x0004e67d... (25 %)
    Writing at 0x00055d8c... (29 %)
    Writing at 0x0005deec... (32 %)
    Writing at 0x0006538a... (35 %)
    Writing at 0x0006c67d... (38 %)
    Writing at 0x000736c7... (41 %)
    Writing at 0x0007bb38... (45 %)
    Writing at 0x00083cea... (48 %)
    Writing at 0x0008c882... (51 %)
    Writing at 0x00093e4a... (54 %)
    Writing at 0x0009b4fb... (58 %)
    Writing at 0x000a2802... (61 %)
    Writing at 0x000a898c... (64 %)
    Writing at 0x000ae9ca... (67 %)
    Writing at 0x000b4c77... (70 %)
    Writing at 0x000baf1d... (74 %)
    Writing at 0x000c0c30... (77 %)
    Writing at 0x000c76a4... (80 %)
    Writing at 0x000cf186... (83 %)
    Writing at 0x000d5776... (87 %)
    Writing at 0x000dbbee... (90 %)
    Writing at 0x000e1b0d... (93 %)
    Writing at 0x000e8365... (96 %)
    Writing at 0x000ef467... (100 %)
    Wrote 926048 bytes (496607 compressed) at 0x00010000 in 6.4 seconds (effective 1154.8 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 103...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 590.0 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    Done
    xxx@ubuntu22:~/Project/esp32/myApp1$

       ↓ flash

        :  port 설정이 없으면 ESPPORT 변수의 값을 찾아서 하고 ,  ESPPORT  변수가 없을경우

           Serial port를 순차대로 검색 합니다. 

         아래 명령은 ESPPORT 변수 설정이 되어 있는상태의  flash 명령 사용 예제 입니다.

    $ export ESPPORT=/dev/ttyACM0
    $ idf.py flash
    
    ~~ 중략 ~~
    
    esptool.py v4.7.dev2
    Serial port /dev/ttyACM0
    
    ~~ 중략 ~~
    
    Wrote 966016 bytes (518851 compressed) at 0x00010000 in 6.8 seconds (effective 1136.4 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 103...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 709.9 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    Done

     

       ↓  idf.py  flash -- help

         :  flash 명령에 대한 도움말

    더보기
    $ idf.py flash --help
    Usage: idf.py flash [OPTIONS]
    
      Flash the project.
    
    Options:
      -C, --project-dir PATH         Project directory.
      -D, --define-cache-entry TEXT  Create a cmake cache entry. This option can
                                     be used at most once either globally, or for
                                     one subcommand.
      -b, --baud INTEGER             Baud rate for flashing. It can imply monitor
                                     baud rate as well if it hasn't been defined
                                     locally. The default value can be set with
                                     the ESPBAUD environment variable. This option
                                     can be used at most once either globally, or
                                     for one subcommand.
      -p, --port PATH                Serial port. The default value can be set
                                     with the ESPPORT environment variable. This
                                     option can be used at most once either
                                     globally, or for one subcommand.
      --force                        Force write, skip security and compatibility
                                     checks. Use with caution!
      --extra-args TEXT              Pass extra arguments to esptool separated by
                                     space. For more details see `esptool.py
                                     write_flash --help`. For example to compress
                                     and verify data use: `idf.py flash --extra-
                                     args="--compress --verify"`. Use with
                                     caution!
      --help                         Show this message and exit.

     

    ▶ app-flash

        :  application 영역만 flash 하기

    $ idf.py app-flash
    Executing action: app-flash
    Serial port /dev/ttyUSB1
    Connecting....
    Detecting chip type... ESP32-C6
    Running ninja in directory /home/xxx/Project/esp32-matter/123/build
    Executing "ninja app-flash"...
    [1/7] Performing build step for 'chip_gn'
    ninja: no work to do.
    ~~ 중략 ~~
    esptool.py v4.8.0
    Serial port /dev/ttyUSB1
    Connecting....
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00020000 to 0x0027cfff...
    image size >  2476160
    Compressed 2476160 bytes to 1372569...
    Writing at 0x002760d0... (100 %)
    Wrote 2476160 bytes (1372569 compressed) at 0x00020000 in 37.3 seconds (effective 531.4 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    Done

     

    ▶ bootloader-flash

      : 부트로더만 flash 하기

    $ idf.py bootloader-flash
    Executing action: bootloader-flash
    Serial port /dev/ttyUSB1
    Connecting....
    Detecting chip type... ESP32-C6
    ~~ 중략 ~~
    Executing "ninja bootloader-flash"...
    ~~ 중략 ~~
    [1/2] cd /home/xxx/esp/esp-idf/components/boo...idf/components/esptool_py/run_serial_tool.cmake
    esptool.py --chip esp32c6 -p /dev/ttyUSB1 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 bootloader/bootloader.bin
    esptool.py v4.8.0
    Serial port /dev/ttyUSB1
    Connecting....
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00000000 to 0x00005fff...
    image size >  21776
    SHA digest in image updated
    Compressed 21776 bytes to 13140...
    Writing at 0x00000000... (100 %)
    Wrote 21776 bytes (13140 compressed) at 0x00000000 in 0.6 seconds (effective 272.1 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    Done

     

    ▶  menuconfig

         : sdkconfig 파일을 읽어오고 저장합니다.

     

       ↓  idf.py menuconfig

     

       ↓ menuconfig --help

    더보기
     $ idf.py menuconfig --help
    Usage: idf.py menuconfig [OPTIONS]
    
      Run "menuconfig" project configuration tool.
    
    Options:
      -C, --project-dir PATH         Project directory.
      -D, --define-cache-entry TEXT  Create a cmake cache entry. This option can
                                     be used at most once either globally, or for
                                     one subcommand.
      --style, --color-scheme TEXT   Menuconfig style. The built-in styles
                                     include:
    
                                     - default - a yellowish theme,
    
                                     - monochrome -  a black and white theme, or
    
                                     - aquatic - a blue theme.
    
                                     It is possible to customize these themes
                                     further as it is described in the Color
                                     schemes section of the kconfiglib
                                     documentation. The default value is
                                     "aquatic". The default value can be set with
                                     the MENUCONFIG_STYLE environment variable.
      --help                         Show this message and exit.

     

    ▶ monitor -p /dev/ttyACM0

      :  프로젝트 디렉토리에서 실행해야 동작합니다. 종료 명령 :  Ctrl + ]

     → 프로젝트 루트 디렉토리 미사용

    >> case of no project root
    $ idf.py monitor
    Executing action: monitor
    CMakeLists.txt not found in project directory /home/xxx

     

    → 프로젝트 루트 디렉토리 사용시

    더보기
    $ idf.py monitor
    Executing action: monitor
    Running idf_monitor in directory /home/xxx/Project/esp32/myApp1
    Executing "/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python 
               /home/xxx/esp/esp-idf/tools/idf_monitor.py 
                  -p /dev/ttyACM0 -b 115200 --toolchain-prefix riscv32-esp-elf- 
                  --target esp32c6 --revision 0 -
                  -decode-panic backtrace 
                      /home/xxx/Project/esp32/myApp1/build/myApp1.elf 
                  -m '/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python' 
                     '/home/xxx/esp/esp-idf/tools/idf.py'"...
    --- esp-idf-monitor 1.3.4 on /dev/ttyACM0 115200 ---
    --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
    ESP-ROM:esp32c6-20220919
    Build:Sep 19 2022
    rst:0x15 (USB_UART_HPSYS),boot:0x6d (SPI_FAST_FLASH_BOOT)
    Saved PC:0x408096c8
    0x408096c8: rv_utils_wait_for_intr 
          at /home/xxx/esp/esp-idf/components/riscv/include/riscv/rv_utils.h:52
     (inlined by) esp_cpu_wait_for_intr 
          at /home/xxx/esp/esp-idf/components/esp_hw_support/cpu.c:143
    
    SPIWP:0xee
    mode:DIO, clock div:2
    load:0x40875720,len:0x1804
    load:0x4086c410,len:0xde0
    load:0x4086e610,len:0x2df8
    entry 0x4086c41a
    I (23) boot: ESP-IDF v5.2-beta1-263-ge49823f10c 2nd stage bootloader
    I (23) boot: compile time Dec 22 2023 15:14:21
    I (24) boot: chip revision: v0.0
    I (27) boot.esp32c6: SPI Speed      : 80MHz
    ~~ 중략 ~~

     

      --no-reset 옵션 사용하면 현재 상태로 바로 연결됩니다.

    더보기
    $ idf.py monitor  --no-reset -p /dev/ttyUSB1
    Executing action: monitor
    Running idf_monitor in directory /home/xxx/Project/esp32-matter/myApp1
    Executing "/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python 
                 /home/xxx/esp/esp-idf/tools/idf_monitor.py 
                    -p /dev/ttyUSB1 -b 115200 
                    --toolchain-prefix riscv32-esp-elf- 
                    --target esp32c6 --revision 0 
                    --decode-panic backtrace /home/xxx/Project/esp32-matter/myApp1/build/myApp1.elf 
                    --no-reset 
                    -m '/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python' 
                       '/home/xxx/esp/esp-idf/tools/idf.py'"...
    --- esp-idf-monitor 1.5.0 on /dev/ttyUSB1 115200
    --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
    
    
    > help
    
    matter
      Matter utilities
    
    help  [<string>]
      Print the summary of all registered commands if no arguments are given,
      otherwise print summary of given command.
          <string>  Name of command

     

      flash monitor

      :  장치에 이미지 다운로드후 디버깅 로그  출력하기

    더보기
    xxx@ubuntu22:~/Project/esp32/myApp1$ idf.py flash monitor
    Executing action: flash
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja flash"...
    [1/5] cd /home/xxx/Project/esp32/uc5...32/myApp1/build/myApp1.bin
    myApp1.bin binary size 0xfc1a0 bytes. Smallest app partition is 0x180000 bytes. 0x83e60 bytes (34%) free.
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
    Bootloader binary size 0x5430 bytes. 0x2bd0 bytes (34%) free.
    [2/3] cd /home/xxx/esp/esp-idf/compo...nents/esptool_py/run_serial_tool.cmake
    esptool.py --chip esp32c6 -p /dev/ttyACM0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 bootloader/bootloader.bin 0x10000 myApp1.bin 0x8000 partition_table/partition-table.bin
    esptool.py v4.7.0
    Serial port /dev/ttyACM0
    Connecting...
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00000000 to 0x00005fff...
    Flash will be erased from 0x00010000 to 0x0010cfff...
    Flash will be erased from 0x00008000 to 0x00008fff...
    Compressed 21552 bytes to 12990...
    Writing at 0x00000000... (100 %)
    Wrote 21552 bytes (12990 compressed) at 0x00000000 in 0.3 seconds (effective 566.9 kbit/s)...
    Hash of data verified.
    Compressed 1032608 bytes to 551286...
    Writing at 0x00106ce2... (100 %)
    Wrote 1032608 bytes (551286 compressed) at 0x00010000 in 7.3 seconds (effective 1128.2 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 120...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (120 compressed) at 0x00008000 in 0.0 seconds (effective 669.4 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    
    
    
    
    Executing action: monitor
    Running idf_monitor in directory /home/xxx/Project/esp32/myApp1
    Executing "/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python 
               /home/xxx/esp/esp-idf/tools/idf_monitor.py 
                  -p /dev/ttyACM0 -b 115200 --toolchain-prefix riscv32-esp-elf- 
                  --target esp32c6 --revision 0 
                  --decode-panic backtrace /home/xxx/Project/esp32/myApp1/build/myApp1.elf 
                  -m '/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python' '/home/xxx/esp/esp-idf/tools/idf.py'"...
    --- esp-idf-monitor 1.3.4 on /dev/ttyACM0 115200 ---
    --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
    I (139) esp_image: segment 1: paddr=0003ebb8 vaddr=408000ESP-ROM:esp32c6-20220919
    Build:Sep 19 2022
    rst:0x15 (USB_UART_HPSYS),boot:0x4f (SPI_FAST_FLASH_BOOT)
    Saved PC:0x4001a378
    0x4001a378: ets_sha_process in ROM
    
    SPIWP:0xee
    mode:DIO, clock div:2
    load:0x40875720,len:0x1804
    load:0x4086c410,len:0xde0
    load:0x4086e610,len:0x2df8
    entry 0x4086c41a
    I (23) boot: ESP-IDF v5.2-beta1-263-ge49823f10c 2nd stage bootloader
    I (23) boot: compile time Dec 22 2023 15:14:21
    I (24) boot: chip revision: v0.0
    I (28) boot.esp32c6: SPI Speed      : 80MHz
    I (32) boot.esp32c6: SPI Mode       : DIO
    I (37) boot.esp32c6: SPI Flash Size : 4MB
    I (42) boot: Enabling RNG early entropy source...
    I (47) boot: Partition Table:
    I (51) boot: ## Label            Usage          Type ST Offset   Length
    I (58) boot:  0 nvs              WiFi data        01 02 00009000 00006000
    I (66) boot:  1 phy_init         RF data          01 01 0000f000 00001000
    I (73) boot:  2 factory          factory app      00 00 00010000 00180000
    I (80) boot:  3 storage          Unknown data     01 82 00190000 00070000
    I (88) boot: End of partition table
    I (92) esp_image: segment 0: paddr=00010020 vaddr=420c0020 size=2eb90h (191376) map
    I (140) esp_image: segment 1: paddr=0003ebb8 vaddr=40800000 size=01460h (  5216) load
    I (142) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=b9328h (758568) map
    I (299) esp_image: segment 3: paddr=000f9350 vaddr=40801460 size=10928h ( 67880) load
    I (316) esp_image: segment 4: paddr=00109c80 vaddr=40811d90 size=024f0h (  9456) load
    ~~ 중략 ~~

     

     

    partition-table

    $ idf.py partition-table
    Executing action: partition-table
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja partition-table"...
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/esp...
    ********************************************************
    "Partition table binary generated. Contents:
    *******************************************************************************
    # ESP-IDF Partition Table
    # Name, Type, SubType, Offset, Size, Flags
    nvs,data,nvs,0x9000,24K,
    phy_init,data,phy,0xf000,4K,
    factory,app,factory,0x10000,1M,
    *******************************************************************************
    
    Partition Table build complete. To flash, run this command:
    /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
         ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py 
          -p (PORT) 
          -b 460800 
          --before default_reset       --after hard_reset 
          --chip esp32c6  
          write_flash 0x8000 build/partition_table/partition-table.bin
    or run 'idf.py -p (PORT) partition-table-flash'

     

     

     partition_table

      :  partition table을  빌드합니다.

        이명령은 더이상 사용하지 않고 partition-table을 사용하라고 나옵니다.

    더보기
    $ idf.py partition_table
    Executing action: partition_table
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja partition_table"...
    [1/2] cd /home/xxx/Project/esp32/myApp1/build/esp-idf/partition_table 
           && /usr/bin/cmake -E echo "Partition table binary generated. Contents:" 
           && /usr/bin/cmake -E echo "*******************************************************" 
           && /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
                /home/xxx/esp/esp-idf/components/partition_table/gen_esp32part.py 
                   -q --offset 0x8000 
                   --flash-size 2MB 
                   -- /home/xxx/Project/esp32/myApp1/build/partition_table/partition-table.bin 
                   && /usr/bin/cmake -E echo "***********************************************"
    Partition table binary generated. Contents:
    *******************************************************************************
    # ESP-IDF Partition Table
    # Name, Type, SubType, Offset, Size, Flags
    nvs,data,nvs,0x9000,24K,
    phy_init,data,phy,0xf000,4K,
    factory,app,factory,0x10000,1M,
    *******************************************************************************
    [2/2] Warning: command "partition_table" is deprecated. 
          Have you wanted to run "partition-table" instead?

     

     

     partition-table-flash

      : partition-table.bin 을 디바이스에 쓰기

    더보기
    $ idf.py partition-table-flash
    Executing action: partition-table-flash
    Running ninja in directory /home/xxx/Project/esp32/spiffs/build
    Executing "ninja partition-table-flash"...
    [0/1] cd /home/xxx/esp/esp-idf/components/partition_table && /usr/bin/cmake 
         -D IDF_PATH=/home/xxx/esp/esp-idf 
         -D "SERIAL_TOOL=/home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python;;
             /home/xxx/esp/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32c6" 
         -D "SERIAL_TOOL_ARGS=--before=default_reset;
         --after=hard_reset;write_flash;@partition-table-flash_args" 
         -D WORKING_DIRECTORY=/home/xxx/Project/esp32/spiffs/build 
         -P /home/xxx/esp/esp-idf/components/esptool_py/run_serial_tool.cmake
    esptool.py --chip esp32c6 
       -p /dev/ttyACM0 -b 460800 
       --before=default_reset 
       --after=hard_reset 
       write_flash 
         --flash_mode dio 
         --flash_freq 80m -
         -flash_size 2MB 0x8000 partition_table/partition-table.bin
    esptool.py v4.7.dev2
    Serial port /dev/ttyACM0
    Connecting....
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00008000 to 0x00008fff...
    Compressed 3072 bytes to 119...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 702.0 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    Done

     

      size

    $ idf.py size
    
    Executing action: size
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja all"...
    [1/4] cd /home/xxx/Project/esp32/uc5...32/myApp1/build/myApp1.bin
              myApp1.bin binary size 0xe2160 bytes. 
              Smallest app partition is 0x100000 bytes. 0x1dea0 bytes (12%) free.
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
              Bootloader binary size 0x5310 bytes. 0x2cf0 bytes (35%) free.
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja size"...
    [0/1] cd /home/xxx/Project/esp32/myApp1/build && /usr/bin/cmake 
      -D "IDF_SIZE_TOOL=/home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python;-m;esp_idf_size" 
      -D MAP_FILE=/home/xxx/Project/esp32/myApp1/build/myApp1.map 
      -D OUTPUT_JSON= 
      -P /home/xxx/esp/esp-idf/tools/cmake/run_size_tool.cmake
    Total sizes:
    Used stat D/IRAM:   93600 bytes ( 358512 remain, 20.7% used)
          .data size:    8828 bytes
          .bss  size:   19240 bytes
          .text size:   65532 bytes
    Used Flash size :  851588 bytes
               .text:  676540 bytes
             .rodata:  172976 bytes
    Total image size:  925948 bytes (.bin may be padded larger)

     

    ▶ --version

      : idf 버전 표시

    $ idf.py --version
    ESP-IDF v5.1.1-dirty
    
    
    $ idf.py --version
    ESP-IDF v5.2-beta1-263-ge49823f10c

     

    ▶ --list-targets

      : 지원하는 타겟 리스트 표시  (set-target 에서 사용)

    $ idf.py --list-targets
    esp32
    esp32s2
    esp32c3
    esp32s3
    esp32c2
    esp32c6
    esp32h2

     

    ▶ all

      :  build 명령과 동일합니다.

    Executing action: all (aliases: build)
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja all"...
    [1/4] cd /home/xxx/Project/esp32/myApp1/build/esp-idf/esptool_py 
           && /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
              /home/xxx/esp/esp-idf/components/partition_table/check_sizes.py 
                 --offset 0x8000 partition 
                 --type app /home/xxx/Project/esp32/myApp1/build/partition_table/partition-table.bin 
                            /home/xxx/Project/esp32/myApp1/build/myApp1.bin
    myApp1.bin binary size 0xe2160 bytes. Smallest app partition is 0x100000 bytes. 0x1dea0 bytes (12%) free.
    [2/4] Performing build step for 'bootloader'
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/esp-idf/esptool_py 
           && /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
              /home/xxx/esp/esp-idf/components/partition_table/check_sizes.py 
                 --offset 0x8000 bootloader 0x0 /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
    Bootloader binary size 0x5310 bytes. 0x2cf0 bytes (35%) free.
    
    Project build complete. To flash, run this command:
    /home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python 
       ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py 
          -p (PORT) -b 460800 
          --before default_reset --after hard_reset 
          --chip esp32c6  
          write_flash 
            --flash_mode dio 
            --flash_size 2MB 
            --flash_freq 80m 
               0x0 build/bootloader/bootloader.bin 
               0x8000 build/partition_table/partition-table.bin 
               0x10000 build/myApp1.bin
    or run 'idf.py -p (PORT) flash'

     

    ▶  docs

      : web 브라우저를 통해 espressif 다큐먼트 페이지가 오픈됍니다.

    $ idf.py docs
    Executing action: docs
    Opening documentation in the default browser:
    https://docs.espressif.com/projects/esp-idf/en/v5.1.1/esp32c6/
    
    $ idf.py docs -sp api-reference/system/heap_debug.html
    Executing action: docs
    Opening documentation in the default browser:
    https://docs.espressif.com/projects/esp-idf/en/v5.2.1/esp32/api-reference/system/heap_debug.html
    
    $ idf.py docs --help
    Usage: idf.py docs [OPTIONS]
    
      Open web browser with documentation for ESP-IDF
    
    Options:
      -C, --project-dir PATH          Project directory.
      -nb, --no-browser               Don't open browser.
      -l, --language [en|zh_CN|cn]    Documentation language. Your system language by default (en or cn)
      -sp, --starting-page TEXT       Documentation page (get-started, api-reference etc).
      -v, --version TEXT              Version of ESP-IDF.
      -t, --target [esp32|esp32s2|esp32c3|esp32s3|esp32c2|esp32c6|esp32h2|linux|esp32p4|]
                                      Chip target.
      --help                          Show this message and exit.

     

     

    ▶ build-system-targets

      : print list of build system targets.

    더보기
    $ idf.py build-system-targets 
    Executing action: build-system-targets
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja help"...
    [1/1] All primary targets available:menuconfig: phony
    confserver: phony
    save-defconfig: phony
    erase_flash: phony
    monitor: phony
    flash: phony
    encrypted-flash: phony
    size: phony
    size-files: phony
    size-components: phony
    uf2-app: phony
    uf2: phony
    edit_cache: phony
    rebuild_cache: phony
    list_install_components: phony
    install: phony
    install/local: phony
    install/strip: phony
    /home/xxx/Project/esp32/myApp1/build/CMakeFiles/menuconfig: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/CMakeFiles/confserver: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/CMakeFiles/save-defconfig: CUSTOM_COMMAND
    ~~ 중략 ~~
    /home/xxx/Project/esp32/myApp1/build/CMakeFiles/size-components: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/CMakeFiles/uf2-app: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/CMakeFiles/uf2: CUSTOM_COMMAND
    esp-idf/edit_cache: phony
    esp-idf/rebuild_cache: phony
    esp-idf/list_install_components: phony
    esp-idf/install: phony
    ~~ 중략 ~~
    esp-idf/efuse/install/local: phony
    esp-idf/efuse/install/strip: phony
    /home/xxx/Project/esp32/myApp1/build/esp-idf/efuse/CMakeFiles/efuse-common-table: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/efuse/CMakeFiles/efuse_common_table: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/efuse/CMakeFiles/efuse_custom_table: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/efuse/CMakeFiles/show-efuse-table: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/efuse/CMakeFiles/show_efuse_table: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/efuse/CMakeFiles/efuse_test_table: CUSTOM_COMMAND
    esp-idf/driver/edit_cache: phony
    ~~ 중략 ~~
    esp-idf/partition_table/install/local: phony
    esp-idf/partition_table/install/strip: phony
    /home/xxx/Project/esp32/myApp1/build/esp-idf/partition_table/CMakeFiles/partition_table_bin: phony
    /home/xxx/Project/esp32/myApp1/build/partition_table/partition-table.bin: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/partition_table/CMakeFiles/partition-table: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/partition_table/CMakeFiles/partition_table: CUSTOM_COMMAND
    /home/cxxxhlee/Project/esp32/myApp1/build/esp-idf/partition_table/CMakeFiles/partition-table-flash: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/partition_table/CMakeFiles/encrypted-partition-table-flash: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/partition_table/CMakeFiles/partition_table-flash: CUSTOM_COMMAND
    esp-idf/esp_partition/edit_cache: phony
    esp-idf/esp_partition/rebuild_cache: phony
    esp-idf/esp_partition/list_install_components: phony
    ~~ 중략 ~~
    esp-idf/esp_system/install: phony
    esp-idf/esp_system/install/local: phony
    esp-idf/esp_system/install/strip: phony
    /home/xxx/Project/esp32/myApp1/build/esp-idf/esp_system/CMakeFiles/__ldgen_output_sections.ld: phony
    /home/xxx/Project/esp32/myApp1/build/esp-idf/esp_system/ld/sections.ld: CUSTOM_COMMAND
    /home/xxx/Project/esp32/myApp1/build/esp-idf/esp_system/CMakeFiles/memory_ld: phony
    /home/xxx/Project/esp32/myApp1/build/esp-idf/esp_system/ld/memory.ld: CUSTOM_COMMAND
    esp-idf/esp_system/port/edit_cache: phony
    esp-idf/esp_system/port/rebuild_cache: phony
    esp-idf/esp_system/port/list_install_components: phony
    ~~ 중략 ~~
    esp-idf/main/install/strip: phony
    __idf_app_trace: phony
    __idf_app_update: phony
    __idf_bootloader_support: phony
    __idf_bt: phony
    __idf_cmock: phony
    ~~ 중략 ~~
    __idf_wpa_supplicant: phony
    __ldgen_output_sections.ld: phony
    apidoc: phony
    app-flash: phony
    app_check_size: phony
    bootloader-flash: phony
    custom_bundle: phony
    efuse-common-table: phony
    efuse-custom-table: phony
    efuse_common_table: phony
    efuse_custom_table: phony
    efuse_test_table: phony
    encrypted-app-flash: phony
    encrypted-bootloader-flash: phony
    encrypted-partition-table-flash: phony
    lib: phony
    libapp_trace.a: phony
    libapp_update.a: phony
    libbootloader_support.a: phony
    libbt.a: phony
    libcmock.a: phony
    libconsole.a: phony
    ~~ 중략 ~~
    libwear_levelling.a: phony
    libwifi_provisioning.a: phony
    libwpa_supplicant.a: phony
    mbedcrypto: phony
    mbedtls: phony
    mbedx509: phony
    memory_ld: phony
    partition-table: phony
    partition-table-flash: phony
    partition_table: phony
    partition_table-flash: phony
    partition_table_bin: phony
    show-efuse-table: phony
    show_efuse_table: phony
    build.ninja: RERUN_CMAKE
    clean: CLEAN
    help: HELP

     

    ▶ erase-flash

    : flash 의 모든 영역을 지우기

    더보기
    $ idf.py erase-flash 
    Executing action: erase-flash
    Running esptool.py in directory /home/xxx/Project/esp32-matter/light/build
    Executing "/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python 
               /home/xxx/esp/esp-idf/components/esptool_py/esptool/esptool.py 
                   -p /dev/ttyACM0 -b 460800 --before default_reset 
                   --after hard_reset --chip esp32c6 erase_flash"...
    esptool.py v4.7.0
    Serial port /dev/ttyACM0
    Connecting...
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Erasing flash (this may take a while)...
    Chip erase completed successfully in 14.2s
    Hard resetting via RTS pin...
    Done
    
    >> 포트 지정하기
    $ idf.py flash  -p /dev/ttyACM1
    Executing action: flash
    Running ninja in directory /home/xxx/Project/esp32/blink/build
    Executing "ninja flash"...
    [1/5] cd /home/xxx/Project/esp32/blink/build/esp-idf/espto...on-table.bin 
             /home/xxx/Project/esp32/blink/build/blink.bin
    blink.bin binary size 0x25600 bytes. 
    Smallest app partition is 0x100000 bytes. 0xdaa00 bytes (85%) free.
    [1/1] cd /home/xxx/Project/esp32/blink/build/bootloader/es...
               me/xxx/Project/esp32/blink/build/bootloader/bootloader.bin
    Bootloader binary size 0x35b0 bytes. 0x4a50 bytes (58%) free.
    [2/3] cd /home/xxx/esp/esp-idf/components/esptool_py && 
              /u...xxx/esp/esp-idf/components/esptool_py/run_serial_tool.cmake
    esptool.py --chip esp32c6 -p /dev/ttyACM1 -b 460800 
               --before=default_reset --after=hard_reset write_flash --flash_mode dio 
               --flash_freq 80m 
               --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 blink.bin 0x8000 partition_table/partition-table.bin
    esptool.py v4.7.0
    Serial port /dev/ttyACM1
    Connecting...
    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
    Features: WiFi 6, BT 5, IEEE802.15.4
    Crystal is 40MHz
    MAC: 40:4c:ca:ff:fe:43:15:18
    BASE MAC: 40:4c:ca:43:15:18
    MAC_EXT: ff:fe
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash will be erased from 0x00000000 to 0x00003fff...
    Flash will be erased from 0x00010000 to 0x00035fff...
    Flash will be erased from 0x00008000 to 0x00008fff...
    Compressed 13744 bytes to 9658...
    Writing at 0x00000000... (100 %)
    Wrote 13744 bytes (9658 compressed) at 0x00000000 in 0.2 seconds (effective 482.4 kbit/s)...
    Hash of data verified.
    Compressed 153088 bytes to 78874...
    Writing at 0x0002f4f7... (100 %)
    Wrote 153088 bytes (78874 compressed) at 0x00010000 in 1.2 seconds (effective 986.2 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 103...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 620.1 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...

     

    ▶ fullclean

      : 모든 build directory 안의 내용 지우기

    $ idf.py fullclean
    Executing action: fullclean
    Executing action: remove_managed_components
    Done

     

    ▶  help

    더보기
    xxx@ubuntu22:~/Project/esp32/myApp1$ idf.py --help
    Setting IDF_PATH environment variable: /home/xxx/esp/esp-idf
    Usage: idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
    
      ESP-IDF CLI build management tool. For commands that are not known to idf.py an attempt to execute it as a
      build system target will be made. Selected target: esp32c6
    
    Options:
      --version                       Show IDF version and exit.
      --list-targets                  Print list of supported targets and exit.
      -C, --project-dir PATH          Project directory.
      -B, --build-dir PATH            Build directory.
      -w, --cmake-warn-uninitialized / -n, --no-warnings
                                      Enable CMake uninitialized variable warnings for CMake files inside the
                                      project directory. (--no-warnings is now the default, and doesn't need to be
                                      specified.) The default value can be set with the
                                      IDF_CMAKE_WARN_UNINITIALIZED environment variable.
      -v, --verbose                   Verbose build output.
      --preview                       Enable IDF features that are still in preview.
      --ccache / --no-ccache          Use ccache in build. Disabled by default. The default value can be set with
                                      the IDF_CCACHE_ENABLE environment variable.
      -G, --generator [Ninja|Unix Makefiles]
                                      CMake generator.
      --no-hints                      Disable hints on how to resolve errors and logging.
      -D, --define-cache-entry TEXT   Create a cmake cache entry. This option can be used at most once either
                                      globally, or for one subcommand.
      -p, --port TEXT                 Serial port. The default value can be set with the ESPPORT environment
                                      variable. This option can be used at most once either globally, or for one
                                      subcommand.
      -b, --baud INTEGER              Baud rate for flashing. It can imply monitor baud rate as well if it hasn't
                                      been defined locally. The default value can be set with the ESPBAUD
                                      environment variable. This option can be used at most once either globally,
                                      or for one subcommand.
      --help                          Show this message and exit.
    
    Commands:
      add-dependency               Add dependency to the manifest file.
      all                          Aliases: build. Build the project.
      app                          Build only the app.
      app-flash                    Flash the app only.
      bootloader                   Build only bootloader.
      bootloader-flash             Flash bootloader only.
      build-system-targets         Print list of build system targets.
      clean                        Delete build output files from the build directory.
      confserver                   Run JSON configuration server.
      coredump-debug               Create core dump ELF file and run GDB debug session with this file.
      coredump-info                Print crashed task’s registers, callstack, list of available tasks in the
                                   system, memory regions and contents of memory stored in core dump (TCBs and
                                   stacks)
      create-component             Create a new component.
      create-manifest              Create manifest for specified component.
      create-project               Create a new project.
      create-project-from-example  Create a project from an example.
      delete-version               (Deprecated) Deprecated! New CLI command: "compote component delete". Delete
                                   specified version of the component from the component registry.
      docs                         Open web browser with documentation for ESP-IDF
      efuse-common-table           Generate C-source for IDF's eFuse fields.
      efuse-custom-table           Generate C-source for user's eFuse fields.
      encrypted-app-flash          Flash the encrypted app only.
      encrypted-flash              Flash the encrypted project.
      erase-flash                  Erase entire flash chip.
      erase-otadata                Erase otadata partition.
      flash                        Flash the project.
      fullclean                    Delete the entire build directory contents.
      gdb                          Run the GDB.
      gdbgui                       GDB UI in default browser.
      gdbtui                       GDB TUI mode.
      menuconfig                   Run "menuconfig" project configuration tool.
      monitor                      Display serial output.
      openocd                      Run openocd from current path
      pack-component               (Deprecated) Deprecated! New CLI command: "compote component pack". Create
                                   component archive and store it in the dist directory.
      partition-table              Build only partition table.
      partition-table-flash        Flash partition table only.
      post-debug                   Utility target to read the output of async debug action and stop them.
      python-clean                 Delete generated Python byte code from the IDF directory
      read-otadata                 Read otadata partition.
      reconfigure                  Re-run CMake.
      save-defconfig               Generate a sdkconfig.defaults with options different from the default ones
      set-target                   Set the chip target to build.
      show-efuse-table             Print eFuse table.
      size                         Print basic size information about the app.
      size-components              Print per-component size information.
      size-files                   Print per-source-file size information.
      uf2                          Generate the UF2 binary with all the binaries included
      uf2-app                      Generate an UF2 binary for the application only
      update-dependencies          Update dependencies of the project
      upload-component             (Deprecated) Deprecated! New CLI command: "compote component upload". Upload
                                   component to the component registry. If the component doesn't exist in the
                                   registry it will be created automatically.
      upload-component-status      (Deprecated) Deprecated! New CLI command: "compote component upload-status".
                                   Check the component uploading status by the job ID.

     

      uf2

       : uf2 형식의 파일 생성

     

     

    $ idf.py uf2 --help
    Usage: idf.py uf2 [OPTIONS]
    
    Options:
      -C, --project-dir PATH  Project directory.
      --md5-disable           Disable MD5 checksum
      --help                  Show this message and exit.
    
    $ idf.py uf2
    Adding "uf2"'s dependency "all" to list of commands with default set of options.
    Executing action: all (aliases: build)
    Running ninja in directory /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build
    Executing "ninja all"...
    [1/4] cd /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/esp-idf/esptoo...lee/Project/tuya/tuya_iot_link_sdk_for_esp32/build/tuya_iot_link_sdk_for_esp32.bin
    tuya_iot_link_sdk_for_esp32.bin binary size 0xf8410 bytes. Smallest app partition is 0x100000 bytes. 0x7bf0 bytes (3%) free.
    Warning: The smallest app partition is nearly full (3% free space left)!
    [1/1] cd /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/bootloader/esp...ome/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/bootloader/bootloader.bin
    Bootloader binary size 0x54e0 bytes. 0x2b20 bytes (34%) free.
    Executing action: uf2
    Running ninja in directory /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build
    Executing "ninja uf2"...
    [0/1] cd /home/xxx/esp/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH=/home/xxx/esp/esp-idf -D "SERIAL_TOOL=/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python;/home/xxx/esp/esp-idf/tools/mkuf2.py;write;--chip;esp32c6" -D "SERIAL_TOOL_ARGS=--json;/home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/flasher_args.json;-o;/home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/uf2.bin" -P run_serial_tool.cmake
    Note: /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python;/home/xxx/esp/esp-idf/tools/mkuf2.py;write;--chip;esp32c6 will search for a serial port. To specify a port, set the ESPPORT environment variable.
    Note: /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python;/home/xxx/esp/esp-idf/tools/mkuf2.py;write;--chip;esp32c6 will attempt to set baud rate automatically. To specify a baud rate, set the ESPBAUD environment variable.
    esptool.py v4.7.0
    Adding /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/bootloader/bootloader.bin at 0x0
    Adding /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/partition_table/partition-table.bin at 0x8000
    Adding /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/tuya_iot_link_sdk_for_esp32.bin at 0x10000
    Wrote 0x120400 bytes to file /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/uf2.bin, ready to be flashed with any ESP USB Bridge
    Executing: /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python -m esptool --chip esp32c6 merge_bin --format uf2 -o /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/uf2.bin 0x0 /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/bootloader/bootloader.bin 0x10000 /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/tuya_iot_link_sdk_for_esp32.bin 0x8000 /home/xxx/Project/tuya/tuya_iot_link_sdk_for_esp32/build/partition_table/partition-table.bin
    Done

     

     > uf2.bin 파일 생성  (기존 bin 파일보다 약간 큼)

     

    ▶ reconfigure

        :  CMake를 다시 실행시켜주는 옵션

    더보기
    $ idf.py reconfigure --help
    Usage: idf.py reconfigure [OPTIONS]
    
      Re-run CMake even if it doesn't seem to need re-running. This isn't
      necessary during normal usage, but can be useful after adding/removing files
      from the source tree, or when modifying CMake cache variables. For example,
      "idf.py -DNAME='VALUE' reconfigure" can be used to set variable "NAME" in
      CMake cache to value "VALUE".
    
    Options:
      -C, --project-dir PATH         Project directory.
      -D, --define-cache-entry TEXT  Create a cmake cache entry. This option can
                                     be used at most once either globally, or for
                                     one subcommand.
      --help                         Show this message and exit.
    
    
    $ idf.py reconfigure
    
    Executing action: reconfigure
    Running cmake in directory /home/xxx/Project/esp32/blink/build
    Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python 
                              -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 /home/xxx/Project/esp32/blink"...
    -- ccache will be used for faster recompilation
    -- Building ESP-IDF components for target esp32c6
    NOTICE: 
    Following dependencies have new versions available:
    Dependency "espressif/led_strip": "2.5.2" -> "2.5.5"
    Consider running "idf.py update-dependencies" to update your lock file.
    Processing 2 dependencies:
    [1/2] espressif/led_strip (2.5.2)
    [2/2] idf (5.2.1)
    -- Project sdkconfig file /home/xxx/Project/esp32/blink/sdkconfig
    Loading defaults file /home/xxx/Project/esp32/blink/sdkconfig.defaults...
    -- App "blink" version: 3a89d69
    -- Adding linker script /home/xxx/Project/esp32/blink/build/esp-idf/esp_system/ld/memory.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_system/ld/esp32c6/sections.ld.in
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.coexist.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib-normal.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.heap.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
    -- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__led_strip esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 iot-core_config json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table protobuf-c protocomm pthread riscv sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant
    -- Component paths: /home/xxx/esp/esp-idf/components/app_trace /home/xxx/esp/esp-idf/components/app_update /home/xxx/esp/esp-idf/components/bootloader /home/xxx/esp/esp-idf/components/bootloader_support /home/xxx/esp/esp-idf/components/bt /home/xxx/esp/esp-idf/components/cmock /home/xxx/esp/esp-idf/components/console /home/xxx/esp/esp-idf/components/cxx /home/xxx/esp/esp-idf/components/driver /home/xxx/esp/esp-idf/components/efuse /home/xxx/esp/esp-idf/components/esp-tls /home/xxx/esp/esp-idf/components/esp_adc /home/xxx/esp/esp-idf/components/esp_app_format /home/xxx/esp/esp-idf/components/esp_bootloader_format /home/xxx/esp/esp-idf/components/esp_coex /home/xxx/esp/esp-idf/components/esp_common /home/xxx/esp/esp-idf/components/esp_eth /home/xxx/esp/esp-idf/components/esp_event /home/xxx/esp/esp-idf/components/esp_gdbstub /home/xxx/esp/esp-idf/components/esp_hid /home/xxx/esp/esp-idf/components/esp_http_client /home/xxx/esp/esp-idf/components/esp_http_server /home/xxx/esp/esp-idf/components/esp_https_ota /home/xxx/esp/esp-idf/components/esp_https_server /home/xxx/esp/esp-idf/components/esp_hw_support /home/xxx/esp/esp-idf/components/esp_lcd /home/xxx/esp/esp-idf/components/esp_local_ctrl /home/xxx/esp/esp-idf/components/esp_mm /home/xxx/esp/esp-idf/components/esp_netif /home/xxx/esp/esp-idf/components/esp_netif_stack /home/xxx/esp/esp-idf/components/esp_partition /home/xxx/esp/esp-idf/components/esp_phy /home/xxx/esp/esp-idf/components/esp_pm /home/xxx/esp/esp-idf/components/esp_psram /home/xxx/esp/esp-idf/components/esp_ringbuf /home/xxx/esp/esp-idf/components/esp_rom /home/xxx/esp/esp-idf/components/esp_system /home/xxx/esp/esp-idf/components/esp_timer /home/xxx/esp/esp-idf/components/esp_wifi /home/xxx/esp/esp-idf/components/espcoredump /home/xxx/Project/esp32/blink/managed_components/espressif__led_strip /home/xxx/esp/esp-idf/components/esptool_py /home/xxx/esp/esp-idf/components/fatfs /home/xxx/esp/esp-idf/components/freertos /home/xxx/esp/esp-idf/components/hal /home/xxx/esp/esp-idf/components/heap /home/xxx/esp/esp-idf/components/http_parser /home/xxx/esp/esp-idf/components/idf_test /home/xxx/esp/esp-idf/components/ieee802154 /home/xxx/esp/esp-idf/components/iot-core_config /home/xxx/esp/esp-idf/components/json /home/xxx/esp/esp-idf/components/log /home/xxx/esp/esp-idf/components/lwip /home/xxx/Project/esp32/blink/main /home/xxx/esp/esp-idf/components/mbedtls /home/xxx/esp/esp-idf/components/mqtt /home/xxx/esp/esp-idf/components/newlib /home/xxx/esp/esp-idf/components/nvs_flash /home/xxx/esp/esp-idf/components/nvs_sec_provider /home/xxx/esp/esp-idf/components/openthread /home/xxx/esp/esp-idf/components/partition_table /home/xxx/esp/esp-idf/components/protobuf-c /home/xxx/esp/esp-idf/components/protocomm /home/xxx/esp/esp-idf/components/pthread /home/xxx/esp/esp-idf/components/riscv /home/xxx/esp/esp-idf/components/sdmmc /home/xxx/esp/esp-idf/components/soc /home/xxx/esp/esp-idf/components/spi_flash /home/xxx/esp/esp-idf/components/spiffs /home/xxx/esp/esp-idf/components/tcp_transport /home/xxx/esp/esp-idf/components/ulp /home/xxx/esp/esp-idf/components/unity /home/xxx/esp/esp-idf/components/usb /home/xxx/esp/esp-idf/components/vfs /home/xxx/esp/esp-idf/components/wear_levelling /home/xxx/esp/esp-idf/components/wifi_provisioning /home/xxx/esp/esp-idf/components/wpa_supplicant
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/xxx/Project/esp32/blink/build

     

    python-clean

     : 생성된 파이션 바이트코드를 제거시 사용합니다. 주로 IDF/Python 버전 변환시 발생하는 문제를 해결할려고 할때

      사용합니다.

    to

    >> python-clean 시 아래의 파일이 삭제됨.
    $ find -name *.pyc
    ./components/partition_table/__pycache__/gen_esp32part.cpython-310.pyc
    ./tools/__pycache__/python_version_checker.cpython-310.pyc
    
    $ idf.py python-clean
    Executing action: python-clean

     

    save-defconfig 

    :  sdkconfig.defaults 생성옵션

    blink$ idf.py save-defconfig
    [0/1] Re-running CMake...
    -- ccache will be used for faster recompilation
    -- Building ESP-IDF components for target esp32c6
    NOTICE: 
    Following dependencies have new versions available:
    Dependency "espressif/led_strip": "2.5.2" -> "2.5.5"
    Consider running "idf.py update-dependencies" to update your lock file.
    Processing 2 dependencies:
    [1/2] espressif/led_strip (2.5.2)
    [2/2] idf (5.2.1)
    -- Project sdkconfig file /home/xxx/Project/esp32/blink/sdkconfig
    -- App "blink" version: 3a89d69
    -- Adding linker script /home/xxx/Project/esp32/blink/build/esp-idf/esp_system/ld/memory.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_system/ld/esp32c6/sections.ld.in
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.coexist.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib-normal.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.heap.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
    -- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__led_strip esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 iot-core_config json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table protobuf-c protocomm pthread riscv sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant
    -- Component paths: /home/xxx/esp/esp-idf/components/app_trace /home/xxx/esp/esp-idf/components/app_update /home/xxx/esp/esp-idf/components/bootloader /home/xxx/esp/esp-idf/components/bootloader_support /home/xxx/esp/esp-idf/components/bt /home/xxx/esp/esp-idf/components/cmock /home/xxx/esp/esp-idf/components/console /home/xxx/esp/esp-idf/components/cxx /home/xxx/esp/esp-idf/components/driver /home/xxx/esp/esp-idf/components/efuse /home/xxx/esp/esp-idf/components/esp-tls /home/xxx/esp/esp-idf/components/esp_adc /home/xxx/esp/esp-idf/components/esp_app_format /home/xxx/esp/esp-idf/components/esp_bootloader_format /home/xxx/esp/esp-idf/components/esp_coex /home/xxx/esp/esp-idf/components/esp_common /home/xxx/esp/esp-idf/components/esp_eth /home/xxx/esp/esp-idf/components/esp_event /home/xxx/esp/esp-idf/components/esp_gdbstub /home/xxx/esp/esp-idf/components/esp_hid /home/xxx/esp/esp-idf/components/esp_http_client /home/xxx/esp/esp-idf/components/esp_http_server /home/xxx/esp/esp-idf/components/esp_https_ota /home/xxx/esp/esp-idf/components/esp_https_server /home/xxx/esp/esp-idf/components/esp_hw_support /home/xxx/esp/esp-idf/components/esp_lcd /home/xxx/esp/esp-idf/components/esp_local_ctrl /home/xxx/esp/esp-idf/components/esp_mm /home/xxx/esp/esp-idf/components/esp_netif /home/xxx/esp/esp-idf/components/esp_netif_stack /home/xxx/esp/esp-idf/components/esp_partition /home/xxx/esp/esp-idf/components/esp_phy /home/xxx/esp/esp-idf/components/esp_pm /home/xxx/esp/esp-idf/components/esp_psram /home/xxx/esp/esp-idf/components/esp_ringbuf /home/xxx/esp/esp-idf/components/esp_rom /home/xxx/esp/esp-idf/components/esp_system /home/xxx/esp/esp-idf/components/esp_timer /home/xxx/esp/esp-idf/components/esp_wifi /home/xxx/esp/esp-idf/components/espcoredump /home/xxx/Project/esp32/blink/managed_components/espressif__led_strip /home/xxx/esp/esp-idf/components/esptool_py /home/xxx/esp/esp-idf/components/fatfs /home/xxx/esp/esp-idf/components/freertos /home/xxx/esp/esp-idf/components/hal /home/xxx/esp/esp-idf/components/heap /home/xxx/esp/esp-idf/components/http_parser /home/xxx/esp/esp-idf/components/idf_test /home/xxx/esp/esp-idf/components/ieee802154 /home/xxx/esp/esp-idf/components/iot-core_config /home/xxx/esp/esp-idf/components/json /home/xxx/esp/esp-idf/components/log /home/xxx/esp/esp-idf/components/lwip /home/xxx/Project/esp32/blink/main /home/xxx/esp/esp-idf/components/mbedtls /home/xxx/esp/esp-idf/components/mqtt /home/xxx/esp/esp-idf/components/newlib /home/xxx/esp/esp-idf/components/nvs_flash /home/xxx/esp/esp-idf/components/nvs_sec_provider /home/xxx/esp/esp-idf/components/openthread /home/xxx/esp/esp-idf/components/partition_table /home/xxx/esp/esp-idf/components/protobuf-c /home/xxx/esp/esp-idf/components/protocomm /home/xxx/esp/esp-idf/components/pthread /home/xxx/esp/esp-idf/components/riscv /home/xxx/esp/esp-idf/components/sdmmc /home/xxx/esp/esp-idf/components/soc /home/xxx/esp/esp-idf/components/spi_flash /home/xxx/esp/esp-idf/components/spiffs /home/xxx/esp/esp-idf/components/tcp_transport /home/xxx/esp/esp-idf/components/ulp /home/xxx/esp/esp-idf/components/unity /home/xxx/esp/esp-idf/components/usb /home/xxx/esp/esp-idf/components/vfs /home/xxx/esp/esp-idf/components/wear_levelling /home/xxx/esp/esp-idf/components/wifi_provisioning /home/xxx/esp/esp-idf/components/wpa_supplicant
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/xxx/Project/esp32/blink/build
    [0/1] cd /home/xxx/Project/esp32/blink/build && /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python /home/xxx/esp/esp-idf/tools/kconfig_new/prepare_kconfig_files.py --list-separator=semicolon --env-file /home/xxx/Project/esp32/blink/build/config.env && /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python -m kconfgen --list-separator=semicolon --kconfig /home/xxx/esp/esp-idf/Kconfig --sdkconfig-rename /home/xxx/esp/esp-idf/sdkconfig.rename --config /home/xxx/Project/esp32/blink/sdkconfig --env-file /home/xxx/Project/esp32/blink/build/config.env --dont-write-deprecated --output savedefconfig /home/xxx/Project/esp32/blink/sdkconfig.defaults
    
    >> sdkconfig.defaults 가 새로 갱신이 됩니다.
    :~/Project/esp32/blink$ ls -al sdkconfig.defaults
    -rw-rw-r-- 1 xxx xxx 268 Aug 30 10:49 sdkconfig.defaults
    
    >> sdkconfig.defaults 안의 내용
    $ cat sdkconfig.defaults
    # This file was generated using idf.py save-defconfig. It can be edited manually.
    # Espressif IoT Development Framework (ESP-IDF) 5.2.1 Project Minimal Configuration
    #
    CONFIG_IDF_TARGET="esp32c6"
    CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
    CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y

     

     set-target 

      : 빌드할 chip-target 설정

    더보기
    $ idf.py set-target
    Usage: idf.py set-target [OPTIONS] {esp32|esp32s2|esp32c3|esp32s3|esp32c2|esp32c6
                                        |esp32h2|linux|esp32p4}
    Try 'idf.py set-target --help' for help.
    
    Error: Missing argument '{esp32|esp32s2|esp32c3|esp32s3|esp32c2|esp32c6|esp32h2|linux|esp32p4}'. Choose from:
            esp32,
            esp32s2,
            esp32c3,
            esp32s3,
            esp32c2,
            esp32c6,
            esp32h2,
            linux,
            esp32p4
    
    >> blink 예제에 set-target 명령시 로그
    $ idf.py set-target esp32s3
    -- Existing sdkconfig '/home/xxx/Project/esp32/blink/sdkconfig' renamed to '/home/xxx/Project/esp32/blink/sdkconfig.old'.
    -- Found Git: /usr/bin/git (found version "2.34.1") 
    -- ccache will be used for faster recompilation
    -- The C compiler identification is GNU 13.2.0
    -- The CXX compiler identification is GNU 13.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/xxx/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /home/xxx/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /home/xxx/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Building ESP-IDF components for target esp32s3
    NOTICE: 
    Following dependencies have new versions available:
    Dependency "espressif/led_strip": "2.5.2" -> "2.5.5"
    Consider running "idf.py update-dependencies" to update your lock file.
    NOTICE: Updating lock file at /home/xxx/Project/esp32/blink/dependencies.lock
    Processing 2 dependencies:
    [1/2] espressif/led_strip (2.5.2)
    [2/2] idf (5.2.1)
    -- Project sdkconfig file /home/xxx/Project/esp32/blink/sdkconfig
    -- Compiler supported targets: xtensa-esp-elf
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of time_t
    -- Check size of time_t - done
    -- Found Python3: /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python (found version "3.10.12") found components: Interpreter 
    -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
    -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
    -- App "blink" version: 3a89d69-dirty
    -- Adding linker script /home/xxx/Project/esp32/blink/build/esp-idf/esp_system/ld/memory.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
    -- Adding linker script /home/xxx/esp/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
    -- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__led_strip esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 iot-core_config json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport touch_element ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
    -- Component paths: /home/xxx/esp/esp-idf/components/app_trace /home/xxx/esp/esp-idf/components/app_update /home/xxx/esp/esp-idf/components/bootloader /home/xxx/esp/esp-idf/components/bootloader_support /home/xxx/esp/esp-idf/components/bt /home/xxx/esp/esp-idf/components/cmock /home/xxx/esp/esp-idf/components/console /home/xxx/esp/esp-idf/components/cxx /home/xxx/esp/esp-idf/components/driver /home/xxx/esp/esp-idf/components/efuse /home/xxx/esp/esp-idf/components/esp-tls /home/xxx/esp/esp-idf/components/esp_adc /home/xxx/esp/esp-idf/components/esp_app_format /home/xxx/esp/esp-idf/components/esp_bootloader_format /home/xxx/esp/esp-idf/components/esp_coex /home/xxx/esp/esp-idf/components/esp_common /home/xxx/esp/esp-idf/components/esp_eth /home/xxx/esp/esp-idf/components/esp_event /home/xxx/esp/esp-idf/components/esp_gdbstub /home/xxx/esp/esp-idf/components/esp_hid /home/xxx/esp/esp-idf/components/esp_http_client /home/xxx/esp/esp-idf/components/esp_http_server /home/xxx/esp/esp-idf/components/esp_https_ota /home/xxx/esp/esp-idf/components/esp_https_server /home/xxx/esp/esp-idf/components/esp_hw_support /home/xxx/esp/esp-idf/components/esp_lcd /home/xxx/esp/esp-idf/components/esp_local_ctrl /home/xxx/esp/esp-idf/components/esp_mm /home/xxx/esp/esp-idf/components/esp_netif /home/xxx/esp/esp-idf/components/esp_netif_stack /home/xxx/esp/esp-idf/components/esp_partition /home/xxx/esp/esp-idf/components/esp_phy /home/xxx/esp/esp-idf/components/esp_pm /home/xxx/esp/esp-idf/components/esp_psram /home/xxx/esp/esp-idf/components/esp_ringbuf /home/xxx/esp/esp-idf/components/esp_rom /home/xxx/esp/esp-idf/components/esp_system /home/xxx/esp/esp-idf/components/esp_timer /home/xxx/esp/esp-idf/components/esp_wifi /home/xxx/esp/esp-idf/components/espcoredump /home/xxx/Project/esp32/blink/managed_components/espressif__led_strip /home/xxx/esp/esp-idf/components/esptool_py /home/xxx/esp/esp-idf/components/fatfs /home/xxx/esp/esp-idf/components/freertos /home/xxx/esp/esp-idf/components/hal /home/xxx/esp/esp-idf/components/heap /home/xxx/esp/esp-idf/components/http_parser /home/xxx/esp/esp-idf/components/idf_test /home/xxx/esp/esp-idf/components/ieee802154 /home/xxx/esp/esp-idf/components/iot-core_config /home/xxx/esp/esp-idf/components/json /home/xxx/esp/esp-idf/components/log /home/xxx/esp/esp-idf/components/lwip /home/xxx/Project/esp32/blink/main /home/xxx/esp/esp-idf/components/mbedtls /home/xxx/esp/esp-idf/components/mqtt /home/xxx/esp/esp-idf/components/newlib /home/xxx/esp/esp-idf/components/nvs_flash /home/xxx/esp/esp-idf/components/nvs_sec_provider /home/xxx/esp/esp-idf/components/openthread /home/xxx/esp/esp-idf/components/partition_table /home/xxx/esp/esp-idf/components/perfmon /home/xxx/esp/esp-idf/components/protobuf-c /home/xxx/esp/esp-idf/components/protocomm /home/xxx/esp/esp-idf/components/pthread /home/xxx/esp/esp-idf/components/sdmmc /home/xxx/esp/esp-idf/components/soc /home/xxx/esp/esp-idf/components/spi_flash /home/xxx/esp/esp-idf/components/spiffs /home/xxx/esp/esp-idf/components/tcp_transport /home/xxx/esp/esp-idf/components/touch_element /home/xxx/esp/esp-idf/components/ulp /home/xxx/esp/esp-idf/components/unity /home/xxx/esp/esp-idf/components/usb /home/xxx/esp/esp-idf/components/vfs /home/xxx/esp/esp-idf/components/wear_levelling /home/xxx/esp/esp-idf/components/wifi_provisioning /home/xxx/esp/esp-idf/components/wpa_supplicant /home/xxx/esp/esp-idf/components/xtensa
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/xxx/Project/esp32/blink/build

     

    show-efuse-table

       : efuse table 표시

    더보기
    [1/1] cd /home/xxx/Project/esp32/blink/build/esp-idf/efuse && 
             /home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python 
                  /home/xxx/esp/esp-idf/components/efuse/efuse_table_gen.py 
                  /home/xxx/esp/esp-idf/components/efuse/esp32s3/esp_efuse_table.csv 
                  -t esp32s3 --max_blk_len 256 --info
    Parsing efuse CSV input file /home/xxx/esp/esp-idf/components/efuse/esp32s3/esp_efuse_table.csv ...
    Verifying efuse table...
    Max number of bits in BLK 256
    Sorted efuse table:
    # 	field_name                     	efuse_block 	bit_start 	bit_count
    1 	WR_DIS                         	EFUSE_BLK0 	   0     	   32   
    2 	WR_DIS.RD_DIS                  	EFUSE_BLK0 	   0     	   1    
    3 	WR_DIS.DIS_ICACHE              	EFUSE_BLK0 	   2     	   1    
    4 	WR_DIS.DIS_DCACHE              	EFUSE_BLK0 	   2     	   1    
    5 	WR_DIS.DIS_DOWNLOAD_ICACHE     	EFUSE_BLK0 	   2     	   1    
    6 	WR_DIS.DIS_DOWNLOAD_DCACHE     	EFUSE_BLK0 	   2     	   1    
    7 	WR_DIS.DIS_FORCE_DOWNLOAD      	EFUSE_BLK0 	   2     	   1    
    8 	WR_DIS.DIS_USB_OTG             	EFUSE_BLK0 	   2     	   1    
    9 	WR_DIS.DIS_TWAI                	EFUSE_BLK0 	   2     	   1    
    10 	WR_DIS.DIS_APP_CPU             	EFUSE_BLK0 	   2     	   1    
    11 	WR_DIS.DIS_PAD_JTAG            	EFUSE_BLK0 	   2     	   1    
    12 	WR_DIS.DIS_DOWNLOAD_MANUAL_ENCRYPT 	EFUSE_BLK0 	   2     	   1    
    13 	WR_DIS.DIS_USB_JTAG            	EFUSE_BLK0 	   2     	   1    
    14 	WR_DIS.DIS_USB_SERIAL_JTAG     	EFUSE_BLK0 	   2     	   1    
    15 	WR_DIS.STRAP_JTAG_SEL          	EFUSE_BLK0 	   2     	   1    
    16 	WR_DIS.USB_PHY_SEL             	EFUSE_BLK0 	   2     	   1    
    17 	WR_DIS.VDD_SPI_XPD             	EFUSE_BLK0 	   3     	   1    
    18 	WR_DIS.VDD_SPI_TIEH            	EFUSE_BLK0 	   3     	   1    
    19 	WR_DIS.VDD_SPI_FORCE           	EFUSE_BLK0 	   3     	   1    
    20 	WR_DIS.WDT_DELAY_SEL           	EFUSE_BLK0 	   3     	   1    
    21 	WR_DIS.SPI_BOOT_CRYPT_CNT      	EFUSE_BLK0 	   4     	   1    
    22 	WR_DIS.SECURE_BOOT_KEY_REVOKE0 	EFUSE_BLK0 	   5     	   1    
    23 	WR_DIS.SECURE_BOOT_KEY_REVOKE1 	EFUSE_BLK0 	   6     	   1    
    24 	WR_DIS.SECURE_BOOT_KEY_REVOKE2 	EFUSE_BLK0 	   7     	   1    
    25 	WR_DIS.KEY_PURPOSE_0           	EFUSE_BLK0 	   8     	   1    
    26 	WR_DIS.KEY_PURPOSE_1           	EFUSE_BLK0 	   9     	   1    
    27 	WR_DIS.KEY_PURPOSE_2           	EFUSE_BLK0 	   10    	   1    
    28 	WR_DIS.KEY_PURPOSE_3           	EFUSE_BLK0 	   11    	   1    
    29 	WR_DIS.KEY_PURPOSE_4           	EFUSE_BLK0 	   12    	   1    
    30 	WR_DIS.KEY_PURPOSE_5           	EFUSE_BLK0 	   13    	   1    
    31 	WR_DIS.SECURE_BOOT_EN          	EFUSE_BLK0 	   15    	   1    
    32 	WR_DIS.SECURE_BOOT_AGGRESSIVE_REVOKE 	EFUSE_BLK0 	   16    	   1    
    33 	WR_DIS.FLASH_TPUW              	EFUSE_BLK0 	   18    	   1    
    34 	WR_DIS.DIS_DOWNLOAD_MODE       	EFUSE_BLK0 	   18    	   1    
    35 	WR_DIS.DIS_DIRECT_BOOT         	EFUSE_BLK0 	   18    	   1    
    36 	WR_DIS.DIS_USB_SERIAL_JTAG_ROM_PRINT 	EFUSE_BLK0 	   18    	   1    
    37 	WR_DIS.FLASH_ECC_MODE          	EFUSE_BLK0 	   18    	   1    
    38 	WR_DIS.DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE 	EFUSE_BLK0 	   18    	   1    
    39 	WR_DIS.ENABLE_SECURITY_DOWNLOAD 	EFUSE_BLK0 	   18    	   1    
    40 	WR_DIS.UART_PRINT_CONTROL      	EFUSE_BLK0 	   18    	   1    
    41 	WR_DIS.PIN_POWER_SELECTION     	EFUSE_BLK0 	   18    	   1    
    42 	WR_DIS.FLASH_TYPE              	EFUSE_BLK0 	   18    	   1    
    43 	WR_DIS.FLASH_PAGE_SIZE         	EFUSE_BLK0 	   18    	   1    
    44 	WR_DIS.FLASH_ECC_EN            	EFUSE_BLK0 	   18    	   1    
    45 	WR_DIS.FORCE_SEND_RESUME       	EFUSE_BLK0 	   18    	   1    
    46 	WR_DIS.SECURE_VERSION          	EFUSE_BLK0 	   18    	   1    
    47 	WR_DIS.DIS_USB_OTG_DOWNLOAD_MODE 	EFUSE_BLK0 	   19    	   1    
    48 	WR_DIS.DISABLE_WAFER_VERSION_MAJOR 	EFUSE_BLK0 	   19    	   1    
    49 	WR_DIS.DISABLE_BLK_VERSION_MAJOR 	EFUSE_BLK0 	   19    	   1    
    50 	WR_DIS.BLK1                    	EFUSE_BLK0 	   20    	   1    
    51 	WR_DIS.MAC                     	EFUSE_BLK0 	   20    	   1    
    52 	WR_DIS.SPI_PAD_CONFIG_CLK      	EFUSE_BLK0 	   20    	   1    
    53 	WR_DIS.SPI_PAD_CONFIG_Q        	EFUSE_BLK0 	   20    	   1    
    54 	WR_DIS.SPI_PAD_CONFIG_D        	EFUSE_BLK0 	   20    	   1    
    55 	WR_DIS.SPI_PAD_CONFIG_CS       	EFUSE_BLK0 	   20    	   1    
    56 	WR_DIS.SPI_PAD_CONFIG_HD       	EFUSE_BLK0 	   20    	   1    
    57 	WR_DIS.SPI_PAD_CONFIG_WP       	EFUSE_BLK0 	   20    	   1    
    58 	WR_DIS.SPI_PAD_CONFIG_DQS      	EFUSE_BLK0 	   20    	   1    
    59 	WR_DIS.SPI_PAD_CONFIG_D4       	EFUSE_BLK0 	   20    	   1    
    60 	WR_DIS.SPI_PAD_CONFIG_D5       	EFUSE_BLK0 	   20    	   1    
    61 	WR_DIS.SPI_PAD_CONFIG_D6       	EFUSE_BLK0 	   20    	   1    
    62 	WR_DIS.SPI_PAD_CONFIG_D7       	EFUSE_BLK0 	   20    	   1    
    63 	WR_DIS.WAFER_VERSION_MINOR_LO  	EFUSE_BLK0 	   20    	   1    
    64 	WR_DIS.PKG_VERSION             	EFUSE_BLK0 	   20    	   1    
    65 	WR_DIS.BLK_VERSION_MINOR       	EFUSE_BLK0 	   20    	   1    
    66 	WR_DIS.FLASH_CAP               	EFUSE_BLK0 	   20    	   1    
    67 	WR_DIS.FLASH_TEMP              	EFUSE_BLK0 	   20    	   1    
    68 	WR_DIS.FLASH_VENDOR            	EFUSE_BLK0 	   20    	   1    
    69 	WR_DIS.PSRAM_CAP               	EFUSE_BLK0 	   20    	   1    
    70 	WR_DIS.PSRAM_TEMP              	EFUSE_BLK0 	   20    	   1    
    71 	WR_DIS.PSRAM_VENDOR            	EFUSE_BLK0 	   20    	   1    
    72 	WR_DIS.K_RTC_LDO               	EFUSE_BLK0 	   20    	   1    
    73 	WR_DIS.K_DIG_LDO               	EFUSE_BLK0 	   20    	   1    
    74 	WR_DIS.V_RTC_DBIAS20           	EFUSE_BLK0 	   20    	   1    
    75 	WR_DIS.V_DIG_DBIAS20           	EFUSE_BLK0 	   20    	   1    
    76 	WR_DIS.DIG_DBIAS_HVT           	EFUSE_BLK0 	   20    	   1    
    77 	WR_DIS.WAFER_VERSION_MINOR_HI  	EFUSE_BLK0 	   20    	   1    
    78 	WR_DIS.WAFER_VERSION_MAJOR     	EFUSE_BLK0 	   20    	   1    
    79 	WR_DIS.ADC2_CAL_VOL_ATTEN3     	EFUSE_BLK0 	   20    	   1    
    80 	WR_DIS.SYS_DATA_PART1          	EFUSE_BLK0 	   21    	   1    
    81 	WR_DIS.OPTIONAL_UNIQUE_ID      	EFUSE_BLK0 	   21    	   1    
    82 	WR_DIS.BLK_VERSION_MAJOR       	EFUSE_BLK0 	   21    	   1    
    83 	WR_DIS.TEMP_CALIB              	EFUSE_BLK0 	   21    	   1    
    84 	WR_DIS.OCODE                   	EFUSE_BLK0 	   21    	   1    
    85 	WR_DIS.ADC1_INIT_CODE_ATTEN0   	EFUSE_BLK0 	   21    	   1    
    86 	WR_DIS.ADC1_INIT_CODE_ATTEN1   	EFUSE_BLK0 	   21    	   1    
    87 	WR_DIS.ADC1_INIT_CODE_ATTEN2   	EFUSE_BLK0 	   21    	   1    
    88 	WR_DIS.ADC1_INIT_CODE_ATTEN3   	EFUSE_BLK0 	   21    	   1    
    89 	WR_DIS.ADC2_INIT_CODE_ATTEN0   	EFUSE_BLK0 	   21    	   1    
    90 	WR_DIS.ADC2_INIT_CODE_ATTEN1   	EFUSE_BLK0 	   21    	   1    
    91 	WR_DIS.ADC2_INIT_CODE_ATTEN2   	EFUSE_BLK0 	   21    	   1    
    92 	WR_DIS.ADC2_INIT_CODE_ATTEN3   	EFUSE_BLK0 	   21    	   1    
    93 	WR_DIS.ADC1_CAL_VOL_ATTEN0     	EFUSE_BLK0 	   21    	   1    
    94 	WR_DIS.ADC1_CAL_VOL_ATTEN1     	EFUSE_BLK0 	   21    	   1    
    95 	WR_DIS.ADC1_CAL_VOL_ATTEN2     	EFUSE_BLK0 	   21    	   1    
    96 	WR_DIS.ADC1_CAL_VOL_ATTEN3     	EFUSE_BLK0 	   21    	   1    
    97 	WR_DIS.ADC2_CAL_VOL_ATTEN0     	EFUSE_BLK0 	   21    	   1    
    98 	WR_DIS.ADC2_CAL_VOL_ATTEN1     	EFUSE_BLK0 	   21    	   1    
    99 	WR_DIS.ADC2_CAL_VOL_ATTEN2     	EFUSE_BLK0 	   21    	   1    
    100 	WR_DIS.BLOCK_USR_DATA          	EFUSE_BLK0 	   22    	   1    
    101 	WR_DIS.CUSTOM_MAC              	EFUSE_BLK0 	   22    	   1    
    102 	WR_DIS.BLOCK_KEY0              	EFUSE_BLK0 	   23    	   1    
    103 	WR_DIS.BLOCK_KEY1              	EFUSE_BLK0 	   24    	   1    
    104 	WR_DIS.BLOCK_KEY2              	EFUSE_BLK0 	   25    	   1    
    105 	WR_DIS.BLOCK_KEY3              	EFUSE_BLK0 	   26    	   1    
    106 	WR_DIS.BLOCK_KEY4              	EFUSE_BLK0 	   27    	   1    
    107 	WR_DIS.BLOCK_KEY5              	EFUSE_BLK0 	   28    	   1    
    108 	WR_DIS.BLOCK_SYS_DATA2         	EFUSE_BLK0 	   29    	   1    
    109 	WR_DIS.USB_EXCHG_PINS          	EFUSE_BLK0 	   30    	   1    
    110 	WR_DIS.USB_EXT_PHY_ENABLE      	EFUSE_BLK0 	   30    	   1    
    111 	WR_DIS.SOFT_DIS_JTAG           	EFUSE_BLK0 	   31    	   1    
    112 	RD_DIS                         	EFUSE_BLK0 	   32    	   7    
    113 	RD_DIS.BLOCK_KEY0              	EFUSE_BLK0 	   32    	   1    
    114 	RD_DIS.BLOCK_KEY1              	EFUSE_BLK0 	   33    	   1    
    115 	RD_DIS.BLOCK_KEY2              	EFUSE_BLK0 	   34    	   1    
    116 	RD_DIS.BLOCK_KEY3              	EFUSE_BLK0 	   35    	   1    
    117 	RD_DIS.BLOCK_KEY4              	EFUSE_BLK0 	   36    	   1    
    118 	RD_DIS.BLOCK_KEY5              	EFUSE_BLK0 	   37    	   1    
    119 	RD_DIS.BLOCK_SYS_DATA2         	EFUSE_BLK0 	   38    	   1    
    120 	DIS_ICACHE                     	EFUSE_BLK0 	   40    	   1    
    121 	DIS_DCACHE                     	EFUSE_BLK0 	   41    	   1    
    122 	DIS_DOWNLOAD_ICACHE            	EFUSE_BLK0 	   42    	   1    
    123 	DIS_DOWNLOAD_DCACHE            	EFUSE_BLK0 	   43    	   1    
    124 	DIS_FORCE_DOWNLOAD             	EFUSE_BLK0 	   44    	   1    
    125 	DIS_USB_OTG                    	EFUSE_BLK0 	   45    	   1    
    126 	DIS_TWAI                       	EFUSE_BLK0 	   46    	   1    
    127 	DIS_APP_CPU                    	EFUSE_BLK0 	   47    	   1    
    128 	SOFT_DIS_JTAG                  	EFUSE_BLK0 	   48    	   3    
    129 	DIS_PAD_JTAG                   	EFUSE_BLK0 	   51    	   1    
    130 	DIS_DOWNLOAD_MANUAL_ENCRYPT    	EFUSE_BLK0 	   52    	   1    
    131 	USB_EXCHG_PINS                 	EFUSE_BLK0 	   57    	   1    
    132 	USB_EXT_PHY_ENABLE             	EFUSE_BLK0 	   58    	   1    
    133 	VDD_SPI_XPD                    	EFUSE_BLK0 	   68    	   1    
    134 	VDD_SPI_TIEH                   	EFUSE_BLK0 	   69    	   1    
    135 	VDD_SPI_FORCE                  	EFUSE_BLK0 	   70    	   1    
    136 	WDT_DELAY_SEL                  	EFUSE_BLK0 	   80    	   2    
    137 	SPI_BOOT_CRYPT_CNT             	EFUSE_BLK0 	   82    	   3    
    138 	SECURE_BOOT_KEY_REVOKE0        	EFUSE_BLK0 	   85    	   1    
    139 	SECURE_BOOT_KEY_REVOKE1        	EFUSE_BLK0 	   86    	   1    
    140 	SECURE_BOOT_KEY_REVOKE2        	EFUSE_BLK0 	   87    	   1    
    141 	KEY_PURPOSE_0                  	EFUSE_BLK0 	   88    	   4    
    142 	KEY_PURPOSE_1                  	EFUSE_BLK0 	   92    	   4    
    143 	KEY_PURPOSE_2                  	EFUSE_BLK0 	   96    	   4    
    144 	KEY_PURPOSE_3                  	EFUSE_BLK0 	  100    	   4    
    145 	KEY_PURPOSE_4                  	EFUSE_BLK0 	  104    	   4    
    146 	KEY_PURPOSE_5                  	EFUSE_BLK0 	  108    	   4    
    147 	SECURE_BOOT_EN                 	EFUSE_BLK0 	  116    	   1    
    148 	SECURE_BOOT_AGGRESSIVE_REVOKE  	EFUSE_BLK0 	  117    	   1    
    149 	DIS_USB_JTAG                   	EFUSE_BLK0 	  118    	   1    
    150 	DIS_USB_SERIAL_JTAG            	EFUSE_BLK0 	  119    	   1    
    151 	STRAP_JTAG_SEL                 	EFUSE_BLK0 	  120    	   1    
    152 	USB_PHY_SEL                    	EFUSE_BLK0 	  121    	   1    
    153 	FLASH_TPUW                     	EFUSE_BLK0 	  124    	   4    
    154 	DIS_DOWNLOAD_MODE              	EFUSE_BLK0 	  128    	   1    
    155 	DIS_DIRECT_BOOT                	EFUSE_BLK0 	  129    	   1    
    156 	DIS_USB_SERIAL_JTAG_ROM_PRINT  	EFUSE_BLK0 	  130    	   1    
    157 	FLASH_ECC_MODE                 	EFUSE_BLK0 	  131    	   1    
    158 	DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE 	EFUSE_BLK0 	  132    	   1    
    159 	ENABLE_SECURITY_DOWNLOAD       	EFUSE_BLK0 	  133    	   1    
    160 	UART_PRINT_CONTROL             	EFUSE_BLK0 	  134    	   2    
    161 	PIN_POWER_SELECTION            	EFUSE_BLK0 	  136    	   1    
    162 	FLASH_TYPE                     	EFUSE_BLK0 	  137    	   1    
    163 	FLASH_PAGE_SIZE                	EFUSE_BLK0 	  138    	   2    
    164 	FLASH_ECC_EN                   	EFUSE_BLK0 	  140    	   1    
    165 	FORCE_SEND_RESUME              	EFUSE_BLK0 	  141    	   1    
    166 	SECURE_VERSION                 	EFUSE_BLK0 	  142    	   16   
    167 	DIS_USB_OTG_DOWNLOAD_MODE      	EFUSE_BLK0 	  159    	   1    
    168 	DISABLE_WAFER_VERSION_MAJOR    	EFUSE_BLK0 	  160    	   1    
    169 	DISABLE_BLK_VERSION_MAJOR      	EFUSE_BLK0 	  161    	   1    
    170 	MAC                            	EFUSE_BLK1 	   0     	   8    
    171 	MAC                            	EFUSE_BLK1 	   8     	   8    
    172 	MAC                            	EFUSE_BLK1 	   16    	   8    
    173 	MAC                            	EFUSE_BLK1 	   24    	   8    
    174 	MAC                            	EFUSE_BLK1 	   32    	   8    
    175 	MAC                            	EFUSE_BLK1 	   40    	   8    
    176 	SPI_PAD_CONFIG_CLK             	EFUSE_BLK1 	   48    	   6    
    177 	SPI_PAD_CONFIG_Q               	EFUSE_BLK1 	   54    	   6    
    178 	SPI_PAD_CONFIG_D               	EFUSE_BLK1 	   60    	   6    
    179 	SPI_PAD_CONFIG_CS              	EFUSE_BLK1 	   66    	   6    
    180 	SPI_PAD_CONFIG_HD              	EFUSE_BLK1 	   72    	   6    
    181 	SPI_PAD_CONFIG_WP              	EFUSE_BLK1 	   78    	   6    
    182 	SPI_PAD_CONFIG_DQS             	EFUSE_BLK1 	   84    	   6    
    183 	SPI_PAD_CONFIG_D4              	EFUSE_BLK1 	   90    	   6    
    184 	SPI_PAD_CONFIG_D5              	EFUSE_BLK1 	   96    	   6    
    185 	SPI_PAD_CONFIG_D6              	EFUSE_BLK1 	  102    	   6    
    186 	SPI_PAD_CONFIG_D7              	EFUSE_BLK1 	  108    	   6    
    187 	WAFER_VERSION_MINOR_LO         	EFUSE_BLK1 	  114    	   3    
    188 	PKG_VERSION                    	EFUSE_BLK1 	  117    	   3    
    189 	BLK_VERSION_MINOR              	EFUSE_BLK1 	  120    	   3    
    190 	FLASH_CAP                      	EFUSE_BLK1 	  123    	   3    
    191 	FLASH_TEMP                     	EFUSE_BLK1 	  126    	   2    
    192 	FLASH_VENDOR                   	EFUSE_BLK1 	  128    	   3    
    193 	PSRAM_CAP                      	EFUSE_BLK1 	  131    	   2    
    194 	PSRAM_TEMP                     	EFUSE_BLK1 	  133    	   2    
    195 	PSRAM_VENDOR                   	EFUSE_BLK1 	  135    	   2    
    196 	K_RTC_LDO                      	EFUSE_BLK1 	  141    	   7    
    197 	K_DIG_LDO                      	EFUSE_BLK1 	  148    	   7    
    198 	V_RTC_DBIAS20                  	EFUSE_BLK1 	  155    	   8    
    199 	V_DIG_DBIAS20                  	EFUSE_BLK1 	  163    	   8    
    200 	DIG_DBIAS_HVT                  	EFUSE_BLK1 	  171    	   5    
    201 	WAFER_VERSION_MINOR_HI         	EFUSE_BLK1 	  183    	   1    
    202 	WAFER_VERSION_MAJOR            	EFUSE_BLK1 	  184    	   2    
    203 	ADC2_CAL_VOL_ATTEN3            	EFUSE_BLK1 	  186    	   6    
    204 	SYS_DATA_PART2                 	EFUSE_BLK10 	   0     	  256   
    205 	OPTIONAL_UNIQUE_ID             	EFUSE_BLK2 	   0     	  128   
    206 	BLK_VERSION_MAJOR              	EFUSE_BLK2 	  128    	   2    
    207 	TEMP_CALIB                     	EFUSE_BLK2 	  132    	   9    
    208 	OCODE                          	EFUSE_BLK2 	  141    	   8    
    209 	ADC1_INIT_CODE_ATTEN0          	EFUSE_BLK2 	  149    	   8    
    210 	ADC1_INIT_CODE_ATTEN1          	EFUSE_BLK2 	  157    	   6    
    211 	ADC1_INIT_CODE_ATTEN2          	EFUSE_BLK2 	  163    	   6    
    212 	ADC1_INIT_CODE_ATTEN3          	EFUSE_BLK2 	  169    	   6    
    213 	ADC2_INIT_CODE_ATTEN0          	EFUSE_BLK2 	  175    	   8    
    214 	ADC2_INIT_CODE_ATTEN1          	EFUSE_BLK2 	  183    	   6    
    215 	ADC2_INIT_CODE_ATTEN2          	EFUSE_BLK2 	  189    	   6    
    216 	ADC2_INIT_CODE_ATTEN3          	EFUSE_BLK2 	  195    	   6    
    217 	ADC1_CAL_VOL_ATTEN0            	EFUSE_BLK2 	  201    	   8    
    218 	ADC1_CAL_VOL_ATTEN1            	EFUSE_BLK2 	  209    	   8    
    219 	ADC1_CAL_VOL_ATTEN2            	EFUSE_BLK2 	  217    	   8    
    220 	ADC1_CAL_VOL_ATTEN3            	EFUSE_BLK2 	  225    	   8    
    221 	ADC2_CAL_VOL_ATTEN0            	EFUSE_BLK2 	  233    	   8    
    222 	ADC2_CAL_VOL_ATTEN1            	EFUSE_BLK2 	  241    	   7    
    223 	ADC2_CAL_VOL_ATTEN2            	EFUSE_BLK2 	  248    	   7    
    224 	USER_DATA                      	EFUSE_BLK3 	   0     	  256   
    225 	USER_DATA.MAC_CUSTOM           	EFUSE_BLK3 	  200    	   48   
    226 	KEY0                           	EFUSE_BLK4 	   0     	  256   
    227 	KEY1                           	EFUSE_BLK5 	   0     	  256   
    228 	KEY2                           	EFUSE_BLK6 	   0     	  256   
    229 	KEY3                           	EFUSE_BLK7 	   0     	  256   
    230 	KEY4                           	EFUSE_BLK8 	   0     	  256   
    231 	KEY5                           	EFUSE_BLK9 	   0     	  256   
    
    Used bits in efuse table:
    EFUSE_BLK0 
    [0 31] [0 0] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] [2 2] 
    [2 3] [3 3] [3 3] [3 13] [15 16] [18 18] [18 18] [18 18] [18 18] [18 18] [18 18] [18 18] 
    [18 18] [18 18] [18 18] [18 18] [18 18] [18 18] [18 19] [19 19] [19 20] [20 20] [20 20] 
    [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] 
    [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] [20 20] 
    [20 20] [20 20] [20 20] [20 20] [20 21] [21 21] [21 21] [21 21] [21 21] [21 21] [21 21] 
    [21 21] [21 21] [21 21] [21 21] [21 21] [21 21] [21 21] [21 21] [21 21] [21 21] [21 21] 
    [21 21] [21 22] [22 30] [30 38] [32 38] [40 52] [57 58] [68 70] [80 111] [116 121] [124 157] 
    [159 161] 
    
    EFUSE_BLK1 
    [0 136] [141 175] [183 191] 
    
    EFUSE_BLK10 
    [0 255] 
    
    EFUSE_BLK2 
    [0 129] [132 254] 
    
    EFUSE_BLK3 
    [0 255] [200 247] 
    
    EFUSE_BLK4 
    [0 255] 
    
    EFUSE_BLK5 
    [0 255] 
    
    EFUSE_BLK6 
    [0 255] 
    
    EFUSE_BLK7 
    [0 255] 
    
    EFUSE_BLK8 
    [0 255] 
    
    EFUSE_BLK9 
    [0 255] 
    
    Note: Not printed ranges are free for using. (bits in EFUSE_BLK0 are reserved for Espressif)

     

    size-components

         : 각각의 컴퍼넌트 크기 정보 표시

    더보기
    $ idf.py size-components
    Executing action: size-components
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja all"...
    [1/4] cd /home/xxx/Project/esp32/myApp1/myApp1/build/myApp1.bin
    myApp1.bin binary size 0xfc3d0 bytes. 
    Smallest app partition is 0x180000 bytes. 0x83c30 bytes (34%) free.
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
    Bootloader binary size 0x5430 bytes. 
    0x2bd0 bytes (34%) free.
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja size-components"...
    [0/1] cd /home/xxx/Project/esp32/myApp1/build && /usr/bin/cmake 
            -D "IDF_SIZE_TOOL=/..../python_env/idf5.2_py3.10_env/bin/python;-m;esp_idf_size" 
            -D IDF_SIZE_MODE=--archives 
            -D MAP_FILE=/home/xxx/Project/esp32/myApp1/build/myApp1.map 
            -D OUTPUT_JSON= -P /home/xxx/esp/esp-idf/tools/cmake/run_size_tool.cmake
    Total sizes:
    Used stat D/IRAM:  102472 bytes ( 349640 remain, 22.7% used)
          .data size:    9464 bytes
          .bss  size:   19912 bytes
          .text size:   73096 bytes
    Used Flash size :  950510 bytes
               .text:  758926 bytes
             .rodata:  188744 bytes
    Total image size: 1033070 bytes (.bin may be padded larger)
    Per-archive contributions to ELF file:
                Archive File DRAM .data & 0.bss .eh_frame IRAM0 .text ram_st_total Flash .text & .rodata & .appdesc flash_total
                     libbt.a        142   13963         0        3192        17297      371096     19991          0      394421
                libble_app.a        139     529         0       15260        15928      166810      6796          0      189005
                libpthread.a          0      12         0           0           12        1254    117256          0      118510
             libmbedcrypto.a        156     200         0          86          442       43780     30754          0       74776
                 libspiffs.a          0      12         0           0           12       33526       321          0       33847
         libesp_hw_support.a       3159     124         0        7040        10323       18682      1632          0       30513
                    libphy.a        899      44         0        4272         5215       19520         0          0       24691
                 libdriver.a         68      13         0           0           81       17178      1034          0       18280
                    libhal.a        338      12         0        7536         7886        7344       367          0       15585
              libnvs_flash.a          0      24         0           0           24       14940       248          0       15188
               libfreertos.a         88    2240         0       12146        14474         800      1102          0       14136
                   libmain.a       1023    1095         0           0         2118       12480       531          0       14034
             libesp_system.a         92     134         0        2042         2268        7912       443          0       10489
                    libvfs.a        304      72         0           0          376        9406       633          0       10343
              libspi_flash.a        783      14         0        7798         8595        1042       355          0        9978
                 libstdc++.a         12      49      2580           0           61        3514       553          0        6659
                      libc.a        260     320         0           0          580        5724       257          0        6241
            libesp_ringbuf.a          0       0         0        5334         5334           0       557          0        5891
                libcoexist.a       1372      62         0           0         1434        3296        40          0        4708
                   libbtbb.a          0       0         0           0            0        4702         0          0        4702
                 libnewlib.a        156     200         0        1822         2178        1478        95          0        3551
                   libheap.a         12       8         0        1052         1072        2024       405          0        3493
                 libesp_mm.a          4      44         0         354          402        2948       166          0        3472
              libesp_timer.a         16      36         0        1682         1734        1684        82          0        3464
                libesp_phy.a          0      33         0          56           89        2702       284          0        3042
          libesp_partition.a          0       8         0           0            8        2010       168          0        2178
             libesp_common.a          0       0         0           0            0          58      1734          0        1792
                  libefuse.a         48       4         0           0           52        1196       177          0        1421
                libesp_rom.a          0       0         0        1324         1324           0        45          0        1369
                    liblog.a          8     272         0         262          542        1044        21          0        1335
                    libsoc.a          0       0         0         268          268           0       880          0        1148
                  libriscv.a          0     256         0         764         1020         130        50          0         944
     libbootloader_support.a          0       0         0         706          706          52        40          0         798
         libesp_app_format.a          0      17         0           0           17         202         4        256         462
               libesp_coex.a         72       0         0          98          170         124         0          0         294
             libapp_update.a          0       4         0           0            4         196        30          0         226
                    libcxx.a          0       0         0           0            0          54         0          0          54
       libnvs_sec_provider.a          0       0         0           0            0           2         0          0           2
                    libgcc.a          0       0         0           0            0           0         0          0           0

     

    size-files

      : 각각의 소스파일 크기정보 출력

    더보기
    e$ idf.py size-files
    Executing action: size-files
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja all"...
    [1/4] cd /home/xxx/Project/esp32/uc5...32/myApp1/build/myApp1.bin
    myApp1.bin binary size 0xfc3d0 bytes. Smallest app partition is 0x180000 bytes. 
    0x83c30 bytes (34%) free.
    [1/1] cd /home/xxx/Project/esp32/myApp1/build/bootloader/bootloader.bin
    Bootloader binary size 0x5430 bytes. 0x2bd0 bytes (34%) free.
    Running ninja in directory /home/xxx/Project/esp32/myApp1/build
    Executing "ninja size-files"...
    [0/1] cd /home/xx/Project/esp32/myApp1/build && /usr/bin/cmake 
        -D "IDF_SIZE_TOOL=/....../python_env/idf5.2_py3.10_env/bin/python;-m;esp_idf_size" 
        -D IDF_SIZE_MODE=--files 
        -D MAP_FILE=/home/xxx/Project/esp32/myApp1/build/myApp1.map 
        -D OUTPUT_JSON= -P /home/xxx/esp/esp-idf/tools/cmake/run_size_tool.cmake
    Total sizes:
    Used stat D/IRAM:  102472 bytes ( 349640 remain, 22.7% used)
          .data size:    9464 bytes
          .bss  size:   19912 bytes
          .text size:   73096 bytes
    Used Flash size :  950510 bytes
               .text:  758926 bytes
             .rodata:  188744 bytes
    Total image size: 1033070 bytes (.bin may be padded larger)
    Per-file contributions to ELF file:
                 Object File DRAM .data & 0.bss .eh_frame IRAM0 .text ram_st_total Flash .text & .rodata & .appdesc flash_total
               pthread.c.obj          0       8         0           0            8         626    117210          0      117836
            ecp_curves.c.obj         28       0         0           0           28        5738     29512          0       35278
             ble_lll_adv.c.o          4       0         0           0            4       24190      1037          0       25231
           btm_ble_gap.c.obj          0      50         0           0           50       17026       537          0       17563
            bta_dm_act.c.obj          0       0         0           0            0       16118      1140          0       17258
               btm_sec.c.obj          0       0         0           0            0       15026       159          0       15185
           btc_gap_ble.c.obj          0      96         0           0           96       12324      1678          0       14002
            ble_lll_scan.c.o          0      10         0        1602         1612       11012       421          0       13035
                  uart.c.obj         32      13         0           0           45       12528       466          0       13026
              ble_ll_adv.c.o          0       4         0           0            4       12140       461          0       12601
             ble_ll_scan.c.o          0      12         0         374          386       11800       403          0       12577
             ble_ll_ctrl.c.o          0       0         0           0            0       11772       294          0       12066
        spiffs_nucleus.c.obj          0       0         0           0            0       12052         0          0       12052
         btm_ble_5_gap.c.obj          0     225         0           0          225       10464       754          0       11218
            ble_lll_conn.c.o          1       0         0        1012         1013        9442       218          0       10673
             ble_ll_conn.c.o          0       4         0          70           74       10212       114          0       10396
         bta_gattc_act.c.obj          0       0         0           0            0       10196       147          0       10343
               btm_ble.c.obj          0       1         0           0            1        9854       195          0       10049
            bta_dm_api.c.obj          0       0         0           0            0        9326       660          0        9986
            gatt_utils.c.obj          0      52         0           0           52        9630        32          0        9662
               gatt_sr.c.obj          0       0         0           0            0        9330       131          0        9461
        uc500_cmd_task.c.obj         13     879         0           0          892        9060        58          0        9131
        ~~ 중략 ~~
      
                    del_op.o          0       0        24           0            0           8         0          0          32
      esp_memory_utils.c.obj          0       0         0          30           30           0         0          0          30
      esp_rom_systimer.c.obj          0       0         0          30           30           0         0          0          30
            mpi_periph.c.obj          0       0         0           0            0           0        28          0          28
                   del_ops.o          0       0        24           0            0           4         0          0          28
                  del_opvs.o          0       0        24           0            0           4         0          0          28
              eh_exception.o          0       0        24           0            0           2         0          0          26
                   new_opv.o          0       0        24           0            0           2         0          0          26
          libc_a-sysunlink.o          0       0         0           0            0          24         0          0          24
      esp_gpio_reserve.c.obj          0       8         0          24           32           0         0          0          24
              systimer.c.obj          0       0         0          24           24           0         0          0          24
        ext_mem_layout.c.obj          0       0         0           0            0           0        24          0          24
    esp_timer_impl_common.c.         16       0         0           8           24           0         0          0          24
     esp_aes_gdma_impl.c.obj          0       0         0           0            0          24         0          0          24
        bootloader_mem.c.obj          0       0         0           0            0          20         0          0          20
              libc_a-errno.o          0       0         0           0            0          18         0          0          18
     esp_sha_gdma_impl.c.obj          0       0         0           0            0          18         0          0          18
        hash_functions.c.obj          0       0         0           0            0          16         0          0          16
         flash_encrypt.c.obj          0       0         0          14           14           0         0          0          14
       bta_gatt_common.c.obj          0       0         0           0            0          14         0          0          14
    spi_flash_chip_drivers.c         12       0         0           0           12           0         0          0          12
       esp_system_chip.c.obj          0       0         0           8            8           0         0          0           8
               pthread.c.obj          0       0         0           0            0           6         0          0           6
         os_cputime_pwr2.c.o          0       0         0           4            4           0         0          0           4
            libc_a-environ.o          4       4         0           0            8           0         0          0           4
          spi_bus_lock.c.obj          0       0         0           0            0           0         4          0           4
            rtc_module.c.obj          0       0         0           4            4           0         0          0           4
           eh_term_handler.o          4       0         0           0            4           0         0          0           4
           eh_unex_handler.o          4       0         0           0            4           0         0          0           4
          cxx_guards.cpp.obj          0       0         0           0            0           2         0          0           2
                 ubsan.c.obj          0       0         0           2            2           0         0          0           2
      nvs_sec_provider.c.obj          0       0         0           0            0           2         0          0           2
      pthread_cond_var.c.obj          0       0         0           0            0           2         0          0           2
        pthread_rwlock.c.obj          0       0         0           0            0           2         0          0           2
     pthread_semaphore.c.obj          0       0         0           0            0           2         0          0           2
              stub_funcs.c.o          0      12         0           0           12           0         0          0           0
                   _divdi3.o          0       0         0           0            0           0         0          0           0
                   _moddi3.o          0       0         0           0            0           0         0          0           0
                  _udivdi3.o          0       0         0           0            0           0         0          0           0
                  _umoddi3.o          0       0         0           0            0           0         0          0           0
             bad_array_new.o          0       0         0           0            0           0         0          0           0
                  bad_cast.o          0       0         0           0            0           0         0          0           0
                bad_typeid.o          0       0         0           0            0           0         0          0           0
                    random.o          0       0         0           0            0           0         0          0           0
                sso_string.o          0       0         0           0            0           0         0          0           0
               string-inst.o          0       0         0           0            0           0         0          0           0

     

     

     

    < 기타 >

    ▶ idf.py build 에러

       : esp-idf 5.1.2 에서 5.2  업그레이드 후 발생

    $ idf.py build
    Executing action: all (aliases: build)
    '/home/xxx/.espressif/python_env/idf5.2_py3.10_env/bin/python' 
       is currently active in the environment while the project was configured with 
       '/home/xxx/.espressif/python_env/idf5.1_py3.10_env/bin/python'. 
    Run 'idf.py fullclean' to start again.
    
    $ idf.py fullclean
      >> 이후정상

      

     

    ▶ 옵션

      -p PORT

      : flash / monitor 명령이 실행될 포트 지정

       $ idf.py flash -p /dev/ttyUSBx

     

     -D

    idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.defaults.zb_gw_board" set-target esp32s3 build
    반응형