I recently undertook a project that required the use of native ESP-IDF firmware and uses both an ESP32C5 for communications and ESP32S3 for control and I could not use Aurdino or ESPHome for various technical reasons.
Holy cow - complicated as hell. You have to manage memory, you have to manage OTA slots. You have to manage task priorities. You have to manage what task runs on which core. You basically have to manage everything. My hats off to the ESPHome team for making things so damn easy to use.
It’s crazy but it’s super powerful. Thank God for a good strong dose of Cursor AI help. I could never have done it without it.
ESP-IDF is a complicated animal. Using AI tools is an absolute must unless you are a deep code jockey. Prioritizing tasks, assigning them to the proper core, and managing memory is non-trivial. Flashing can be problematic unless managed properly.
Although I was successful in getting most things to work, a much better architecture is display and touch need their own dedicated SPI and I2C buses
All other peripherals can use a shared bus. Timing matters. Buses matter. And sharing a bus, especially with something like Touch, can make an interface either sluggish, or responsive.
Things like time of flight sensors and touch sensors shared I2C bus don’t play well together using ESP-IDF while ESPHome is able to gracefully handle conflicts.
My recommendation is stick to ESPHome or Arduino, because ESP-IDF is not for the faint of heart you have unlimited patience and lots of time to debug.