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.

TMS320F28069: Flash Programming

Part Number: TMS320F28069
Other Parts Discussed in Thread: UNIFLASH, , C2000WARE

I have a TMS320F28069 dev board and I am trying to program the flash. I am using UniFlash gui. It looks like my setup is correct, and I get the following message after I finish programming:  [SUCCESS] Program Load completed successfully.

But after I reset my dev board I dont see my board executing any code.

all the switches on the S1 are ON. Do I need to change any bits on this Dip switch?

Thank you!

  • I looked at this file in my project please see below.  Can this file can be modified to include flash?


             Contiguous SARAM memory blocks can be combined
             if required to create a larger memory block.
    */

    _Cla1Prog_Start = _Cla1funcsRunStart;
    -heap 0x400
    -stack 0x400


    // Define a size for the CLA scratchpad area that will be used
    // by the CLA compiler for local symbols and temps
    // Also force references to the special symbols that mark the
    // scratchpad are.
    // CLA_SCRATCHPAD_SIZE = 0x100;
    --undef_sym=__cla_scratchpad_end
    --undef_sym=__cla_scratchpad_start

    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode   */

       BEGIN              : origin = 0x000000, length = 0x000002
       RAMM0              : origin = 0x000050, length = 0x0003B0
       RAML5L8          : origin = 0x00C000, length = 0x008000


      /* RAML0_L2       : origin = 0x008000, length = 0x001000 */
       RAML3            : origin = 0x009000, length = 0x001000
       RESET              : origin = 0x3FFFC0, length = 0x000002














       /* FPU Tables in Boot ROM */
       FPUTABLES        : origin = 0x3FD590, length = 0x0006A0




        /* IQ Math Tables in Boot ROM */
       IQTABLES           : origin = 0x3FDF00, length = 0x000B50
       IQTABLES2          : origin = 0x3FEA50, length = 0x00008C
       IQTABLES3          : origin = 0x3FEADC, length = 0x0000AA




       BOOTROM            : origin = 0x3FF3B0, length = 0x000C10






    PAGE 1 :








       /* Part of M0, BOOT rom will use this for stack */
       BOOT_RSVD               : origin = 0x000002, length = 0x00004E
       /* on-chip RAM block M1 */
       RAMM1                   : origin = 0x000480, length = 0x000380
       CLARAM0              : origin = 0x008800, length = 0x000400
       CLARAM1              : origin = 0x008C00, length = 0x000400
       CLARAM2                : origin = 0x008000, length = 0x000800
       /* on-chip RAM block L4-L8 */
       RAML4                : origin = 0x00A000, length = 0x002000
      /* RAML5              : origin = 0x00C000, length = 0x002000 */
      /* RAML6               : origin = 0x00E000, length = 0x002000 */
      /* RAML7               : origin = 0x010000, length = 0x002000 */
      /* RAML8               : origin = 0x012000, length = 0x002000 */

       CLA1_MSGRAMLOW       : origin = 0x001480, length = 0x000080
       CLA1_MSGRAMHIGH      : origin = 0x001500, length = 0x000080

    }









    SECTIONS
    {

    /* Setup for "boot to SARAM" mode:
          The codestart section (found in DSP28_CodeStartBranch.asm)
          re-directs execution to the start of user code.  */
       codestart        : > BEGIN,     PAGE = 0
       ramfuncs         : > RAMM0,     PAGE = 0
       .text            : > RAML5L8,   PAGE = 0
       .cinit           : > RAMM0,     PAGE = 0
       .pinit           : > RAMM0,     PAGE = 0
       .switch          : > RAMM0,     PAGE = 0
       .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */







       .stack           : > RAML4,     PAGE = 1
       .ebss            : > RAML4,     PAGE = 1
       .econst          : > RAML4,     PAGE = 1
       .esysmem         : > RAML4,     PAGE = 1
       .sysmem          : > RAML4,     PAGE = 1
       .cio             : > RAML4,     PAGE = 1

























       .scratchpad      : > CLARAM0,   PAGE = 1
       .bss_cla            : > CLARAM0,   PAGE = 1
       .const_cla        : > CLARAM0,   PAGE = 1

       IQmath           : > RAML4,       PAGE = 1
       IQmathTables     : > IQTABLES,  PAGE = 0, TYPE = NOLOAD

       /* Allocate FPU math areas: */
       FPUmathTables    : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
       
       Cla1Prog        : > RAML3,
                         LOAD_START(_Cla1funcsLoadStart),
                         LOAD_END(_Cla1funcsLoadEnd),
                         LOAD_SIZE(_Cla1funcsLoadSize),
                         RUN_START(_Cla1funcsRunStart),
                         PAGE = 0



       Cla1ToCpuMsgRAM  : > CLA1_MSGRAMLOW,   PAGE = 1
       CpuToCla1MsgRAM  : > CLA1_MSGRAMHIGH,  PAGE = 1
       Cla1DataRam0        : > CLARAM0,          PAGE = 1
       Cla1DataRam1        : > CLARAM1,          PAGE = 1
       Cla1DataRam2        : > CLARAM2,          PAGE = 1

       CLA1mathTables    : > CLARAM1,
                          LOAD_START(_Cla1mathTablesLoadStart),
                          LOAD_END(_Cla1mathTablesLoadEnd),
                          LOAD_SIZE(_Cla1mathTablesLoadSize),
                          RUN_START(_Cla1mathTablesRunStart),
                          PAGE = 1





       CLAscratch       :
                         { *.obj(CLAscratch)
                         . += CLA_SCRATCHPAD_SIZE;
                         *.obj(CLAscratch_end) } > CLARAM0,



                         PAGE = 1







      /* Uncomment the section below if calling the IQNexp() or IQexp()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       {


                  IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)


       }
       */
       /* Uncomment the section below if calling the IQNasin() or IQasin()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables3    : > IQTABLES3, PAGE = 0, TYPE = NOLOAD
       {


                  IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)

       }


       */









    }

    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */


  • Hi Farid,

    Please attach files like the one you provided instead of putting it in the body as text going forward. It makes it the forum thread a lot more readable and easier for us on this side.

    Regarding your issue, this linker command file you're using places everything in RAM while you want to run from Flash. You can either modify this .cmd file, or (a much easier approach) just use the generic Flash .cmd file within C2000ware:

    C:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2806x\common\cmd\F28069.cmd

    Also make sure any boot selection pins are correctly configured to boot from flash on your dev board. You can consult the dev board documentation within C2000ware if you have questions on this, but you may already have looked into this by the sound of it.

    Best,
    Kevin

  • Hi!

    I tried using 28068.cmd, I modified it and added data section for CLA. but I got all sorts of errors. I had no issues before using this cmd file: 28069_RAM_CLA_lnk. But I can use this file as I need to boot from the flash. Can anyone help me on how to include what I need from 28069_RAM_CLA_lnk into a cmd file for the flash. Thanks!
  • Hi Farid,

    The CLA doesn't have access to Flash memory, you will have to copy it over to one of the three memory types below that the CLA can access:

    • CLA Program Memory

    • CLA Data Memory

    • CLA Shared Message RAMs

    You should allocate memory for the CLA program in your linker command file and then you can copy the section into ram using memcpy() during run time.

    See this prior E2E post for help: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/483335?f28069-Loading-initialized-memory-from-Flash-to-RAM-

    Also the CLA chapter within the device Technical Reference Manual and memory map within the device datasheet.

    Best,

    Kevin

  • Hi Kevin! Thank you for your reply. Please see attached my cmd file and debug errors file. I tried to follow what you said but i am still getting errors. can you please look at the cmd file and see what I am missing.
    /*
    //###########################################################################
    //
    // FILE:    F28069.cmd
    //
    // TITLE:   Linker Command File For F28069 Device
    //
    //###########################################################################
    // $TI Release: F2806x C/C++ Header Files and Peripheral Examples V151 $
    // $Release Date: February  2, 2016 $
    // $Copyright: Copyright (C) 2011-2016 Texas Instruments Incorporated -
    //             http://www.ti.com/ ALL RIGHTS RESERVED $
    //###########################################################################
    */

    /* ======================================================
    // For Code Composer Studio V2.2 and later
    // ---------------------------------------
    // In addition to this memory linker command file,
    // add the header linker command file directly to the project.
    // The header linker command file is required to link the
    // peripheral structures to the proper locations within
    // the memory map.
    //
    // The header linker files are found in <base>\F2806x_headers\cmd
    //
    // For BIOS applications add:      F2806x_Headers_BIOS.cmd
    // For nonBIOS applications add:   F2806x_Headers_nonBIOS.cmd
    ========================================================= */

    /* ======================================================
    // For Code Composer Studio prior to V2.2
    // --------------------------------------
    // 1) Use one of the following -l statements to include the
    // header linker command file in the project. The header linker
    // file is required to link the peripheral structures to the proper
    // locations within the memory map                                    */

    /* Uncomment this line to include file only for non-BIOS applications */
    /* -l F2806x_Headers_nonBIOS.cmd */

    /* Uncomment this line to include file only for BIOS applications */
    /* -l F2806x_Headers_BIOS.cmd */

    /* 2) In your project add the path to <base>\F2806x_headers\cmd to the
       library search path under project->build options, linker tab,
       library search path (-i).
    /*========================================================= */

    /* Define the memory block start/length for the F2806x
       PAGE 0 will be used to organize program sections
       PAGE 1 will be used to organize data sections

       Notes:
             Memory blocks on F28069 are uniform (ie same
             physical memory) in both PAGE 0 and PAGE 1.
             That is the same memory region should not be
             defined for both PAGE 0 and PAGE 1.
             Doing so will result in corruption of program
             and/or data.

             Contiguous SARAM memory blocks can be combined
             if required to create a larger memory block.
    */


    MEMORY
    {
    PAGE 0 :   /* Program Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
       RAML0       : origin = 0x008000, length = 0x000800     /* on-chip RAM block L0 */
       RAML1       : origin = 0x008800, length = 0x000400     /* on-chip RAM block L1 */
       OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */

       FLASHH      : origin = 0x3D8000, length = 0x004000     /* on-chip FLASH */
       FLASHG      : origin = 0x3DC000, length = 0x004000     /* on-chip FLASH */
       FLASHF      : origin = 0x3E0000, length = 0x004000     /* on-chip FLASH */
       FLASHE      : origin = 0x3E4000, length = 0x004000     /* on-chip FLASH */   
       FLASHD      : origin = 0x3E8000, length = 0x004000     /* on-chip FLASH */
       FLASHC      : origin = 0x3EC000, length = 0x004000     /* on-chip FLASH */
       FLASHA      : origin = 0x3F4000, length = 0x003F80     /* on-chip FLASH */
       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
       CSM_PWL_P0  : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */

       FPUTABLES   : origin = 0x3FD860, length = 0x0006A0      /* FPU Tables in Boot ROM */
       IQTABLES    : origin = 0x3FDF00, length = 0x000B50     /* IQ Math Tables in Boot ROM */
       IQTABLES2   : origin = 0x3FEA50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
       IQTABLES3   : origin = 0x3FEADC, length = 0x0000AA      /* IQ Math Tables in Boot ROM */


       ROM         : origin = 0x3FF3B0, length = 0x000C10     /* Boot ROM */
       RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
       VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */

    PAGE 1 :   /* Data Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
               /* Registers remain on PAGE1                                                  */

       BOOT_RSVD   : origin = 0x000000, length = 0x000050     /* Part of M0, BOOT rom will use this for stack */
       RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
       RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       RAML2       : origin = 0x008C00, length = 0x000400     /* on-chip RAM block L2 */
       RAML3       : origin = 0x009000, length = 0x001000      /* on-chip RAM block L3 */
       RAML4       : origin = 0x00A000, length = 0x002000     /* on-chip RAM block L4 */
       RAML5       : origin = 0x00C000, length = 0x002000     /* on-chip RAM block L5 */
       RAML6       : origin = 0x00E000, length = 0x002000     /* on-chip RAM block L6 */
       RAML7       : origin = 0x010000, length = 0x002000     /* on-chip RAM block L7 */
       RAML8       : origin = 0x012000, length = 0x002000     /* on-chip RAM block L8 */
       USB_RAM     : origin = 0x040000, length = 0x000800     /* USB RAM          */   
       FLASHB      : origin = 0x3F0000, length = 0x004000     /* on-chip FLASH */

       dataRAM       : origin = 0x008800, length = 0x000400       /* on-chip RAM block L1 */

       CLA_CPU_MSGRAM  : origin = 0x001480, length = 0x000080 /* CLA-R/W, CPU-R message RAM */
       CPU_CLA_MSGRAM  : origin = 0x001500, length = 0x000080 /* CPU-R/W, CLA-R message RAM */
    }


    /* Allocate sections to memory blocks.
       Note:
             codestart user defined section in DSP28_CodeStartBranch.asm used to redirect code
                       execution when booting to flash
             ramfuncs  user defined section to store functions that will be copied from Flash into RAM
    */

    SECTIONS
    {

       /* Allocate program areas: */
       .cinit              : > FLASHA,     PAGE = 0
       .pinit              : > FLASHA,     PAGE = 0
       .text               : > FLASHA,     PAGE = 0
       codestart           : > BEGIN,      PAGE = 0
       ramfuncs            : LOAD = FLASHD,
                             RUN = RAML0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             LOAD_SIZE(_RamfuncsLoadSize),
                             PAGE = 0


           Cla1Prog         : LOAD = FLASHC, /* Note for running from RAM the load and RUN can be the same */
                          RUN = RAML3,
                          LOAD_START(_Cla1funcsLoadStart),
                          LOAD_END(_Cla1funcsLoadEnd),
                          RUN_START(_Cla1funcsRunStart),
                          PAGE = 1

       csmpasswds          : > CSM_PWL_P0, PAGE = 0
       csm_rsvd            : > CSM_RSVD,   PAGE = 0


       /* Allocate uninitalized data sections: */
       .stack              : > RAMM0,      PAGE = 1
       .ebss               : > RAML4,      PAGE = 1
       .esysmem            : > RAML2,      PAGE = 1
        Cla1Data               : > RAML2,      PAGE = 1

       /* Initalized sections to go in Flash */
       /* For SDFlash to program these, they must be allocated to page 0 */
       .econst             : > FLASHA,     PAGE = 0
       .switch             : > FLASHA,     PAGE = 0

       /* Allocate IQ math areas: */
       IQmath              : > FLASHA,     PAGE = 0            /* Math Code */
       IQmathTables        : > IQTABLES,   PAGE = 0, TYPE = NOLOAD
       
       /* Allocate FPU math areas: */
       FPUmathTables       : > FPUTABLES,  PAGE = 0, TYPE = NOLOAD
       
       DMARAML5               : > RAML5,      PAGE = 1
       DMARAML6               : > RAML6,      PAGE = 1
       DMARAML7               : > RAML7,      PAGE = 1
       DMARAML8               : > RAML8,      PAGE = 1   

       Cla1ToCpuMsgRAM   : > CLA_CPU_MSGRAM PAGE = 1
       CpuToCla1MsgRAM   : > CPU_CLA_MSGRAM PAGE = 1

       .reset            : > RESET,      PAGE = 0, TYPE = DSECT
       vectors           : > VECTORS     PAGE = 0, TYPE = DSECT


       /* .reset is a standard section used by the compiler.  It contains the */
       /* the address of the start of _c_int00 for C Code.   /*
       /* When using the boot ROM this section and the CPU vector */
       /* table is not needed.  Thus the default type is set here to  */
       /* DSECT  */
       .reset              : > RESET,      PAGE = 0, TYPE = DSECT
       vectors             : > VECTORS,    PAGE = 0, TYPE = DSECT

    }





















    /*
    //===========================================================================
    // End of file.
    //===========================================================================













    */



    /*
    //###########################################################################
    //
    // FILE:    F28069.cmd
    //
    // TITLE:   Linker Command File For F28069 Device
    //
    //###########################################################################
    // $TI Release: F2806x C/C++ Header Files and Peripheral Examples V151 $
    // $Release Date: February  2, 2016 $
    // $Copyright: Copyright (C) 2011-2016 Texas Instruments Incorporated -
    //             http://www.ti.com/ ALL RIGHTS RESERVED $
    //###########################################################################
    */

    /* ======================================================
    // For Code Composer Studio V2.2 and later
    // ---------------------------------------
    // In addition to this memory linker command file,
    // add the header linker command file directly to the project.
    // The header linker command file is required to link the
    // peripheral structures to the proper locations within
    // the memory map.
    //
    // The header linker files are found in <base>\F2806x_headers\cmd
    //
    // For BIOS applications add:      F2806x_Headers_BIOS.cmd
    // For nonBIOS applications add:   F2806x_Headers_nonBIOS.cmd
    ========================================================= */

    /* ======================================================
    // For Code Composer Studio prior to V2.2
    // --------------------------------------
    // 1) Use one of the following -l statements to include the
    // header linker command file in the project. The header linker
    // file is required to link the peripheral structures to the proper
    // locations within the memory map                                    */

    /* Uncomment this line to include file only for non-BIOS applications */
    /* -l F2806x_Headers_nonBIOS.cmd */

    /* Uncomment this line to include file only for BIOS applications */
    /* -l F2806x_Headers_BIOS.cmd */

    /* 2) In your project add the path to <base>\F2806x_headers\cmd to the
       library search path under project->build options, linker tab,
       library search path (-i).
    /*========================================================= */

    /* Define the memory block start/length for the F2806x
       PAGE 0 will be used to organize program sections
       PAGE 1 will be used to organize data sections

       Notes:
             Memory blocks on F28069 are uniform (ie same
             physical memory) in both PAGE 0 and PAGE 1.
             That is the same memory region should not be
             defined for both PAGE 0 and PAGE 1.
             Doing so will result in corruption of program
             and/or data.

             Contiguous SARAM memory blocks can be combined
             if required to create a larger memory block.
    */


    MEMORY
    {
    PAGE 0 :   /* Program Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
       RAML0       : origin = 0x008000, length = 0x000800     /* on-chip RAM block L0 */
       RAML1       : origin = 0x008800, length = 0x000400     /* on-chip RAM block L1 */
       OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */

       FLASHH      : origin = 0x3D8000, length = 0x004000     /* on-chip FLASH */
       FLASHG      : origin = 0x3DC000, length = 0x004000     /* on-chip FLASH */
       FLASHF      : origin = 0x3E0000, length = 0x004000     /* on-chip FLASH */
       FLASHE      : origin = 0x3E4000, length = 0x004000     /* on-chip FLASH */  
       FLASHD      : origin = 0x3E8000, length = 0x004000     /* on-chip FLASH */
       FLASHC      : origin = 0x3EC000, length = 0x004000     /* on-chip FLASH */
       FLASHA      : origin = 0x3F4000, length = 0x003F80     /* on-chip FLASH */
       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
       CSM_PWL_P0  : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */

       FPUTABLES   : origin = 0x3FD860, length = 0x0006A0      /* FPU Tables in Boot ROM */
       IQTABLES    : origin = 0x3FDF00, length = 0x000B50     /* IQ Math Tables in Boot ROM */
       IQTABLES2   : origin = 0x3FEA50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
       IQTABLES3   : origin = 0x3FEADC, length = 0x0000AA      /* IQ Math Tables in Boot ROM */


       ROM         : origin = 0x3FF3B0, length = 0x000C10     /* Boot ROM */
       RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
       VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */

    PAGE 1 :   /* Data Memory */
               /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
               /* Registers remain on PAGE1                                                  */

       BOOT_RSVD   : origin = 0x000000, length = 0x000050     /* Part of M0, BOOT rom will use this for stack */
       RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
       RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       RAML2       : origin = 0x008C00, length = 0x000400     /* on-chip RAM block L2 */
       RAML3       : origin = 0x009000, length = 0x001000      /* on-chip RAM block L3 */
       RAML4       : origin = 0x00A000, length = 0x002000     /* on-chip RAM block L4 */
       RAML5       : origin = 0x00C000, length = 0x002000     /* on-chip RAM block L5 */
       RAML6       : origin = 0x00E000, length = 0x002000     /* on-chip RAM block L6 */
       RAML7       : origin = 0x010000, length = 0x002000     /* on-chip RAM block L7 */
       RAML8       : origin = 0x012000, length = 0x002000     /* on-chip RAM block L8 */
       USB_RAM     : origin = 0x040000, length = 0x000800     /* USB RAM          */  
       FLASHB      : origin = 0x3F0000, length = 0x004000     /* on-chip FLASH */

       dataRAM       : origin = 0x008800, length = 0x000400       /* on-chip RAM block L1 */

       CLA_CPU_MSGRAM  : origin = 0x001480, length = 0x000080 /* CLA-R/W, CPU-R message RAM */
       CPU_CLA_MSGRAM  : origin = 0x001500, length = 0x000080 /* CPU-R/W, CLA-R message RAM */
    }


    /* Allocate sections to memory blocks.
       Note:
             codestart user defined section in DSP28_CodeStartBranch.asm used to redirect code
                       execution when booting to flash
             ramfuncs  user defined section to store functions that will be copied from Flash into RAM
    */

    SECTIONS
    {

       /* Allocate program areas: */
       .cinit              : > FLASHA,     PAGE = 0
       .pinit              : > FLASHA,     PAGE = 0
       .text               : > FLASHA,     PAGE = 0
       codestart           : > BEGIN,      PAGE = 0
       ramfuncs            : LOAD = FLASHD,
                             RUN = RAML0,
                             LOAD_START(_RamfuncsLoadStart),
                             LOAD_END(_RamfuncsLoadEnd),
                             RUN_START(_RamfuncsRunStart),
                             LOAD_SIZE(_RamfuncsLoadSize),
                             PAGE = 0


           Cla1Prog         : LOAD = FLASHC, /* Note for running from RAM the load and RUN can be the same */
                          RUN = RAML3,
                          LOAD_START(_Cla1funcsLoadStart),
                          LOAD_END(_Cla1funcsLoadEnd),
                          RUN_START(_Cla1funcsRunStart),
                          PAGE = 1

       csmpasswds          : > CSM_PWL_P0, PAGE = 0
       csm_rsvd            : > CSM_RSVD,   PAGE = 0


       /* Allocate uninitalized data sections: */
       .stack              : > RAMM0,      PAGE = 1
       .ebss               : > RAML4,      PAGE = 1
       .esysmem            : > RAML2,      PAGE = 1
        Cla1Data               : > RAML2,      PAGE = 1

       /* Initalized sections to go in Flash */
       /* For SDFlash to program these, they must be allocated to page 0 */
       .econst             : > FLASHA,     PAGE = 0
       .switch             : > FLASHA,     PAGE = 0

       /* Allocate IQ math areas: */
       IQmath              : > FLASHA,     PAGE = 0            /* Math Code */
       IQmathTables        : > IQTABLES,   PAGE = 0, TYPE = NOLOAD
      
       /* Allocate FPU math areas: */
       FPUmathTables       : > FPUTABLES,  PAGE = 0, TYPE = NOLOAD
      
       DMARAML5               : > RAML5,      PAGE = 1
       DMARAML6               : > RAML6,      PAGE = 1
       DMARAML7               : > RAML7,      PAGE = 1
       DMARAML8               : > RAML8,      PAGE = 1  

       Cla1ToCpuMsgRAM   : > CLA_CPU_MSGRAM PAGE = 1
       CpuToCla1MsgRAM   : > CPU_CLA_MSGRAM PAGE = 1

       .reset            : > RESET,      PAGE = 0, TYPE = DSECT
       vectors           : > VECTORS     PAGE = 0, TYPE = DSECT


       /* .reset is a standard section used by the compiler.  It contains the */
       /* the address of the start of _c_int00 for C Code.   /*
       /* When using the boot ROM this section and the CPU vector */
       /* table is not needed.  Thus the default type is set here to  */
       /* DSECT  */
       .reset              : > RESET,      PAGE = 0, TYPE = DSECT
       vectors             : > VECTORS,    PAGE = 0, TYPE = DSECT

    }





















    /*
    //===========================================================================
    // End of file.
    //===========================================================================













    */

  • sorry I could not send the files as an attachment!
  • These are the errors I am getting:

    <Linking>
    warning #10247-D: creating output section ".bss_cla" without a SECTIONS
    specification
    warning #10247-D: creating output section "Cla1DataRam1" without a SECTIONS
    specification
    "../F28069.cmd", line 145: warning #10097: memory range not found: FLASHC on
    page 1
    Cla1Prog : LOAD = FLASHC, /* Note for running from RAM the load and RUN can be the same */
    "../F28069.cmd", line 145: error #10265: no valid memory range(null) available
    for placement of "Cla1Prog"
    Cla1Prog : LOAD = FLASHC, /* Note for running from RAM the load and RUN can be the same */
    "../F28069.cmd", line 145: error #10099-D: program will not fit into available
    memory. load placement with alignment/blocking fails for section "Cla1Prog"
    size 0x376 page 1
    Cla1Prog : LOAD = FLASHC, /* Note for running from RAM the load and RUN can be the same */

    undefined first referenced
    symbol in file
    --------- ----------------
    _Cla1Prog_Start ./Boost_main.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "Boost.out" not built
  • Hi Farid,

    You might have to convert the .cmd to a .txt or attach it as a zip file.

    The first warnings are because you haven't allocated a section for some data you have in your program. You can fix this by adding sections similar to what you had before:

    .scratchpad : > CLARAM0, PAGE = 1
    .bss_cla : > CLARAM0, PAGE = 1
    .const_cla : > CLARAM0, PAGE = 1

    For the other error I think you're missing "LOAD_SIZE(_Cla1funcsLoadSize)," in your Cla1Prog section.

    One resource I found that may help you as well is the following CLA example within C2000ware. It includes a linker command file that allocates/copies from flash correctly:

    C:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2806x\examples\c28\cla_adc_fir

    Best,
    Kevin
  • Please see my attached file I just sent. I have managed to somehow move forward a bit with my cmd file. if I don`t commet .ebss I get the following Errors:
    warning #10247-D: creating output section ".bss_cla" without a SECTIONS
    specification
    "../F28069.cmd", line 84: error #10099-D: program will not fit into available
    memory. run placement with alignment/blocking fails for section ".ebss"
    size 0x74e page 1. Available memory ranges:
    RAMM1 size: 0x400 unused: 0x400 max hole: 0x400
    .ebss : > RAMM1, PAGE = 1


    but if I comment out .ebss line: I get these warnings:
    warning #10247-D: creating output section ".ebss" without a SECTIONS
    specification
    warning #10247-D: creating output section ".bss_cla" without a SECTIONS
    specification

    and my code in debug mode just stops waiting for a software task trigger to take place, which it never happens.
    Cla1ForceTask4andWait();

    Please have a quick look at my cmd file.

    Thanks a lot
  • 5621.F28069.zipHi Guys!

    Can anyone look at the zipped file I sent and let me know what I am missing in my cmd file.

    these are the variables I am using for my CLA:

    //file PID.cla

    #pragma DATA_SECTION(Cmpns1_Coef, "Cla1DataRam1");

    #pragma DATA_SECTION(Cmpns2_Coef, "Cla1DataRam1")

    #pragma DATA_SECTION(Cmpns3_Coef, "Cla1DataRam1");

    CNTL2P2Z_Coef Cmpns1_Coef;

    CNTL2P2Z_Coef Cmpns2_Coef;

    CNTL2P2Z_Coef Cmpns3_Coef;

    #pragma DATA_SECTION(Cmpns1, "Cla1DataRam1");

    #pragma DATA_SECTION(Cmpns2, "Cla1DataRam1");

    #pragma DATA_SECTION(Cmpns3, "Cla1DataRam1");

    CNTL2P2Z_CLA Cmpns1;

    CNTL2P2Z_CLA Cmpns2;

    CNTL2P2Z_CLA Cmpns3;

    //shared_data.c file

    #pragma DATA_SECTION(PID3_Out,"Cla1ToCpuMsgRAM")

    #pragma DATA_SECTION(PID2_Out,"Cla1ToCpuMsgRAM")

    #pragma DATA_SECTION(PID1_Out,"Cla1ToCpuMsgRAM")

    float PID1_Out;

    float PID2_Out;

    float PID3_Out;

    #pragma DATA_SECTION(BoostControl_Ref,"CpuToCla1MsgRAM");

    float BoostControl_Ref=0;

    #pragma DATA_SECTION(ulCycleCount,"Cla1ToCpuMsgRAM");

    unsigned long ulCycleCount;

  • Hi Guys!

    Can anyone look at the zipped file I sent and let me know what I am missing in my cmd file.

    these are the variables I am using for my CLA:

    //file PID.cla
    #pragma DATA_SECTION(Cmpns1_Coef, "Cla1DataRam1");
    #pragma DATA_SECTION(Cmpns2_Coef, "Cla1DataRam1")
    #pragma DATA_SECTION(Cmpns3_Coef, "Cla1DataRam1");
    CNTL2P2Z_Coef Cmpns1_Coef;
    CNTL2P2Z_Coef Cmpns2_Coef;
    CNTL2P2Z_Coef Cmpns3_Coef;
    #pragma DATA_SECTION(Cmpns1, "Cla1DataRam1");
    #pragma DATA_SECTION(Cmpns2, "Cla1DataRam1");
    #pragma DATA_SECTION(Cmpns3, "Cla1DataRam1");
    CNTL2P2Z_CLA Cmpns1;
    CNTL2P2Z_CLA Cmpns2;
    CNTL2P2Z_CLA Cmpns3;


    //shared_data.c file
    #pragma DATA_SECTION(PID3_Out,"Cla1ToCpuMsgRAM")
    #pragma DATA_SECTION(PID2_Out,"Cla1ToCpuMsgRAM")
    #pragma DATA_SECTION(PID1_Out,"Cla1ToCpuMsgRAM")
    float PID1_Out;
    float PID2_Out;
    float PID3_Out;
    #pragma DATA_SECTION(BoostControl_Ref,"CpuToCla1MsgRAM");
    float BoostControl_Ref=0;
    #pragma DATA_SECTION(ulCycleCount,"Cla1ToCpuMsgRAM");
    unsigned long ulCycleCount;
  • can anyone explains why i am getting this error. Thanks!

    warning #10247-D: creating output section ".bss_cla" without a SECTIONS
    specification
    "../F28069.cmd", line 92: error #10099-D: program will not fit into available
    memory. run placement with alignment/blocking fails for section ".ebss"
    size 0x74e page 1. Available memory ranges:
    dataRAM size: 0x400 unused: 0x3a0 max hole: 0x3a0
    .ebss : > dataRAM, PAGE = 1
  • In Between I am not using any assembly code in my project
  • Farid,

    Please look at the linker command file within C2000ware, I think it would help you a lot...

    C:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2806x\examples\c28\cla_adc_fir_flash\F28069_CLA_lnk.cmd

    You need to allocate memory for some of this data, which is why you're getting warning/errors like below:

    warning #10247-D: creating output section ".bss_cla" without a SECTIONS
    specification

    The other errors you are getting are because the RAM block your using to allocate isn't large enough. You need to use a different part of memory. There should be plenty of other RAM blocks on your device you can use. From f28060_CLA_lnk.cmd:

       RAML2       : origin = 0x008C00, length = 0x000400     /* on-chip RAM block L2 */
       RAML4       : origin = 0x00A000, length = 0x002000     /* on-chip RAM block L4 */
       RAML5       : origin = 0x00C000, length = 0x002000     /* on-chip RAM block L5 */
       RAML6       : origin = 0x00E000, length = 0x002000     /* on-chip RAM block L6 */
       RAML7       : origin = 0x010000, length = 0x002000     /* on-chip RAM block L7 */
       RAML8       : origin = 0x012000, length = 0x002000     /* on-chip RAM block L8 */   

    Best,

    Kevin

  • Thank you for your reply. I followed your advice and fixed my errors. please the attached Zip file. however my code does not work. It just hangs at:

    //Start Task4

       Cla1ForceTask4andWait();    /* used to initialize PID Parameters */

    It appears my CLA is mapped properly on the linker file. Could you please comment on this.

    cmd.zip

  • I am not getting any Errors for on my cmd file. I can load the code onto the flash. However, mu code hangs at: Cla1ForceTask4andWait();  please see attached files for my .cmd and main.c files. I am not sure if i called MemCopy(&Cla1funcsLoadStart, &Cla1funcsLoadEnd, &Cla1funcsRunStart) at the right place.

    5383.cmd.zip5811.main.zip

    Please comment!

  • If I move the memcopy function as shown below, I get an ISR error when I am in debug mode.

    // Assign user defined ISR to the PIE vector table
    EALLOW;
    PieVectTable.TINT1 = &cpu_timer1_isr;
    PieVectTable.CLA1_INT1 = &cla1_task1_isr;
    PieVectTable.CLA1_INT2 = &cla1_task2_isr;
    PieVectTable.CLA1_INT3 = &cla1_task3_isr;
    PieVectTable.CLA1_INT4 = &cla1_task4_isr;
    EDIS;

    EALLOW;
    MemCopy(&Cla1funcsLoadStart, &Cla1funcsLoadEnd, &Cla1funcsRunStart);
    EDIS;
  • I am still having issues with my flash. I have manged to compile my code with no errors, but in my debug code my debugger hangs at Cla1ForceTask4andWait();  Can anyone please say what might be the issue for CLA not to be triggered.  attached is a copy of my main.c file and cmd file.

    1732.cmd.zip

    5444.main.zip

  • Hi Farid,

    I am not an expert on the CLA. I'd suggest creating a new thread for this new issue so that someone more qualified can answer your questions.

    Best,
    Kevin