Little Endian support for MPC5643L

cancel
Showing results for 
Search instead for 
Did you mean: 

Little Endian support for MPC5643L

600 Views
tanmayeesapre
Contributor II

I am trying to create a project with Code Warrior 10.7 for MPC5643L. I have selected the BytePrdering to be Little, but that gives me link error - Cannot mid big and little endian. The ewl libraries used during linking seem to be created for big endian scheme only. I could not find corresponding lib files for little endian scheme. What would be the right way to support little-endian byte ordering for the project?

3 Replies

365 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

libraries compiled with Little Endian swith are not provided, because microcontroller is designed to use big endian.

But you can compile these libraries on your own. In CodeWarrior installation folder at path c:\Freescale\CW MCU v10.7\MCU\PA_Support\ewl\EWL_C\ there is EWL_C.PA.mak which is makefile for compiling the libraries. 

You must edit this makefile and add  -little parameter to compiler options.

Regards,

Martin

365 Views
tanmayeesapre
Contributor II

Thank you Martin. I was able to recompile the libraries for the microcontroller. Like you said the hardware seems to be configured for big endian support so I am unable to flash the ELF file. Would I need a custom hardware board or are there any changes I can make to the registers, init routines etc. to support the little endian mode? 

0 Kudos

365 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

this is not about board but about microcontroller itself. The core this microcontroller uses can support both, big and little endian, but peripherals are not prepared to use little endian.

So, If I can give you an advice, use the microcontroller in standard way, which is big endian. This will ensure correct behavior and it will save you much troubles during development.

Regards,

Martin