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.

Wrong values when adding .cdb file

Hi,

1st of all some details:

BIOS ver: cuda 4.90.02.10

Processor & board: TMS320VC5510 DSK (evaluation board)

CCS: 3.1.0   3.1.19.0

Code Gen Toolset: 3.2.2

 

I've created a new project written in c++, which includes some memory allocations.

Then I understood that I need to create a DSP/BIOS config.

I did it without configuring much of the features there and included it into to project, and excluded the previous .cmd file

as recommended.

However, when I run it I got  wrong values all across the project, couldnt perform a simple FOR loop cuz the index started in 32 an not 0

even numbers passed to a function suddenly change their values, like from 27 to 985.

 

What is going on here?

I would really appreciate all the help I can get.

Yehuda.

 

 

  • We provide a C++ example with the product.  Can you try it and make sure it works for you?  You can hopefully then use it as reference point for your C++ project.

    The example BIOS/C++ project is called 'bigtime'.

    Regards,
    -Karl-

  • I configured the config file and increased the stack and system stack sizes.

    Yet, it looks like it has a problem with allocating memory.

    I'm using "new" to allocate space, am I suppose to do anything else in addition?

    I read in spru281F ( TMS320c55x optimizing c/C++ compiler user's guide ) that in using the small model, as I do, I have to ensure that: .bss .data .stack .sysstack .sysmem .const, are all in a single page of memory (64k words), however .sysmem does not appear in the generated .cmd file. And as stated this section is for dynamic memory space.

    Where can I declare/add it?

    Are there more issues I need to know about?

  • Make sure that you have heaps enabled and that your default heap size is big enough.

    In config tool, go to MEM area and make sure heaps are enabled.   Create a heap in one of your data sections (via one of the MEM entries like SRAM).  

    Uncheck the "No Dynamic Memory Heaps Button"

    Create a heap in one of your sections

    Set 'Segment for DSP/BIOS Objects" and "Segment for malloc/free" to the segment where you just created the heap.

    If this doesn't help, make sure you look at that bigtime example I referenced earlier.