Compiler command for aligning all arrays

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Compiler command for aligning all arrays

1,768 次查看
helferog
Contributor II

Hey,

I am working with a S32R274 Processor and build the Code with the S32 Studio.

I face the issue, that parameter arrays which are loaded by the SPT must be aligned.

Currently I use global arrays like:

uint32_t fft256_command_list[] __attribute__ ((aligned (8))) = { ... };

and add the alignment manually to each array.

Is there a way to set this alignment by default (as compiler setting) ?

Thanks and best regards

Roger

标签 (1)
标记 (4)
2 回复数

696 次查看
martin_kovar
NXP Employee
NXP Employee

Hello Roger,

I am afraid, the only possibility is add attribute aligned manually to each array. I tried to search another solution, but it seems gcc does not allow anything else.

Regards,

Martin

696 次查看
helferog
Contributor II

Hello Martin,

Alright, thank you for the fast response.

Best regards,

Roger

0 项奖励