Tool/software:
Hi,
I have the habit of declaring in .cla files the variables that go in Cla1ToCpuMsgRAM, and in .c files the variables that go in CpuToCla1MsgRAM. Such variables are connected via a .h file that is included in both de .c and the .cla file. because of the .h file, I would expect it wouldn't make any difference which variable is declared where. Except it looks like it does, and I don't understand...
Here, I have a set of variables declared as such (for instance) :
#pragma DATA_SECTION(BuckVoltage,"Cla1ToCpuMsgRAM"); InfLib_Mesure_t BuckVoltage;
Because the location of the variable in memory is forced, I believed the declaration in a .c or .cla file wouldn't make any difference.
If I declare all my variables in the .cla file, I get the following error message :
#10462-D: Symbol, "BuckVoltage", referenced in "./sources/regulation/regulation_cpu1.obj\", assumes that data is blocked but is accessing non-blocked data in \"./sources/regulation/regulation_cla2.obj". Runtime failures may result.
Based on this page, I tried to declare the variables in the .c file, to see if the error goes away.
When I do so, I get another error message :
#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. run placement with alignment/blocking fails for section "Cla1ToCpuMsgRAM" size 0x92 page 0. Available memory ranges:",
So ... What happened ? Are the variables not in the right location when declared in the .cla file, in spite of the pragma ? Do data take up more more memory when declared in a .c file than in an .cla file ? Is there a hidden issue not detected by the compiler when in the .cla file ? Some other issue ?
I am quite puzzled by this difference.
Thanks in advance for your help,
Best regards,
Adrien
