Big endian on Kinetis

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Big endian on Kinetis

2,275件の閲覧回数
EduardB_
Contributor I

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

0 件の賞賛
返信
2 返答(返信)

1,006件の閲覧回数
timias
Contributor IV

I was told with my Kinetis processor ( K60) it was not supported in the compiler Codewarrior 10.2 yet, and wasn't scheduled to be done anytime soon.

 

FYI I am currently fighting a problem with CW where to Srec generated for my firmware has inconsistant endianess. Where the vector table is being output in BIG, but the code is coming out in Little. If I find out info about this problem I will post.

 

 

0 件の賞賛
返信

1,006件の閲覧回数
ignisuti
Contributor IV

Just curious if you guys have an update on this. I have a K10 MCU that I'd like to make Big-Endian.

 

I'm trying this line of code, but doesn't seem to be working for me.

SCB_AIRCR = SCB_AIRCR_VECTKEY(0x5FA)| SCB_AIRCR_ENDIANNESS_MASK;

0 件の賞賛
返信