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.

F2808 Starter Kit(Out of RAM for emulation).

Currenlty I am developing some application with F2808 starter kit.

When I compile my program which utilizes IQ math library, I got the following error.

>>error: can't allocate IQmath,size 00000164(page 0) in PRAML0L1 (avail:000000d3)

The following is my cmd file. I think it is the problem of not having enough RAM for emulation.But I am not sure how to solve it.

thanks

MEMORY

{

PAGE 0 :

   /* BEGIN is used for the "boot to SARAM" bootloader mode   */

  

   BEGIN      : origin = 0x000000, length = 0x000002

   RAMM0      : origin = 0x000002, length = 0x0003FE

   PRAML0L1   : origin = 0x3F8000, length = 0x002000

   BOOTROM    : origin = 0x3FF000, length = 0x000FC0

   RESET      : origin = 0x3FFFC0, length = 0x000002          

 

        

PAGE 1 :

 

   RAMM1   : origin = 0x000400, length = 0x000400

   DRAMH0  : origin = 0x3FA000, length = 0x001000

   DLOG_H0 : origin = 0x00B000, length = 0x001000

  

}

 

 

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            : > PRAML0L1,   PAGE = 0

   .cinit           : > PRAML0L1,   PAGE = 0

   .pinit           : > PRAML0L1,   PAGE = 0

   .switch          : > PRAML0L1,   PAGE = 0

   .reset           : > RESET,      PAGE = 0, TYPE = DSECT /* not used, */

  

   .stack           : > RAMM1,      PAGE = 1

   .ebss            : > DRAMH0,     PAGE = 1

   .econst          : > DRAMH0,     PAGE = 1     

   .esysmem         : > DRAMH0,     PAGE = 1

 

   DLOG                                               : >        DLOG_H0,    PAGE = 1

 

   /*==========================================================*/

   /* Tables for IQ math functions:                            */

   /*==========================================================*/

   IQmathTables  : load = BOOTROM, type = NOLOAD, PAGE = 0    

 

   /*==========================================================*/

   /* IQ math functions:                                       */

   /*==========================================================*/

   IQmath        : load= PRAML0L1,   PAGE = 0

    }

  • There's nothing like "RAM for emulation". Part of your program is simply too big to fit in provided memory. However, you can look into .map file generated for your project and see which memories have still free space. Then rearrange memeories/sections to fit.

  • Sorry for wrong usage about emulation. I am currently running my whole program from RAM. So I put my whole program into PAGE0(Program RAM) and PAGE1(DATA RAM). The following is my PAGE 0 portion of .map file. I found out that "RAMM0" has some free space about (0x3D0). So I tried to put IQMATH library from TI into this portion. But my program is not working after placing IQMATH libary in this portion. So Any other options for me?

              name                origin               length      used          attr    

    ----------------------  --------  ---------  --------  ----  --------
    PAGE  0: BEGIN       00000000   00000002  00000002  RWIX
             RAMM0           00000002   000003fe   0000001f  RWIX
             PRAML0L1      003f8000   00002000  00001f80  RWIX
             BOOTROM      003ff000    00000fc0   00000b50  RWIX
             RESET              003fffc0     00000002  00000000  RWIX

  • Did you try moving some of the other sections like .cinit, .pinit, .switch to RAMM0 and leave IQMath in PRAML0L1 if it fits?

  • Hi I try to move ".cinit" into RAMM0 and it works. Thanks a lot.

    But I am sure that my code will also exceed the current available RAM size one day. So I am thinking to run the whole program by downloading into Flash.

    So I am trying to combine the program by using "F2808.cmd" file. I got the following error msg when I compile with "Debug" option. But when I compile with "Release" option, there is any error. Any reason for this?

    >>   error: can't allocate .text, size 00001be8 (page 0) in 
    >>   error: can't allocate DLOG, size 00001000 (page 1) in DEV_EMU (avail:
                000000b0), FLASH_REGS (avail: 00000058), CSM (avail: 00000000),
                ADC_MIRROR (avail: 00000000), CPU_TIMER0 (avail: 00000000),
                CPU_TIMER1 (avail: 00000000), CPU_TIMER2 (avail: 00000000),
                PIE_CTRL (avail: 00000006), PIE_VECT (avail: 00000000), ECANA
                (avail: 0000000c), ECANA_LAM (avail: 00000000), ECANA_MOTS (avail:
                00000000), ECANA_MOTO (avail: 00000000), ECANA_MBOX (avail:
                00000000), ECANB (avail: 0000000c), ECANB_LAM (avail: 00000000),
                ECANB_MOTS (avail: 00000000), ECANB_MOTO (avail: 00000000),
                ECANB_MBOX (avail: 00000000), EPWM1 (avail: 00000000), EPWM2
                (avail: 00000000), EPWM3 (avail: 00000000), EPWM4 (avail:
                00000000), EPWM5 (avail: 00000000), EPWM6 (avail: 00000000), ECAP1
                (avail: 00000000), ECAP2 (avail: 00000000), ECAP3 (avail:
                00000000), ECAP4 (avail: 00000000), EQEP1 (avail: 00000000), EQEP2
                (avail: 00000000), GPIOCTRL (avail: 00000000), GPIODAT (avail:
                00000000), GPIOINT (avail: 00000016), SYSTEM (avail: 00000000),
                SPIA (avail: 00000000), SCIA (avail: 00000000), XINTRUPT (avail:
                00000000), ADC (avail: 00000002), SPIB (avail: 00000000), SCIB
                (avail: 00000000), *** (avail: 00000000), SPID (avail: 00000000),
                I2CA (avail: 0000001e), CSM_PWL (avail: 00000000)
    >>   error: can't allocate IQmathTables, size 00000b50 (page 0) in 
    >>   error: can't allocate .ebss, size 000002c0 (page 1) in DEV_EMU (avail:
                000000b0), FLASH_REGS (avail: 00000058), CSM (avail: 00000000),
                ADC_MIRROR (avail: 00000000), CPU_TIMER0 (avail: 00000000),
                CPU_TIMER1 (avail: 00000000), CPU_TIMER2 (avail: 00000000),
                PIE_CTRL (avail: 00000006), PIE_VECT (avail: 00000000), ECANA
                (avail: 0000000c), ECANA_LAM (avail: 00000000), ECANA_MOTS (avail:
                00000000), ECANA_MOTO (avail: 00000000), ECANA_MBOX (avail:
                00000000), ECANB (avail: 0000000c), ECANB_LAM (avail: 00000000),
                ECANB_MOTS (avail: 00000000), ECANB_MOTO (avail: 00000000),
                ECANB_MBOX (avail: 00000000), EPWM1 (avail: 00000000), EPWM2
                (avail: 00000000), EPWM3 (avail: 00000000), EPWM4 (avail:
                00000000), EPWM5 (avail: 00000000), EPWM6 (avail: 00000000), ECAP1
                (avail: 00000000), ECAP2 (avail: 00000000), ECAP3 (avail:
                00000000), ECAP4 (avail: 00000000), EQEP1 (avail: 00000000), EQEP2
                (avail: 00000000), GPIOCTRL (avail: 00000000), GPIODAT (avail:
                00000000), GPIOINT (avail: 00000016), SYSTEM (avail: 00000000),
                SPIA (avail: 00000000), SCIA (avail: 00000000), XINTRUPT (avail:
                00000000), ADC (avail: 00000002), SPIB (avail: 00000000), SCIB
                (avail: 00000000), *** (avail: 00000000), SPID (avail: 00000000),
                I2CA (avail: 0000001e), CSM_PWL (avail: 00000000)
    >>   error: can't allocate .cinit, size 0000029b (page 0) in 
    >>   error: can't allocate IQmath, size 00000164 (page 0) in 
    >>   error: can't allocate .econst, size 00000110 (page 0) in 
    >>   error: can't allocate ramfuncs, size 0000001f (page 0) in 
    >>   error: can't allocate .reset, size 00000002 (page 0) in 
    >>   error: can't allocate codestart, size 00000002 (page 0) in 
    >>   error: errors in input - ../build/pmsm3_1.out not built

    >> Compilation failure

    Build Complete,
      12 Errors, 0 Warnings, 0 Remarks.

  • Looks like you removed the command file used to allocate the registers (ie the header file .cmd file) from the project.   It needs to be added back.  You will find it under DSP280x_headers\cmd named DSP280x_Headers_nonBIOS.cmd

    Lori

  • Hi, I have this cmd file "DSP280X_Header_nonBIOS.cmd" in my project. What I don't have is F2808_EzDSP_RAM_Ink.cmd file. So I would like to know whether F2808.cmd is for release version and F2808_EzDSP_RAM_Ink.cmd is for debug version. Is my assumption correct? Do I need special tool to burn the output object file into Flash?

    Thanks for your answer.

  • If you are using the C/C++ header files and peripheral examples - In the doc directory there should be a header file quickstart guide.  This describes the different command files and how to migrate a project from RAM to flash. 

    Yes, basically the "ezdsp RAM" linker files are for running the projects from RAM and the specific device command file (like F2808.cmd) is setup for flash execution.

    In Code Composer Studio you can program the flash using the flash plugin.   Section 2.1 of this document describes how ot use the plug-in: Flash Programming Solutions for the TMS320F28xxx: http://www.ti.com/lit/pdf/spraal3

    Here are a couple of other good resources:

    Lori