I'm using the Audio SOC example provided in the SDK as a template for my own application. Since I'm using quite a few large data buffers (on the DSP side), I want to place all data in L2 memory instead of external memory to increase the speed. Thus, I have added the following lines to the file "audio.tcf" :
// Increase size of IRAM (L2 memory) to 224kB
var IRAM = prog.module("MEM").instance("IRAM");
IRAM.len = 0x38000; // 224kB
which builds without problems and the .map-file looks OK (to me), see memory configuration below :
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
IRAM 11800000 00038000 00013144 00024ebc RWIX
CACHE_L2 11838000 00008000 00000000 00008000 RWIX
CACHE_L1P 11e00000 00008000 00000000 00008000 RWIX
CACHE_L1D 11f00000 00008000 00000000 00008000 RWIX
L3_CBA_RAM 80000000 00020000 00000000 00020000 RWIX
RESET_VECTOR c3e00000 00000080 00000000 00000080 RWIX
DDR c3e00080 000fff80 00094fdf 0006afa1 RWIX
DSPLINKMEM c3f00000 00030000 00000000 00030000 RWIX
POOLMEM c3f30000 000d0000 00000000 000d0000 RWIX
However, when I start to actually place data in IRAM I run into weird problems (which does not ocurr with the data in external memory - then everything is fine but slow). Is the above procedure for increasing the IRAM size OK, or should I do something else? Have I missed something?
Thanks in advance!