code portability for legacy 68K devices

cancel
Showing results for 
Search instead for 
Did you mean: 

code portability for legacy 68K devices

121 Views
Contributor I

I have an application which runs on legacy 68020 processor with external FPU. This unit was deployed 20 years ago , which requires replacement. Is it possible to port  to the newer coldfire platform without modifying C code. If modification is required, can it be made minimal?

Tags (1)
0 Kudos
3 Replies

7 Views
Specialist I

(( What do you mean my post contains "Banned Content"? Which common words is this system objecting to now? "A?P?P?L?E"? "N?A?K?E?K"? ))

The 68020 is a "n?a?k?e?d CPU" without any internal peripherals (see, that wasn't an offensive use of that word, was it?). If you wanted something to simply "drop in" to an existing hardware design, then the early Coldfire chips that were like that are extremely old and very much "not recommended for new designs". Newer Coldfire CPUs are, as Mike said, were also released quite a long time ago. But they come with a lot of peripherals, updated memory interfaces and would change your hardware design a lot.

Now is not the time to START on a new Coldfire design. A major problem is that you can't buy the development boards any more, These are often only available for a year or two after a new chip is released. That means you're likely to have to try and debug a chip on your board without a working development board. This is very hard.

A 68020 starts executing from the reset vector. That's all it does. The startup code just has to initialise external hardware. Modern CPUs have to run a lot of code setting up all the internal hardware before they can do anything else. That's a lot of code.

You wouldn't believe how much code an i.MXRT has to run in order to start. It also expects to boot from USB, eMMC or HyperFlash with a custom "DCD" description segment. The peripherals are EXTREMELY complicated. It takes weeks to get something like an SPI driver working.

Good software design has "drivers" that handle the specific hardware and "application" code which shouldn't depend on the hardware at all. If your original software is written like that (and I'll bet it isn't), then the "Application" code doesn't have to change. The "Driver" or "Platform" code certainly does.

To get an FPU you have to use a Version 4 Coldfire. But since the 68020 and the FPU is probably only running at 16 or 25 MHz it is very likely that a V3 Coldfire (that doesn't have an FPU) running at 240 MHz would be able to EMULATE the floating point operations as fast or even faster than the old hardware could do it.

If you were really courageous you might consider running a modern hardware design and then running a 68020 EMULATOR on that which can run your old code. That was what A?p?p?l?e did back in 1994 when they jumped from the 68030 to the PPC. They emulated the previous processor. But that was a LONG time ago.

Can your replace your hardware with a Raspberry Pi? You might be able to run a 68020 emulator on that. But your device probably has a lot of custom hardware that the Pi doesn't have or couldn't talk to.

The same applies to changing to a more modern chip based on ARM. You can get 600 MHz very easily there.

Except ARM is little-endian and 68k and Coldfire is big-endian. If you have endian-dependent code in your current design then that is likely to be a problem.

Tom

0 Kudos

7 Views
Specialist I

Another possibility is to put a 68020 core into an FPGA of some sort.

I think this would be very "challenging" and "courageous" and be difficult to support and keep going.

There are 68000 cores here, but no 68020 or 68030. I think an FPU core would be even rarer:

Projects :: OpenCores 

Here's some 68k emulation discussion - that last happened 12 YEARS ago:

TG68 - The Open Source Minimig CPU into the FPGA 

Here's a thread from 2014 about a "68060 in an FPGA", much discussed in the Amiga community:

Superscalar 68000, have you seen the Apollo core ? What do you think about ? - Page 1 

Tom

0 Kudos

7 Views
NXP TechSupport
NXP TechSupport

Hi,

For ColdFire products launched more than ten years, we would recommend to use ARM based related MCU, such as Kinetis, LPC and i.MXRT for new design.

There also need to do software porting work, whatever porting MC86020 to ColdFire or ARM core based MCUs.

Thanks for the attention.

best regards

Mike

0 Kudos