This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2432: Memory footprint of Lwip and ICSS_EMAC driver

Part Number: AM2432

Hi Expert,

We have a plan to port 3rd party Ethernet/IP solution, which will run on top of Lwip. In a previous conference call, your software team(Prasad) recommended the combination of Lwip and ICSS_EMAC for the use of 3rd party Ethernet/IP and we also discussed the memory optimization of Lwip and ICSS_EMAC driver. From the discussion, your team informed us about the target size of the memory optimization is < 200KB and we can refer to the example is "hsr_prp_demo" in SDK 8.2 to see the combination of Lwp and ICSS_EMAC. driver.

I got the map file of "hsr_prp_demo" to see the memory footprint via email from your team(through Gunter). I guess this file is the map file of "hsr_prp_demo" in 08.02.00.28.

ICSS_PKT_BUF_MEM

00010000

65,536

64KB buffer

.bss

000585c0

361,920

230K = 360K – 130K (task stack)

.data

00000c10

3,088

 

.text

00033600

210,432

 

.rodata

00011500

70,912

 

When I checked each size in the map file, the size seems still big as you can see in the table above. The size of code and data is around 510KB and I think this is NOT the optimized size(200KB) your team is targeting. If my size analysis is wrong, please let me know.

So, my question is, is this the final footprint of your memory optimization? If it is not the final one, please share your plan for memory optimization of Lwip and the relevant driver, ICSS_EMAC driver.

Regards,

Moonil

  • Hi
    Here is the summary of memory footprint for icss-emac driver, icss-emac lwip interface library and lwip library. (Numbers are approximate)

    • icss-emac : 123.8 KB ( 123.8 KB = 64 KB for packet buffers + 17.3 KB for icss-emac driver footprint(code and data) + 42.5 KB driver handle memory(allocated in example) )
    • icss_emac lwipif library : 7.3 KB
    • lwip-freertos library: 280.5 KB

    Above includes the size of memory occupied by icss-emac and lwIP only.  Now there are other components like peripheral drivers, board drivers, FWHAL(Firmware and HW Abstraction Layer) library for PRP (for your case, it will be EtherNet/IP FWHAL), ICSS TimeSync driver and OS as well which account for the rest of the memory used.

    You can check the map file for more details on specific components. You can search for “Module Summary” in the map file and get component wise details.


    Regards
    Dhaval Khandla

  • Hi Dhaval Khandla,

    Thank you for your explanation in detail.

    Can we consider this is the final footprint from your optimization activity? I think your team will continue optimization but was wondering if a major improvement is almost done in the latest released version.

    I downloaded two versions of SDK, 08.02.00.12 and 08.02.00.28. please let me know if there is any other version we have to use for the most optimized one.

    Best,

    Moonil

  • Moonil,

    Can you please let us know what's your footprint requirement? 

    As Dhaval stated above, icss-emac and lwipif is already takes not so much memory. Also 64K is used for packet memory which you can reduce if throughput requirements are very low.

    Now lwip-freertos takes 280KB which can be reduced based on feature set. You can refer to optimizing lwip docs available on web.

    So I believe with configuration changes you should be able to meet your goal of memory footprint.  

    Regards,

    Prasad