ESP32 S3 아두이노 디버깅.
보스 셋팅(보드 옵션, 파티션 등), 라이브러리 로깅 등의 정보가 필요할 때 사용합니다.
- 보드 옵션.
DebugLevel=verbose
사용한 보드가 DebugLevel 옵션을 지원하는지 체크하는 명령어.
arduino-cli --config-file arduino-cli.yaml board details -b esp32:esp32:esp32s3
esp32:esp32:esp32s3 는 사용할 보드로 변경합니다.
컴파일, sketch.yaml 에 fqbn 부분에 DebugLevel=verbose 을 추가하면 됩니다.
fqbn: esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=cdc,DebugLevel=verbose
아래처럼 상세한 보드 정보가 나오고, 사용하는 라이브러리의 로그도 보입니다.
[2025-11-06 20:48:02] =========== Before Setup Start ===========
[2025-11-06 20:48:02] Chip Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Model : ESP32-S3
[2025-11-06 20:48:02] Package : 0
[2025-11-06 20:48:02] Revision : 0.02
[2025-11-06 20:48:02] Cores : 2
[2025-11-06 20:48:02] CPU Frequency : 240 MHz
[2025-11-06 20:48:02] XTAL Frequency : 4ded Flash : No
[2025-11-06 20:48:02] Embedded PSRAM : No
[2025-11-06 20:48:02] 2.4GHz WiFi : Yes
[2025-11-06 20:48:02] Classic BT : No
[2025-11-06 20:48:02] BT Low Energy : Yes
[2025-11-06 20:48:02] IEEE 802.15.4 : No
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] INTERNAL Memory Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Total Size : 329228 B ( 321.5 KB)
[2025-11-06 20:48:02] Free Bytes : 291004 B ( 284.2 KB)
[2025-11-06 20:48:02] Allocated Bytes : 33016 B ( 32.2 KB)
[2025-11-06 20:48:02] Minimum Free Bytes: 285736 B ( 279.0 KB)
[2025-11-06 20:48:02] Largest Free Block: 233460 B ( 228.0 KB)
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] SPIRAM Memory Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Total Size : 8388608 B (8192.0 KB)
[2025-11-06 20:48:02] Free Bytes : 8375084 B (8178.8 KB)
[2025-11-06 20:48:02] Allocated Bytes : 11132 B ( 10.9 KB)
[2025-11-06 20:48:02] Minimum Free Bytes: 8375084 B (8178.8 KB)
[2025-11-06 20:48:02] Largest Free Block: 8257524 B (8064.0 KB)
[2025-11-06 20:48:02] Bus Mode : OPI
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Flash Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Chip Size : 16777216 B (16 MB)
[2025-11-06 20:48:02] Block Size : 65536 B ( 64.0 KB)
[2025-11-06 20:48:02] Sector Size : 4096 B ( 4.0 KB)
[2025-11-06 20:48:02] Page Size : 256 B ( 0.2 KB)
[2025-11-06 20:48:02] Bus Speed : 80 MHz
[2025-11-06 20:48:02] Flash Frequency : 80 MHz (source: 160 MHz, divider: 2)
[2025-11-06 20:48:02] Bus Mode : QIO
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Partitions Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] otadata : addr: 0x00009000, size: 8.0 KB, type: DATA, subtype: OTA
[2025-11-06 20:48:02] app0 : addr: 0x00010000, size: 5120.0 KB, type: APP, subtype: OTA_0
[2025-11-06 20:48:02] app1 : addr: 0x00510000, size: 5120.0 KB, type: APP, subtype: OTA_1
[2025-11-06 20:48:02] nvs : addr: 0x00A10000, size: 512.0 KB, type: DATA, subtype: NVS
[2025-11-06 20:48:02] spiffs : addr: 0x00A90000, size: 5568.0 KB, type: DATA, subtype: SPIFFS
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Software Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Compile Date/Time : Nov 6 2025 16:28:11
[2025-11-06 20:48:02] Compile Host OS : windows
[2025-11-06 20:48:02] ESP-IDF Version : v5.5.1-418-gf1a1df9b2e
[2025-11-06 20:48:02] Arduino Version : 3.3.3
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Board Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Arduino Board : ESP32S3_DEV
[2025-11-06 20:48:02] Arduino Variant : esp32s3
[2025-11-06 20:48:02] Arduino FQBN : esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PartitionScheme=custom,CPUFreq=240,FlashMode=qio,FlashSize=16M,UploadSpeed=921600,DebugLevel=verbose,PSRAM=opi,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default
[2025-11-06 20:48:02] ============ Before Setup End ============
[2025-11-06 20:48:02] [ 4857][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 44 successfully set to type UART_RX (2) with bus 0x3fc9c2d8
[2025-11-06 20:48:02] [ 4857][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x420246ec
[2025-11-06 20:48:02] [ 4858][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 43 successfully set to type UART_TX (3) with bus 0x3fc9c2d8
[2025-11-06 20:48:02] [ 4858][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x420246b8
[2025-11-06 20:48:02] [ 4859][I][esp32-hal-periman.c:141] perimanSetPinBus(): Pin 19 already has type USB_DM (45) with bus 0x3fca2ffc
[2025-11-06 20:48:02] [ 4859][I][esp32-hal-periman.c:141] perimanSetPinBus(): Pin 20 already has type USB_DP (46) with bus 0x3fca2ffc
[2025-11-06 20:48:02] [INFO] Boot
[2025-11-06 20:48:02] I NimBLEDevice: BLE Host Task Started
[2025-11-06 20:48:02] I NimBLEDevice: NimBle host synced.
[2025-11-06 20:48:02] D NimBLEDevice: Setting bonding: 1, mitm: 0, sc: 1
[2025-11-06 20:48:02] [DBG ] Scan start()
[2025-11-06 20:48:02] D NimBLEScan: >> start: duration=0
[2025-11-06 20:48:02] D NimBLEScan: Scan started
[2025-11-06 20:48:02] D NimBLEScan: << start()
[2025-11-06 20:48:02] =========== After Setup Start ============
[2025-11-06 20:48:02] INTERNAL Memory Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Total Size : 329228 B ( 321.5 KB)
[2025-11-06 20:48:02] Free Bytes : 228088 B ( 222.7 KB)
[2025-11-06 20:48:02] Allocated Bytes : 94740 B ( 92.5 KB)
[2025-11-06 20:48:02] Minimum Free Bytes: 228088 B ( 222.7 KB)
[2025-11-06 20:48:02] Largest Free Block: 184308 B ( 180.0 KB)
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] SPIRAM Memory Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] Total Size : 8388608 B (8192.0 KB)
[2025-11-06 20:48:02] Free Bytes : 8375084 B (8178.8 KB)
[2025-11-06 20:48:02] Allocated Bytes : 11132 B ( 10.9 KB)
[2025-11-06 20:48:02] Minimum Free Bytes: 8375084 B (8178.8 KB)
[2025-11-06 20:48:02] Largest Free Block: 8257524 B (8064.0 KB)
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] GPIO Info:
[2025-11-06 20:48:02] ------------------------------------------
[2025-11-06 20:48:02] GPIO : BUS_TYPE[bus/unit][chan]
[2025-11-06 20:48:02] --------------------------------------
[2025-11-06 20:48:02] 19 : USB_DM
[2025-11-06 20:48:03] 20 : USB_DP
[2025-11-06 20:48:03] 43 : UART_TX[0]
[2025-11-06 20:48:03] 44 : UART_RX[0]
[2025-11-06 20:48:03] ============ After Setup End =============
- 빌드 옵션.
-- 이건 별 소용 없었다. esp32라 그런지 잘모름.
코드에 다음과 같이 정의하거나
#define CORE_DEBUG_LEVEL 5
컴파일 옵션에 다음과 같이 옵션을 주면 됩니다.
--build-property compiler.c.extra_flags="-DCORE_DEBUG_LEVEL=5" --build-property compiler.cpp.extra_flags="-DCORE_DEBUG_LEVEL=5"
예시.
arduino-cli --config-file arduino-cli.yaml compile --export-binaries --build-property compiler.c.extra_flags="-DCORE_DEBUG_LEVEL=5" --build-property compiler.cpp.extra_flags="-DCORE_DEBUG_LEVEL=5" --upload --port COM4 "sketchbook\test"
arduino-cli --config-file arduino-cli.yaml compile --export-binaries --build-propertycompiler.c.extra_flags="-DCORE_DEBUG_LEVEL=5" --build-propertycompiler.cpp.extra_flags="-DCORE_DEBUG_LEVEL=5" --upload --port COM4 "sketchbook\test"
compile --export-binaries --build-propertycompiler.c.extra_flags="-DCORE_DEBUG_LEVEL=5" --build-propertycompiler.cpp.extra_flags="-DCORE_DEBUG_LEVEL=5" --upload --port COM4 "sketchbook\InternetRadio" && arduino-cli --config-file arduino-cli.yaml 모니터 -p COM4 -c 921600 --timestamp
댓글
댓글 쓰기