Converting to Big Endian format

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Converting to Big Endian format

1,046 Views
raybreslau
Contributor I

I'm using KL16Z256VLH device and am having trouble converting it to big endian formatting. When I change the Target Processor Setting from  Toolchain Default to Big Endian, I get errors during compilation.

Labels (1)
4 Replies

696 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Ray Breslau:

Unfortunately the KL16Z256VLH device only supports the little endian format, as noted in the manual:

pastedImage_0.png

However I checked the Kinetis Design Studio IDE and I think it should not let you select the Big Endian option if it is not supported. I will provide this feedback to the developers.

I hope this clarifies the issue.


Best Regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

696 Views
BlackNight
NXP Employee
NXP Employee

In Eclipse you can select how the data is displayed (see A little or big Indian? A Plea for Peace… | MCU on Eclipse ). However, the ARM cores for Kinetis as implemented by NXP do not allow you to switch between little and big endian. The compiler and tool chain are universal and could support either format, if supported in the silicon. I think the error you saw was with linking the binaries, as the LE/BE is encoded/listed in the libraries. So you would have to have the matching libraries. But as Kinetis does not support BE, I think this is anyway not relevant.

I hope this helps,

Erich

696 Views
vigneshbalaji
Senior Contributor I

Hi Erich,

              As you said the cortex-M0+ architecture supports only little endian for data transfer.What is the advantage and disaddvantage if we use Big Endian or Little Endian for data transfer?

0 Kudos

696 Views
BlackNight
NXP Employee
NXP Employee

In my opinion there is no advantag of little endian vs. big endian. It can be done both ways, and if it can be done in both ways, then for sure it will be done in both ways. I would say there is more a  historical reason: because the early communication protocols were using little endian (or somehow had enough market share), most protocols are using little endian. So it is an advantage that if your controller is already little endian, you don't have to swap bits. But it could be true the other way round too. It is like driving on the left side of the road or on the right side of the road: just make sure you adopt to the rules :-)

Erich