AnsweredAssumed Answered

Memory Allocation

Question asked by dramsay on May 13, 2011
Latest reply on May 13, 2011 by dramsay

[Error li1040] ".\David1.ldf":176 Out of memory in output section 'seg_dmda' in processor 'P0'
        Total of 0x4002 word(s) were not mapped.
For more details, see 'linker_log.xml' in the output directory.



Hello, I'm getting this error and I'm not quite sure how to fix it (working on the ADSP-21262 EZ-Kit).  I've seen the earlier post on the subject, and went about adding my own ldf file and clicking the 'generate symbolic map' option, but I'm still stuck as to what is going on.



As far as I can tell, I shouldn't be running out of memory.  My program is based on the block-based talkthru (C) example, so the program code isn't particularly memory intensive.  I'm using a 2048 point FFT with cfft and cfft_mag, and 5 1024 sample blocks to read in data using the DMA controller-


that's 5 x 1024 ints (for DMA data in), 3 x 2048 x 2 floats (b/c they're complex_floats for FFT in/out), 1 x 2048 floats (spectrum output of cfft_mag), and 1 x 1048 x 2 floats (complex floats for twiddle factors that can be stored in program memory), along with a few other variables here and there.  All totaled that's about 22K 32-bit words, 20K of which I need in RAM.  According to the sheet for the chip, I should be able to store 32K 32-bit words in the RAM of either Block 0 or Block 1, so it seems to me that I'm well within the bounds of reason (especially since I'd assume the program is stored in ROM).



In any case, how do I go about solving this problem?  As far as I can tell I'm well within the limits of the chip.  I tried looking at the log.xml file but it just repeated the error above (and since I created my own .ldf file it hasn't even said that).  I'm very new at this so any suggestions are greatly appreciated.


Is there a way to just assign the PM to Block 0 ROM and the DM to Block 0 RAM and be done with it?


I'm sure that linking is a complicated issue, and not one that I've dealt with before.  I've read through the hardware reference and datasheet memory sections, and I'm in the process of chugging through the Linker and Utilities Manual, but I'm not 100% on what to look for exactly.


Thanks for the help!