Documentation for gen_shm_cmd.pl

NAME

gen_shm_cmd.pl

SYNOPSIS

Perl script that reads in an XML file representation of a linker map file and spits out MEMORY sections that are in shared memory, so they can be shared with another processor (eg Arm+DSP). Basically avoids the double-duty problem ie if SHMEM section start address or length changes, then you'd otherwise need to update the other processor's SHMEM org, len cmd file definitions (Arm or DSP)

A sample output in a generated .cmd might be: -

        /* This file is *auto-generated*. Do not edit. Mods risk being overwritten */ 
        /* These sections are shared between Arm & DSP */ 
        MEMORY {
                SHMEM1: origin = 0x00030000, len = 0x00010000 
                SHMEM2: origin = 0x00060000, len = 0x00020000 
        }

USAGE

   gen_shm_cmd.pl <--start_shm=0x1234> <--end_shm=0x5678> <xml file> <output_cmd_file>

ADDITIONAL OPTIONS

 --cg_xml_version : Print out the version of the cg_xml package in use

DESCRIPTION

Generate the XML version of the map file with the linker option --xml_link_info=<file>

For execution on Unix, the first line must be modified to point to the directory where Perl is installed.

This script was written using Perl version 5.8.3. It may not work with earlier revisions of Perl.

Script assumes that the Shared Memory is contiguous ie will not work if there's a strange case of SHMEM, NONSHMEM, SHMEM.

Script will output the actual physical start and length of the shared MEMORY sections in the xml file within the ranges specified by start_shm, end_shm ie its not just a straight cmd-style duplicate of the start_shm, end_shm passed in. Hence, advice is to pass start_shm, end_shm addresses consistent with range of SHMEM in device data sheet, thus encompassing full range and ensuring that all SHMEM sections will be captured.

 Documentation for gen_shm_cmd.pl