Tool chain for the TWR-MPC5125

This is a followup to the previous write-up (as some information have become outdated):

https://tthtlc.wordpress.com/2011/01/06/unboxing-my-freescale-board-mpc5125

MPC5125 as provided here:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC5125

https://linuxlink.timesys.com/docs/gsg/mpc5125_twr

https://community.freescale.com/thread/74066

http://cache.freescale.com/files/soft_dev_tools/software/board_support_packages/TWRMPC5125LinuxBSP.rar?fpsp=1&WT_TYPE=Board%20Support%20Packages&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=rar&WT_ASSET=Downloads&sr=5

http://www.freescale.com/webapp/sps/download/license.jsp?colCode=CWF-MPC512xADS&nodeId=0127260061033202A5621E&location=overview&WT_TYPE=Board%20Support%20Packages&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=iso&WT_ASSET=Downloads&Parent_nodeId=123481170878772616621E&Parent_pageType=overview

https://community.freescale.com/thread/127394

http://www.freescale.com/files/microcontrollers/doc/fact_sheet/MPC5125FS.pdf

The following is an attempt to recompile the source codes using ELDK toolchain:

https://community.freescale.com/message/342028#342028

I downloaded the following files (from http://ftp.denx.de/pub/eldk/5.3/targets/powerpc/):

eldk-eglibc-i686-powerpc-toolchain-gmae-5.3.sh
powerpc.sha256
target.conf
install.sh

Then I installed them by doing the following:

$ mkdir eldk-download
$ cd eldk-download
$ mkdir -p targets/powerpc
$ wget ftp://ftp.denx.de/pub/eldk/5.3/install.sh
$ cd targets/powerpc
$ wget ftp://ftp.denx.de/pub/eldk/5.3/targets/powerpc/target.conf
$ wget ftp://ftp.denx.de/pub/eldk/5.3/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.3.sh
$ wget ftp://ftp.denx.de/pub/eldk/5.3/targets/powerpc/powerpc.sha256
$ sha256sum -c armv7a.sha256
eldk-eglibc-i686-powerpc-toolchain-gmae-5.3.sh: OK
target.conf: OK

$ cd ../..
$ chmod a+x install.sh
$ ./install.sh -s gmae -r – powerpc

That resulted in ‘gmae’ selected as the cross compiler toolchain and ‘none’ selected as the root file system (I’m using LimeOS on the development board).

Then I cross-compiled “Hello World” with the following:

$ source opt/eldk-5.3/powerpc/environment-setup-powerpc-linux
$ powerpc-gcc helloworld.c

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: