-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Feature Request: Arduino IDE Tools Menu Info Dump for v3 #9026
-
Feature request for the upcoming arduino-esp32 core v3.
It'd be great if we could programmatically grab all the info from the Arduino IDE (v2 & greater) Tools menu into an array or structure.
Be very good to have this for documenting and debugging a sketch so that we could, for example add a few Serial.println( ); statements and get something like:
Board: "ESP32 Dev Module"
Port: "/dev/cu.usbserial-0001"
CPU Frequency: "240MHz (WiFi/BT)"
Core Debug Level: "None"
Erase All Flash Before Sketch Upload: "Disabled"
Events Run On: "Core 1"
Flash Frequency: "8OMHz"
Flash Mode: "QIO"
Flash Size: "4MB (32Mb)"
JAG Adapter: "Disabled"
Arduino Runs On: "Core 1"
Partition Scheme: "Huge APP (3MB No OTA/1MB SPIFFS)"
PSRAM: "Disabled"
Upload Speed: "921600"
Programmer: "Esptool"
It would be a huge benefit when asking for help on this and other forums.
It would be good to modify this so that if a custom partition scheme is used, that would be noted with the file name of that scheme available too.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 2 replies
-
but we do already have that :) here is wat get's printed out if you set the core debug level to "debug" or "verbose". FQBN gives you the selected options:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x18 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x508
load:0x403c9700,len:0x4
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x29d8
entry 0x403c9880
=========== Before Setup Start ===========
Chip Info:
------------------------------------------
Model : ESP32-S3
Package : 0
Revision : 2
Cores : 2
Frequency : 240 MHz
Embedded Flash : No
Embedded PSRAM : No
2.4GHz WiFi : Yes
Classic BT : No
BT Low Energy : Yes
IEEE 802.15.4 : No
------------------------------------------
INTERNAL Memory Info:
------------------------------------------
Total Size : 395780 B ( 386.5 KB)
Free Bytes : 363812 B ( 355.3 KB)
Allocated Bytes : 27048 B ( 26.4 KB)
Minimum Free Bytes: 358764 B ( 350.4 KB)
Largest Free Block: 327668 B ( 320.0 KB)
------------------------------------------
Flash Info:
------------------------------------------
Chip Size : 16777216 B (16 MB)
Block Size : 65536 B ( 64.0 KB)
Sector Size : 4096 B ( 4.0 KB)
Page Size : 256 B ( 0.2 KB)
Bus Speed : 80 MHz
Bus Mode : QIO
------------------------------------------
Partitions Info:
------------------------------------------
nvs : addr: 0x00009000, size: 20.0 KB, type: DATA, subtype: NVS
otadata : addr: 0x0000E000, size: 8.0 KB, type: DATA, subtype: OTA
app0 : addr: 0x00010000, size: 1280.0 KB, type: APP, subtype: OTA_0
app1 : addr: 0x00150000, size: 1280.0 KB, type: APP, subtype: OTA_1
spiffs : addr: 0x00290000, size: 1408.0 KB, type: DATA, subtype: SPIFFS
coredump : addr: 0x003F0000, size: 64.0 KB, type: DATA, subtype: COREDUMP
------------------------------------------
Software Info:
------------------------------------------
Compile Date/Time : Dec 19 2023 13:01:20
Compile Host OS : macosx
ESP-IDF Version : v5.1.2-185-g3662303f31-dirty
Arduino Version : 3.0.0
------------------------------------------
Board Info:
------------------------------------------
Arduino Board : ESP32S3_DEV
Arduino Variant : esp32s3
Arduino FQBN : espressif:esp32:esp32s3:DebugLevel=debug,UploadSpeed=460800
============ Before Setup End ============
[ 2716][I][esp32-hal-i2c.c:108] i2cInit(): Initialising I2C Master: sda=6 scl=7 freq=400000
Scanning for I2C devices ...
I2C device found at address 0x15
I2C device found at address 0x6B
I2C device found at address 0x7E
Setup done
=========== After Setup Start ============
INTERNAL Memory Info:
------------------------------------------
Total Size : 395780 B ( 386.5 KB)
Free Bytes : 255408 B ( 249.4 KB)
Allocated Bytes : 106588 B ( 104.1 KB)
Minimum Free Bytes: 255408 B ( 249.4 KB)
Largest Free Block: 245748 B ( 240.0 KB)
------------------------------------------
GPIO Info:
------------------------------------------
GPIO : BUS_TYPE[bus/unit][chan]
--------------------------------------
0 : GPIO
2 : LEDC[0][0]
6 : I2C_MASTER_SDA[0]
7 : I2C_MASTER_SCL[0]
8 : GPIO
9 : GPIO
10 : SPI_MASTER_SCK[0]
11 : SPI_MASTER_MOSI[0]
12 : SPI_MASTER_MISO[0]
14 : GPIO
43 : UART_TX[0]
44 : UART_RX[0]
============ After Setup End =============
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1
-
Is there an API to get this info or does it only dump to the serial monitor is one of the debug modes is enabled?
Really need a way to capture this from within a sketch.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
it dumps to serial if debug level is "Debug" or "Verbose". Here are the functions: https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/chip-debug-report.h
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 1
-
+1 for this as a callable feature. I was basically building the guts of "yes, I know you have an ESP32 but I need to know which of the zillion that REALLY means" support feature whe I stumbled upon chip-debug-report.{cc,h}
I'd essentially replicated that before finding it, but would absolutely build that into my debug/about prompt if I could get to that as a string.
Getting our users on correctly configured PSRAM configurations from arbitrary cheap development boards has been a challenge. If they have plentiful, functional OSPI PSRAM, we'd make different buffering/dma strategy than if we're suffering without PSRAM at all. I'm trying to build a debug screen to help them get USE_PSRAM/BOARD_HAS_PSRAM correct without them copy-pasting build flags and slurping -mfix-esp32-psram-cache-issue into an S3 and such.
Being able to collect that whole shebang as a string instead of bit-twiddling it would be way less fragile for us.
Beta Was this translation helpful? Give feedback.