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.

TMS320F28379D: Increase memory (heap size)

Part Number: TMS320F28379D
Other Parts Discussed in Thread: TMDSCNCD28379D

Hi -- what is the maximum limit for heap size for F28379D (TMDSCNCD28379D)? And how to increase it from the existing limit?

I Matlab Simulink: Model Configuration Parameters -> Code Generation -> Build Process -> Build Configuration -> Specify the maximum number I can enter is 0x1000 for both loading and External mode to work OK.

-z -I$(TI_LIB) --stack_size=$(STACK_SIZE) --warn_sections --heap_size=0x1000 --reread_libs --rom_model -m"$(PRODUCT_NAME).map"

For 0x1100

-z -I$(TI_LIB) --stack_size=$(STACK_SIZE) --warn_sections --heap_size=0x1100 --reread_libs --rom_model -m"$(PRODUCT_NAME).map"

loading the application code (Downloading program to the target hardware... & Build process completed successfully) is OK, but if I try to run in External mode, I get the error message:

Linking>

"C:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/supportpackages/tic2000/src/c28377D.cmd", line 134: error:

program will not fit into available memory. run placement with

alignment/blocking fails for section ".esysmem" size 0x1100 page 1.

Available memory ranges:

RAMLS_DATA size: 0x1000 unused: 0xdec max hole: 0xdec

error: errors encountered during linking; "../Vref_v000a.out" not built

>> Compilation failure

gmake: *** [../Vref_v000a.out] Error 1

C:\Users\****\Documents\F28379D tests code\Vref_v000a_ert_rtw>echo The make command returned an error of 2

The make command returned an error of 2

C:\Users\****\Documents\F28379D tests code\Vref_v000a_ert_rtw>An_error_occurred_during_the_call_to_make

'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,

operable program or batch file.

### Creating HTML report file Vref_v000a_codegen_rpt.html

### Build procedure for model: 'Vref_v000a' aborted due to an error.

Error(s) encountered while building "Vref_v000a":

### Failed to generate all binary outputs.

The error message says something about the c28377D.cmd and that the program will not fit into available memory. Is it a because I use c28379D.cmd file for 28379D? In C:/ProgramData/MATLAB/SupportPackages/R2018a/toolbox/target/supportpackages/tic2000/src/ there is no corresponding linker command file.

In this thread I read max. memory for one CPU is 512KB; how this translates to heap size?

In other threads for 28335 they suggest

text : >> RAML1 | RAML2,  PAGE = 0

but in c28377D.cmd RAML1 and RAML2 are not defined as variables; not sure if the steps (solutions) for F28335 apply to F28397D.

  • Hi,

    Heap uses .esysmem section. If you are increasing the heap-size, you should may need to increase memory sections accordingly.

    In your linker file, can you check if .esysmem is in RAMGS0 section? what is the size?

    You can also refer to following link for linker command details.

    software-dl.ti.com/.../c2000_c28x-compiler-understanding-linking.html

  • Hi Santosh, in c28377D.cmd next to .esysmem section is

    .esysmem : > RAMLS_DATA,    PAGE = 1

    RAMLS_DATA is defined as

    #ifdef CLA_BLOCK_INCLUDED
            RAMLS_CLA_DATA      : origin = 0x008000, length = 0x001000
            RAMLS_DATA          : origin = 0x009000, length = 0x001000
       #else
            RAMLS_DATA          : origin = 0x008000, length = 0x001000

    When I change the length from 0x1000 to e.g. 0x1300, now the maximum heap size I can get (i.e. no error message) is 0x1300. For 0x2000, max. heap size is 0x2000.

    What is the maximum value for the RAMLS_DATA length?

    There is no RAMGS0 variable in the c28377D.cmd; c28377D.cmd is located in C:\ProgramData\MATLAB\SupportPackages\R2018a\toolbox\target\supportpackages\tic2000\src.

  • What is the maximum value for the RAMLS_DATA length?

    Please refer to data-sheet section 9.3.1 for memory-map

    www.ti.com/.../tms320f28379d.pdf