3.1.15.2.2. waf_tools.config_codegen_task.create_config
- waf_tools.config_codegen_task.create_config(bld: BuildContext, json_node: Node, idx: str) str
Create the C/H code from a JSON configuration and template.
Resolves all values of the
idx-th entry of the configuration’sfileslist, adds the generation metadata (creation date, date of last update, and foxBMS version obtained fromVcsInformation), and renders the corresponding template.- Parameters:
bld – The active waf build context.
json_node – Node pointing to the JSON configuration file.
idx – Index of the file entry within the configuration’s
fileslist.
- Returns:
The fully rendered file content as a string.
- Raises:
FileNotFoundError – If a referenced CSV file does not exist.
TypeError – If a define value does not match its declared type.
ValueError – If a define value is invalid or out of range.
SystemExit – Indirectly via
bld.fatal()if the template file is missing.