Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-09

68K

37 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Schreiber
to Michael Schnell: Wee seem to want to do an embedded project with an 68 Processor (in fact a "Fido" chip by…
Michael Schnell wrote 6 lines
Is it possible/viable to use the Lazarus IDE for writing and compiling the code ? Is it possible to configure the Lazarus IDE to use gdb in cross-mode ?

Maybe you should have a look to MSEide too. MSEide has been designed not only for MSEgui / Free Pascal projects but also for development of Pascal- C- and mixed-language embedded projects with the GNU tool chain. For example I used it do develop CPU32/BDM and ATMEL AVR32 projects. You probably know that already...

Martin

Reply by email

Michael Schnell

Wee seem to want to do an embedded project with an 68 Processor (in fact a "Fido" chip by Innovasic, that provides the "CPU32" variant of the 68K CPU).

This project does not use a normal OS, it just is a "program", no GUI, no standard API.

The SDK for the chip supports the gnu tool chain and can run gdb (optionally in Eclipse) via a JTAG in circuit debug adapter.

AFAIK, FPC decently supports cross-compiling to 68K.

Is it possible/viable to use the Lazarus IDE for writing and compiling the code ?

Is it possible to configure the Lazarus IDE to use gdb in cross-mode ?

Thanks,
-Michael

Reply by email

Sven Barth
to Michael Schnell
Michael Schnell wrote
AFAIK, FPC decently supports cross-compiling to 68K.

You need to use a pre 2.0 version of FPC for this. The 68k code isn't enabled and/or maintained in current versions.

Of course you can try to revive it again :D

Regards,
Sven

Reply by email

Mark Morgan Lloyd
to Sven Barth
Sven Barth wrote 5 lines
On 14.09.2011 16:29, Michael Schnell wrote: > AFAIK, FPC decently supports cross-compiling to 68K. You need to use a pre 2.0 version of FPC for this. The 68k code isn't enabled and/or maintained in current versions.

Does that also apply to cross builds? Could Lazarus built with a current FPC drive a 1.x compiler, or is it too different?

Of course you can try to revive it again :D
Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Sven Barth
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 9 lines
Sven Barth wrote: > On 14.09.2011 16:29, Michael Schnell wrote: >> AFAIK, FPC decently supports cross-compiling to 68K. > > You need to use a pre 2.0 version of FPC for this. The 68k code isn't > enabled and/or maintained in current versions. Does that also apply to cross builds? Could Lazarus built with a current FPC drive a 1.x compiler, or is it too different?

You'll need to try. I have never used the 1.x series. I came to FPC and Lazarus and the beginning of FPCs 2.2 series.
But perhaps the Lazarus devs will help you to get it working if it currently doesn't. :)

Regards,
Sven

Reply by email

Mark Morgan Lloyd
to Sven Barth
Sven Barth wrote 15 lines
On 14.09.2011 18:32, Mark Morgan Lloyd wrote: > Sven Barth wrote: >> On 14.09.2011 16:29, Michael Schnell wrote: >>> AFAIK, FPC decently supports cross-compiling to 68K. >> >> You need to use a pre 2.0 version of FPC for this. The 68k code isn't >> enabled and/or maintained in current versions. > > Does that also apply to cross builds? Could Lazarus built with a current > FPC drive a 1.x compiler, or is it too different? You'll need to try. I have never used the 1.x series. I came to FPC and Lazarus and the beginning of FPCs 2.2 series. But perhaps the Lazarus devs will help you to get it working if it currently doesn't. :)

/I'm/ not trying it :-) I'm still trying to find time to get back onto FPC MIPS and at least in that case there's viable target hardware knocking around.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Sven Barth
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 10 lines
On Wed, Sep 14, 2011 at 6:32 PM, Mark Morgan Lloyd wrote: > Does that also apply to cross builds? Could Lazarus built with a current FPC > drive a 1.x compiler, or is it too different? Lazarus build what? 3rd party applications or itself? Itself or LCL apps in general for sure not, because the latest LCL requires FPC 2.4.2+

I'd say that Mark meant compiling a non-LCL application for M68k from within Lazarus.

The question is whether Lazarus does check the version that is reported by FPC and is restricted to a certain minimal version... also is M68k part of the platform selection comboboxes? Which command line parameters did change from 1.x up to 2.4.4 that Lazarus uses?

Regards,
Sven

Reply by email

Mark Morgan Lloyd
to Felipe Monteiro de Carvalho: On Wed, Sep 14, 2011 at 6:32 PM, Mark Morgan Lloyd Lazarus build what? 3rd party…
Felipe Monteiro de Carvalho wrote 9 lines
On Wed, Sep 14, 2011 at 6:32 PM, Mark Morgan Lloyd wrote: > Does that also apply to cross builds? Could Lazarus built with a current FPC > drive a 1.x compiler, or is it too different? Lazarus build what? 3rd party applications or itself? Itself or LCL apps in general for sure not, because the latest LCL requires FPC 2.4.2+

When I last looked trunk required >2.4.4. However the point I'm making- or rather the question I'm asking- is whether a recent version of Lazarus could drive a significantly older FPC or whether the compiler options etc. have changed too much.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd
Show quoted text 15 lines
Felipe Monteiro de Carvalho wrote: > On Wed, Sep 14, 2011 at 6:32 PM, Mark Morgan Lloyd > wrote: >> Does that also apply to cross builds? Could Lazarus built with a current FPC >> drive a 1.x compiler, or is it too different? > > Lazarus build what? 3rd party applications or itself? > > Itself or LCL apps in general for sure not, because the latest LCL > requires FPC 2.4.2+ When I last looked trunk required >2.4.4. However the point I'm making- or rather the question I'm asking- is whether a recent version of Lazarus could drive a significantly older FPC or whether the compiler options etc. have changed too much.

As far as I remember there was some change in the combinations of -FU and -FE. I don't remember the details. I doubt that this is critical.

The codetools rules for the FPC sources may need adjustments.

The IDE asks the compiler via the -i option about its target platform. I don't know if this option already worked the same in FPC 1.x.

Mattias

Reply by email

Martin Schreiber
to Mark Morgan Lloyd: When I last looked trunk required >2.4.4. However the point I'm making- or rather the…
Mark Morgan Lloyd wrote 16 lines
Felipe Monteiro de Carvalho wrote: > On Wed, Sep 14, 2011 at 6:32 PM, Mark Morgan Lloyd > > wrote: >> Does that also apply to cross builds? Could Lazarus built with a current >> FPC drive a 1.x compiler, or is it too different? > > Lazarus build what? 3rd party applications or itself? > > Itself or LCL apps in general for sure not, because the latest LCL > requires FPC 2.4.2+ When I last looked trunk required >2.4.4. However the point I'm making- or rather the question I'm asking- is whether a recent version of Lazarus could drive a significantly older FPC or whether the compiler options etc. have changed too much.

MSEide can be used for the purpose. MSEide can drive any compiler. Recognized compiler error formats are Free Pascal and gcc.

Martin

Reply by email

Michael Schnell
to Martin Schreiber: Maybe you should have a look to MSEide too. MSEide has been designed not only for MSEgui…
Martin Schreiber wrote 11 lines
> Is it possible/viable to use the Lazarus IDE for writing and compiling > the code ? > > Is it possible to configure the Lazarus IDE to use gdb in cross-mode ? > Maybe you should have a look to MSEide too. MSEide has been designed not only for MSEgui / Free Pascal projects but also for development of Pascal- C- and mixed-language embedded projects with the GNU tool chain. For example I used it do develop CPU32/BDM and ATMEL AVR32 projects. You probably know that already...

Sounds good.
Thanks,
-Michael

Reply by email

Mark Morgan Lloyd
to Michael Schnell: Sounds good. -Michael
Michael Schnell wrote 13 lines
On 09/14/2011 03:50 PM, Martin Schreiber wrote: > >> Is it possible/viable to use the Lazarus IDE for writing and compiling >> the code ? >> >> Is it possible to configure the Lazarus IDE to use gdb in cross-mode ? >> > Maybe you should have a look to MSEide too. MSEide has been designed > not only for MSEgui / Free Pascal projects but also for development of > Pascal- C- and mixed-language embedded projects with the GNU tool chain. > For example I used it do develop CPU32/BDM and ATMEL AVR32 projects. > You probably know that already... Sounds good.

In summary, it sounds as though it might be less work to tweak FPC v1 to (if necessary) support the -i option and emit standard error messages than to do a full port to v2. Although I must say that the time I've been able to put into MIPS so far has been very rewarding.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Michael Schnell: Seems viable- What is the reason why 68K is not supported in the newer versions ? -Michael
Michael Schnell wrote 10 lines
On 09/14/2011 04:37 PM, Sven Barth wrote: > > You need to use a pre 2.0 version of FPC for this. The 68k code isn't > enabled and/or maintained in current versions. > > Of course you can try to revive it again :D > Seems viable- What is the reason why 68K is not supported in the newer versions ?

Demand? I think this thread is the first time I've seen 68K mentioned for many years except in the context of programming classic Palms (for which there is, it appears, a native Pascal compiler).

I see that the Linux kernel still supports the architecture, and that Qemu supports a variant. But I don't think I've ever seen a 68K system on e.g. eBay... I lie, somebody was trying to give away an old workstation on a private conferencing system I use (CIX) but it had something like 2Mb RAM.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Michael Schnell: I don't think I would need to do that. I suppose I just need to point Lazarus to the…
Michael Schnell wrote 6 lines
On 09/14/2011 06:32 PM, Mark Morgan Lloyd wrote: > > Does that also apply to cross builds? Could Lazarus built with a > current FPC drive a 1.x compiler, or is it too different? I don't think I would need to do that. I suppose I just need to point Lazarus to the compiler to be used for ARCH 68K.

Recipe for jugged hare: first catch your hare :-)

