Marshaller Memory Footprint Analysis
Table of Content
Conditions
- Codesourcery GCC 4.5.2
- Compile Flags: '-ffunction-sections', '-fdata-sections', '-mlong-calls', '-mapcs', '-mthumb-interwork', '-fshort-enums', '-fno-common', '-mcpu=arm966e-s', '-Os', '-mthumb'
- rcX V2.1.5.0
- Marshaller V2.0.16.1
- netX51
- USB Serial Marshalling (USB_MARSHALLER)
- Packet Transport (PACKET_MARSHALLER)
Static Code & Data
Component | Code Size [Bytes] | Data Size [Bytes] |
---|---|---|
Marshaller Core | 2882 | 184 |
Packet Transport | 1904 | 54 |
Serial Connector | 860 | 52 |
rcX Uart Driver | 2640 | 224 |
Total | 8286 | 514 |
Marshaller Footprint of target firmware may differ slightly from calculation above, as shared kernel componts (e.g. Semaphore) are explicitly not considered!
Dynamic Memory Allocation
The attributes listed below are configurable by target firmware and have considerable influence on dynamic memory foorprint!
Attribute | Comment | |
---|---|---|
Marshaller Core | RX_STATIC_TASK_T:StckSiz | Maximum Stack Requirement = 452 Bytes |
Packet Transport | PACKET_TRANSPORT_CONFIG_T:ulMaxChannels | Number of channels handled by Marshaller (system channel, protocol 1, protocol 2, etc.) |
PACKET_TRANSPORT_CONFIG_T:ulStackSize | Maximum Stack Requirement = 232 Bytes | |
Serial Connector | HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulDataBufferCnt | Limits the number of parallel services |
HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulDataBufferSize | Should match the size of the largest expected telegram plus additional 20 bytes for marshaller transport header. e.g: 20 + 1596 (TLR_MAX_PACKET_SIZE) = 1616 Bytes | |
HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulTxBufferCnt | Can be 0 if unsolicited packets and indications should not be processed | |
HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulTxBufferSize | TX Buffer size for unsolicited packets / calls (indication / callbacks) Can be 0 if unsolicited packets and indications should not be processed | |
rcX Uart Driver | RX_INTERRUPT_SET:ulTaskStackSize | Maximum Stack Requirement = 284 Bytes |
Maximum stack space was evaluated during runtime via pattern search method for a specific target configuration and a restricted use case scenario. Those values may differ for other target configurations or extended use cases!
Full dynamic memory requirement for each component is given in the table below.
Component | Dynamic Allocation Size [Bytes] | Minimum Requirement [Bytes] |
---|---|---|
Marshaller Core | 384 + (RX_STATIC_TASK_T:StckSiz * 4) | 836 |
Packet Transport | 500 + (PACKET_TRANSPORT_CONFIG_T:ulMaxChannels * 120) + (PACKET_TRANSPORT_CONFIG_T:ulStackSize * 4) | 972 |
Serial Connector | 624 + (HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulDataBufferCnt * (HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulDataBufferSize + 104)) + (HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulTxBufferCnt * (HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulTxBufferSize + 104)) | 2344 |
rcX Uart Driver | 176 + RX_INTERRUPT_SET:ulTaskStackSize * 4 | 460 |
Total | 1684 + [Configureable] | 4612 |