nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

NutPi version of DDE

Fri Dec 07, 2012 11:25 am

Has anyone had any luck with the version of the ROOL DDE on the NutPi package? I've installed it, but so far haven't managed to get a clean compile of any of the supplied example programs. An example: the readme file states:

Code: Select all

Once installed, you should be able to build the demonstration source code
components by following these steps:

* Open "AcornC/C++" and !SetPaths should run automatically (the first time
    it is 'seen' by RISC OS after every boot) - this initialises a number
    of imprtant system variables, amongst other things

* Open "Sources.DDE-Examples"

* Open one of the example folders (e.g. "examplemod")

* Run the MkRam (or Mk) script to build a RAM-loadable version of that
    component
When I try this, I get the following:

Code: Select all

AMU: failed to read time stamp for 'RISCOSLIB:o.romcstubs'
AMU: failed to read time stamp for 'RISCOSLIB:o.romcstubs'
If I try the Mk file in the exampleapp test, I get:

Code: Select all

link  -o !RunImage o.main  CLIB:o.stubs
/SDFS::RISCOSpi.$/Apps/Utilities/!CoreUtils/link: invalid option -- o
Try `/SDFS::RISCOSpi.$/Apps/Utilities/!CoreUtils/link --help' for more information.
AMU: *** exit (1) ***

AMU: *** 'all' not re-made because of errors ***
Looking at the second case, could it be that there's a clash with having both gcc and the DDE installed?

Ta,
--
nr.

grannyg
Posts: 22
Joined: Fri Nov 02, 2012 11:55 am

Re: NutPi version of DDE

Fri Dec 07, 2012 12:55 pm

It looks like you've installed CoreUtils. It clashes with some of the commands in the DDE. Try uninstalling CoreUtils with PackMan.

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: NutPi version of DDE

Fri Dec 07, 2012 1:36 pm

Yup, that helped with the second example - I can now build the exampleapp program, and run it, so that's a step forward :) I still get the same errors when building the examplemod test program though - that hasn't changed at all.

I'm guessing this means that it's going to be difficult, if not impossible, to use both GCC and the ROOL DDE side by side on the same machine?

Many thanks for the help so far - much appreciated.
--
nr.

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: NutPi version of DDE

Fri Dec 07, 2012 2:31 pm

Blimey. Flushed with success, I thought I'd have a go at compiling my pi_css5 test on RISC OS with the ROOL DDE, and compare the results with GCC on Raspbian.

So, calculating pi to 16384 places. Firstly on Raspian, compiled with -march=armv6 -mfloat-abi=hard

Code: Select all

Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave
initializing...
nfft= 4096
radix= 10000
error_margin= 7.41633e-05
calculating 16384 digits of PI...
AGM iteration
precision= 48: 0.04 sec
precision= 80: 0.04 sec
precision= 176: 0.04 sec
precision= 352: 0.04 sec
precision= 688: 0.04 sec
precision= 1392: 0.05 sec
precision= 2784: 0.04 sec
precision= 5584: 0.04 sec
precision= 11168: 0.04 sec
precision= 22336: 0.04 sec
0.52 sec. (real time)
Now on RISC OS:

Code: Select all

Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave
initializing...
nfft= 4096
radix= 10000
error_margin= 7.41633e-05
calculating 16384 digits of PI...
AGM iteration
precision= 48: 1.68 sec
precision= 80: 1.68 sec
precision= 176: 1.69 sec
precision= 352: 1.68 sec
precision= 688: 1.68 sec
precision= 1392: 1.68 sec
precision= 2784: 1.69 sec
precision= 5584: 1.68 sec
precision= 11168: 1.69 sec
precision= 22336: 1.68 sec
21.38 sec. (real time)
I'm sure there's all sorts of things I can do with the RISC OS version to optimise it. As I had to remove GCC from RISC OS to get the DDE to install I don't have the results anywhere to hand, but that was something like 8 seconds or so for the same test I think.

Ta,
--
nr.

SEDev
Posts: 34
Joined: Thu Aug 02, 2012 10:55 pm

Re: NutPi version of DDE

Fri Dec 07, 2012 3:08 pm

nr. wrote:Yup, that helped with the second example - I can now build the exampleapp program, and run it, so that's a step forward :) I still get the same errors when building the examplemod test program though - that hasn't changed at all.
Might this be the same issue as the one discussed here: https://www.riscosopen.org/forum/forums/5/topics/1480

In any case, make that the system variable CLib$Path is set (do '*Show CLib$Path' in a TaskWindow) and if it's unset do '*Set CLib$Path C:'.
nr. wrote:I'm guessing this means that it's going to be difficult, if not impossible, to use both GCC and the ROOL DDE side by side on the same machine?
No, not really, I have both the ROOL DDE and GCC on this machine (Iyonix) and both seem to work fine.

The problem with CoreUtils is that it creates aliases for all the utilities inside it. If these get in the way create an Obey file to unset all those aliases and run that before using the DDE then there should be no problem. To reinstate the aliases just run the CoreUtils !Boot file.
nr. wrote:I'm sure there's all sorts of things I can do with the RISC OS version to optimise it.
Probably but remember that DDE/GCC on RISC OS don't support hard float (yet?).

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: NutPi version of DDE

Fri Dec 07, 2012 3:27 pm

SEDev wrote:
nr. wrote:Yup, that helped with the second example - I can now build the exampleapp program, and run it, so that's a step forward :) I still get the same errors when building the examplemod test program though - that hasn't changed at all.
Might this be the same issue as the one discussed here: https://www.riscosopen.org/forum/forums/5/topics/1480
mmm... in other words, it's known not to work, yet is still being sold without any kind of supporting documentation to let people know this. That's a bit, um, crap really.

Hey ho. Onwards and upwards. I'll carry on playing with the DDE, to see what happens :)

Don't suppose anyone here knows if there's any plans to release gcc 4.7 on RISC OS? The latest I can find is 4.1.2. I know I can build 4.7 from source, but I have no idea how long that's going to take on a pi!

Ta,
--
nr.

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: NutPi version of DDE

Fri Dec 07, 2012 4:19 pm

Just in case anyone else wants to run gcc and DDE compilers, here are the aliases set by the current version of !Coreutils:

Code: Select all

unset CoreUtils$Dir
unSet Alias$base64
unSet Alias$basename
unSet Alias$chcon
unSet Alias$chgrp
unSet Alias$chmod
unSet Alias$chown
unSet Alias$cksum
unSet Alias$comm
unSet Alias$cp
unSet Alias$csplit
unSet Alias$cut
unSet Alias$date
unSet Alias$dd
unSet Alias$dircolors
unSet Alias$dirname
unSet Alias$du
unSet Alias$[
unSet Alias$echo
unSet Alias$env
unSet Alias$expand
unSet Alias$expr
unSet Alias$factor
unSet Alias$false
unSet Alias$fmt
unSet Alias$fold
unSet Alias$getlimits
unSet Alias$ginstall
unSet Alias$groups
unSet Alias$head
unSet Alias$id
unSet Alias$join
unSet Alias$kill
unSet Alias$link
unSet Alias$ln
unSet Alias$logname
unSet Alias$ls
unSet Alias$md5sum
unSet Alias$mkdir
unSet Alias$mkfifo
unSet Alias$mknod
unSet Alias$mktemp
unSet Alias$mv
unSet Alias$nice
unSet Alias$nl
unSet Alias$nohup
unSet Alias$nproc
unSet Alias$od
unSet Alias$paste
unSet Alias$pathchk
unSet Alias$pr
unSet Alias$printenv
unSet Alias$printf
unSet Alias$ptx
unSet Alias$pwd
unSet Alias$readlink
unSet Alias$rmdir
unSet Alias$rm
unSet Alias$runcon
unSet Alias$seq
unSet Alias$setuidgid
unSet Alias$sha1sum
unSet Alias$sha224sum
unSet Alias$sha256sum
unSet Alias$sha384sum
unSet Alias$sha512sum
unSet Alias$shred
unSet Alias$shuf
unSet Alias$sleep
unSet Alias$sort
unSet Alias$split
unSet Alias$stat
unSet Alias$stdbuf
unSet Alias$stty
unSet Alias$su
unSet Alias$sum
unSet Alias$sync
unSet Alias$tac
unSet Alias$tail
unSet Alias$tee
unSet Alias$test
unSet Alias$timeout
unSet Alias$touch
unSet Alias$tr
unSet Alias$true
unSet Alias$truncate
unSet Alias$tsort
unSet Alias$tty
unSet Alias$uname
unSet Alias$unexpand
unSet Alias$uniq
unSet Alias$unlink
unSet Alias$vdir
unSet Alias$wc
unSet Alias$whoami
unSet Alias$yes
Put that lot into an obey file, and execute it before using the DDE compiler. Hopefully will save someone a bit of typing :)

Ta,
--
nr.

grannyg
Posts: 22
Joined: Fri Nov 02, 2012 11:55 am

Re: NutPi version of DDE

Fri Dec 07, 2012 6:24 pm

The first problem you're having is due to a typo in the !SetPaths !Run file.

In SDFS::RISCOSpi.$.AcornC/C++.!SetPaths.!Run

Change,

Set RISCOSLLB$Path <RISC_OSLib$Path>

to

Set RISCOSLIB$Path <RISC_OSLib$Path>

I also ran pi_css5 on RISC OS using gcc 4.7.3 with vfp support. It uses float-abi=softfp. Can't use float-abi=hard as this is used by fpa support.

*pi_css5
Calculation of PI using FFT and AGM, ver. LG1.1.2-MP1.5.2a.memsave

Usage: /RAM::RamDisc0.$/pi_css5 digits

Number of digits of pi to calculate?
16384
initializing...
nfft= 4096
radix= 10000
error_margin= 7.41633e-05
calculating 16384 digits of PI...
AGM iteration
precision= 48: 0.06 sec
precision= 80: 0.04 sec
precision= 176: 0.05 sec
precision= 352: 0.04 sec
precision= 688: 0.04 sec
precision= 1392: 0.05 sec
precision= 2784: 0.04 sec
precision= 5584: 0.05 sec
precision= 11168: 0.04 sec
precision= 22336: 0.04 sec
writing pi16384.txt...
0.57 sec. (real time)
Hit RETURN to exit.

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: NutPi version of DDE

Fri Dec 07, 2012 6:59 pm

grannyg wrote:The first problem you're having is due to a typo in the !SetPaths !Run file.

In SDFS::RISCOSpi.$.AcornC/C++.!SetPaths.!Run

Change,

Set RISCOSLLB$Path <RISC_OSLib$Path>

to

Set RISCOSLIB$Path <RISC_OSLib$Path>
Perfect, thanks. That's fixed it. Ta.
grannyg wrote: writing pi16384.txt...
0.57 sec. (real time)
Hit RETURN to exit.
Cool, that's good to know. Do you know if there are any plans afoot to make gcc 4.7.3 generally available on RISC OS as a package? If I have to build it, I have to build it, and that's fine. Would be far easier for me to install a pre-built package though, as the only platform I've got at the moment for doing any kind of compilation is the pi.

Ta,
--
nr.

Return to “RISCOS”