view gpf/CCD/util/readme.txt @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
line wrap: on
line source

Tools supporting CCD stack size calculation
===========================================

1. ccd_stacksize.exe
--------------------

If gnumake is called in \gpf\CCD\util, an executable
ccd_stacksize.exe is created. This programm prints the
needed stacksize for encoding respectively decoding
each message defined in the actual ccddata_dll.dll.
In addition the recursion level (level of substructures)
is printed.
With gnumake configuration parameters can be supplied,
depending on which CCD variant is to be used.
MEMSUPER, TRACE, and DEBUG are possible parameters, e.g.

  gnumake MEMSUPER=1 DEBUG=1 TRACE=0

creates a ccd_stacksize.exe for a CCD compiled with partition
supervision, debug information, but without tracing functionality.
Supported platforms are arm7 and arm9, default is arm7.
With the configuration parameter PLATFORM=arm9 the corresponding
version for the arm9 is created.

The output of ccd_stacksize.exe looks like this:

MSG                                     ENC  DEC REC-LEVEL
==========================================================
MS_RF_CAPABILITY                        532  512   4
U_ALERT                                 356  404   2
[ ... more output lines ...]
MOD_PDP_ACC                             152  116   0
SM_STATUS                               348  320   2

That means e.g. that for encoding a U_ALERT message,
356 bytes of stack is needed.

With

  ccd_stacksize -api

a list of the remaining, non message related functions of CCD
and their needed amout of stack is printed:

ccd_init                  64
ccd_exit                  40
ccd_begin                 32
ccd_end                   32
[ ... more output lines ...]

In the current version the stack needed for calling frame
functions are not yet considered.

2. globs.bat
------------
For those entities that require a reentrant CCD (GRR in GPRS;
RRC and RCM in UMTS) an own set of CCD internal data is needed.
It was required by REDMEM to particularly distinguish between GSM
only and GPRS (i.e. without/with GRR on the arm7). Therefore the
block of internal CCD data for GRR is no longer statically declared.
Instead CCD finds out if GRR calls ccd_init and tries then to
dynamically allocate the memory for the data. That implies,
that a big enough partition in xxxconst.h must be supplied.

The batch file globs.bat calculates the amount of memory needed
for one set of CCD internal data in several configurations.
The actual values for CCD_2.6.0 are:

- for a non-tracing CCD on ARM7:  1600
- for a     tracing CCD on ARM7:  1656
- for a non-tracing CCD on ARM9:  1604
- for a     tracing CCD on ARM9:  1740
- for a non-tracing CCD on PC:    2634
- for a     tracing CCD on PC:    2771

That means e.g. for a GPRS arm7 target version, a data partition of
1600/1656 bytes must be available.