APPENDIX B SIZE OF MEMORY
This appendix explains the size of the memory area.
The memory areas used and managed by the RI850V4 are divided into eight sections by use.
|
|
|
Area where executable code of RI850V4 is allocated.
|
|
Area where static data of RI850V4 is allocated.
|
|
Area where dynamic data of RI850V4 is allocated.
|
|
Area where kernel initialization flag of RI850V4 is allocated.
|
.kernel_const_trace.const
|
Area where static data of trace function is allocated.
|
|
Area where dynamic data of trace function is allocated.
|
|
Area where system stack, task stack, data queue, fixed-sized memory pool and variable-sized memory pool is allocated.
|
. sec_namuser-defined area
|
Area where task stack, data queue, fixed-sized memory pool or variable-sized memory pool is allocated.
|
The size of ".kernel_system" section depends on the trace mode and the kernel library used.
There are four types of kernel library as follows.
- CC-RH version, not supporting the FPU
- CC-RH version, supporting the FPU
- CCV850 version, not supporting the FPU
- CCV850 version, supporting the FPU
1 ) CC-RH version, not supporting the FPU
|
|
|
|
Taking in trace chart by hardware trace mode
|
|
Taking in trace chart by software trace mode
|
|
Taking in long-statistics by software trace mode
|
|
2 ) CC-RH version, supporting the FPU
|
|
|
|
Taking in trace chart by hardware trace mode
|
|
Taking in trace chart by software trace mode
|
|
Taking in long-statistics by software trace mode
|
|
3 ) CCV850 version, not supporting the FPU
|
|
|
|
Taking in trace chart by hardware trace mode
|
|
Taking in trace chart by software trace mode
|
|
Taking in long-statistics by software trace mode
|
|
4 ) CCV850 version, supporting the FPU
|
|
|
|
Taking in trace chart by hardware trace mode
|
|
Taking in trace chart by software trace mode
|
|
Taking in long-statistics by software trace mode
|
|
Note The above values are maximum, when using all service calls provided by RI850V4. The value fluctuate corresponding to the type of service calls using.
The following shows an expression required for estimation ".kernel_const" section size.
In the expression, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
KERNEL_CONST =
224
+ 8 * MEM_AREA_num
+ 24 * CRE_TSK_num
+ 8 * CRE_SEM_num
+ 8 * CRE_FLG_num
+ 8 * CRE_DTQ_num
+ 4 * CRE_MBX_num
+ align42 * CRE_MTX_num
+ 12 * CRE_MPF_num
+ 12 * CRE_MPL_num
+ 20 * CRE_CYC_num
+ 8 * DEF_INH_num
+ 8 * DEF_SVC_num
+ 12 * ATT_INI_num
+ 8 * VATT_IDL_num
+ align4maxint
+ align4TA_ACT_num
+ align4TA_STA_num
|
Note The keyword in the expression means as follows.
|
|
MEM_AREA_num
|
|
CRE_TSK_num
|
|
CRE_SEM_num
|
|
CRE_FLG_num
|
|
CRE_DTQ_num
|
|
CRE_MBX_num
|
|
CRE_MTX_num
|
|
CRE_MPF_num
|
|
CRE_MPL_num
|
|
CRE_CYC_num
|
|
DEF_INH_num
|
|
DEF_SVC_num
|
|
ATT_INI_num
|
|
VATT_IDL_num
|
|
maxint
|
|
TA_ACT_num
|
The number of the definition of "TA_ACT" to initial activation state of Attribute: tskatr.
|
TA_STA_num
|
The number of the definition of "TA_STA" to initial activation state of Attribute: cycatr
|
The following shows an expression required for estimation ".kernel_data" section size.
In the expression, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
KERNEL_DATA =
68
+ 32 * CRE_TSK_num
+ 8 * CRE_SEM_num
+ 8 * CRE_FLG_num
+ 8 * CRE_DTQ_num
+ 12 * CRE_MBX_num
+ 8 * CRE_MTX_num
+ 8 * CRE_MPF_num
+ 8 * CRE_MPL_num
+ 8 * CRE_CYC_num
+ align4maxtpri
|
Note The keyword in the expression means as follows.
|
|
CRE_TSK_num
|
|
CRE_SEM_num
|
|
CRE_FLG_num
|
|
CRE_DTQ_num
|
|
CRE_MBX_num
|
|
CRE_MTX_num
|
|
CRE_MPF_num
|
|
CRE_MPL_num
|
|
CRE_CYC_num
|
|
maxtpri
|
|
The size of ".kernel_data_init" section is 4 bytes.
B.1.5 .kernel_const_trace.const
The size of ".kernel_const_trace.const" section depends on the trace mode; that is, the mode selected in the
Property panel ->
[Task Analyzer] tab -> [Trace] category
-> [Selection of trace mode].
In the following table, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
|
|
|
|
Taking in trace chart by hardware trace mode
|
|
Taking in trace chart by software trace mode
|
|
Taking in long-statistics by software trace mode
|
|
B.1.6 .kernel_data_trace.bss
The size of ".kernel_data_trace.bss" section depends on the trace mode. The type of trace mode is selected in the "
Property panel ->
[Task Analyzer] tab -> [Trace] category
-> [Selection of trace mode]".
1 ) Not tracing
The size of ".kernel_data_trace.bss" section is 0 bytes.
2 ) Taking in trace chart by hardware trace mode
The size of ".kernel_data_trace.bss" section is 4 bytes.
3 ) Taking in trace chart by software trace mode
The size of ".kernel_data_trace.bss" section depends on the definition in the
Property panel ->
[Task Analyzer] tab -> [Trace] category
-> [Buffer size].
The following shows an expression required for estimating ".kernel_data_trace.bss" section size.
In the expression, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
KERNEL_DATA_TRACE.BSS =
24
+ align4TRC_BUF_size
|
Note The keyword in the expression means as follows.
4 )
Taking in long-statistics by software trace modeThe size of ".kernel_data_trace.bss" section depends on the number of task information items defined and the details of the basic information definitions.
The following shows an expression required for estimation
".kernel_data_trace.bss" section size.
In the expression, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
KERNEL_DATA_TRACE.BSS =
24
+ 8 * CRE_TSK_num
+ align410 * intlvl - maxintpri
+ 8 * maxint
|
Note The keyword in the expression means as follows.
|
|
|
|
|
The value of interrupt level provided in the target CPU.
|
|
|
|
|
The following shows an expression required for estimating ".kernel_work" section size.
In the expression, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
KERNEL_WORK =
116
+ SYSSTK
+ TSKSTK_total
+ DTQ_total
+ MPF_total
+ MPL_total
|
Note The keyword in the expression means as follows.
|
|
|
|
|
Total amount of the stack size that specified in " Task stack" for each task.
|
|
Total amount of the memory size that specified in " Data queue" for each data queue.
|
|
|
|
|
The size of the system stack depends on the details of the
Task information and the process of task.
The following shows an expression required for estimation the system stack size required by the RI850V4.
In the following expression, "max(a, b, c)" means the result of selecting the largest value from "a", "b", and "c" (for example, max(1, 2, 3) is 3).
SYSSTK =
maxalign4INT + align4CYC, align4INI, align4IDL
|
Note The keyword in the expression means as follows.
|
|
|
The stack size of the interrupt handler using. If the interrupt handler processes are nested, considers the nest counts. If the interrupt handler is undefined, the stack size of the interrupt handler is nothing.
|
|
The stack size of the cyclic handler using. If multiple cyclic handlers are existed, the maximum value among them. If the cyclic handler is undefined, the stack size of the cyclic handler is nothing.
|
|
The stack size of the initialization routine using. If multiple initialization routines are existed, the maximum value among them. If the initialization routine is undefined, the stack size of the initialization routine is nothing.
|
|
The stack size of the idle routine using. If the idle routine is undefined, the stack size of the idle routine is nothing.
|
The size of the task stack depends on the details of
Task information definitions and processing to be done in the tasks.
The following shows an expression required for estimating the task stack size required by each task defined in the
Task information.
Note The keyword in the expression means as follows.
The following shows an expression required for estimating the data queue size by each data queue defined in the
Data queue information.
Note The keyword in the expression means as follows.
4 ) Fixed-sized memory pool
The following shows an expression required for estimating the fixed-sized memory pool size required by each fixed-sized memory pool defined in the
Fixed-sized memory pool information.
In the expression, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
MPF =
align4blksz * blkcnt
|
Note The keyword in the expression means as follows.
5 ) Variable-sized memory pool
The following shows an expression required for estimating the variable-sized memory pool size required by each variable-sized memory pool defined in the
Variable-sized memory pool information.
In the expression, "align4 (x)" means the result of aligning the value "x" to a 4-byte boundary.
MPF =
align4blksz * blkcnt
|
Note The keyword in the expression means as follows.
B.1.8 .sec_nam(user-definied area)