This tool generates a plugin header file for enabling and disabling plugins in ESP Easy.
A list of files that add to the overall memory footprint is shown and plugins can be selected and deselected (enabled/disabled). Plugins are recognized by their name (i.e., the name starts with _P followed by a number).
If the current configuration has not been saved the last filename of the respective head file is shown in the window title together with a * to show that there are unsaved changes.
To help you decide which and how many plugins to enable it reads a file containing the memory requirements for the different plugins and shows the overall memory needs. Name and Directory of this file can be configured in the config file. The default name is Plugin_sizes.txt in the current directory.
The memory requirements for the typical ESP-configuration with 1M, 4M and the 8285 are shown in a list below the current memory requirements. If one of the current values exceeds the respective value in one of these memory configurations then that respective entry is colored red. This is only for information and does not in any way change the function of the program.
The app looks for a config file named epwconfig.yaml. If it is available, it is assumed to be in YAML format and read. The following are the possible config options and their default values:
# This is the YAML config file for The ESPEasy Config Wizard
srcDirectory: "." # All Files are searched relative to srcDirectory
pluginData: Plugin_sizes.txt # The file containing the memory requirements of the plugins
pluginHeaderFile: enabled_plugins.h # The default file in which to save the enabled plugins
pluginPrefixPattern: "_P" # The pattern used to identify plugins
# pluginPrefixPattern: "_P|_N" # This pattern would identify more files as plugins
modifiedStyle: "-fx-background-color: mistyrose" # The style used to highlight changed plugin values (enabled/disabled)
unmodifiedStyle: "" # The style used for unchanged plugin values
suffix: .ino # The suffix that identifies source files
memLimits: # Here the different memory limits for the configurations of the ESP can be defined
- name: "ESP-8266: 1 MB"
cacheIRam: 9999
initRam: 9999
roRam: 9999
uninitRam: 1000
flashRom: 500000
- name: "ESP-8266: 4 MB"
cacheIRam: 2
initRam: 2
roRam: 3
uninitRam: 4
flashRom: 5
By changing the source directory you can add even plugins that are not in the original plugin list and add them to, even though for them naturally no size information is available. Still, if a header file is saved, the respective macro name is generated and saved to the file. You can click on the button on the right side, or alternatively, directly on the source directory label, and a file chooser is opened that allows you to pick a different source directory. The sources found there are added to the list. This allows e.g., to add plugins from the playground or from other sources as well for the header file generation.
By clicking on the load button you can load an existing header file. This gets interpreted and the plugins enabled in the header file are enabled in the list as well. If macro names do not correlate to an existing plugin entry a new entry will be created (though without memory requirements).
By clicking the save button you can save the current configuration in a header file. You can choose any possible file name, and this allows you to save different configurations in header files that you can easily activate.
I have hacked this together during a weekend, so don't expect much. Especially no testing yet (I might add it later).