Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 106 -
Modify concretely as follows.
<< A part of "TASKALL2.DAT" file >>
SEGMENT
VERSION_GROUP ( BASE = 0A00030H, LIMIT = 0FH, DPL = 0 )
,VERSION_TEXT ( LIMIT = +0, DPL = 0 )
,SYSCONF_DATA ( BASE = 00A40000H, DPL = 3 )
,SEG_GDT_USER ( USE32, ALIGN = DWORD, DPL = 0 )
,FREE_MEM_SEG ( USE32, ALIGN = PAGE, DPL = 0 )
#[1]
,TS1_DGROUP ( LIMIT = 0FFFFh )
,TS1_STK0_SEG ( USE32, LIMIT = 7FFh, ALIGN = DWORD, DPL = 0 )
,TS1_RESERVEDSEG ( LIMIT = 0 )
#[2]
,TS2_DGROUP ( LIMIT = 0FFFFh ) <-(A)
,TS2_STK0_SEG ( USE32, LIMIT = 7FFh, ALIGN = DWORD, DPL = 0 )
,TS2_RESERVEDSEG ( LIMIT = 0 )
#[3]
,TS3_DGROUP ( LIMIT = 0FFFFh ) <-(B)
,TS3_STK0_SEG ( USE32, LIMIT = 7FFh, ALIGN = DWORD, DPL = 0 )
,TS3_RESERVEDSEG ( LIMIT = 0 )
"LIMIT = 0FFFFh" of (A) is the definition of the DGROUP segment size of the
communication task, and "LIMIT = 0FFFFh" of (B) is one of the alarm task.
( "0FFFFh = 64KB - 1" is the segment limit size.) If you modify this line as
"LIMIT = 7FFFh" (for example), the DGROUP segment size is changed as 32KB.
This modification changes the initial value of the stack pointer
automatically.
The following section is described about the enough size for the DGROUP
semgnet.
You first check how many variables are static or initialized. The segment
sizes of all segments are listed in the end part of the map files built by
compiling and linking the application program, task2.map (the communication
task) and task3.map (the alarm task). The sum of "LENGTH" values of
"TS?__DATA", "TS?_CONST" and "TS?__BSS" segments ('?' is '2' (for the
communication task) or '3' (for the alarm task)) is the total amount size of
the static or initialized variables allocated in the DGROUP segment. The
required size for the DGROUP segment is the total of that variables and the
stack area. About 10KB memory is enough for the stack area. For more
accurate estimation, check the return value of "stackavail()" function in the
most deep-nested function of the real executing application program. The
return value of "stackavail()" function is the unused size of the user stack
area at the moment. It is enough generally that the unused size is more than
or equal to 2 through 3 KB. ( "2 - 3 KB" is for calling of the FANUC library.)
[ End of 20mkapp.man ]