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.

malloc and MEMalloc Problem

Dear All,6052.ourtcf.txt

We have a problem with MEM_alloc and malloc() functions.

We have bought an OMAP-L137 EVM and want to work with EDMA. With the configuration tool we configured the memories and set "Call User init Function" in the tool to main function. We configured heap to be placed in SDRAM and disable Caches. The tcf file has been attached to this post.

Then, we built the project. The out file was built successfully. We loaded the program on the board and started to debug it. All thing was ok until we reached to the line including malloc(). The program halted and the system do not any thing. We tried MEM_alloc but the problem was the same.

What is the solution?

Please, help.

Janet.

  • Janet,
    setting Call User Init Function to 'main' does not look like a right thing to do. Please read more about it in spru403.pdf in the directory 'docs' of your BIOS installation. Look for Section GBL Module.

    What's the version of BIOS you are using? Can you post the lines where you invoke MEM_alloc?

  • Dear Sasha,

    I think the main problem of my tcf is memory configuration. When I use the tcf file delivered with this example all things are ok. That tcf use "256kB L2 Shared Internal RAM" as IRAM. I want to place my code in "256kB L2 DSP local RAM" but when I insert a MEM in configuration tool and set its base address and length to "256kB L2 DSP local RAM" and set .text to place in that the system does not work. Why? I don't know! Does not Bios have access to "256kB L2 DSP local RAM"? Please, help me about memory configuration in a way that I can use "256kB L2 DSP local RAM" for my code. How can I change tcf file to do this?

    Thanks,

    Janet

  • Janet,
    I can see in your attached script the following line:
    bios.MEM.TEXTSEG = prog.get("DSPL2RAM");
    That allocates code to DSPL2RAM. If I understood you correctly your program fails with that setting and works with
    bios.MEM.TEXTSEG = prog.get("IRAM");
    Is that right?

    Can you tell if MEM_allocis returning? Are you checking for the return value?