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.
I am getting the below error outputs into my terminal:
"../CLA_Res.cla", line 35: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resError" overflowed; the 18-bit relocated address
0x3fc00 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x00000008, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 35: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resonant_command" overflowed; the 18-bit relocated
address 0x3f800 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x0000000a, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 41: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resError" overflowed; the 18-bit relocated address
0x3fc00 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x00000030, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 41: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resonant_command" overflowed; the 18-bit relocated
address 0x3f800 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x00000032, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 46: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resonant_command" overflowed; the 18-bit relocated
address 0x3f800 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x00000036, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 46: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resonant_command" overflowed; the 18-bit relocated
address 0x3f800 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x0000004a, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 48: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resonant_command" overflowed; the 18-bit relocated
address 0x3f800 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x00000052, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 48: warning #17003-D: relocation from function
"Cla2Task1" to symbol "_resonant_command" overflowed; the 18-bit relocated
address 0x3f800 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x00000066, section =
"Cla1Prog:_Cla2Task1")
"../CLA_Res.cla", line 104: warning #17003-D: relocation from function
"Cla2Task8" to symbol "_resonant_command" overflowed; the 18-bit relocated
address 0x3f800 is too large to encode in the 16-bit unsigned field (type =
'R_ABS16_OC' (107), file = "./CLA_Res.obj", offset = 0x00000028, section =
"Cla1Prog:_Cla2Task8")
warning #10015-D: output file "hrpwm_Collector.out" cannot be loaded and run on
a target system
Finished building target: "hrpwm_Collector.out"
Here is my DCL/CLA code for this example:
#include "DCLCLA.h"
#include "F2837xD_Cla_typedefs.h"
#include <stdbool.h>
#include "F2837xD_Cla_defines.h"
#include "F28x_Project.h"
float flagRes; // Clamp flag variables
float freq_upperLim, freq_lowerLim; // Lower clamp limit of digital compensation block
// Digital Control Library Structures
DCL_DF22_CLA res_ctrl2; // Voltage compensation controller
extern float fromCLA;
// Sensor data that is passed to CLA2 from CPU2
// In future can use resonant current or feed-forward voltage
// For now, for simplicity, just pass resonant error
extern float32_t resError;
// CLA1 C Task Prototypes
__interrupt void Cla2Task1();
__interrupt void Cla2Task2();
__interrupt void Cla2Task3();
__interrupt void Cla2Task4();
__interrupt void Cla2Task5();
__interrupt void Cla2Task6();
__interrupt void Cla2Task7();
__interrupt void Cla2Task8();
// Task executions
interrupt void Cla2Task1 (void)
{
// Resonant error is calculated in CPU1 and passed via IPC to CPU2
// run pre-computed controller
fromCLA = DCL_runDF22_L2(&res_ctrl2, resError);
flagRes = DCL_runClamp_L1(&fromCLA, freq_upperLim, freq_lowerLim); // Call clamp function and set clamp flag
// Check that the immediate part of the controller is "in range"
if (0.0f == flagRes)
{
DCL_runDF22_L3(&res_ctrl2, resError, fromCLA);
}
// Clamp max/min
// sets to between 1 and 2 for 200kHz nominal, 400kHz max frequency
fromCLA = (fromCLA > freq_upperLim)?
freq_upperLim:fromCLA;
fromCLA = (fromCLA < freq_lowerLim)?
freq_lowerLim:fromCLA;
}
__interrupt void Cla2Task2 ( void )
{
}
__interrupt void Cla2Task3 ( void )
{
}
__interrupt void Cla2Task4 ( void )
{
// Could possibly have an additional CLA task, such as CLA Task 4,
// Which calls the update DF22 function on user-request, when a GPIO output pin
// Has been triggered on/off, such as the one used to trigger the load-side switch
// Then, we can switch into the control scheme more extreme/aggressive PID coefficents
// When a load pulse is received to minimize the cathode voltage deviations
// Check TI examples for the way to do this, could alternatively use the GPIO pin
// muxed into the input cross-bar to generate a CLA executing interrupt directly from CPU1
}
__interrupt void Cla2Task5 ( void )
{
}
__interrupt void Cla2Task6 ( void )
{
}
__interrupt void Cla2Task7 ( void )
{
}
//Task 8 will initialize the variables used in Task 3
__interrupt void Cla2Task8 ( void )
{
// __mdebugstop();
// Initialise DF22 Full Voltage Controller Compensation Coefficients
res_ctrl2.a1 = -2.1280f;
res_ctrl2.a2 = 1.3968f;
res_ctrl2.b0 = 9.6580f;
res_ctrl2.b1 = -9.1580f;
res_ctrl2.b2 = -9.6521f;
// clamp limits of both the voltage and current controllers
freq_upperLim = 2.0f; // 2x nominal frequency maximum
freq_lowerLim = 1.0f; // nominal frequency minimum
fromCLA = 0.0f; // Initialise resonant command output
}
which is largely based on previous examples I have seen with C2000Ware.
Any advice on why I may be getting these errors? Again, I have wrote a similar program in my CPU1 CLA, with no errors. Not sure what is happening here.
Thanks,
Joel
Hi Joel,
It appears the resError variable may be assigned to a memory that is not accessible to the CLA. Please make sure the variable is mapped to one of the LSx memory assigned to CLA or to CLA-CPU Message RAM.
See this FAQ for additional information:
Thanks,
Ashwini