Recent

Author Topic: Lazarus for RISC OS  (Read 14350 times)

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Lazarus for RISC OS
« on: June 06, 2023, 04:02:17 pm »
Hello I want to revive a topic about implementing Lazarus for RISC OS from Gerald Holdsworth:
Are there any programmers in this community that would like to join in a project to release Lazarus for the ARM based OS : RISC OS?

RISC OS was the first OS implemented on the now famous ARM processors. RISC OS is open source now.
GCC 10.4 is available on RISC OS. It runs on any Raspberry Pi and it is also available as free emulator for Windows and Linux/MacOS (RPCemu). There is not really any program IDE available for RISC OS other than one for BBCBASIC (AppBASIC).
So currently Lazarus would be for sure the most popular IDE on RISC OS.


We made a poll about Lazarus and 74% of RISC OS users  who took part in the poll are interested in Lazarus.
https://twitter.com/RISCOSproject/status/1662538079104532481
So we would mainly need som people who are familiar with the Lazarus code and implenting the Pascal compiler. We can find some people who will assist with the RISC OS part.


For anyone interested in helping us I would offer our RISC OS Cloverleaf distro for free with a collection of most free applications available and also our modern filer "CLFiler".


Please read the previously posted topic by Gerald in 2021:
https://forum.lazarus.freepascal.org/index.php/topic,52467


regards Stefan

PascalDragon

  • Hero Member
  • *****
  • Posts: 5210
  • Compiler Developer
Re: Lazarus for RISC OS
« Reply #1 on: June 06, 2023, 09:59:21 pm »
Hello I want to revive a topic about implementing Lazarus for RISC OS from Gerald Holdsworth:
Are there any programmers in this community that would like to join in a project to release Lazarus for the ARM based OS : RISC OS?

You first need to port FPC itself before you can even remotely think about porting Lazarus. For a slightly outdated example of porting FPC, please look here.

Once you've ported FPC you then need to check whether you can use an existing widgetset like GTK or Qt or whether you need to implement a completely new widgetset for RISC OS. In the later case you might want to first start with a cross compiler as quite a lot of the widgetset needs to work correctly before the IDE will work.

TRon

  • Hero Member
  • *****
  • Posts: 1558
Re: Lazarus for RISC OS
« Reply #2 on: June 07, 2023, 11:47:16 am »
@StefanRISCOS:
Just a note.

When I treat myself as being totally oblivious to RiscOS, I surf over to https://www.riscosopen.org and start digging for the obvious when trying to port something. That usually entails finding a toolchain that I can use (usually for a existing c-compiler).

Then I find out that RisOS itself is using it's own custom build utility (not familiar with it, no intention to either as it has no relevance for porting, let alone cross-compiling) that it uses a closed source c-compiler and that the source-code (I also assume headers) is not compatible with gnu-c. see also: https://www.riscosopen.org/wiki/documentation/show/Cross-building%20RISC%20OS

Perhaps I am looking at the wrong locations but the things I was able to find isn't very encouraging, do you agree ?

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Re: Lazarus for RISC OS
« Reply #3 on: June 07, 2023, 05:30:20 pm »
@PascalDragon
thanks for the link to the FPC porting. There are some ARM related ports already so we might not start at zero level there.
system_arm_embedded
system_arm_symbian

But currently we cannot use aarch64 yet as RISC OS is still stuck to 32bit so aarch32.

Parts of new RISC OS implementations has been adopted from Open BSD.

I just found the reference of @Iproven about the Ultibo FPC for Raspberry
https://ultibo.org/wiki/Building_for_Raspbian
I think that might be the closest fit for an FPC on RISC OS.

@TRon

I think that the Lazarus UI looks quiet similar to RISC OS style. The only thing that is different that there is no top menu.
There is a library called Toolbox that handels all window related stuff (gadgets?!)
http://www.riscos.com/support/developers/toolbox/reseditor.html
Is the Lazarus UI written based on Pascal or C?

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Re: Lazarus for RISC OS
« Reply #4 on: June 07, 2023, 08:17:46 pm »
@TRon
There is also GCC 10.4 available. There is the Shared C library and the Toolbox library to access all windows elements.
To edit window content there is a tool that is very much similar to Lazarus editor (when you scroll down the page you will see the screenshots).
http://www.riscos.com/support/developers/toolbox/reseditor.html

I think the RISC OS windows design is very much like Delphi style. More than MS Windows or MacOS.

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Re: Lazarus for RISC OS
« Reply #5 on: June 08, 2023, 11:12:27 am »
@MarkMLl
For unknow reason I cannot answer your private message. When I click on your Nickname it says: "You are not allowed to access this section". In the Message center there is no button to reply to your message also...

So I answer you here:
Yes Pascal for sure is not very popular anymore but the Lazarus IDE (Borland Delhpi IDE) is the easiest and fastest way to write powerfull office application. There is no AI features needed.

When we have the Lazarus running on RISC OS it might be even possible to add C++ or Python as programming language in the far future.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5210
  • Compiler Developer
Re: Lazarus for RISC OS
« Reply #6 on: June 08, 2023, 12:26:48 pm »
@PascalDragon
thanks for the link to the FPC porting. There are some ARM related ports already so we might not start at zero level there.
system_arm_embedded
system_arm_symbian