You're going to need a cross-binary of FPC v1 targeting 68K.

If I were doing it- which I'm not- I'd first start off with something like https://wiki.debian.org/Aranym onto which I'd try installing http://www.freepascal.org/down/old/m68k-linux-ftp.freepascal.org.var If you could get that combination working then you'd have some confidence that you'd got a working compiler.

Then you could try compiling the corresponding sources into something that would run on x86, i.e. as a cross-compiler. To do this you'd probably need to start off with an x86 FPC v1. Then finally you could investigate whether Lazarus could control the result.

Alternatively investigate whether the current sources can be got working. My ongoing notes at
http://wiki.lazarus.freepascal.org/Native_MIPS_Systems#Mainline_MIPS_Port might help with binutils etc.

In any event please write up what you do for the wiki to get it "into the record".

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Schnell
to Mark Morgan Lloyd: Demand? I think this thread is the first time I've seen 68K mentioned for many years…
Mark Morgan Lloyd wrote 15 lines
Michael Schnell wrote: > On 09/14/2011 04:37 PM, Sven Barth wrote: >> >> You need to use a pre 2.0 version of FPC for this. The 68k code >> isn't enabled and/or maintained in current versions. >> >> Of course you can try to revive it again :D >> > Seems viable- > > What is the reason why 68K is not supported in the newer versions ? Demand? I think this thread is the first time I've seen 68K mentioned for many years except in the context of programming classic Palms (for which there is, it appears, a native Pascal compiler).

