Hello,
is it possible to switch to big-endian in S32DS for S32K144? I am porting some project from Coldfire V1 and there are so many structures used in communication, which assume big-endiannes ...
I tried -mbig-endian in compiler options, but I got "compiled for a big endian system and target is little endian" error :smileysad:
Is it even possible to switch to big-endian?
Thanks,
Martin
Solved! Go to Solution.
Seems like "compiled for a big endian system and target is little endian" error is the linker error since libraries are Little Endian. NXP GCC contains only LE prebuilt libraries.
Seems like "compiled for a big endian system and target is little endian" error is the linker error since libraries are Little Endian. NXP GCC contains only LE prebuilt libraries.
Hi,
as far as I know, there is no such gcc parameter or __attribute__. Normally is such situation handled by some "endian_swap" function in receive/transmit.
Jiri
I just did "send(uin8t_ *ptr_to_struct, uint16_t len)" before, now I would need to make copy of the struct, do the swapping and then send it, that would be so much rewriting for all the structures, so I thought that it would may be possible to switch S32K144 (to big-endian mode somehow (may be SETEND instruction, but it seems that it doesn't exist in Cortex-M series anymore - see ARM Cortex-M - Wikipedia ).