
B-66284EN/01 4.EMBEDDING OF C APPLICATIONS
- 365 -
4.5.6 Making of Combining Application Program
4.5.6.1 Combining of the main task
(1) Create a user function for user screen display.
(2) Add registration of the user function to USERFUNC.C.
(3) Add the source files configuring TASK1.
In CEXE.MAK in the UserSample folder, the FP libraries
(USERFUNC.O, ..\FPLIB\FPJPEGLIB.A, ..\FPLIB\FPMAINLI
B.A) are defined as TASK1.
Example)
Addition of USERMAIN.O USERSCRN.O
TASK1=USERFUNC.O ..\FPLIB\FPJPEGLIB.A ..\FPLIB\
FPMAINLIB.A\USERMAIN.O USERSCRN.O
4.5.6.2 Combining of alarm task
Add processing of the alarm task for user applications to BACK1.C.
In CEXE.MAK in the UserSample folder, the FP library
(FPSUBLIB.O) is added to TASK3.
TASK3 = BACK1.O ..\FPLIB\FPSUBLIB.A
(1) User_Alarm_Task_Init() function
Add the initialization of the alarm task of the user application
program.
(2) User_Alarm_Task_Main() function
Add the processing of the alarm task of the user application
program.
The longer the processing time of the alarm task is, the lower the
display speed of the main task and the response of key input become.
Therefore, it is necessary to allocate as much CPU time as possible to
the main task during design.
Even when the alarm task is not used by a user application, be sure to
specify "BACK1.OBJ" for "TASK3=" of MAKEFILE.
4.5.6.3 Combining of communication task
Add processing of the communication task for a user application to
BACK2.C.
The longer the processing time of the communication task is, the
lower the display speed of the main task and the response of key input
become. Therefore, it is necessary to allocate as much CPU time as
possible to the main task during design.
Even when the communication task is not used by a user application,
be sure to specify "BACK2.OBJ" for "TASK2=" of MAKEFILE.