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.

Issue copying CLA Math tables in Flash on 28035

Hello,

  I'm trying to run the CLA math libraries on the TMS32028035, and face the same issue mentioned in http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/232646/816912.aspx#816912.

 If I load the libraries in RAM there is no problem, but when I try loading them in FLASH I get a compiling error. The code I'm using to load the tables in Flash is

********************************************************

CLA1mathTables : LOAD = FLASHH,
RUN = RAML2,
LOAD_START(_Cla1mathTablesLoadStart),
LOAD_END(_Cla1mathTablesLoadEnd),
RUN_START(_Cla1mathTablesRunStart),
PAGE = 1

**********************************************************

  And here is the section of the log, where is complaining about the tables

**********************************************************

"../F28035_PfcControlTest.cmd", line 158: warning #10097: memory range not
found: FLASHH on page 1
"../F28035_PfcControlTest.cmd", line 158: error #10265: no valid memory
range(NULL) available for placement of "CLA1mathTables"

"../F28035_PfcControlTest.cmd", line 158: error #10099-D: program will not fit
>> Compilation failure
into available memory. load placement with alignment/blocking fails for
section "CLA1mathTables" size 0x156 page 1
error #10010: errors encountered during linking; "DSP28035_PFCControlTest.out"
not built
gmake: *** [DSP28035_PFCControlTest.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

*****************************************************************

  For the application I'm dealing with, I need to store these tables in Flash to copy them to RAM in Run Time by calling  MemCopy(&Cla1mathTablesLoadStart, &Cla1mathTablesLoadEnd, &Cla1mathTablesRunStart);

  Please, could you give me some suggestions? 

  Thanks,

Lucas

  • Lucas,

    The error message is saying there is no memory named FLASHH on PAGE 1 defined in the memory section of any linker command file.  Do you have a FLASHH defined on PAGE 1?

     

    - David

  • Hello David,

      Thanks a lot for your quick reply. The memory sections are defined in the command file as

    *************************************************************

    PAGE 0: /* Program Memory */
    /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
    RAML1 : origin = 0x008800, length = 0x000400 /* on-chip RAM block L1, 1k*/
    RAML3 : origin = 0x009000, length = 0x001000 /* on-chip RAM block L3 CLA PROGRAM */
    OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */

    FLASHH : origin = 0x3F0000, length = 0x006000 /* on-chip FLASH */
    FLASHD : origin = 0x3F6000, length = 0x001000 /* on-chip FLASH */
    FLASHA : origin = 0x3F7000, length = 0x000F80 /* 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 */

    IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Tables in Boot ROM */
    IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Tables in Boot ROM */
    IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Tables in Boot ROM */

    ROM : origin = 0x3FF27C, length = 0x000D44 /* 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 = 0x000040 /* 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 */
    RAML0 : origin = 0x008000, length = 0x000800 /* on-chip RAM block L0, 2k*/

    RAML2 : origin = 0x008C00, length = 0x000400 /* on-chip RAM block L2 CLA DATA*/

    FLASHB : origin = 0x3F6000, length = 0x001000 /* on-chip FLASH */
    CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
    CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080

    *************************************************************

    I've tried changing the page to Page 0 as you mentiones, writing

    *************************************************************

    CLA1mathTables : LOAD = FLASHH,

    RUN = RAML2,
    LOAD_START(_Cla1mathTablesLoadStart),
    LOAD_END(_Cla1mathTablesLoadEnd),
    RUN_START(_Cla1mathTablesRunStart),
    PAGE = 0

    *************************************************************

    and it didn't help. I obtain the following result

    *************************************************************

    "../F28035_PfcControlTest.cmd", line 159: warning #10097: memory range not

    found: RAML2 on page 0
    >> Compilation failure
    "../F28035_PfcControlTest.cmd", line 158: error #10265: no valid memory
    range(NULL) available for placement of "CLA1mathTables"
    "../F28035_PfcControlTest.cmd", line 158: error #10099-D: program will not fit
    into available memory. run placement with alignment/blocking fails for
    section "CLA1mathTables" size 0x156 page 0
    error #10010: errors encountered during linking; "DSP28035_PFCControlTest.out"
    not built
    gmake: *** [DSP28035_PFCControlTest.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    *****************************************************

    Thanks again,

    Lucas

  • Lucas,

    You have FLASHH defined on PAGE 0, and RAML2 defined on PAGE 1.  Try this:

    CLA1mathTables : LOAD = FLASHH,    PAGE = 0
                     RUN = RAML2,      PAGE = 1
                     LOAD_START(_Cla1mathTablesLoadStart),
                     LOAD_END(_Cla1mathTablesLoadEnd),
                     RUN_START(_Cla1mathTablesRunStart)

     

    Regards,

    David

  • It worked!!

    Thanks for your help,

    Lucas