yyang2000 wrote on Monday, February 15, 2010:
Hi,
I am compiling the Freertos + lwIP +Keil +LM6965 demo and got some questions regarding the use of heap2. and heap3.
If I compile with heap2.c the RAM ZI Data is about 60KB as below showing.
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
0 0 0 0 0 700 api_lib.o
8758 3596 142 4 0 21648 dhcp.o
4634 1480 412 1 200 12426 etharp.o
2344 128 24 24 0 7935 ethisr.o
258 18 3200 0 200 4903 fs.o
252 14 0 20 24000 3311 heap_2.o
1184 66 99 0 0 7244 httpd.o
1304 428 0 0 0 2413 icmp.o
62 0 0 0 0 4872 inet.o
550 114 0 0 0 3526 inet_chksum.o
34 0 0 0 0 880 init.o
2656 902 222 2 0 5018 ip.o
78 0 8 0 0 5413 ip_addr.o
146 0 0 0 0 3949 list.o
1680 536 0 0 52 19893 lwipstack.o
802 388 0 0 0 25479 main.o
1368 184 0 16 18452 4513 mem.o
492 76 189 52 11335 3858 memp.o
1376 398 0 12 0 7752 netif.o
1844 410 71 0 0 7461 pbuf.o
336 44 0 4 0 4097 port.o
1078 0 0 0 0 8809 queue.o
104 4 0 4 0 1576 raw.o
700 76 571 9 0 5073 rit128x96x4.o
276 256 0 0 2048 412 startup_rvmdk.o
0 0 0 0 280 1693 stats.o
514 66 0 0 0 2851 sys.o
638 44 0 2 32 10831 sys_arch.o
2288 192 20 76 250 16476 tasks.o
5508 1658 89 33 0 27602 tcp.o
8480 1708 162 32 20 14864 tcp_in.o
4862 1354 353 0 0 8959 tcp_out.o
864 290 0 16 0 24718 tcpip.o
1538 84 57 28 2048 8341 uart0.o
1538 86 40 28 2048 7897 uart1.o
3150 1048 0 4 0 13079 udp.o
-----------------------------------------------
61740 15648 5708 376 60968 310472 Object Totals
However, if I use heap3.c that the ZI Data is about 36KB RAM as below showed.
Code (inc. data) RO Data RW Data ZI Data Debug Object Name
0 0 0 0 0 700 api_lib.o
8758 3596 142 4 0 21648 dhcp.o
4634 1480 412 1 200 12426 etharp.o
2344 128 24 24 0 7935 ethisr.o
258 18 3200 0 200 4903 fs.o
46 0 0 0 0 1083 heap_3.o
1184 66 99 0 0 7244 httpd.o
1304 428 0 0 0 2413 icmp.o
62 0 0 0 0 4872 inet.o
550 114 0 0 0 3526 inet_chksum.o
34 0 0 0 0 880 init.o
2656 902 222 2 0 5018 ip.o
78 0 8 0 0 5413 ip_addr.o
146 0 0 0 0 3949 list.o
1680 536 0 0 52 19893 lwipstack.o
802 388 0 0 0 25479 main.o
1368 184 0 16 18452 4513 mem.o
492 76 189 52 11335 3858 memp.o
1376 398 0 12 0 7752 netif.o
1844 410 71 0 0 7461 pbuf.o
336 44 0 4 0 4097 port.o
1078 0 0 0 0 8809 queue.o
104 4 0 4 0 1576 raw.o
700 76 571 9 0 5073 rit128x96x4.o
276 256 0 0 2048 412 startup_rvmdk.o
0 0 0 0 280 1693 stats.o
514 66 0 0 0 2851 sys.o
638 44 0 2 32 10831 sys_arch.o
2288 192 20 76 250 16476 tasks.o
5508 1658 89 33 0 27602 tcp.o
8480 1708 162 32 20 14864 tcp_in.o
4862 1354 353 0 0 8959 tcp_out.o
864 290 0 16 0 24718 tcpip.o
1538 84 57 28 2048 8341 uart0.o
1538 86 40 28 2048 7897 uart1.o
3150 1048 0 4 0 13079 udp.o
-----------------------------------------------
61536 15634 5708 356 36968 308244 Object Totals
That will be a big different between use of heap2 and heap3. I wonder if any one can point me some information regarding this question. If this is true, I cannot use heap2 because I application is about 30KB already. It will blow up the SRAM usage for LM6965 that has 64KB SRAM only.
Thanks,
Bill