Other Parts Discussed in Thread: SYSCONFIG
Hi,
I am starting a new project, only working through configuration of the peripherals, and I get the following error message :
<Linking> "../2838x_FLASH_CLA_lnk_cpu1.cmd", line 78: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".cinit" size 0x20 page 0. Available memory ranges: FLASH1 size: 0x2000 unused: 0x0 max hole: 0x0 error #10010: errors encountered during linking; "2205-CTC-CHRG7K-SW-CPU1.out" not built
The source code could not be any smaller :
void main(void)
{
//
// Initializes system control, device clock, and peripherals
//
Device_init();
//
// Initializes PIE and clear PIE registers. Disables CPU interrupts.
// and clear all CPU interrupt flags.
//
Interrupt_initModule();
//
// Initialize the PIE vector table with pointers to the shell interrupt
// Service Routines (ISR).
//
Interrupt_initVectorTable();
while(status == SFO_INCOMPLETE)
{
status = SFO();
if(status == SFO_ERROR)
{
error(); // SFO function returns 2 if an error occurs & # of MEP
} // steps/coarse step exceeds maximum of 255.
}
//
// Disable sync(Freeze clock to PWM as well). GTBCLKSYNC is applicable
// only for multiple core devices. Uncomment the below statement if
// applicable.
//
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_GTBCLKSYNC);
// SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
//
// Board Initialization
//
Board_init();
//
// Enable sync and clock to PWM
//
//SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_GTBCLKSYNC);
//
// Enables CPU interrupts
//
Interrupt_enableGlobal();
// Enter code here
//
// IDLE loop. Just sit and loop forever (optional):
//
for(;;)
{
//int32_t comptA = 0;
// Enter code here
GPIO_togglePin(CMD_RLY_BYPASS_OUT);
DEVICE_DELAY_US(100000);
status = SFO(); // in background, MEP calibration module continuously updates MEP_ScaleFactor
if (status == SFO_ERROR)
{
error(); // SFO function returns 2 if an error occurs & #
// of MEP steps/coarse step
} // exceeds maximum of 255.
HRPWM_setCounterCompareValue(PWM_PFC_BASE, HRPWM_COUNTER_COMPARE_A, compA);
}
}
void error (void)
{
ESTOP0; // Stop here and handle error
}
The line causing the issue is :
HRPWM_setCounterCompareValue(PWM_PFC_BASE, HRPWM_COUNTER_COMPARE_A, compA);
When I comment it, the code builds and runs.
I have read that the issue could be due to the EABI format, but if I change it to COFF, a load of compilation errors appear, I would prefer not to go down this rabbit hole if possible.
Thanks in advance for your help,
Adrien