Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

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

ComponentCode Size [Bytes]Data Size [Bytes]
Marshaller Core
2882184
Packet Transport190454
Serial Connector86052
rcX Uart Driver2640224
Total8286514

 

 



Note

Marshaller Footprint of target firmware may differ slightly from calculation above, as shared kernel componts (e.g. Semaphore) are explicitly not considered!

 

...



Expand
titleDetails: Marshaller Core
Code Block
languagecpp
.text.CalculateCRC16 0x4c 
.text.FindTransportLayer 0x22
.text.OS_LOCK  0x10
.text.OS_UNLOCK.clone.0 0xc 
.text.HilMarshallerFreeBuffer 0x5c
.text.ResetRxStateMachine 0x28
.text.HilMarshallerGetBuffer 0x64
.text.HilMarshallerStop 0x70
.text.HilMarshallerStart 0x10c
.text.HilMarshallerRegisterConnector 0x164
.text.HilMarshallerUnregisterConnector 0x94
.text.HilMarshallerConnTxData 0x34 
.text.SendAcknowledge 0x58
.text.HilMarshallerConnRxData 0x3d0
.text.HilMarshallerConnTxComplete 0x10
.text.HilMarshallerRegisterTransport 0x58 
.text.HilMarshallerUnregisterTransport 0x1c 
.text.HilMarshallerTimer 0x64 
.text.HilMarshallerMain 0x80 
.text.MarshallerRequestCallback 0x14
.text.MarshallerTestTask 0x84
.bss.s_abSemaphore 0x34
.bss.s_abTimer 0x50
.data.s_tMarshallerParams 0x34

...

The attributes listed below are configurable by target firmware and have considerable influence on dynamic memory foorprint!

...


AttributeComment

Marshaller Core

RX_STATIC_TASK_T:StckSizMaximum Stack Requirement = 452 Bytes
Packet TransportPACKET_TRANSPORT_CONFIG_T:ulMaxChannelsNumber of channels handled by Marshaller (system channel, protocol 1, protocol 2, etc.)
PACKET_TRANSPORT_CONFIG_T:ulStackSizeMaximum 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:ulTxBufferCntCan 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 DriverRX_INTERRUPT_SET:ulTaskStackSizeMaximum Stack Requirement = 284 Bytes

 

...



Note

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.

ComponentDynamic 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

...

 



Expand
titleHeap analyser results of a specific target firmware

Firmware sources:

http://subversion01:8080/svn/EmbeddedOS/Marshaller/Device/rcX/latest/targets/TestApp

Settings:

  • RX_STATIC_TASK_T:StckSiz = 128
  • PACKET_TRANSPORT_CONFIG_T:ulMaxChannels = 4
  • PACKET_TRANSPORT_CONFIG_T:ulStackSize = 64
  • HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulDataBufferCnt = 1
  • HIL_MARSHALLER_CONNECTOR_PARAMS_T:ulDataBufferSize = 1616
  • RX_INTERRUPT_SET:ulTaskStackSize = 80

Stack Coverage

Heap Analysis

Total Heap requirement = 4972 Bytes

 

 

 

...