AFAIK, Amiga is 68K. See: http://blog.alb42.de/ (8/10/2011)

-Michael

Reply by email

Mark Morgan Lloyd
to Michael Schnell: Thanks for the pointers Of course I'll be posting here when starting this :-) . -Michael
Michael Schnell wrote 8 lines
On 09/15/2011 11:25 AM, Mark Morgan Lloyd wrote: > ... Thanks for the pointers > > In any event please write up what you do for the wiki to get it "into > the record". > Of course I'll be posting here when starting this :-) .

I've added a stub to
http://wiki.lazarus.freepascal.org/Qemu_and_other_emulators for Aranym.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 12 lines
Michael Schnell wrote: > On 09/15/2011 11:25 AM, Mark Morgan Lloyd wrote: >> ... > Thanks for the pointers >> >> In any event please write up what you do for the wiki to get it "into >> the record". >> > Of course I'll be posting here when starting this :-) . I've added a stub to http://wiki.lazarus.freepascal.org/Qemu_and_other_emulators for Aranym.

68K guest now running Debian "Sid":

root at pye-dev-07g:~ # cat /proc/cpuinfo
CPU: 68040
MMU: 68040
FPU: 68040
Clocking: 14.9MHz
BogoMips: 9.99
Calibration: 49984 loops

With that level of performance I'd not suggest trying to run a graphical login, but it should be adequate to check out FPC v1.

