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'm programing on 28035 CLA. But I encounter an annoy warning "#17003-D relocation from function". It's related to a leaf function in my .cla file, and most probably related with 2 long local variable inside that leaf function. My project is RAM based and I use CGTools v6.1.0.
The help link tells that this warning most probably stems from long address. I checked map file. The leaf function is mapped to address 0x0097a8. And it is just 0x118 large. I can not understand why there would be long address problem.
And what's more if I declare this leaf function using keyword "__interrupt", the warning disappears. But of course everybody knows that this doesn't make sense!!
The latest remedy is that:
If I switch on optimizaiton options, this warning disappears.
Aber if I switch off all the optimization options, they come up again.
Would you be able to post a snippet of the function which is causing the error
Hi, just a thought.
Can't your Leaf function be to far away from your CLA interrupt function ClaTask()?
I'm having one (leaf) function called by 3 ClaTasks. The tasks (pre) init the global variables before executing the "main" ClaCode. The leaf became bigger and bigger and suddenly I also had the linker complaining that it could not reallocate. I've solved this by placing the inline keyword before the leaf function. By doing this the 'leaf code' is inserted in all the ClaTasks and no jumps are made anymore. Disadvantage is that you take more code space now the entire leaf function is embedded in the ClaTasks.
In my case I think the jump offsets just became to large.
__interrupt void Cla1Task3 ( void ) { /*Some global configurations here */ .... /* 'jump' to inline leaf function */ ControlTask(); /*Clean up (if needed)*/ } inline void ControlTask( void ) { //main leaf code }
Best regards,
Tjarco