Page 1 of 1

Porting Apps to RISC OS

Posted: Fri May 31, 2013 6:15 pm
by JxPond
I just gave RISC OS a spin and I'm quite surprised on how well it runs on the Pi.

My question though is how does one port apps to RISC OS? I know you can set up Cross-compiling to Raspbian, Is there a similar set up to Compile to RISC OS and is the following the preferred method?

http://www.riscos.info/index.php/Using_GCCSDK

Re: Porting Apps to RISC OS

Posted: Sat Jun 01, 2013 3:05 pm
by grannyg
JxPond wrote:I just gave RISC OS a spin and I'm quite surprised on how well it runs on the Pi.

My question though is how does one port apps to RISC OS? I know you can set up Cross-compiling to Raspbian, Is there a similar set up to Compile to RISC OS and is the following the preferred method?

http://www.riscos.info/index.php/Using_GCCSDK
Those are the instructions you need.
GCCSDK is a cross-compiler that targets RISC OS. Most of the programs available in !PackMan were built with it.
Command-line stuff and anything that uses the SDL library (but not OpenGL) is fairly straightforward to port.

Chris

Re: Porting Apps to RISC OS

Posted: Sat Sep 14, 2013 9:05 pm
by DavidS
Yes GCC is good and GCCSDK is usable.

If I may ask why are you using a cross compiler? It is much easier and faster to do these things under RISC OS directly. Once you get the hang of RISC OS, StrongED (or !Zap), and the use of *commands you will be surprized how much easier it is to do any development work under RISC OS. You may even end up cross compiling to other systems from RISC OS once you get the hang of things.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 4:25 pm
by grannyg
It's out of necessity more than anything. Running RISC OS on even the fastest RISC OS hardware is pitifully slow and under resourced compared to a modern PC.
Unless you're dealing with very simple and small projects it would be very difficult to port software from other platforms. The tools just aren't available on RISC OS to get the job done easily.
As an example take for instance building the !NetSurf executable. Which is a very small project compared to some. Once all the libraries are bult in the autobuilder I just type make and out pops the !NetSurf application in under 8 seconds.
To do the same on RISC OS there would be no end of hacking scripts just to get it to build. Then you would have to wait 10 minutes for the application to be built. Then more fiddling to end up with a working application.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 4:40 pm
by DavidS
grannyg wrote:It's out of necessity more than anything. Running RISC OS on even the fastest RISC OS hardware is pitifully slow and under resourced compared to a modern PC.
Unless you're dealing with very simple and small projects it would be very difficult to port software from other platforms.
Now it is true that there are some differences in the build enviroments, though it is far from difficult.
The tools just aren't available on RISC OS to get the job done easily.
As an example take for instance building the !NetSurf executable. Which is a very small project compared to some. Once all the libraries are bult in the autobuilder I just type make and out pops the !NetSurf application in under 8 seconds.
To do the same on RISC OS there would be no end of hacking scripts just to get it to build. Then you would have to wait 10 minutes for the application to be built. Then more fiddling to end up with a working application.
10 Minutes?? it only takes about 30 to 45 Minutes to build all of RISC OS, once everything is set up well. It takes about 15 seconds to build Dillo (though there are still some mods needed to get it to run well on RISC OS), and I have yet to come acrossed any application that takes more than 50 seconds.

While I have not had the need to build !NetSurf, I would expect it to be set up to build well in RISC OS, as it began as a RISC OS only project.

I do note that using GCC and the related GNU tools is often unreasonably slow, though if you use either the DDE or LCC + ExtASM + DrLink it is much faster (of cource the fastest build is with the DDE, and it also produces much better object code than GCC).

Obviously any time you are porting software written for another OS there will be changes to be made to the way it is built, as well as to the source in most cases.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 4:45 pm
by DavidS
I FORGOT IN LAST POST
I would note that the times that I noted were on a Raspberry Pi model B 512MB running at 700MHz. If you are attempting to do these things on a pre Strong-ARM RISC PC I could see it being as slow as you were saying.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 4:59 pm
by DavidS
ALSO:
In order to get the best build performance you will want to set up a tool caching system and have the development chain in a RAM disk (I use an Obey in $.!Boot.Choices.Boot.Tasks to configure the RAM Disk and copy the develoment tools, and update the needed system variables/aliases).

