µTasker Forum
September 05, 2010, 06:11:47 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: January 2010: uTasker utFAT version released for M522XX, SAM7X, LM3SXXXX, LPC2XXX and AVR32 - see utFAT board for full details!
Note that Internet Explorer 8 doesn't work with the forum (unless compatibility view is selected); please use Firefox or Chrome (or other well behaved browsers) as alternative!
 
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Using Eclipse and open source tool chain with M5223X  (Read 2842 times)
mark
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1899



View Profile WWW
« on: July 13, 2007, 12:10:02 am »

Hi All

There has been quite a lot of interest recently about the possibilities of using open source tools - especially Eclipse - for M5223X developments.

The lastest service pack for the M5223X (SP4) includes also a GNU project build and the makefile is also suitable for use with Eclipse.

One test I made was to compare the generated code of a particular project build with Codewarrior 6.3 and the results were surprisingly positive:

Code:
GNU   FLASH    56'848 bytes / RAM 1'728 bytes (including 1024 bytes for vector RAM)
CW6.3 FLASH    59'492 bytes / RAM 1'680 bytes (including 1024 bytes for Vector RAM)

This was performed with CodeSourcery G++ Lite 4.1-32 (GCC 4.1.1)

There is an important note about the latest CodeSourcery 4.2-15 (or 4.2-8 Lite) versions since we have found that it has a bug in it. If you use -O1 all works but higher levels of optimisation, including -Os don't work. The reason is that the IRQs are compiled as normal functions with RTS rather than RTE!!


Here are some notes and CodeSourcery has confirmed that they can reproduce the problem:

Quote
> There are some uTasker users who's projects are based on CodeSourcery
> GNU. Some registers users have 4.2.15 and found that the project would
> no longer run but immediately crashes due to an address error.
> Therefore I have just downloaded the 4.2-8 Lite (which is probably
> 4.2.15
> like) to see what happens and it is the same on my M52235 board - the
> reference project doesn't run.
> The reason that I see is that the interrupt routines are trying to return
> using RTS (rather than RTE) which result in instant death.

 

Here is a quick step guide on how to configure the uTasker project in Eclipse.

1. See the tutorial from Paul at Cambridge Imaging: http://www.cambridgeimaging.co.uk/downloads/Coldfire%20IDE.pdf This explains how to find the software, how to install it and how to start working with Eclipse.

2. Start Eclipe and set the working directory any where you want it to be.

3. File | New | Project…
Choose standard make C project

4. Continue Set project name eg. uTaskerV1.3
Uncheck “use default location” and then set the uTasker directory as location.

5. Continue setting standard set up according to the C/C++ developers user guide until finished (I don’t think that there is anything critical – just defaults).

Afterwards you will see the uTasker project structure including document folder etc.
WARNING: Do not delete anything from the project shown in Eclipse because it will also delete the files from the hard disk!!!!!!!

6. Click on the project (highest level in the C/C++ perspective) and right click the mouse. New | File. Add a file called “makefile” which will then be created in the highest uTasker directory.
Copy the contents of the make file in the uTasker project to it and save.

7. Put the file “m52235evb-rom.ld” – also in the uTasker project– in the directory \Applications\uTaskerV1.3\GNU_ColdFire
This assumes that you have already added the SP4 to your project.

8.  Add a make target in the target window (on the right) and then double click on the green ALL circle.

The project should build and afterwards you have uTaskerV1.3.s19 / uTaskerV1.3.elf and uTaskerV1.3.map in the file \Applications\uTaskerV1.3\GNU_ColdFire and all compiled object files in \Applications\uTaskerV1.3\GNU_ColdFire\Build

Note that you can also compile the project by double clicking on Build_M5223X.bat in \Applications\uTaskerV1.3\GNU_ColdFire.

 
9. It is also possible to put the make file in the application target directory – the position of the make file has then to be set in the project (target window on right). This is in fact the prefered method since it allows several build projects in the same Eclipse project.


One last note. If you are using a CodeSourcery version above 4.1-32 you will need a slighty revised linker script file. This can be found on the service pack page - http://www.utasker.com/software/V1.3/m52235evb-rom.zip

If anyone has additional notes or would like to offer some tips for using the debug functions in Eclipse then please include them here.

Regards

Mark

« Last Edit: February 04, 2010, 10:55:11 am by mark » Logged
aersek
Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #1 on: February 04, 2010, 09:33:29 am »

Tutorial on http://www.cambridgeimaging.co.uk/whitepapers.php is not any more available. Do you have it saved? Can you please put it on uTasker forum?

Regards

Andrija
Logged
mark
Global Moderator
Hero Member
*****
Offline Offline

Posts: 1899



View Profile WWW
« Reply #2 on: February 04, 2010, 10:56:15 am »

Hi Andrija

The paper is still on the web site but its location had been changed: http://www.cambridgeimaging.co.uk/downloads/Coldfire%20IDE.pdf

Regards

Mark
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Copyright © 2010 utasker.com. Webdesign and Hosting by e-future.ch 2010
Valid XHTML 1.0! Valid CSS!
Page created in 0.705 seconds with 18 queries.