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.
Tool/software: TI C/C++ Compiler
Hello,
customer switched from compiler 16.9.0.LTS to 16.9.1.LTS and got the failure attached:
"The aligment of an array element is greaater than the element size"
DSP: F28075
TI Bibliothek v210
What is the reason?
Regards, Holger
Thank you for reporting this problem. I can reproduce it. I filed CODEGEN-1968 in the SDOWP system to have this addressed. You are welcome to follow it with the SDOWP link below in my signature.
Thanks and regards,
-George
That's my fault. I made an error when filing the issue. I just fixed it. Please accept my apologies.
It will take few hours to propagate to the external view. When you search for the bug, enter the full identifier: CODEGEN-1968 .
Thanks and regards,
-George
Please note that this is not a bug in the compiler but rather in the CAN header files. The C2000 team has already filed a bug to fix their header files.
The compiler error statement is correct. You can't declare an array of byte peripherals. The compiler guide has been updated to include this restriction. The reason is that byte peripherals are aligned larger than their size, and the C language requires that array elements not have an alignment larger than their size because of element address calculation. Note that prior to 16.9.1.LTS, the compiler silently accepted such arrays but did not increase the alignment of the elements. This was a bug for byte peripheral types and was corrected as a bug fix in 16.9.1.LTS.
Thanks,
Anna
Dear Sebastian,
As these headers are distributed by Texas Instruments, we cannot distribute your patch to our headers on the forum, as it was not verified to be correct by the C2000 team. However, an engineer from the C2000 team has already posted a patch. Please compare the posted patch to yours for any discrepancies and let us know if you have any questions.
Thanks and Regards,
Anna
Ooops, that patch was indeed totally broken. /o\
So to anyone who might have downloaded the patch:
Do not use my patch! It most likely breaks stuff.
This might be a matter of taste, but I find simply deleting the post without any comment more confusing than openly stating that the patch is broken.