Code generation
If the settings are correct and no error is reported, the tool’s code generation engine instantly regenerates the source code. You can view the resulting code the Code Preview view of the Peripherals tool.
The Peripherals tool produces the following C files:
- peripherals.c
- peripherals.hNote: For multicore processors, the peripherals.c/.h are generated for each core, containing functional groups associated with that core. It can be configured in functional group properties.Note: Some components, such as the USB or FlexSPI, may generate additional output files.
These files contain initialization code for peripherals produced by selected configuration components including:
- Constants and functions declaration in header file.
- Initialized configuration structures variables (constants).
- Global variables for the user application that are used in the initialization. For example, handles and buffers.
- Initialization function for each configuration component.
- Initialization function for each functional group. The name of the function is the same as the functional group name. These functions include execution of all assigned components’ initialization functions.
- Default initialization function containing call to the function
initializing the selected functional group of peripherals.Note: The prefixes of the global definitions (defines, constants, variables, and functions) can be configured in the Properties of the functional group.
|