µTasker Forum

µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: fabio on September 26, 2007, 08:18:12 AM

Title: default 4 byte integer
Post by: fabio on September 26, 2007, 08:18:12 AM
In codewarrior In the project "console debug setting" there is a check box in "Coldfire Processor" that enable or disable 4byte integer. Default an integer use 4byte like in utasker project.
Can I pass to 2byte integer in the utasker project or I will have errors?

best regards
Fabio
Title: Re: default 4 byte integer
Post by: mark on September 26, 2007, 05:42:32 PM
Hi Fabio

I must admit to now having experimented greatly with such settings (although I may modify the project to use register passing since it reduced code size a little - am am not sure that it is not a bit faster too (?) - there seems to be only one line of assember to modify and then it works..).

I believe that 2 byte integers should work. The project runs also on the 16 bit M9S12NE64 and int is used only for loop counters with quite small count values or for returning codes like 0 and 1, or -1 etc.
However I don't know whether there are any advantages doing this. Generally the processors work best with their natural integer value (same as the processor bus width) and a 4 byte integer is probably most efficient.

In any case there should be no harm in trying - just check the code size before and after to see what happens.

Do you have a particular reason to use 2 byte integer?

Regards

Mark
Title: Re: default 4 byte integer
Post by: fabio on September 28, 2007, 08:20:10 AM
Hi Mark.
because the others libraries that I have included in my project and that was originally compiled for a 8bit micro, with the 4byte-integer, don't work...

It seems me too that utasker work also with the 2byte-integer, so I could use this option..but I am a little worry...

regards
Fabio

Title: Re: default 4 byte integer
Post by: fabio on November 13, 2007, 05:38:42 PM
I can confirm that some parts of utasker doesn't go with deselection of 4-byte integer. for example the FTP
So I have corrected the others library

best regards
Fabio