Loading...
Loading...
Debug ESP32 firmware issues including compilation errors, runtime panics, memory issues, and communication failures
npx skill4agent add laurigates/mcu-tinkering-lab esp32-debuggingfatal error: driver/gpio.h: No such file or directoryidf_component_register(
SRCS "main.c"
REQUIRES driver
)undefined reference to 'some_function'| Error | Cause | Fix |
|---|---|---|
| Writing to invalid memory | Check pointer initialization |
| Reading from invalid memory | Check null pointers |
| Corrupted function pointer | Check callback assignments |
| Division by zero | Add zero checks |
Guru Meditation Error: Core 0 panic'ed (Stack overflow)xTaskCreatePinnedToCore(task_fn, "name", 4096, NULL, 5, NULL, 0);
// ^^^^ increase thisStack smashing detectedESP_LOGI(TAG, "Free heap: %lu", esp_get_free_heap_size());
ESP_LOGI(TAG, "Min free heap: %lu", esp_get_minimum_free_heap_size());free()malloc()E (1234) i2c: i2c_master_cmd_begin(xxx): I2C_NUM error# Clean build to eliminate stale objects
make robocar-clean && make robocar-build-main
# Build with verbose output
cd packages/esp32-projects/robocar-main && idf.py build -v
# Start serial monitor
make robocar-monitor-main PORT=/dev/cu.usbserial-0001sdkconfigidf.py menuconfigCONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOTCONFIG_FREERTOS_WATCHPOINT_END_OF_STACKCONFIG_HEAP_POISONING_COMPREHENSIVE