Build fails to honor latest changes. Possible old cache in use

I’ve been struggling with getting platformio to honor the latest code\config changes I’m making in platformio.ini, platformio_override.ini or code. For example, if I change a build flag value, after building and uploading my code. These changes are not present. I’ve even made sweeping changes to other values in these ini files and still see no change in the firmware I’m uploading.

I have a hunch that there is some old data or compiled files cached away somewhere that platformio assumes is the most recent and therefore not incorporating my recent changes.

Is there a cache folder somewhere that I can delete to force a fresh build? I’ve already tried removing the following folders with no luck.

  • <pio_project_path>.pio\build\esp32dev
  • C:\Users<user_name>.platformio.cache

Could this have something to do with a bad git branch? Should I try creating a new branch off of main and see if that helps? I’m all out of ideas and need some suggestions.


OK, this ended up being user error on my part. All of the values I was trying to modify in the ini file ended up being hard coded which I overlooked.