![Lattice Semiconductor LatticeMico32 Hardware Developer User Manual Download Page 92](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852092.webp)
C
REATING
C
USTOM
C
OMPONENTS
IN
L
ATTICE
M
ICO
S
YSTEM
:
Adding Software Files to Custom Components
86
LatticeMico32 Hardware Developer User Guide
implementing them in source files that are compiled as part of the
application build step.
Structure header file type – These header files contain declarations that
your device driver structure may reference. These files are included as
preprocessor “include” statements in the automatically generated
DDStructs.h header file. See Chapter 5 of the
LatticeMico System
Software Developer User Guide
for information on the DDStructs.h
header file.
Header file type – These files are header files that are needed by the
component source files but are not required by your device driver
structure.
The application file type and platform library file type govern the composition
of the component makefile.
See Chapter 5 of the
LatticeMico System Software Developer User’s Guide
for more information on the managed-build process.
Imported files do not become part of the component until you click the OK
button and save the component without error. The Current Software Files
portion of the Software Files tab only displays software files if an existing
custom component is being edited.
Table 14 lists the options available in the Software Files tab of the Import/
Create Custom Component dialog box.
Table 14: Software Files Tab Options
Option
Description
Software File
Enables you to browse to the software driver files. Copies the selected file into
the component folder.
Add
Adds the file currently listed in the Software File entry box to the table of
Imported Files.
Delete
Deletes the highlighted entry in the Import Software Files table
.
Directory
Displays the folder where the source code files associated with the component
being edited reside.
Delete
Deletes a source file already associated with the component being edited.
File Type
Specifies the file type. Choose the following from the drop-down menu:
Application, Platform Library, Structure Header, Header.
DRC
Performs a design-rule check of the new component.
Save
Adds the custom component to LatticeMico32. If the design-rule check fails, a
message appears that warns you that the data to be saved contains errors and
cannot be used in a platform. The component icon displays a small red “x” in the
bottom left-hand corner.
If the custom component passes the design-rule check, no message box or red
“x” appears, and the data is saved.
If you are going to override an existing file, another message comes up to ask
you for override permission.