Thursday, December 22, 2011

Eclipse for embedded development:- A re-visit


Eclipse for embedded development:- A re-visit



Today we shall see some finer points of using eclipse as a cross-compiler tool. Eclipse has almost everything in it to be the perfect compiler for all your needs but more manuals need to posted for meeting your specific requirement.




When i was going through my compilation i observed  the following problems:-
  1. <math.h> library is not compiled properly along with the program. This can be solved by using the flags -lm. Also -lpthread flag can be used when compiling multi-threaded application. 
      Eclipse screenshot-1

  2. Using gdb-debugger to test the program running on the target platform.
    This is one task where i faced a lot of challenges and i am quite happy i overcame it.This can be seen in the post here.
  3. Updating Eclipse plugins and software:-
    If you try to update eclipse behind a proxy server, you may face problems as it will show network failure. We cannot even connect to our remote target. This can be sorted out by manualling setting the network in preferences window. MAKE SURE YOU ONLY PROVIDE THE PROXY FOR HTTP ONLY AND NOT FOR SOCKS AND HTTP. Also add the device ip to the exception list.



Sunday, December 4, 2011

Alternnative for Xmanager in Ubuntu: Remmina

How to configure Remmina for remote login into using XDMCP protocol

  1. Install Remmina Client from software centre.
  2. Install install remmina-plugin-xdmcp plugin.
  3. Restart the machine
  4. Start Remmina
  5. Now from New select the XDMCP from dropbox.

For XDMCP connection to Ubuntu
1. XDM Configuration
1. Change runlevel to 5
Open/etc/inittab and set the initial runlevel to 5 as following:
id:5:initdefault:
2. Enable XDMCP

 For GDM:

Open /etc/X11/gdm/gdm.conf and set the Enable entry to 1 in the [xdmcp] section as following.
[xdmcp]
Enable=1

Open /etc/X11/gdm/gdm.conf and set the DisallowTCP entry to false in the [security] section as following.
[security]
DisallowTCP=false
2. Firewall (TCP/UDP Ports) Configuration
Open UDP port 177 from the PC to the remote host direction.
Open incoming TCP ports 6000~6010 from the remote host to your PC.
3. Reboot the remote host and start Xmanager
# init 3; init 5

 

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..





Tuesday, January 11, 2011

Block Diagram


here is the block diagram of our SLAMROVER,
prepared by Niyas