AnsweredAssumed Answered

Big endian on Kinetis

Question asked by Bauer Eduard on Apr 4, 2012
Latest reply on Jul 29, 2012 by Joe Kissell

Hi,

 

I'm using Kinetis (K10) with MQX (3.8) for my Project. 

 

Is it possible to switch to big endian (I'm porting a large portion of code written for a big endian processor)?

 

If it is possible, how can I do this?

 

I found this macro in PSP

 

 

 

/* Indicate which endian this PSP is */

#if

defined(__ARM__) || defined(__GHS__)

 

#ifdef__BIG_ENDIAN

 

#definePSP_ENDIAN MQX_BIG_ENDIAN

 

#else#definePSP_ENDIAN MQX_LITTLE_ENDIAN

 

#endif

#elif

defined(__MET__)

 

#ifdef_BE

 

#definePSP_ENDIAN MQX_BIG_ENDIAN

 

#else#definePSP_ENDIAN MQX_LITTLE_ENDIAN

 

#endif

#elif

defined(__GNUC__)

 

#ifdefBYTES_BIG_ENDIAN

 

#definePSP_ENDIAN MQX_BIG_ENDIAN

 

#else#definePSP_ENDIAN MQX_LITTLE_ENDIAN

 

#endif

#else

#define PSP_ENDIAN MQX_LITTLE_ENDIAN

#endif

 

 

The bold define is defined!

 

 

Thx

 

Eddie

Outcomes