Hope that helps :-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Marco van de Voort
to Michael Schnell: I don't think I would need to do that. I suppose I just need to point Lazarus to the…
Michael Schnell wrote 8 lines
On 09/14/2011 06:32 PM, Mark Morgan Lloyd wrote: > > Does that also apply to cross builds? Could Lazarus built with a > current FPC drive a 1.x compiler, or is it too different? I don't think I would need to do that. I suppose I just need to point Lazarus to the compiler to be used for ARCH 68K. Am I wrong ?

Probably not. You just need to craft that 68k compiler :-)

Reply by email

Marco van de Voort
to Mark Morgan Lloyd: Demand? I think this thread is the first time I've seen 68K mentioned for many years…
Mark Morgan Lloyd wrote 11 lines
>> enabled and/or maintained in current versions. >> >> Of course you can try to revive it again :D >> > Seems viable- > > What is the reason why 68K is not supported in the newer versions ? Demand? I think this thread is the first time I've seen 68K mentioned for many years except in the context of programming classic Palms (for which there is, it appears, a native Pascal compiler).

The Motorola Coldfire series was popular say 3-5 years ago. However nobody really put a lot of time into it to create a port for 68k.

Show quoted text 5 lines
I see that the Linux kernel still supports the architecture, and that Qemu supports a variant. But I don't think I've ever seen a 68K system on e.g. eBay... I lie, somebody was trying to give away an old workstation on a private conferencing system I use (CIX) but it had something like 2Mb RAM.

It used to be fairly easy, since on mac fairs they gave them away for free.

Easier than Sparc or Mips that never made consumer hardware.

Reply by email

Sven Barth
to Marco van de Voort
Marco van de Voort wrote 10 lines
On Thu, Sep 15, 2011 at 08:28:16AM +0000, Mark Morgan Lloyd wrote: > I see that the Linux kernel still supports the architecture, and that > Qemu supports a variant. But I don't think I've ever seen a 68K system > on e.g. eBay... I lie, somebody was trying to give away an old > workstation on a private conferencing system I use (CIX) but it had > something like 2Mb RAM. It used to be fairly easy, since on mac fairs they gave them away for free. Easier than Sparc or Mips that never made consumer hardware.

Some TVs are running on MIPS with Linux now... just as a sidenote (I personally own a TV with an ARM and a Linux :P )

Regards,
Sven

Reply by email

Mark Morgan Lloyd
to Sven Barth
Sven Barth wrote 15 lines
On 15.09.2011 19:47, Marco van de Voort wrote: > On Thu, Sep 15, 2011 at 08:28:16AM +0000, Mark Morgan Lloyd wrote: >> I see that the Linux kernel still supports the architecture, and that >> Qemu supports a variant. But I don't think I've ever seen a 68K system >> on e.g. eBay... I lie, somebody was trying to give away an old >> workstation on a private conferencing system I use (CIX) but it had >> something like 2Mb RAM. > > It used to be fairly easy, since on mac fairs they gave them away for > free. > > Easier than Sparc or Mips that never made consumer hardware. Some TVs are running on MIPS with Linux now... just as a sidenote (I personally own a TV with an ARM and a Linux :P )

Also OpenWRT reflashes popular MIPS-based routers, and the earlier Raq routers were MIPS and could be repurposed. We missed a bin SGI visualisation system being sold locally on eBay a year ago, went for ?10 :-(

But the viability of the Chinese Loongson MIPS-based chip is very much an open question.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Michael Schnell
Michael Schnell wrote 7 lines
On 09/15/2011 09:59 PM, Sven Barth wrote: > > Some TVs are running on MIPS with Linux now... just as a sidenote (I > personally own a TV with an ARM and a Linux :P ) > I was very disappointed to find that the settop box from Deutsche Telekom I have uses WinCE :(.

Fixing that can be your next job but one :-)

OK, I've got Debian on 68k as I've documented, and while it's very much a minimal installation all the standard development tools are available. It's probably not powerful enough to run a full compiler build in reasonable time, but assuming the correctness of GCC (i.e. that Linux is actually compiled to the right opcodes) it's an adequate test for any other compiler.

I was going to install FPC v1 to check it ran natively before getting back onto other things but it's no longer available at http://www.freepascal.org/down/old/m68k-linux-ftp.freepascal.org.var

Anybody know where it can be found?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Marco van de Voort
to Sven Barth: Some TVs are running on MIPS with Linux now... just as a sidenote (I personally own a TV…
Sven Barth wrote 6 lines
> > It used to be fairly easy, since on mac fairs they gave them away for free. > > Easier than Sparc or Mips that never made consumer hardware. Some TVs are running on MIPS with Linux now...

Yeah yeah, I got a Linksys wrt too :-)

just as a sidenote (I personally own a TV with an ARM and a Linux :P )

I do have a Linux based TV too, I don't know what CPU, but the TV producer also sells ARMs.

Since I live in Eindhoven, the brand can probably be guessed easily :-)