I never said that you'd start at zero. The link I gave you is for porting FPC for a new operating system under the assumption that the port for the processor is already available which is the case for RISC OS, because it's running on 32-bit ARM. What you need is cross binutils that support RISC OS as target, but run on a supported target (e.g. Linux, Windows, etc.), then you can setup a cross compilation toolchain and make sure that the RTL is running well enough that FPC itself can be compiled for RISC OS. Even more of the packages and such then need to be enabled for RISC OS so that you can then start having a dig at Lazarus.

I think that the Lazarus UI looks quiet similar to RISC OS style. The only thing that is different that there is no top menu.
There is a library called Toolbox that handels all window related stuff (gadgets?!)
http://www.riscos.com/support/developers/toolbox/reseditor.html
Is the Lazarus UI written based on Pascal or C?

It's name is LCL, not “Lazarus UI” and it's written in Pascal, which is why you need to have a fully working FPC first.

And don't worry about GUI stuff before you don't have the compiler itself working. One step at a time or you'll simply overwhelm yourself.

TRon

  • Hero Member
  • *****
  • Posts: 1558
Re: Lazarus for RISC OS
« Reply #7 on: June 09, 2023, 05:36:04 am »
Is the Lazarus UI written based on Pascal or C?
The GUI of Lazarus itself is written in Pascal but it uses what we call a widgetset as a backend and depends on the platform/target. For instance there are widgetsets available for gtk, qt, windows, cocao etc. See also: https://wiki.lazarus.freepascal.org/Widgetset.

Besides that there are custom drawn components that are (as the name implies) custom drawn components (think of a component as something that is able to represent a widget/gadgets).

There is also GCC 10.4 available. There is the Shared C library and the Toolbox library to access all windows elements.
Yeah but that is exactly the issue: all I was able to find (development wise) runs natively on RiscOS. Which is ofc. pretty neat (and in the end is what is best for RiscOS itself) but as PascalDragon wrote that is not how to port a compiler like Free Pascal. That always start by creating a cross-compiler and for that you need a (cross) toolchain.

You talk about having a GCC compiler for (native) RiscOS. Does RiscOS host/store its own patches against the compiler or are they merged upstream in the (GCC) compiler itself ?
« Last Edit: June 09, 2023, 05:47:23 am by TRon »

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Re: Lazarus for RISC OS
« Reply #8 on: June 13, 2023, 03:47:21 pm »
@TRon
My programmer uses Linux with GCC SDK and  CLion as dev IDE to compile programs for RISC OS.

BTW: Thanks all for the infos!

TRon

  • Hero Member
  • *****
  • Posts: 1558
Re: Lazarus for RISC OS
« Reply #9 on: June 14, 2023, 07:12:43 am »
My programmer uses Linux with GCC SDK and  CLion as dev IDE to compile programs for RISC OS.
The website that host GCCSDK gives me a gateway timeout/ BAD gateway. And just now a "Sorry! This site is experiencing technical difficulties."

The gists that I was able to find uses the same website for accessing the source-code. I am only a little versed with svn but it seems that the redirections to where the source-code is stored are not working for me.

I retrieve svn errors like:
- E020014: Can't find a temporary directory: Internal error
- E170011: Repository moved temporarily to 'http://www.riscos.info/gccsdk/trunk/autobuilder.
- E170011: Repository moved temporarily to 'http://www.riscos.info/gccsdk/trunk'
- E175003: The server at 'https://www.riscos.info/gccsdk/trunk' does not support the HTTP/DAV protocol
etc.
« Last Edit: June 14, 2023, 07:18:47 am by TRon »

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Re: Lazarus for RISC OS
« Reply #10 on: June 14, 2023, 09:16:06 am »
@TRon
Ok I will have a look what is the problem with the site.

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Re: Lazarus for RISC OS
« Reply #11 on: June 14, 2023, 09:27:20 am »
@TRon
Are you using Linux or Windows?

TRon

  • Hero Member
  • *****
  • Posts: 1558
Re: Lazarus for RISC OS
« Reply #12 on: June 14, 2023, 09:31:57 am »
Are you using Linux or Windows?
Linux, Debian Bookworm to be precise (x86_64).

In case it matters: Firefox version 114.0.1 and svn version 1.14.2 (r1899510)

StefanRISCOS

  • New Member
  • *
  • Posts: 27
Re: Lazarus for RISC OS
« Reply #13 on: June 14, 2023, 09:34:45 am »
I just got word from one RISC OS programmer Micheal Grundlitz:
I think FPC will compile pretty easy with gcc10 on gccsdk. Unixlib is almost a complete posix layer.
So probably the Linux port could be used.

TRon

  • Hero Member
  • *****
  • Posts: 1558
Re: Lazarus for RISC OS
« Reply #14 on: June 14, 2023, 09:48:33 am »
@Stefan:
The Free Pascal compiler is written in Pascal. The compiler startup-code does (is not suppose to) not rely on external libraries (except for libc).

Before anything can be done there is need for a toolchain. Free Pascal relies on an (external) assembler and linker that are able to create 'correct' executables for the target.

Hence I do not mind taking a small side-track with creating some examples with a c-compiler in order to see the toolchain in action (that way it is possible to investigate how the toolchain could be used with FPC: that is why I asked if the changes that your developers made to the gcc toolchain are hosted on your own website (usually in the form of patches) or if the changes are pushed upstream to the gnu directory so that GCC is able to target RiscOS out of the box)
« Last Edit: June 14, 2023, 09:52:13 am by TRon »

 

TinyPortal © 2005-2018