And of cource you will wish to have the development tools that you use configured for the best balance of performance and code optimization. I have found that for most projects build time are much lower in RISC OS than in any OS on a 7-12GIPS per core 4-core machine, no mater how I configure the development enviroment on either end. And if you are using the DDE you will find that the resaulting code is much better than that produced by most of the compilers that target the ARM on other platforms (ESPECIALY BETTER THAN GCC).

It would still be nice to have a port of TCC to help speed up development, do to the shortened compile times, though with that you would still want a better compiler for the final product.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 5:04 pm
by grannyg
Although the autobuilder isn't perfect it's much less time consuming to set up a fully automated build environment. Once it's set up it's simple to test building an application.

Building the RISC OS rom is the only thing I build on RISC OS using the DDE. It takes under 7 minutes to build here. Building the rom is classed as a simple project compared to some of the things in the autobuilder.

The c++ support is also severely lacking in the DDE so it's not possible compile a lot of source code out there.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 5:18 pm
by grannyg
DavidS wrote:ALSO:
In order to get the best build performance you will want to set up a tool caching system and have the development chain in a RAM disk (I use an Obey in $.!Boot.Choices.Boot.Tasks to configure the RAM Disk and copy the develoment tools, and update the needed system variables/aliases).
I do all this already. I'm using RISC on a pandaboard clocked at 1.6Ghz with overclocked ram and it's still too slow.

What about source code that needs 2GBytes of ram to build. There isn't any RISC OS hardware capable of this.

Also GCC 4.7 is the only compiler on RISC OS capable of generating code that uses VFP/NEON instructions. Another reason that precludes using the DDE.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 5:23 pm
by DavidS
grannyg wrote:Building the RISC OS rom is the only thing I build on RISC OS using the DDE. It takes under 7 minutes to build here. Building the rom is classed as a simple project compared to some of the things in the autobuilder.
Ok I would be interested to know what kind of project is more complex? Even if you were to compile the total of all other software that I use on RISC OS I do not think that you would reach the same level of complexity as the ROM built from the ground up (that is completely from source, not reusing any OIF files from previous builds), and that is saying something.

The c++ support is also severely lacking in the DDE so it's not possible compile a lot of source code out there.
Leave that kind of statement to some one that perfers to program on another OS :-) . The C++ is complete in as far as the accepted standards (yes they were established in the early 1990s) and most of the extensions that are not supported have a tendancy to be used to aid in very poor and ineffecient coding(eg Lazy programming). As such what you are calling a negitive I am calling a positive in this case. Also most of the extensions very by implementation making them impossible to fully standardize with out breaking two thirds of them.

If you realy need C++ with the stupidity extensions write your own preprocessor to take care of that. If the language is as useful as you seem to claim to think it should be no problem for a single person to do, if not then is it realy usable? That is a big part of why C became so popular, it is possible for a single person to understand the entire language, and implement a compiler and STDLib for it.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 5:30 pm
by DavidS
grannyg wrote:
DavidS wrote:ALSO:
In order to get the best build performance you will want to set up a tool caching system and have the development chain in a RAM disk (I use an Obey in $.!Boot.Choices.Boot.Tasks to configure the RAM Disk and copy the develoment tools, and update the needed system variables/aliases).
I do all this already. I'm using RISC on a pandaboard clocked at 1.6Ghz with overclocked ram and it's still too slow.
Wow you must be attempting to recompile all of a large Linux distro in one go or something.
What about source code that needs 2GBytes of ram to build. There isn't any RISC OS hardware capable of this.
I have not run acrossed any such monster, ouch that would have to have some HUGE and DEEP single sources, as the time most memory is taken is building the parse trees, and reorginizing them as part of the optimization. OUCH!
Also GCC 4.7 is the only compiler on RISC OS capable of generating code that uses VFP/NEON instructions. Another reason that precludes using the DDE.
Ok so you are telling me that there is no such thing as ExtASM, or BBC BASIC, or a hundred others? Not to mention that there are those that are working on getting support for VFP/NEON into the DDE. I think that !Charm also supports this, though do not quote me on that.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 5:38 pm
by DavidS
Ok I just verified that Charm does support VFP.

Re: Porting Apps to RISC OS

Posted: Sun Sep 15, 2013 11:22 pm
by colin B
Just a thought meandering through my mind.

If large size compiles were needed, wouldn't it be quicker to compile them in something like VirtualRISC which would then use the full processing power of the platform CPU and RAM?