Reply by email

Michael Schnell
to Felipe Monteiro de Carvalho: zero contributors and zero maintainers for such a port. Just the same reason for every…
Felipe Monteiro de Carvalho wrote
On Thu, Sep 15, 2011 at 10:01 AM, Michael Schnell wrote: > What is the reason why 68K is not supported in the newer versions ? zero contributors and zero maintainers for such a port. Just the same reason for every other missing feature.

What I wanted to ask is: What needs to be done to make it work ?

-Michael

Reply by email

Mark Morgan Lloyd
to Michael Schnell
Michael Schnell wrote 7 lines
On 09/15/2011 10:37 AM, Felipe Monteiro de Carvalho wrote: > On Thu, Sep 15, 2011 at 10:01 AM, Michael Schnell > wrote: >> What is the reason why 68K is not supported in the newer versions ? > zero contributors and zero maintainers for such a port. Just the same > reason for every other missing feature. What I wanted to ask is: What needs to be done to make it work ?

Start off by telling us if it will compile :-) See my Wiki page on MIPS since I'm starting off at a very similar position.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Felipe Monteiro de Carvalho
to Michael Schnell: What I wanted to ask is: What needs to be done to make it work ? -Michael
Michael Schnell wrote
What I wanted to ask is: What needs to be done to make it work ?

There is no guide about how to port FPC, but I started a wiki page years ago:

http://wiki.freepascal.org/Porting_Free_Pascal

But I was porting to a new operating system, which is different from a new architecture.

You should start by first finding out what is necessary to make a port and then document this in that wiki page ;)

You can get a clue of what is necessary by searching the FPC viewcv for when MIPS was merged for example.

Felipe Monteiro de Carvalho

Reply by email

Marco van de Voort
to Michael Schnell: What I wanted to ask is: What needs to be done to make it work ? -Michael
Michael Schnell wrote
>> What is the reason why 68K is not supported in the newer versions ? > zero contributors and zero maintainers for such a port. Just the same > reason for every other missing feature. What I wanted to ask is: What needs to be done to make it work ?

Nearly everything. Afaik there are some 2.0 reg definitions for 68k, and that is about it. And probably outdated by several years.

The 1.0.x codegenerator is totally different. It can be used in some cases to see what it did in some cases, but for the rest it means starting over.

Reply by email

Michael Schnell
to Marco van de Voort
Marco van de Voort wrote 7 lines
Nearly everything. Afaik there are some 2.0 reg definitions for 68k, and that is about it. And probably outdated by several years. The 1.0.x codegenerator is totally different. It can be used in some cases to see what it did in some cases, but for the rest it means starting over.

That sounds quite disappointing :(

Thanks for the warning.

-Michael

Reply by email

Mark Morgan Lloyd
to Michael Schnell
Michael Schnell wrote 13 lines
On 09/26/2011 11:06 AM, Marco van de Voort wrote: > > Nearly everything. Afaik there are some 2.0 reg definitions for 68k, and > that is about it. And probably outdated by several years. > > The 1.0.x codegenerator is totally different. It can be used in some > cases > to see what it did in some cases, but for the rest it means starting > over. > That sounds quite disappointing :( Thanks for the warning.

Seconded :-( The v1 compiler does appear to work though, so it could be that "plan b" (see whether the Lazarus IDE can drive v1) has a chance.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Marco van de Voort
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 6 lines
> That sounds quite disappointing :( > > Thanks for the warning. Seconded :-( The v1 compiler does appear to work though, so it could be that "plan b" (see whether the Lazarus IDE can drive v1) has a chance.

That depends on what you want to do with it. I personally wouldn't bother. Either do it right, or forget about it.

Reply by email

Michael Schnell
to Marco van de Voort
Marco van de Voort wrote
That depends on what you want to do with it. I personally wouldn't bother. Either do it right, or forget about it.

Yep. I am quite sure that _if_ I am going to need it I'll try to get the current compiler version going.

Thanks,
-Michael

Reply by email