Compiler command for aligning all arrays

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiler command for aligning all arrays

1,350 Views
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

Labels (1)
Tags (4)
2 Replies

278 Views
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

278 Views
helferog
Contributor II

Hello Martin,

Alright, thank you for the fast response.

Best regards,

Roger

0 Kudos