A documentation of the tool HALCoGen can be found in HALCoGen tool documentation, the waf-tool wrapper for this project in this section, information on configuring HALCoGen in the context of the toolchain of this project in HALCoGen and an example on how to use a pre-generated HAL instead of generating it in the compilation step in How to Use Generated Sources from HALCoGen.
The tool is located in
Implements a waf tool to use TI HALCoGen (https://www.ti.com/tool/HALCOGEN)
- class f_hcg.NodeStructure(xml_file_path)
Holds all relevant information on generated files based on a HALCoGen configuration file
Parses information on generated files from the HALCoGen configuration file.
configuration step of the TI HALCoGen Code Generator.
checks whether the platform is Win32 or not, as HALCoGen is only supported on Win32.
searches for the HALCoGen program
Adds the include path of the F021 Flash API to
- class f_hcg.hcg_compiler(*args: Any, **kwargs: Any)
Class to implement running the HALCoGen code generator
- color = 'PINK'
color in which the command line is displayed in the terminal
- ext_out = ['.h', '.c', '.asm']
task produces headers therefore it must run before c-tasks
list of string
displayed keyword when generating sources from a HALCoGen project
Runs the HALCoGen code generator
Copy the HALCoGen sources to the build directory
Get CPU clock frequency that is set by HALCoGen from FreeRTOSConfig.h and copy it to our configuration file
Copy the HALCoGen sources again to the output directory. This needs to be done, as HALCoGen re-writes the timestamp of the HALCoGen file when the tool is run. With this step the sources and build directory are synchronized.
- vars = ['HALCOGEN', 'HALCOGEN_SRC_INPUT']
variables this task depends on
list of string
- f_hcg.process_hcg(self, node)
creates HALCoGen task if a hcg input file and a corresponding dil file exists and binds it to the
See Fig. 3.11 for a simplified representation of how the input output relation is calculated.
A copy of the FreeRTOS sources is provided in the repository. Therefore the generated FreeRTOS sources are not needed and these files must be removed as otherwise the wrong files may be included.
The only information needed from the generated sources is the
configCPU_CLOCK_HZ. This information is extracted from the sources (see
hcg_compiler.run()for details) and written into a configuration header. This configuration header is config_cpu_clock_hz.h.
ConfigurationError – Raises an error that stops the build if no corresponding .dil file is found.