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.
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
Hi Adrien,
Did you try mapping the .cinit section to another unused Flash sector? FLASH1 might be full with code.
Thanks and regards,
Vamsi
Hi,
It works, but how come FLASH1 is full ? I provided the entierty of the hand-written code (there's only that + whatever sysconfig generated)
Hi Adrien,
Did you check the map file? It will give details on what all got mapped to FLASH1.
Thanks and regards,
Vamsi
Hi Adrien,
Do you have any update on this? Can I close this post?
Thanks and regards,
Vamsi