Author Topic: Libraries  (Read 8832 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Libraries
« on: November 01, 2008, 10:44:15 AM »
Hi Mark,
  This isnt a utasker question, but was wondering if you can point me in the right direction?

I am using codewarrior 7.1, and was trying to find out information on what libraries to link in, and is utasker (I have simply converted the demo that you have written), compiled in a certain model (ie Large etc..)?. I cant seem to find any information on this.

Any advice on this?

Thanks
Neil

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Libraries
« Reply #1 on: November 01, 2008, 12:56:46 PM »
Hi Neil

The CW project is set up for 32bit code and data model. It is also set up for parameter passing in registers.
Any libraries used must therefore match this (I don't think that there is any sense in using a different model - unless anyone can explain one. Register passing is more efficient and results in smaller code). The settings are in CW configuration under Code Generation->Coldfire processor

As a guide to selecting libraries I have found the "Codewarrior Development Studio Coldfire(TM) Architectures Edition Build Tools Reference" very useful. However I have not been able to find a link to it (possibly latest version) on the Freescale web site (if any one can track it down please let me know!). Basically ensure that any libraries used are names with *regABI*.a.

Therefore I have a local copy here for emergencies: http://www.utasker.com/docs/Coldfire/ColdFire_Build_Tools_Reference.pdf

Regards

Mark

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
Re: Libraries
« Reply #2 on: November 06, 2008, 10:40:55 AM »
Hi Mark,
  Thanks for the info, and link, which is very useful. I done the below, which seams to work fine, but can you see anything I missed out ?

Thanks
neil


To use the floating point, and string commands etc, I linked in:

C_4i_CF_RegABI_MSL.a
c_4i_CF_Runtime.a
fp_coldfire.a

And to use floating point I changed file ansi_prefix.CF.size.h as follows:

#define _MSL_FLOATING_POINT     1
//#define _MSL_NO_MATH_LIB                    0
#undef _MSL_NO_MATH_LIB
#endif

#define _MSL_FLOATING_POINT_IO    1

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: Libraries
« Reply #3 on: November 06, 2008, 02:01:39 PM »
Hi Neil

I don't have much experience working with (and configuring) the libraries so I can't really comment myself. I know that various other users have done a lot more than me so maybe someone else can give a tip.

If all works OK it sounds good though...!

Regards

Mark