Sometimes I need to patch the framework I’m working with (Arduino, Mbed, etc.). For example, I’m using it with my custom board which uses different external oscillator frequency. I thought it would be a good feature to enable file tree overlay for a framework.
I.e. add a new setting to
platformio.ini build environment section, for example,
framework_overlay_dir = patches.
This is the path to a subdirectory in the project tree. It can contain files and directories, replicating the structure of the used framework. Whenever a file from the framework is built (or a header file included), if similar file is found in
patches subdirectory of the project, it will be used instead of the file shipped with the framework.
Pros: makes framework patching easier, the patches will survive framework version update.
Cons: can lead to errors if you forget about file substitution (it is readily detected by seeing additional setting in