3.4 Creating the main.c File
(Ask a Question)To update the main.c file, perform the following steps:
- On the SoftConsole menu, click .
- In the New Source File dialog box, enter
main.c
in the Source file field, and then click Finish, as shown in the following figure.Figure 3-10. main.c File Creation The main.c file is created inside the project, as shown in the following figure.
Figure 3-11. The main.c File - Copy all of the content of the
main.c
from DesignFiles_directory\FW, and paste it in the main.c file of the SoftConsole project. - Save the SoftConsole main.c file.
- Similarly, create another file named hw_platform.h.
- Copy all of the content of the
hw_platform.h
from the DesignFiles_directory\FW, and paste it in the newly created hw_platform.h file.
Important: The hw_platform.h file includes the system clock frequency, baud rate, and base addresses of peripherals. The hw_platform.h file appears, as shown in the following figure.
hw_platform.h
File