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.

MAD Partitions and memory map



Hello all,

I am reading the MAD UG and image_processing example deployment_template_evmc6678l.json file and not sure how to assign the memory map for the partitions. For example I see that 0x9e000000, 0x81e000000 may reside in DDR3, but what about 0x808000000?...and how to know the section names "secNamePat"...any more details document other than the User Guide?

  • Hi Murad,

    For your application typically, you don`t need to change the memory map in the json file unless the build throws out an error but all the addresses in the json file correspond to memory locations in DDR memory. If you want to add additional secNamePat then you can maintain the uniform gap between all the section partitions as has been done in the ddr data section of the json file. secNamePat needs to be modified if your application .out file has more section names that the perl script doesn`t recognize but the "args" option specified in the json file is like a wild card option that will place all the sections other than the ones specified in the ddr-data partition in ddr-data section by default.

    You can view the permisiions and the partions in your application binary by using the ofd6x utiltiy provided with the compiler by using it as specified below:

    ofd6x -v app1 > objdump.txt

    BAsed on the permissions and the nature of the serction you can place it in either ddr-code or ddr-data. For example if you have a your own section name emif4config defined in your linker command file and this is a data section, then you can add, "emif$" to the secNamePat that the perl script should use to match the pattern with the section name in your applkication binary. when the script finds this partition in your application binary it will place it in the ddr-data section of the final binary.

    Regards,

    Rahul

  • Thank you Raul for your prompt reply,
    I ran the ofd6x and produced a very large .txt file (> 10 M) that couldn't attach. at end of file, I see a list of names but not all listed in the .secNamePat...any way to summarize what is in the file?

        offset  string                    
        ------  ------                    
             0  ""                        
             1  "ti.sdo.ipc.SharedRegion_0"
            27  ".ti.decompress"          
            42  ".stack"                  
            49  ".bss"                    
            54  ".neardata"               
            64  ".rodata"                 
            72  ".cinit"                  
            79  ".pinit"                  
            86  ".init_array"             
            98  ".data"                   
           104  ".sysmem"                 
           112  ".args"                   
           118  ".ti.handler_table"       
           136  ".code"                   
           142  ".defaultStackSection"    
           163  ".plt"                    
           168  "xdc.meta"                
           177  ".debug_info"             
           189  ".debug_line"             
           201  ".debug_frame"            
           214  ".debug_abbrev"           
           228  ".debug_pubnames"         
           244  ".debug_aranges"          
           259  ".debug_str"              
           270  ".debug_pubtypes"         
           286  ".text"                   
           292  ".const"                  
           299  ".fardata.1"              
           310  ".fardata.2"              
           321  ".switch.1"               
           331  ".switch.2"               
           341  ".far"                    
           346  ".cio"                    
           351  ".vecs"                   
           357  ".cppi"                   
           363  ".qmss"                   
           369  ".nimu_eth_ll2"           
           383  ".far:NDK_PACKETMEM"      
           402  ".far:NDK_OBJMEM"         
           418  ".far:WEBDATA"            
           431  ".resmgr_memregion"       
           449  ".resmgr_handles"         
           465  ".resmgr_pa"              
           476  "systemHeapMaster"        
           493  "platform_lib"            
           506  ".c6xabi.attributes"      
           525  ".symtab"                 
           533  ".TI.section.flags"       
           551  ".strtab"                 
           559  ".shstrtab" 

    Regards,

    Murad

  • Hi Murad,

    Here is an example of the information you should read from the objdump from ofd6x.

    the First segment<0> contains 2 sections .text and .const and have Read and Execute permissions (r-x) so they will be placed in the ddr-code section while the other 2 segments (<1>,<2>)  have Read Write permissions (rw-) so they will be placed in the ddr-code section based on the configuration in the json file.

    The syntax specification of "stack", "^.far$" in the secNamePat of the ddr-data section helps place those sections in the ddr-data section.  The same goes for the "^.text", "const" specification in the secNAmePat field of the ddr-code section. In case tou make a mistake of placing a section with read and write in ddr-code the build will report error of incompatible permissions.

    Regards,

    Rahul

  • Thanks Rahul for the example.

    Regards,

    Murad