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: How to increase available malloc size in TIOVX User Kernels (R5F)

Part Number: TDA4VM

Hello, there.

I use PSDK RTOS and PSDK QNX. And I added my TIOVX custom kernels to ${PSDK_RTOS_PATH}/vision_apps/kernels using PyTIOVX as follows:

from tiovx import *

code = KernelExportCode("my_custom_kernel", "r5f", "CUSTOM_APPLICATION_PATH")

code.setCoreDirectory("r5f")

kernel = Kernel("my_custom_kernel")

kernel.setParameter(Type.USER_DATA_OBJECT, Direction.INPUT, ParamState.REQUIRED, "configuration", ['my_custom_kernel_input_t'])
kernel.setParameter(Type.USER_DATA_OBJECT, Direction.OUTPUT, ParamState.REQUIRED, "recognition_result", ['my_custom_kernel_output_t'])

kernel.setTarget(Target.IPU2)

code.export(kernel)

And I confirmed that the module was loaded and the Create(), Process(), Delete() callbacks were executed normally.
After OSPI flashing in SD boot mode, the sample app was executed in OSPI boot mode.
However, when memory is allocated with the malloc (in R5F target code, TIOVX callback), it seems that only about 670 KB are allocated.
(I used malloc function in std c)

How can I increase available malloc size in TIOVX User Kernels (R5F)? 

I already tried the following two ways, but both failed.

1. Modify ${PSDK_RTOS}/vision_apps/apps/basic_demos/app_tirtos/bios_cfg/bios_common.cfg. 

a) Modify: Memory.defaultHeapSize = 10*768*1024; (origin: 768*1024)

b) Build -> Build error 

"/home/user/ti-processor-sdk-rtos-j721e-evm-07_01_00_11/vision_apps/apps/basic_demos/app_tirtos/tirtos_qnx/mcu3_0/linker.cmd", line 23: error: 
   program will not fit into available memory, or the section contains a call
   site that requires a trampoline that can't be generated for this section.
   run placement with alignment fails for section ".bss" size 0xb07448.
   Available memory ranges:
   DDR_MCU3_0   size: 0x6ffc00     unused: 0x5470c0     max hole: 0x545400  
error: errors encountered during linking;
   "/home/user/ti-processor-sdk-rtos-j721e-evm-07_01_00_11/vision_apps/out/J7/R5F/SYSBIOS/release/vx_app_tirtos_qnx_mcu3_0.out" not built
concerto/finale.mak:208: recipe for target '/home/user/ti-processor-sdk-rtos-j721e-evm-07_01_00_11/vision_apps/out/J7/R5F/SYSBIOS/release/vx_app_tirtos_qnx_mcu3_0.out' failed

2. Modify ${PSDK_RTOS}/vision_apps/apps/basic_demos/app_tirtos/tirtos_qnx/gen_linker_mem_map.py.

a) Modify: mcu3_0_ddr_local_heap_size  = 16*MB; (origin: 2MB)

b) Run: gen_linker_mem_map.py

c) Build

d) It didn't work. Still available around 670KB.

Please answer about my question.