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.

TDA4VM: Seek help with memory-related issues that occur after schema modifications based on TDA4

Part Number: TDA4VM


Hi Ti,

When we made an automatic parking application based on TDA4, we had a memory problem after the deep learning architecture was modified for the application. The error log is as follows:

The deep learning architecture before the modification is as follows:

The revised deep learning architecture is as follows:

So, I would like to ask you what is the reason for this problem? Out of memory or architecture problem? How to solve it?Thank you !

  • Hi,

    Could you please send me the pictures with a better clarity? Maybe you could provide me the screenshot?

    In additional to this, could you also elaborate your memory changes? 
    It would be great if you could share me your current rtos memory configuration. (i.e., the app_mem_map.h)

    From the logs, it seems to be an out of memory issue, looks like you have added Segmentation along with psd and vd right?
    Could you please share full logs along with the logs of ./vision_apps_init.sh ?

    As the image is not clear, i'm not able to make out other changes.

    Regards,
    Nikhil

  • Hi,

    Thank you very much for your reply. Here are the new screenshots:

    The following is the attachment of the complete log, please check:


    LXB.zip

    I hope you can help me solve the relevant problems I mentioned at the beginning. If you need any more information later, please inform me in time. I will reply quickly!Thank you very much! 

  • Hi,

    Thank you for sharing the logs.
    From the logs I see the below.

    [C7x_1]      3.932479 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ 117000000 of size 268435456 bytes !!!

    On the other hand, the sum of all the bytes of [C7x_1 ]    544.893399 s: MEM: Allocated xxx bytes @ xxx is exceeding 268435456 upon which the fail is seen.

    This looks like Out of memory issue.

    Could you try to increase the C7x_1 DDR_LOCAL_MEM and test the same?

    Regards,
    Nikhil

     

  • Hi,

    Thank you for your advice. However, after I added C7x_1 DDR_LOCAL_MEM memory, the system crashed. It seems that the memory is out of bounds. Is there anything else I need to modify? The following is a screenshot of the modified and crashed place, please check!

  • Hi,

    Could you let me know how you have modified the memory?

    Have you generated the python script and also make the relevant changes on the linux side (rtos_memory_map.dtsi) and build the dtb file?

    The change will be reflected in the below region

       vision_apps_core_heaps_hi: vision-apps-core-heap-memory-hi@880000000 {
            compatible = "shared-dma-pool";
            reg = <0x08 0x80000000 0x00 0x2B000000>;
            no-map;
        };

    Regards,
    Nikhil

  • Hi,

        Thank you very much for your reply and guidance.

        I directly modified the size of c7x_1_ddr_local_heap_size in the gen_linker_mem_map.py script without building the dtb file.

        How do I need to build it?

        Regards,

       Kong

  • Hi Kong,

    As usual, once the script is generated, build the sdk and copy the filesystem to SD card.

    Additionally follow the below steps:

    Once you generate the python script gen_linker_mem_map.py with your changes, you would see the file k3-j721e-rtos-memory-map.dtsi
    generated.

    Make the same changes as present in k3-j721e-rtos-memory-map.dtsi in the ${PSDKLA}/board-support/linux-5.10.120+gitAUTOINC+95b90aa828-g95b90aa828/arch/arm64/boot/dts/ti/k3-j721e-rtos-memory-map.dtsi

    Once this change is made, go to ${PSDKLA}/ and run make linux-dtbs.

    This would generate the file k3-j721e-vision-apps.dtbo in the folder ${PSDKLA}/board-support/linux-5.10.120+gitAUTOINC+95b90aa828-g95b90aa828/arch/arm64/boot/dts/ti/

    Copy k3-j721e-vision-apps.dtbo and replace in /media/${USER}/rootfs/boot/ in SD card.

    Regards,
    Nikhil