Arduino framework with custom c++ failing

I can’t get a simple arduino-only project compiling. It tends to inject idf insights and that breaks compiles and linking. I have been struggling for hours to just get a simple file build with no avail. AI is telling me to downgrade to a 2024 version. This seems like a pretty basic process - custom c++ code is a common pattern. My cpp files are not being copied to the build/src folders and that is what is causing a linker issue (as my files are not getting compiled).

Any ideas as to how to get around this? I just am trying to do module-to-module communication with an ESP32-c3. The required libraries are not merged with stable yet and the only way I can do this is with custom CPP. But that has a regression and won’t build the project.

It would really help to know what version of ESPHome you are on and whether this is something that used to work or that you’re trying to get working for the first time.

There were major architectural changes with ESPHome 2024.10.0 that changed the way Ardunio works with ESPHome. Starting with 2024.10.0 Ardunio is an ESP-IDF framework rather than a separate thing, and that does cause problems in some cases. If you install and use 2024.9.3 and never upgrade, that might work for you.

Without more details, it’s hard to help more.

This is a new project and I would rather be on the latest version. I had to downgrade to 2024.12.4 version which also necessitated downgrading python to version 1.2.

Bottom line is I want to communicate between 2 modules, but esp-now is not ported to idf framework yet so I need to use custom c++. The challenge is getting my c++ files copied ho the src folder and even compiling. The mixed Arduino/idf framework is not resulting in a compilable project at all.

Python downgraded to 1.2? That doesn’t sound right. You mean (3.)12?

What part isn’t compatible with esphome? Haven’t tried it myself but it should be available functioning: ESPNow communication Component - ESPHome - Smart Home Made Simple

Can you try to compile it without the custom code first, see if that functions. Afterwards you can add bits and pieces of it until you run into issues and troubleshoot it from there.

Ah yes and clean your build files before trying again (shameless stolen this tip from Karosm)

Yes it is, I’m using it in a project as I write this.

$ esphome version
Version: 2025.12.0

No compile logs? No source code? [correctly formatted for forum posting]

We’re speculating until there are more specifics.

That might be your issue. HomeAssistant is advancing so fast the slurp AI produces ii usually outdated, and often downright wrong. Embarrassingly so.

2 Likes