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.

Assembly Language



Hello ,

             I would like to write a assembly code in DSK5416 simulator, so when i compile the program there is no error, but some warnings "no linker command file", so what is the linker command file i need to add , either from example programs i can need to go for any different .cmd file....

  • hi,

     

    here is an example:

    /*****************************************************************************/

    /*                                                                           */

    /* LNK.CMD - V2.00  COMMAND FILE FOR LINKING C PROGRAMS                      */

    /*                                                                           */

    /*      Usage:  lnk500 <obj files...>    -o <out file> -m <map file> lnk.cmd */

    /*              cl500  <src files...> -z -o <out file> -m <map file> lnk.cmd */

    /*                                                                           */

    /*      Description: This file is a sample command file that can be used     */

    /*                   for linking programs built with the C54x C Compiler.    */

    /*                   This file has been designed to work for                 */

    /*                   548 C54x device.                                        */

    /*                   Use it as a guideline; you may want to make alterations */

    /*                   appropriate for the memory layout of the target         */

    /*                   system and/or your application.                         */

    /*                                                                           */

    /*      Notes: (1)   You must specify the directory in which rts.lib is      */

    /*                   located.  Either add a "-i<directory>" line to this     */

    /*                   file, or use the system environment variable C_DIR to   */

    /*                   specify a search path for the libraries.                */

    /*                                                                           */

    /*             (2)   If the run-time library you are using is not            */

    /*                   named rts.lib, be sure to use the correct name here.    */

    /*****************************************************************************/

     

     

    MEMORY {

       PAGE 0: /* program memory */

     

            PROG_RAM (RWX) : origin = 0x1400, length = 0x2C00

            PROG_EXT (RWX) : origin = 0x8000, length = 0x4000

     

          /* boot interrupt vector table location */

            VECTORS (RWX): origin = 0xFF80, length = 0x80

     

     

       PAGE 1:

     

            DATA_RAM (RW): origin = 0x4000, length = 0x2C00

            DATA_EXT (RW): origin = 0x8000, length = 0x7FFF

     

     

     

    } /* MEMORY */

     

     

    SECTIONS {

       .text    > PROG_RAM | PROG_EXT PAGE 0   /* code                     */

       .switch  > PROG_RAM PAGE 0               /* switch table info        */

       .cinit   > PROG_RAM PAGE 0 

     

       .vectors > VECTORS PAGE 0               /* interrupt vectors         */

     

       .cio     > DATA_RAM PAGE 1             /* C I/O                     */  

       .data    > DATA_RAM | DATA_EXT PAGE 1  /* initialized data          */

       .bss     > DATA_RAM | DATA_EXT PAGE 1  /* global & static variables */

       .const   > DATA_RAM PAGE 1             /* constant data             */

       .sysmem  > DATA_RAM | DATA_EXT PAGE 1  /* heap                      */

       .stack   > DATA_RAM | DATA_EXT PAGE 1  /* stack                     */

       .csldata > DATA_RAM PAGE 1

       dmaMem   : align(256) { } >DATA_RAM PAGE 1

    } /* SECTIONS */

    Regards,
    Hyun