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.

CCS compiler error 10099/D - array declaration for F28075

Other Parts Discussed in Thread: CONTROLSUITE

Testing memory allocation using "Blinky" as a host program, destined for a RAM load, declaring an int32 array 512 elements long caused a 10099/D error.  Changing the declaration to "static int32" worked ok.  Anyone else noticed this?  Couldn't find any other references.

  • I don't quite understand what you attempted to do.  I presume your code is organized as a CCS project.  Please put that project back in the state where it fails to link, then submit it here.  Please see this post for details.

    Thanks and regards,

    -George

  • For those reading along, 10099 is a linker error: "program will not fit into available memory." Usually it comes with extra information indicating the section and size.
  • Hi George,

    The error first occurred building a CCS project with the target set to RAM (later to be FLASH). My first declaration of two arrays was:-

    uint32 work0[FFTSIZE], work1[FFTSIZE]; where FFTSIZE was defined as 512 in an included file "FFTfix512.TAB". This include also declared a uint16 array of 512 preset values.

    I first split them into two individual declarations, but no change. Just to change the memory map, I changed both declarations to "static", and lo and behold, the error went away.

    In case this was a consequence of something else in the module, I loaded my trusted test copy of Blinky and repeated the declarations there. The result was exactly the same. Here are the declarations, the modified Blinky code and the error messages from the failed compile:-

    #include "F28x_Project.h" // the global F28x include file for projects

    #include "FFTfix512.tab" // permute table for 512 point FFT module

    static float buff[FFTSIZE]; // the data buffer
    static int16 power_size; // transform size, power of 2 <= FFTSIZE
    int32 work0[FFTSIZE]; // working arrays used alternately
    int32 work1[FFTSIZE];
    static int32 *swork, *dwork, *twork; // source/dest workspace array pointers
    static int32 specmax, percent; // three peak finder from FFT output
    static int16 peak1, peak2, peak3; // results from peak finder (FFT array index)

    void SetupF28075(void) // core F28075 hardware
    {InitSysCtrl(); // initialise system control
    InitGpio(); // initialise GPIO subsystem
    DINT; // disable all interrupts
    InitPieCtrl(); // initialise PIE control regs to default
    IER = 0x0000; // disable CPU interrupts
    IFR = 0x0000; // clear all CPU interrupt flags
    InitPieVectTable(); // initialise the PIE vector table
    EINT; // Enable Global interrupt INTM
    ERTM; // Enable Global realtime interrupt DBGM
    }

    volatile int TOGFlag = 1; // enable the toggle() facility if set

    void toggle(int togctr) // diagnostic flag waver on GPIO69
    {while (TOGFlag == 1 && togctr--)
    {GPIO_WritePin(69,1);
    DELAY_US(100);
    GPIO_WritePin(69,0);
    DELAY_US(100);
    }
    }

    void main(void)
    {int ch;
    SetupF28075(); // TMS340F28075 core setup

    GPIO_SetupPinMux(69, GPIO_MUX_CPU1, 0); // setup diagnostic toggle pin before use!
    GPIO_SetupPinOptions(69, GPIO_OUTPUT, GPIO_PUSHPULL);

    for (;;) // temporary blinky output
    {toggle(10);
    DELAY_US(5000);
    }
    }

    Console output:-

    <Linking>
    "C:/ti/controlSUITE/device_support/F2807x/v200/F2807x_common
    /cmd/2807x_Generic_RAM_lnk.cmd", line 50: error #10099-D:

    program will not fit into available memory. run placement with
    >> Compilation failure
    makefile:144: recipe for target 'modified_blinky_cpu01.out' failed
    alignment/blocking fails for section ".ebss" size 0x90a page 1. Available
    memory ranges:
    RAMLS5 size: 0x800 unused: 0x640 max hole: 0x640
    error #10010: errors encountered during linking; "modified_blinky_cpu01.out"
    not built
    gmake: *** [modified_blinky_cpu01.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    Problem output:-

    Description Resource Path Location Type

    <a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10099.html">
    #10099-D</a> .ccsproject /modified_blinky_cpu01 line 50, external location:
    C:\ti\controlSUITE\device_support\F2807x\v200\F2807x_common
    \cmd\2807x_Generic_RAM_lnk.cmd C/C++ Problem

    Rgds,

    Chris
  • (More from Chris on memory allocation error)

    Adding to the above, this is an error with a similar pedigree - just as obscure - in the same program.

    void main(void) // this temporary "main" will work on
    {byte ch; // either CPU
    SetupF28075(); // TMS340F28075 core setup
    SetupHardware(); // peripheral setup

    for (ch = 0; ch < 100; ch++) // temporary blinky output
    {toggle(10);
    DELAY_US(100);
    }

    // main execution loop

    outstr_c("QLS Test Harness");
    newline_c();

    while (1) // start work
    {ch = (byte) inchar_c(); // read SCIC status
    outstr_c("");
    outchar_c(ch); // echo the char
    toggle(5);
    DELAY_US(100);
    while(TERMFlag) Do_TERM_Commands(ch); // listen for terminal input
    }
    }

    The "QLS Test Harness" message and the newline_c() arrive ok (so the "outstr_c()" routine is good) at the connected terminal, but nothing after that, and the program just dies.

    In the "while (1)" loop, there is a string output with a null string. This compiles ok. If I add ANY characters to the string - I added "echo" - then the compilation / link fails; with the following error:-

    >> Compilation failure
    makefile:154: recipe for target 'MATQLS.out' failed
    alignment/blocking fails for section ".econst" size 0x2e1 page 1. Available
    memory ranges:
    RAMLS5 size: 0x800 unused: 0x2de max hole: 0x2de
    error #10010: errors encountered during linking; "MATQLS.out" not built
    gmake: *** [MATQLS.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    Something is very, very wrong here. It's like the bad old days with some of the early Unix compilers when you missed a bracket or incorrectly specified a macro, and the pre-processor blew without reporting an error, it just went bonkers.

    These are the i/o routines:-

    int inchar_c(void)
    {if (!(ScicRegs.SCIFFRX.bit.RXFFST)) return -1; // nothing waiting, return -1
    TERMFlag = 1; // flag the command
    return ScicRegs.SCIRXBUF.all; // and return the char received
    }

    void outchar_c(byte a)
    {while (ScicRegs.SCIFFTX.bit.TXFFST) ;
    ScicRegs.SCITXBUF.all = a;
    }

    void outstr_c(char *msg)
    {int i;
    i = 0;
    while(msg[i]) outchar_c(msg[i++]);
    }

    void newline_c(void) {outchar_c('\r'); outchar_c('\n');}

    void space_c(void) {outchar_c(32);}

    Rgds,

    Chris
  • Thanks for taking the time to post all that code.  Unfortunately, I cannot use that to reproduce the error.  I still need to know things like the build options and linker command file.  Those details, and others I didn't think to mention, are contained in the CCS project I requested earlier.  Please post the project.

    Thanks and regards,

    -George

  • Hi George,

    For all sorts of good reasons we have created the project as an entity which is complete - i.e. it contains all of its components (many extracted from the ControlSuite hierarchy) so that it can be transported independently. A lot of this I am sure you won't need (it's a bit big ....). I can probably create a more compact .zip of the most important bits, but I am not sure what to do with it - how do I "post" it to you, and where?

    I have a possible clue as to what is going on. There is a post on "Combining contiguous memory blocks to accommodate sections" from Dave Winterbourne which is a possible clue - have I simply run out of memory as laid out in the standard link file, and therefore making more room is all that is needed?

    I have downloaded some instructions on the linker command file primer, but it's a bit thin on the ground, clearly written by someone who knows exactly what he is doing, but hasn't yet worked out how to explain it to anyone else. Is there a "Child's Garden of Driving the Linker?"

    Rgds,

    Chris
  • Hi George,

    With e2e help on another thread, have isolated and sorted the problem, all running smoothly now. There were 2 linker .cmd files running together - not a good situation!

    Thanks again,

    Chris