class my_class
{
public:
int i_var;
int f();
};
int my_class::f()
{
return ++i_var;
}
int main(void)
{
my_class *p_my_class = new my_class();
p_my_class->f();
}
iostream을 추가해서 (아직 uart 출력을 연결하진 않고 빌드만 했지만)
std::cout을 통해 출력만 해보려고 했는데
#include <iostream>
class my_class
{
public:
int i_var;
int f();
};
int my_class::f()
{
return ++i_var;
}
int main(void)
{
my_class *p_my_class = new my_class();
std::cout << p_my_class->f();
}
Namespace and version are optional in the EXAMPLE argument.
Options: -C, --project-dir PATH Project directory. --profile, --service-profile TEXT Specifies the profile to use for this command. By default profile named "default" will be used. Alias "--service-profile" is deprecated and will be removed. The default value can be set with the IDF_COMPONENT_PROFILE environment variable. -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.
C:\Espressif\frameworks\esp-idf-v5.3.1>idf.py help Executing action: help 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: None
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] 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 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. -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. clang-check run clang-tidy check under current folder, write the output into "warnings.txt" clang-html-report generate html report to "html_report" folder by reading "warnings.txt" (may take a few minutes). This feature requires extra dependency "codereport". Please install this by running "pip install codereport" 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 in the ESP 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. merge-bin monitor Display serial output. openocd Run openocd from current path 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 qemu Run QEMU. 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
C:\src\tt>dir C 드라이브의 볼륨에는 이름이 없습니다. 볼륨 일련 번호: 6A30-5BAD
C:\src\tt 디렉터리
2026-02-08 오후 03:04 <DIR> . 2026-02-08 오후 03:04 <DIR> .. 2026-02-08 오후 03:04 <DIR> main 0개 파일 0 바이트 3개 디렉터리 379,272,712,192 바이트 남음
C:\src\tt>cd main
C:\src\tt\main>dir C 드라이브의 볼륨에는 이름이 없습니다. 볼륨 일련 번호: 6A30-5BAD
C:\src\tt\main 디렉터리
2026-02-08 오후 03:04 <DIR> . 2026-02-08 오후 03:04 <DIR> .. 2026-02-08 오후 03:06 652 idf_component.yml 1개 파일 652 바이트 2개 디렉터리 379,272,712,192 바이트 남음
C:\src\tt\main>type idf_component.yml ## IDF Component Manager Manifest File dependencies: espressif/esp_lcd_gc9a01: "^2.0.0" lvgl/lvgl: "^9.*" espressif/esp_lvgl_port: "^2.3.0" ## Required IDF version idf: version: ">=4.1.0" # # Put list of dependencies here # # For components maintained by Espressif: # component: "~1.0.0" # # For 3rd party components: # username/component: ">=1.0.0,<2.0.0" # username2/component2: # version: "~1.0.0" # # For transient dependencies `public` flag can be set. # # `public` flag doesn't have an effect dependencies of the `main` component. # # All dependencies of `main` are public by default. # public: true
C:\src\hello_world>idf.py set-target esp32 Adding "set-target"'s dependency "fullclean" to list of commands with default set of options. Executing action: fullclean Build directory 'C:\src\hello_world\build' not found. Nothing to clean. Executing action: set-target Set Target to: esp32, new sdkconfig will be created. Running cmake in directory C:\src\hello_world\build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\Espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 C:\src\hello_world"... -- Found Git: C:/Espressif/tools/idf-git/2.44.0/cmd/git.exe (found version "2.44.0.windows.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: C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe - 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: C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-g++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git' -- Could not use 'git describe' to determine PROJECT_VER. -- Building ESP-IDF components for target esp32 -- Project sdkconfig file C:/src/hello_world/sdkconfig -- Compiler supported targets: xtensa-esp-elf -- Found Python3: C:/Espressif/python_env/idf5.3_py3.11_env/Scripts/python.exe (found version "3.11.2") found components: Interpreter -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success -- App "hello_world" version: 1 -- Adding linker script C:/src/hello_world/build/esp-idf/esp_system/ld/memory.ld -- Adding linker script C:/src/hello_world/build/esp-idf/esp_system/ld/sections.ld.in -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rom.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.api.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.libgcc.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.newlib-data.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.syscalls.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.newlib-funcs.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/soc/esp32/ld/esp32.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_driver_ana_cmpr esp_driver_cam esp_driver_dac esp_driver_gpio esp_driver_gptimer esp_driver_i2c esp_driver_i2s esp_driver_isp esp_driver_jpeg esp_driver_ledc esp_driver_mcpwm esp_driver_parlio esp_driver_pcnt esp_driver_ppa esp_driver_rmt esp_driver_sdio esp_driver_sdm esp_driver_sdmmc esp_driver_sdspi esp_driver_spi esp_driver_touch_sens esp_driver_tsens esp_driver_uart esp_driver_usb_serial_jtag 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_vfs_console esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 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 ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa -- Component paths: C:/Espressif/frameworks/esp-idf-v5.3.1/components/app_trace C:/Espressif/frameworks/esp-idf-v5.3.1/components/app_update C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.3.1/components/bt C:/Espressif/frameworks/esp-idf-v5.3.1/components/cmock C:/Espressif/frameworks/esp-idf-v5.3.1/components/console C:/Espressif/frameworks/esp-idf-v5.3.1/components/cxx C:/Espressif/frameworks/esp-idf-v5.3.1/components/driver C:/Espressif/frameworks/esp-idf-v5.3.1/components/efuse C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp-tls C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_adc C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_bootloader_format C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_coex C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_common C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_ana_cmpr C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_cam C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_dac C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_gpio C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_gptimer C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_i2c C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_i2s C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_isp C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_jpeg C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_ledc C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_mcpwm C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_parlio C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_pcnt C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_ppa C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_rmt C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_sdio C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_sdm C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_sdmmc C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_sdspi C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_spi C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_touch_sens C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_tsens C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_uart C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_driver_usb_serial_jtag C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_eth C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_event C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_gdbstub C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_hid C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_http_client C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_http_server C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_https_ota C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_https_server C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_lcd C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_local_ctrl C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_mm C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_netif C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_netif_stack C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_partition C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_phy C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_pm C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_psram C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_ringbuf C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_system C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_timer C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_vfs_console C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_wifi C:/Espressif/frameworks/esp-idf-v5.3.1/components/espcoredump C:/Espressif/frameworks/esp-idf-v5.3.1/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.3.1/components/fatfs C:/Espressif/frameworks/esp-idf-v5.3.1/components/freertos C:/Espressif/frameworks/esp-idf-v5.3.1/components/hal C:/Espressif/frameworks/esp-idf-v5.3.1/components/heap C:/Espressif/frameworks/esp-idf-v5.3.1/components/http_parser C:/Espressif/frameworks/esp-idf-v5.3.1/components/idf_test C:/Espressif/frameworks/esp-idf-v5.3.1/components/ieee802154 C:/Espressif/frameworks/esp-idf-v5.3.1/components/json C:/Espressif/frameworks/esp-idf-v5.3.1/components/log C:/Espressif/frameworks/esp-idf-v5.3.1/components/lwip C:/src/hello_world/main C:/Espressif/frameworks/esp-idf-v5.3.1/components/mbedtls C:/Espressif/frameworks/esp-idf-v5.3.1/components/mqtt C:/Espressif/frameworks/esp-idf-v5.3.1/components/newlib C:/Espressif/frameworks/esp-idf-v5.3.1/components/nvs_flash C:/Espressif/frameworks/esp-idf-v5.3.1/components/nvs_sec_provider C:/Espressif/frameworks/esp-idf-v5.3.1/components/openthread C:/Espressif/frameworks/esp-idf-v5.3.1/components/partition_table C:/Espressif/frameworks/esp-idf-v5.3.1/components/perfmon C:/Espressif/frameworks/esp-idf-v5.3.1/components/protobuf-c C:/Espressif/frameworks/esp-idf-v5.3.1/components/protocomm C:/Espressif/frameworks/esp-idf-v5.3.1/components/pthread C:/Espressif/frameworks/esp-idf-v5.3.1/components/sdmmc C:/Espressif/frameworks/esp-idf-v5.3.1/components/soc C:/Espressif/frameworks/esp-idf-v5.3.1/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.3.1/components/spiffs C:/Espressif/frameworks/esp-idf-v5.3.1/components/tcp_transport C:/Espressif/frameworks/esp-idf-v5.3.1/components/ulp C:/Espressif/frameworks/esp-idf-v5.3.1/components/unity C:/Espressif/frameworks/esp-idf-v5.3.1/components/usb C:/Espressif/frameworks/esp-idf-v5.3.1/components/vfs C:/Espressif/frameworks/esp-idf-v5.3.1/components/wear_levelling C:/Espressif/frameworks/esp-idf-v5.3.1/components/wifi_provisioning C:/Espressif/frameworks/esp-idf-v5.3.1/components/wpa_supplicant C:/Espressif/frameworks/esp-idf-v5.3.1/components/xtensa -- Configuring done -- Generating done -- Build files have been written to: C:/src/hello_world/build
C:\src\hello_world>idf.py build Executing action: all (aliases: build) Running ninja in directory C:\src\hello_world\build Executing "ninja all"... [4/966] Generating ../../partition_table/partition-table.bin 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, ******************************************************************************* [452/966] Performing configure step for 'bootloader' -- Found Git: C:/Espressif/tools/idf-git/2.44.0/cmd/git.exe (found version "2.44.0.windows.1") -- 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: C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe - 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: C:/Espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-g++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Building ESP-IDF components for target esp32 -- Project sdkconfig file C:/src/hello_world/sdkconfig -- Compiler supported targets: xtensa-esp-elf -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/soc/esp32/ld/esp32.peripherals.ld -- Bootloader project name: "bootloader" version: 1 -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rom.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.api.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.libgcc.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom/esp32/ld/esp32.rohttp://m.newlib-funcs.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader/subproject/main/ld/esp32/bootloader.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld -- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa -- Component paths: C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.3.1/components/efuse C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_bootloader_format C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_common C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.3.1/components/esp_system C:/Espressif/frameworks/esp-idf-v5.3.1/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.3.1/components/freertos C:/Espressif/frameworks/esp-idf-v5.3.1/components/hal C:/Espressif/frameworks/esp-idf-v5.3.1/components/log C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader/subproject/main C:/Espressif/frameworks/esp-idf-v5.3.1/components/bootloader/subproject/components/micro-ecc C:/Espressif/frameworks/esp-idf-v5.3.1/components/newlib C:/Espressif/frameworks/esp-idf-v5.3.1/components/partition_table C:/Espressif/frameworks/esp-idf-v5.3.1/components/soc C:/Espressif/frameworks/esp-idf-v5.3.1/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.3.1/components/xtensa -- Configuring done -- Generating done -- Build files have been written to: C:/src/hello_world/build/bootloader [107/108] Generating binary image from built executable esptool.py v4.8.1 Creating esp32 image... Merged 2 ELF sections Successfully created esp32 image. Generated C:/src/hello_world/build/bootloader/bootloader.bin [108/108] cmd.exe /C "cd /D C:\src\hello_world\build\bootl...0x1000 C:/src/hello_world/build/bootloader/bootloader.bin" Bootloader binary size 0x6880 bytes. 0x780 bytes (7%) free. [965/966] Generating binary image from built executable esptool.py v4.8.1 Creating esp32 image... Merged 2 ELF sections Successfully created esp32 image. Generated C:/src/hello_world/build/hello_world.bin [966/966] cmd.exe /C "cd /D C:\src\hello_world\build\esp-i...tition-table.bin C:/src/hello_world/build/hello_world.bin" hello_world.bin binary size 0x2b9c0 bytes. Smallest app partition is 0x100000 bytes. 0xd4640 bytes (83%) free.
Project build complete. To flash, run: idf.py flash or idf.py -p PORT flash or python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0x10000 build\hello_world.bin or from the "C:\src\hello_world\build" directory python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash "@flash_args"
C:\src\hello_world>idf.py add-dependency "espressif/esp_lvgl_port^2.3.0" Executing action: add-dependency Created "C:\src\hello_world\main\idf_component.yml" Successfully added dependency "espressif/esp_lvgl_port^2.3.0" to component "main"
C:\src\hello_world>type main\idf_component.yml ## IDF Component Manager Manifest File dependencies: espressif/esp_lvgl_port: "^2.3.0" ## Required IDF version idf: version: ">=4.1.0" # # Put list of dependencies here # # For components maintained by Espressif: # component: "~1.0.0" # # For 3rd party components: # username/component: ">=1.0.0,<2.0.0" # username2/component2: # version: "~1.0.0" # # For transient dependencies `public` flag can be set. # # `public` flag doesn't have an effect dependencies of the `main` component. # # All dependencies of `main` are public by default. # public: true
C:\src\hello_world>type main\idf_component.yml ## IDF Component Manager Manifest File dependencies: lvgl/lvgl: "^8.*" espressif/esp_lvgl_port: "^2.3.0" ## Required IDF version idf: version: ">=4.1.0" # # Put list of dependencies here # # For components maintained by Espressif: # component: "~1.0.0" # # For 3rd party components: # username/component: ">=1.0.0,<2.0.0" # username2/component2: # version: "~1.0.0" # # For transient dependencies `public` flag can be set. # # `public` flag doesn't have an effect dependencies of the `main` component. # # All dependencies of `main` are public by default. # public: true
C:\src\hello_world>type main\idf_component.yml ## IDF Component Manager Manifest File dependencies: espressif/esp_lcd_gc9a01: "^2.0.0" lvgl/lvgl: "^8.*" espressif/esp_lvgl_port: "^2.3.0" ## Required IDF version idf: version: ">=4.1.0" # # Put list of dependencies here # # For components maintained by Espressif: # component: "~1.0.0" # # For 3rd party components: # username/component: ">=1.0.0,<2.0.0" # username2/component2: # version: "~1.0.0" # # For transient dependencies `public` flag can be set. # # `public` flag doesn't have an effect dependencies of the `main` component. # # All dependencies of `main` are public by default. # public: true
C:\src\hello_world>idf.py menuconfig Executing action: menuconfig Running ninja in directory C:\src\hello_world\build Executing "ninja menuconfig"... [0/1] cmd.exe /C "cd /D C:\src\hello_world\build && C:\Esp...ERSION=5.3.1 --output config C:/src/hello_world/sdkconfig"C:/Espressif/frameworks/esp-idf-v5.3.1/Kconfig:15: warning: IDF_ENV_FPGA has 'option env="IDF_ENV_FPGA"', but the environment variable IDF_ENV_FPGA is not set Loaded configuration 'C:/src/hello_world/sdkconfig' No changes to save (for 'C:/src/hello_world/sdkconfig')
+
component config 를 따라가보면 먼가 많긴한데 아쉽게도(?) npm 이나 pip 처럼 먼가 외부 라이브러리 가져오는건 아니고
3.1 Firmware tips and tricks 3.1.1 Common firmware configuration ART configuration The ART Accelerator™ is a memory accelerator which is optimized for STM32 ARM® Cortex™-Mx processors. It balances the inherent performance advantage of the ARM Cortex-Mx over Flash memory technologies, which normally requires the processor to wait for the Flash memory at higher operating frequencies. Thanks to the ART Accelerator™, the CPU can operate up to 120 MHz without wait states, thereby increasing the overall system speed and efficiency. To release the full processor 150 DMIPS performance at this frequency, the accelerator implements an instruction prefetch queue and instruction/data, which enables program execution from Flash memory at up to 120 MHz without wait states.
To avoid extra power consumption it is recommended to configure the ART as follows: /* Disable prefetch buffer */ FLASH->ACR & = ~FLASH_ACR_PRFTEN; /* Enable flash instruction cache */ FLASH->ACR |= FLASH_ACR_ICEN; /* Enable flash data cache */ FLASH->ACR |= FLASH_ACR_DCEN;
The system performance can be adjusted to the current needs. This can be done either from start, according to performance estimations, or on-the-fly on a running system to adjust the performance to the current condition. In this way the prefetch can be enabled or disabled on-the-fly depending on user needs. Disabling the prefetch buffer avoids extra Flash access that consumes 20 mA for 128-bit line fetching.
I read in that document: STMicroelectronics: AN3430 - Application Note of How to achieve the lowest current consumption with STM32F2xx
On page 17 (3.1.1) they say that enabling the buffer prefetch will consume additional 20mA (for 128-bit-line fetching). Maybe at 168 MHz you power supply gets unstable?? Maybe you can try it with lower clock speed (120MHz), where the cpu is very power efficient.