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.
Tool/software: Code Composer Studio
Hello,
I am trying to use Memory Allocation window to check memory footprint of a project but no usable information is displayed. Is this a known issue? I am working with AMIC110 processor, compiler version GNU v6.3.1 so I am using gnu .map file (memory allocation for .xml files generated by C2000 works perfectly fine).
Best regards,
A.Lukasiak
Would you mind giving the latest CCS v8.0 a try to see if that works differently?
http://processors.wiki.ti.com/index.php/Download_CCS
If it shows the same issue, could you zip up the .map file and .out file generated by the project and attach it here?
Looking at CCS 8.0.0.00016 Cortex-A8 project built with GCC v6.3.1 the CCS Memory Allocation view seems to require attributes to be set on the MEMORY regions to be able to parse the memory usage.AartiG said:I will investigate some more and post an update when I have more information.
Originally in the linker script there were no attributes set:
MEMORY { SRAM : o = 0x402F0400, l = 0x0000FC00 /* 64kB internal SRAM */ L3OCMC0 : o = 0x40300000, l = 0x00010000 /* 64kB L3 OCMC SRAM */ M3SHUMEM : o = 0x44D00000, l = 0x00004000 /* 16kB M3 Shared Unified Code Space */ M3SHDMEM : o = 0x44D80000, l = 0x00002000 /* 8kB M3 Shared Data Memory */ DDR0 : o = 0x80000000, l = 0x40000000 /* 1GB external DDR Bank 0 */ }
Which caused the following error to be reported in the Memory Allocation view:
For the example program used, all sections of the program are placed in the DDR0 memory region. When attributes were added on all but the DDR0 region:
MEMORY { SRAM (RWX) : o = 0x402F0400, l = 0x0000FC00 /* 64kB internal SRAM */ L3OCMC0 (RWX) : o = 0x40300000, l = 0x00010000 /* 64kB L3 OCMC SRAM */ M3SHUMEM (RWX) : o = 0x44D00000, l = 0x00004000 /* 16kB M3 Shared Unified Code Space */ M3SHDMEM (RWX) : o = 0x44D80000, l = 0x00002000 /* 8kB M3 Shared Data Memory */ DDR0 : o = 0x80000000, l = 0x40000000 /* 1GB external DDR Bank 0 */ }
Then the Memory Usage view displayed the regions with the attributes, of which none are use for the program sections:
With attributes added to all memory regions:
MEMORY { SRAM (RWX) : o = 0x402F0400, l = 0x0000FC00 /* 64kB internal SRAM */ L3OCMC0 (RWX) : o = 0x40300000, l = 0x00010000 /* 64kB L3 OCMC SRAM */ M3SHUMEM (RWX) : o = 0x44D00000, l = 0x00004000 /* 16kB M3 Shared Unified Code Space */ M3SHDMEM (RWX) : o = 0x44D80000, l = 0x00002000 /* 8kB M3 Shared Data Memory */ DDR0 (RWX) : o = 0x80000000, l = 0x40000000 /* 1GB external DDR Bank 0 */ }
Then the Memory Usage view then displayed the memory usage for the program, all of which is in the DDR0 memory region:
I haven't yet tried with the PRU-ICSS-Profinet_Slave_01.00.02.02 example to check that adding attributes to the memory regions will cause the Memory Allocation to be displayed for the example.
The profinet_slave_RT_MRP_AMIC11x example is a SYS/BIOS project where the memory regions come from the platform ti.platforms.evmAM3359.user5141898 said:However, my project is based on profinet_slave_RT_MRP_AMIC11x from PRU-ICSS-Profinet_Slave_01.00.02.02 and the issue occurs even for unmodified project, downloaded from TI website.
As mentioned in my previous post, for the Memory Allocation view in CCS 8.0.0.00016 to be able to display the memory usage for a program built with the GCC ARM compiler requires attributes to be set on each memory region. One work-around is to add the following to the .cfg file for the program:
/* If any memory region doesn't have access attributes specified, then set to "RWX". Memory region access attributes are required for the Memory Allocation view in CCS 8.0.0.00016 to be able to parse the memory usage for a memory region in .map file generated by the GCC ARM linker */ for (var i=0; i < Program.cpu.memoryMap.length; i++) { if (Program.cpu.memoryMap[i].access == null) { Program.cpu.memoryMap[i].access = "RWX"; } }
With this modification made to the amic11x_app_arm.cfg file from the profinet_slave_RT_MRP_AMIC11x example then the CCS Memory Allocation view then displayed the memory usage:
Using the Edit Platform wizard appears to show that the ti.platforms.evmAM3359 from SYS/BIOS 6.52.00.12 already has attributes (aka "Access") set for the DDR3 memory region, so not sure why the work-around of editing the .cfg file to force attributes to be used was necessary: