
5. TUTORIAL
B–61863E–1/06
GENERAL
42
(3) Procedure for execution.
The necessary operations are described below.
> ic286 softkey.c pr(softkey.lis) oj(softkey.obj) compact extend rom
> ic286 task1.c pr(task1.lis) oj(task1.obj) compact extend rom
> ic286 task2.c pr(task2.lis) oj(task2.obj) compact extend rom
> ic286 task3.c pr(task3.lis) oj(task3.obj) compact extend rom
> ic286 common.c pr(common.lis) oj(common.obj) compact extend
rom
> ic286 ctl.c pr(ctl.lis) oj(ctl.obj) compact extend rom
> bnd386 &<task1.con
> bnd386 &<task2.con
> bnd386 &<task3.con
> bnd386 &<common.con
> bnd386 &<tutorial.con
> bld386 tutorial.lnk oj(tutorial.dat) bf(tutorial.bld)
> oh386 tutorial.dat 386 >tutorial.hex
> map386 tutorial.dat notypecheck
Transfer to PMC
Set LANGUAGE ORIGIN of SYSPRM.
(4) Execution.
Press the softkey [RUN].
Only tool number specification can be inputted by key.
Tool numbers and limit time were set to initial value at poweron and
cannot be input by key. Please make the part by each one.
Other than this, same to the application in chapter 5.8.
In case that a task read the data which is being written by the other
task, or several tasks write to a data at the same time, the application may
not execute as programmed. Preventing this, there is the way that only a
task which has the ownership to the data area can access the area. It is
called exclusive control.
And for exclusive control, semaphore function is prepared on PMC.
This section is a training for the exclusive control which is using
semaphore.
At first, modify the application of 5.9 easy to occur the situation described
above.
Then, the data accessing is controlled exclusively.
The files are in the directory \tutorial\5–9–2.
(1) File confirmation
Please use the files (ctl.c and tutorial.bld) in the directories as listed
below.
The files in \tutorial\5–9–2\rc for PMC–SC/SC3/SC4
The files in \tutorial\5–9–2\nb for PMC–NB/NB2
D ctl.c Link control statement
D softkey.c Source code
D task1.c Source code
D task1.con Command file for binder
D task2.c Source code
D task2.con Command file for binder
D task3.c Source code
5.9.2
Semaphore