Monday, November 28, 2011

Running Ltlib in Ubuntu 11.10:-

Let us see how to configure ltib to create linux image for m5485 board.
  1. Mount the iso file downloaded from Freescale.
  2. You can easily mount it in ubuntu graphically using Furious ISO mount tool
  3. Install ltib using the command <mount point>/install
  4. Now the various dependencies need to be satisfied as shown when ./ltib is run for the first time
  5. Most of it can be found in the Synaptic repository
  6. the install 'build-essentials' package.
  7. Now usually dependencies for 2 packages 'glibc-devel' and 'zlib' needs to be satisfied but is already installed.
  8. Us this post as an example to edit 'Ltibutils.pm' in /bin folder of installation.
  9. Now add the folowing line to '/usr/sbin/visudo'                                              paul ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm
  10. Now run ./ltib --configure

Sunday, November 27, 2011

Coldfire compilation in Ubuntu using Eclipse..

Let us see how to compile in Ubuntu
  1. Download and install the Codesourcery Lite toolchain from here. You may have to configure bash shell as given in the document here.
  2. Now install eclipse CDT and rse from the Synaptics.
  3. Now configure the project as given in post before.
  4.  
    1. No need to change the build command as shown in video.  
    2. Also add to toolchain depending on path.
    3. To get the cross gcc option in ubuntu, install updates in eclipse from the following location

  5.  As Dropbear ssh is installed i can use the following command to copy the generated elf file 
  scp <elf file> <user>@<remote target ip>:< location to copy>

This is easier than using tftp protocol.

Wednesday, November 23, 2011

Using eclipse to compile for Coldfire v4e

In this post i am going to explain how to compile an elf executable for m5485 board..

WHY ECLIPSE???

Eclipse is a general purpose IDE that can be configured to be used with many applications. The IDE generally used is the Freescale's propriety CodeWarrior which is only available in Evaluation version. But the power of eclipse has been accepted by the fact that the latest CodeWarrior has been released in Eclipse version. This has inspired me to port it to ordinary Eclipse.

PROJECT PRE-REQUISITES:-
 
The important thing we must have is Eclipse CDT IDE. I am using the Indigo version for this example which can be downloaded here. Also we require a toolchain to compile the code which we can download from here. It is a version for Sourcery CodeBench Lite for ColdFire GNU/Linux which is free. We must either use an Windows or Linux OS here. Here i am explaining for Windows XP.

SO LETS START..  

  1. First install the toolchain and download eclipse CDT.
  2. The remaining steps in the video below. 

Coldfire eclipse configuration from rinosh1989 on Vimeo.
for more visit my blog at http://super-ibot.blogspot.com/2011/11/using-eclipse-to-compile-for-for.html
these are values i have  used:-
for includes:-
${ToolChain}\CodeSourcery_Linux\lib\gcc\m68k-linux-gnu\4.3.2\include-fixed
${ToolChain}\CodeSourcery_Linux\m68k-linux-gnu\libc\usr\include
${ToolChain}\CodeSourcery_Linux\m68k-linux-gnu\include
${ToolChain}\CodeSourcery_Linux\lib\gcc\m68k-linux-gnu\4.3.2\include





for gcc location
${ToolChain}\CodeSourcery_Linux\bin



prefix values is "m68k-linux-gnu-" without quotes..


${MCPU}=5485 // Change this according to your board
${ToolChain}=C:\Program Files\Freescale\CW MCU v10.1\Cross_Tools //Change this according to where you have installed your toolchain.



This iis my first attempt and i have not tested it on other boards. Please commend if you would like to add more.. 

Note:-
I have not tried using the toolchain directly downloaded. Will post about it soon..