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.

CCS5.2 compile error "out of memory"

Dear all,

Due to test the image algorithm, my project need to include some header files which is about 7M per file.

if i include more than 5 header files, the error "out of memory " occurs.

the DDR size in my project is 512MB. it's enough to load the data.

why this happened?

  • Hi Forest,

    in order to help you we need a few more details.  What target are you using?  What exact CCS version?   What are you trying?  What is your setup (in this case particulalry with regards to memory)?

    Best Regards,

    Lisa

  • Dear Lisa,

    my target board is DM8168. the CCS version is 5.2.1.00018.

    i just tried to include some big image date in the header filers. 

    The total DDR3_RAM on my board is 512M. i allocated 70M as heap space. others for data and code space.8420.myBoard.zip

    attached is my board detail setting.

  • Hi Forest,

    can you provide more details?  Are you seeing the error during build or during load?  Could the load time of the data be overstepping some timer causing a reset?

    Best Regards,
    Lisa

  • Hi Lisa,

    compile didn't pass. the error is "out of memory" when building.

    so it didnt reach the step to load the executable file.

    i suspect the global data is too big for the default data space of CCS.

    thanks a lot.

    Forest.

  • Hi Forest,

    ok, we may want to have a look at your linker command file.   Let me pass this to or compiler team.

    Best Regards,

    Lisa

  • Please show us the build log, which will contain the exact error message.

    We will eventually need a test case so that we can analyze the problem.

    Does your test case have any individual objects larger than 256 MB?

  • **** Build of configuration Debug for project PLD_ELF ****
    
    C:\ti\ccsv5\utils\bin\gmake -j4 -k all 
    back/subdir_rules.mk:7: warning: overriding commands for target `configPkg/compiler.opt'
    subdir_rules.mk:49: warning: ignoring old commands for target `configPkg/compiler.opt'
    'Building file: ../ITG_Filter.c'
    'Building file: ../ITG_Core_Arithmetic.c'
    'Building file: ../ITG_ImgFunctions.c'
    'Invoking: C6000 Compiler'
    'Building file: ../ITG_Char_Segment.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_Filter.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_Filter.c"
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_Core_Arithmetic.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_Core_Arithmetic.c"
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_ImgFunctions.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_ImgFunctions.c"
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_Char_Segment.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_Char_Segment.c"
    "../ITG_Filter.c", line 793: warning #69-D: integer conversion resulted in a change of sign
    "../ITG_Filter.c", line 849: warning #69-D: integer conversion resulted in a change of sign
    "../ITG_Filter.c", line 850: warning #69-D: integer conversion resulted in a change of sign
    'Finished building: ../ITG_ImgFunctions.c'
    ' '
    'Building file: ../ITG_ImgSharp.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_ImgSharp.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_ImgSharp.c"
    'Finished building: ../ITG_Filter.c'
    ' '
    'Building file: ../ITG_PlDebug.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_PlDebug.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_PlDebug.c"
    'Finished building: ../ITG_ImgSharp.c'
    ' '
    'Building file: ../ITG_PlSys.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_PlSys.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_PlSys.c"
    'Finished building: ../ITG_PlDebug.c'
    ' '
    'Building file: ../ITG_PldExtraction.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_PldExtraction.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_PldExtraction.c"
    "../ITG_PldExtraction.c", line 1726: warning #552-D: variable "width_max" was set but never used
    "../ITG_PldExtraction.c", line 1726: warning #552-D: variable "width_min" was set but never used
    "../ITG_PldExtraction.c", line 1726: warning #552-D: variable "height_min" was set but never used
    "../ITG_PldExtraction.c", line 1726: warning #552-D: variable "height_max" was set but never used
    "../ITG_PldExtraction.c", line 1727: warning #552-D: variable "head_height" was set but never used
    "../ITG_PldExtraction.c", line 1728: warning #552-D: variable "single_contour_height_max" was set but never used
    "../ITG_PldExtraction.c", line 1728: warning #552-D: variable "single_contour_height_min" was set but never used
    "../ITG_PldExtraction.c", line 1735: warning #552-D: variable "height" was set but never used
    "../ITG_PldExtraction.c", line 538: warning #179-D: function "ITG_AdaptiveThreshold" was declared but never referenced
    "../ITG_PldExtraction.c", line 587: warning #179-D: function "ITG_CreateBoundingRects1" was declared but never referenced
    "../ITG_PldExtraction.c", line 666: warning #179-D: function "ITG_CreateBoundingRects_VLIB" was declared but never referenced
    'Finished building: ../ITG_PlSys.c'
    ' '
    'Building file: ../ITG_Recognize.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_Recognize.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_Recognize.c"
    'Finished building: ../ITG_Char_Segment.c'
    ' '
    'Building file: ../ITG_Thresh.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_Thresh.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_Thresh.c"
    'Finished building: ../ITG_Thresh.c'
    ' '
    'Building file: ../ITG_Track.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_Track.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_Track.c"
    'Finished building: ../ITG_Core_Arithmetic.c'
    ' '
    'Building file: ../ITG_VehicleDetector.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="ITG_VehicleDetector.pp" --cmd_file="./configPkg/compiler.opt"  "../ITG_VehicleDetector.c"
    "../ITG_VehicleDetector.c", line 1296: warning #179-D: variable "j" was declared but never referenced
    "../ITG_VehicleDetector.c", line 417: warning #179-D: function "ITG_Swap" was declared but never referenced
    'Finished building: ../ITG_Track.c'
    ' '
    'Building file: ../Pld_ITG_Alg_If.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="Pld_ITG_Alg_If.pp" --cmd_file="./configPkg/compiler.opt"  "../Pld_ITG_Alg_If.c"
    'Finished building: ../Pld_ITG_Alg_If.c'
    ' '
    'Building file: ../Pld_ITG_Ialg.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="Pld_ITG_Ialg.pp" --cmd_file="./configPkg/compiler.opt"  "../Pld_ITG_Ialg.c"
    'Finished building: ../Pld_ITG_Ialg.c'
    'Finished building: ../ITG_PldExtraction.c'
    ' '
    ' '
    'Building file: ../main.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=dm8168 --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="../inc" --display_error_number --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt"  "../main.c"
    'Finished building: ../ITG_VehicleDetector.c'
    ' '
    'Finished building: ../ITG_Recognize.c'
    ' '
    "../inc/Y_5.h", line 1200: warning #1-D: last line of file ends without a newline
    "../inc/Y_6.h", line 1200: warning #1-D: last line of file ends without a newline
    "../inc/Y_7.h", line 1200: warning #1-D: last line of file ends without a newline
    "../inc/Y_8.h", line 381: fatal error #4: out of memory
    1 fatal error detected in the compilation of "../main.c".
    Compilation terminated.
    
    >> Compilation failure
    gmake: *** [main.obj] Error 1
    gmake: Target `all' not remade because of errors.
    
    **** Build Finished ****

    2543.linker and cfg.zip

    no any individual object in my test case larger than 256M.

    the maximum size of my header file which include my test data is less than 8M.

    attached are my linker cmd/cfg file and build error.

    thanks.

    Forest

  • Okay, here are the warnings and errors for the relevant C file:

    "../inc/Y_5.h", line 1200: warning #1-D: last line of file ends without a newline
    "../inc/Y_6.h", line 1200: warning #1-D: last line of file ends without a newline
    "../inc/Y_7.h", line 1200: warning #1-D: last line of file ends without a newline
    "../inc/Y_8.h", line 381: fatal error #4: out of memory
    1 fatal error detected in the compilation of "../main.c".

    That error comes from the C parser; compilation fails long before it gets to the linker, so the linker command file is irrelevant.

    At this time, I suspect your header files have an unguarded circular inclusion.  This will cause infinite inclusion, which will exhaust memory.  Does some other compiler (perhaps GCC) successfully compile this test case?

    The warning about the lack of newline is also worrisome; it sometimes indicates a corrupted file.

    In any case, you probably shouldn't be placing tables in header files because if you include the same file twice, you could get multiple definitions of the table.

  • Hi,
    actually, my header file just define a big size array which includes my test data. so none of the cases you figured will happen.
    why i put the data in the array? because i  read the image data from emulator, it's too too ... slow.
    so i want to hard-code the data with my executable file.
    One thing i think i've provided in early posts that if i just inlcude 3 headers(like just include Y6,Y7,Y8). compile can pass.
    if more than 4, the error occur!
  • We will need to see a compilable test case which demonstrates the problem to analyze this problem.

  • my test data is too big to upload by browser.

    could you open a ftp site for me to upload my test data for you?

    thanks.

  • Forest,

    Did you have a chance to upload your test case somewhere? If not, please reply here and let us know and I can set up a temporary ftp location and send you the details via private message.