rad777/system_info

1.0.2

Latest
uploaded 12 hours ago
Prints ESP32 chip info (cores, features, flash, PSRAM) and the partition table to stdout.

Readme

# system_info

Prints ESP32 chip info (target, cores, WiFi/BT/BLE/802.15.4 features, silicon
revision, flash size/type, PSRAM size/type, minimum free heap) and the full
partition table to stdout. Useful as a quick diagnostic dump at boot.

## Requirements

- ESP-IDF >= 5.0
- Any ESP32 target supported by ESP-IDF's `esp_chip_info` / `esp_flash` /
  `esp_partition` APIs (esp32, esp32s2, esp32s3, esp32c3, etc.)

## Usage

```c
#include "system_info.h"

void app_main(void)
{
    system_info_print_all();   // chip info + partition table
    // or call them separately:
    // system_info_print_chip();
    // system_info_print_partitions();
}
```

Add it to your project's `main/CMakeLists.txt`:

```cmake
idf_component_register(
    SRCS "main.c"
    INCLUDE_DIRS "."
    REQUIRES system_info
)
```

No other `REQUIRES` entries are needed — this component's own dependencies
(`esp_partition`, `esp_psram`, etc.) are declared as public requirements and
propagate automatically to whatever includes `system_info.h`.

## PSRAM output

PSRAM info is only printed when `CONFIG_SPIRAM` is enabled in your project's
`sdkconfig` (`idf.py menuconfig` → *Component config → ESP PSRAM* → enable
*Support for external, SPI-connected RAM*, and pick Quad or Octal mode to
match your module). Without it, `system_info_print_chip()` prints a note
that PSRAM isn't configured rather than failing to build — this is expected
behavior on boards without PSRAM, not a bug.

Everything else (chip info, flash size, partition table) works out of the box with no configuration required, on any board/partition layout. This component simply reads and prints whatever partition table and flash size are already configured for your project — see Espressif's partition table docs if you need to customize those for your own board.

## Building the example

```bash
cd examples/basic
idf.py set-target esp32s3   # or your target
idf.py build
idf.py -p PORT flash monitor
```

## License

MIT — see LICENSE.

Links

Supports all targets

To add this component to your project, run:

idf.py add-dependency "rad777/system_info^1.0.2"

download archive

Stats

  • Archive size
    Archive size ~ 6.56 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

rad777/system_info version: 1.0.2
|