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.

TIRTOS Heap Problem



Hi Everyone,

I am using F28M35H52C1 concerto board and CCS 5.5. I am using TIRTOS for my project which requires a large memory (heap) size. I created a new CCS project with TIRTOS. I changed the heap size to 40960 as well as the default heap size in memory module to 40960. I enabled EMAC and TCP/IP in TIRTOS. I loaded the program and ran it, but I got the errors as shown in figure. Can anyone help with this ? By the way, it worked with the heap size 20480.

Thanks in advance!

Ben

  • Hi Ben,

    Have you made any changes to the NDK buffer sizes?  It looks like you're running out of memory in the NDK.

    The "Invalid Packet" message is interesting.  What kind of network transfer are you making?  I'm wondering if that's coming out when the NDK sends or receives a packet.

    Steve

  • Hi Steve,

    Thanks for your reply. I tried to increase the stack size of NDK and I got the same results as yesterday in Figure 1. Also, I tried to increase the buffer size to be double as well, but it had got problems when building as shown in Figure 2. I enable http and IP in my .cfg as the network transfer. Any idea how to solve it ?

    Regards,

    Ben

                                                                       Figure 1

    Figure 2

  • Hi Ben,

    Can you please attach your working and non-working *.cfg files?

    For the working case, I mean the one that corresponds to what you said here:

    Bin Li1 said:
    By the way, it worked with the heap size 20480.

    Please also attach the *.cfg file that corresponds to Figure 2 above.

    Steve

  • Hi Steve,

    I attached three projects in zip files. The first one "M3_1.rar" is the working code with the heap size 20480. The second one "M3_2.rar" is the project which I changed the heap size to 40960 and this one can not be built as shown in figure 1. Yesterday, I found out  the reason why I got the error shown in figure 2. That is because I incresed the size of C02SRAM in the linker file (TMDXDOCKH52C1, can also been seen from figure 2). The original size is below.

    MEMORY
    {
        BOOTROM (RX)    : origin = 0x0,        length = 0x10000
        FLASH_BOOT (RWX): origin = 0x200030,   length = 0x4
        FLASH (RWX)     : origin = 0x200034,   length = 0x7FF9C
        C03SRAM (RWX)   : origin = 0x20000000, length = 0x08000
        S07SHRAM (RWX)  : origin = 0x20008000, length = 0x10000
        CTOMMSGRAM (R)  : origin = 0x2007F000, length = 0x800
        MTOCMSGRAM (RW) : origin = 0x2007F800, length = 0x800
    }

    I am just wondering now if that is possible to increase the heap size to 40960 or not ?

    Thanks,

    Ben

    6888.M3_1.rar

    1727.M3_2.rar

    7558.M3_3.rar

    Figure 1

    Figure 2

  • Ben,

    The linker errors you are getting is because there is not enough space to fit your increased heap size into the memory map.

    I don't think you can create a heap of size 40,960K.  The Concerto board is very limited on memory (only 96K total RAM I believe).

    Looking at the map file of your M1 project, the total size of S07SHRAM 64K.  But, you have already used 56K which consists of your 20K heap and the remainder with is BIOS + NDK.

    So, you would only be able to increase your heap by 8K.

    Steve

  • Thanks Steve, that is helpful.

    Regards,

    Ben