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: Code size error "Program will not fit into the available memory"

Part Number: TMS320F28379D

Hi, I have been using this code which gives me memory size error. I have run bigger codes in CCS but this one does not Build. I have changed at the optimization and size settings (setting attached) but they dont help either. Can you please suggest what should be done to make it work?

Thank you. I am attaching the code, screenshot of error and screenshot of optimization and size settings.

control_cpu01 (3).c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//###########################################################################
//
// FILE: control_cpu01.c
//
// TITLE: Inverter Control (SVPWM)
//
//!
//!
//!
//###########################################################################
//
// Included Files
#define MATH_TYPE FLOAT_MATH //IQ_MATH
#include "IQmathLib.h"
#include <math.h>
#include "F28x_Project.h"
#include "settings.h"
#include "Solar_F.h"
// Function Prototypes
void InitEPwm(void);
void ConfigureADC(void);
__interrupt void epwm1_isr(void);
__interrupt void adca1_isr(void);
Uint16 usRunState;
Uint16 usFaultFlag;
Uint16 usResumePWM;
Uint16 usPwmPeriod;
Uint16 EPwm1_DB;
Uint16 EPwm2_DB;
Uint16 EPwm3_DB;
Uint16 usPhase;
Uint16 usPwm2Phase;
Uint16 usPwm3Phase;
Uint16 EPwm1_CMP;
Uint16 EPwm2_CMP;
Uint16 EPwm3_CMP;
float32 fDutyCycle;
float32 fDutyCycle1;
float32 fDutyCycle2;
float32 fDutyCycle3;
float32 fTdb;
float32 fTdb2;
float32 fTdb3;
Uint16 TestPwm;
float32 fVdcRef;
float32 fVinFlt;
float32 fVdcPeak;
float32 fUma;
float32 fUmb;
float32 fUmc;
float32 fUmz;
float32 fUmax;
float32 fUmin;
float32 fUmaxAbs;
float32 fUminAbs;
float32 fUmodA;
float32 fUmodB;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

    Have you enabled the compile option --gen_func_subsections (C2000 Compiler->Advanced options->Runtime Model Options)?

    This will spit the text sections into subsections at the function level

    Regards,

    Veena

  • Hi Veena,

    I tried this but it it did not solve this issue. I am still seeing that error of "Program will not fit into the available memory". Please advise what else can be done to get rid of this error.

    Please see the screenshot attached.

  • Hi,

    Can you share the .map file? It will be available in the Debug folder.

    It could be that one of the function is so large that it is unable to fit in any of the available RAMs. Note that the linker cannot split a function and place it in different RAM blocks.

    You could try combining multiple RAM blocks and use that for mapping text.

    Eg:

    RAM1 : origin=0x0, length=0x800

    RAM2 : origin=0x800, length=0x800

    text : >>RAM1|RAM2

    Update this to:

    RAM12 : origin=0x0, length=0x1000

    text : >>RAM12

    Regards,

    Veena

  • Hi,

    I haven’t heard from you for the last week, so I’m assuming you were able to resolve your issue. If this isn’t the case, please reject this resolution and reply to this thread. If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

    Regards,

    Veena