[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Sparemint Coldfire



Mark Duckworth wrote:
In the coming weeks I will be rebuilding all of sparemint for coldfire.

Excellent. But it will be a lot of work.
The main problem is that the only compiler for ColdFire is GCC 4.x, most
SpareMiNT sources are really outdated. As I have already underlined, old
software often need some minor patches to be compatible with GCC 4.x.
We would probably have more chances to have a ColdFire distribution with
Alan's Gentoo which use up to date packages.
And also, there is the problem that the RPMs can't be cross-compiled...

I will be using m5474 arch and -mcpu=5474 cflag. So a package for coldfire will look like 'aalib-1.2-1.m5474mint.rpm.

Currently, we have 3 ColdFire processors around:
- The ACP computer use the MCF5474
- The Freescale evaluation boards use the MCF5484 and the MCF5485

All of these use a V4e core and are fully compatible. The only
differences are the clock speed and the additional hardware controllers
built into the processors.

The same compiler options can be used for all V4e processors. In the GCC
sources, the 5475 has been chosen arbitrarily as the default model for
the V4e family. For example, the m68k-linux use the 5475 CPU for the V4e
multilib. So I did the same in the m68k-atari-mint patches, and in the
MiNTLib, etc.

I really believe there are no differences by compiling with -mcpu=5474
or -mcpu=5475 or any other V4e CPU. I have explicitly verified that any
V4e CPU option links the correct V4e multilibs from the m5475 directory.
However it could be theoretically possible to write sources that behave
differently on specific processors by using specific defines, but I
really believe no one does that because there is no good reason.

So when compiling for ColdFire, I recommend using the -mcpu=5475 option
as it is the GCC default choice, until someone finds a difference
between the the different CPU models.

But if that doesn't work I'll be building everything on real coldfire hardware depending on how far away Didier is from having firetos run without cf68klib.

Note that thanks to the CF68KLib, FireTOS can run both 68000 and
ColdFire executables. Of course the ColdFire ones are faster. It could
be theoretically possible to run the standard 68000 EasyMiNT on FireTOS
on the evaluation boards, then to use GCC to build native ColdFire RPMs,
and progressively replace the 68000 binaries by ColdFire ones for
improved speed.

Good luck.

--
Vincent Rivière