timrowledge
Posts: 1275
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: RISC OS released on Raspberry Pi

Mon Oct 29, 2012 8:13 pm

Yay! Well done folks. I guess I'll have to see if I can get the RISC OS port of Squeak up to date sometime.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

tank
Posts: 64
Joined: Thu Dec 15, 2011 5:51 pm

Re: RISC OS released on Raspberry Pi

Mon Oct 29, 2012 9:15 pm

Wizard wrote:My webserver runs really well and most php stuff does what its supposed to do but I have yet to wire in my sensors via GPIO. I must have a butchers at the documentation first since I'm more or less in the dark when it comes to GPIO and RISC OS.
RISC OS itself has nothing built in to control the GPIO ports, but I have added Raspberry Pi support to the GPIO module from http://www.tankstage.co.uk/Software .
This module will let you control the GPIO ports with a SWI interface.
It also detects any MCP23017 GPIO extenders fitted and allows control of them.

User avatar
Wizard
Posts: 120
Joined: Sun Aug 19, 2012 4:52 am
Location: Sweden

Re: RISC OS released on Raspberry Pi

Mon Oct 29, 2012 9:56 pm

tank wrote: RISC OS itself has nothing built in to control the GPIO ports, but I have added Raspberry Pi support to the GPIO module from http://www.tankstage.co.uk/Software .
This module will let you control the GPIO ports with a SWI interface.
It also detects any MCP23017 GPIO extenders fitted and allows control of them.
Sweet!!! :D
Raspberry Pi - finally a worthy replacement for A500!!!

User avatar
Grumpy Mike
Posts: 914
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: RISC OS released on Raspberry Pi

Mon Oct 29, 2012 10:20 pm

@tank
While the last alpha version of RISC OS could talk to the I2C lines, do you know if there is any way of switching it over to the second I2C bus that appears in the revision 2 boards?

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 12:17 am

Sorry to interupt but I downloaded riscos-2012-10-16-RC5.zip via the torrent, un-zipped it, got the ro519-rc5-1876M.img.bz file further unzipped that and got 0.fat, 1.img and '2'.

What goes where?

burning 1.img to my SD card does not work on my pi.

extracting ro519-rc5-1876M.img.bz to my SD card will not work on my pi either.

Any pointers appreciated.

theom
Posts: 73
Joined: Wed Jun 13, 2012 2:53 pm

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 1:49 am

SEDev wrote:For ssh you could try the packages offered by PackMan (NettleSSH, Openssh) but I'm not sure if they've been updated for ARMv6/v7.
They both have been. You probably want to use Nettle - the version in PackMan comes with SSH support. Confusingly, there's another version (not in PackMan) called NettleSSH which is ancient and is almost certainly not what you want.

FTPc... interesting, that wasn't publically available when I was upgrading the packages. 1.44 should work in ARMv5 compatibility mode (the default setting in Configure) but I don't remember testing it.

theom
Posts: 73
Joined: Wed Jun 13, 2012 2:53 pm

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 1:52 am

pygmy_giant wrote:Sorry to interupt but I downloaded riscos-2012-10-16-RC5.zip via the torrent, un-zipped it, got the ro519-rc5-1876M.img.bz file further unzipped that and got 0.fat, 1.img and '2'.
You should unbzip2 that to get ro519-rc5-1876M.img and write that to SD with the usual SD write tools - looks like your unzip tool is pulling apart all the partitions in the image, which you don't want to happen.

tank
Posts: 64
Joined: Thu Dec 15, 2011 5:51 pm

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 6:49 am

Grumpy Mike wrote:@tank
While the last alpha version of RISC OS could talk to the I2C lines, do you know if there is any way of switching it over to the second I2C bus that appears in the revision 2 boards?
I have just uploaded a version that works OK with I2C on the rev 2 Pi......

User avatar
Grumpy Mike
Posts: 914
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 6:58 am

tank wrote:I have just uploaded a version that works OK with I2C on the rev 2 Pi......
Thanks.
Sorry a version of what and where is it?

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 10:05 am

Will it work on both revisions?

theom
Posts: 73
Joined: Wed Jun 13, 2012 2:53 pm

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 11:51 am

I think tank's referring to his GPIO module:
http://www.tankstage.co.uk/software.html

RISC OS should detect what revision of board you have and select the I2C pins as appropriate, so if you speak 'I2C' it comes out of the same pins on P1 irrespective what rev you have. However rev2 boards also have a second I2C on P5 with RISC OS supports - I'm sure tank will be along in a moment to say if that works with his GPIO module.

To access raw I2C in RISC OS you call SWI OS_IICOp:
https://www.riscosopen.org/wiki/documen ... w/OS_IICOp
(the older IIC_Control still works, but doesn't know about multiple buses)
and there's some background on what's happening underneath here:
https://www.riscosopen.org/wiki/documen ... 0IIC%20API

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 2:02 pm

Thanks - looks good -will investigate - still finding my feet....

Burngate has put together this helpful basic guide https://docs.google.com/viewer?a=v&pid= ... Dg4MTQ0NDI

Steve Drain
Posts: 105
Joined: Tue Oct 30, 2012 2:08 pm
Location: Exeter UK

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 2:17 pm

tank wrote
[GPIO module] It also detects any MCP23017 GPIO extenders fitted and allows control of them.
I have written a much less comprehensve module, specifically with the Ciseco SliceOfPIO in mind, that communicates with this chip over IIC and allows 8-bit port operations. It is not yet registered or publicly available, but I can certainly send it to anyone interested.

tank
Posts: 64
Joined: Thu Dec 15, 2011 5:51 pm

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 6:07 pm

theom wrote:
RISC OS should detect what revision of board you have and select the I2C pins as appropriate, so if you speak 'I2C' it comes out of the same pins on P1 irrespective what rev you have. However rev2 boards also have a second I2C on P5 with RISC OS supports - I'm sure tank will be along in a moment to say if that works with his GPIO module.
The second I2C is not supported ATM in RISC OS.
The I2C support detects which rev pcb its running on and makes the port on the main expansion header the primary port.
Steve Drain wrote: I have written a much less comprehensve module, specifically with the Ciseco SliceOfPIO in mind, that communicates with this chip over IIC and allows 8-bit port operations. It is not yet registered or publicly available, but I can certainly send it to anyone interested.
Steve, the latest GPIO module also has 16 bit wide access to the ports using SWI GPIO_ReadExp32 and the other ...Exp32 calls to read and write the OE register and data registers (it reads/writes both 8 bit ports and sends/presents the data in the bottom 16 bits of the returned/sent register from the SWI's).

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 6:56 pm

I've read through the bbc basic manual and there isn't a peek or poke to be found anywhere, so the only way to get to the GPIO is if some acorn or arm programmer to write the machine code for it maybe a wimp interface would be nice.
only been using risc os for about a month and been using linux since 98. But I would pick risc os every time it's so fast and linux appears to be overkill for pi and considering it's aimed at schools, to much to learn unless your a real computer geek.
I have been looking at arm assembly and is a little confused by 26bit and 32bit when programming. I have a book but it only seems to cover the 26bit programming technic. how simular are they to program any tips would be helpful

Steve Drain
Posts: 105
Joined: Tue Oct 30, 2012 2:08 pm
Location: Exeter UK

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 7:25 pm

tank wrote:
the latest GPIO module also has 16 bit wide access to the ports
That's a lot closer to what I want, which is to be similar to BBC B I/O ports. But it does not yet do some things I would like, nor something similar for the GPIO pins. Could we liaise on this?
steve[at]kappa[dot]me[dot]uk

Steve Drain
Posts: 105
Joined: Tue Oct 30, 2012 2:08 pm
Location: Exeter UK

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 7:48 pm

stylx wrote:I've read through the bbc basic manual and there isn't a peek or poke to be found ...
In BBC BASIC you use indirected variables for PEEK and POKE, a much more powerful construct, eg:

Code: Select all

address%!offset%=value$
 value%-=address%!offset%
write and read a 4-byte word to a particular location. There are more things to find out about indirected variables, and they can be used in nearly every place that a normal variable can be used. However, they are no substitute for structures and they can get ugly when used for complex maniputlations.

For the GPIO you have Tank, who has written a module [in machine code in this case] so that access is made simpler. A module is an operating system extension. The interface is through software interupts (SWIs) which can be called from any language. RISC OS itself is highly modular.

As for assember, everything now should be written for 32-bit only. However, nearly everything that you find out about 26-bit is going to be helpful. The biggest difference is in how the flags are handled, which has implications for calling subroutines. You will get lot of help from comp.sys.acorn.programmer.

Steve Drain
Posts: 105
Joined: Tue Oct 30, 2012 2:08 pm
Location: Exeter UK

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 7:51 pm

Oops! Finger trouble. :o

Code: Select all

 address%!offset%=value%
   value%=address%!offset%

User avatar
Grumpy Mike
Posts: 914
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 9:58 pm

there isn't a peek or poke to be found anywhere,
and if you just want single byte indirection there is the ? operation so to peek at an address use:-
val = ?address%
or to poke
?address% = val%
? also works with offsets just like !

Raeddie
Posts: 18
Joined: Sun Aug 05, 2012 9:09 am

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 10:30 pm

Grumpy Mike wrote:val = ?address%
or to poke
?address% = val%
? also works with offsets just like !
To complete the list and the confusion:
?(address%+offset%)=val%
!(address%+offset%)=val%
works as well.

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 10:57 pm

Nice.

Call me a splitter but ... is there a version of GCC(SDK) available for this flavour of RISC OS?

(http://www.riscos.info/index.php/GCCSDK)

Can I just use the latest release from this page: (http://www.riscos.info/downloads/gccsdk/)

What compiled programming options are available?

for packages in general, can I just use any old RISCOS app or do I need architecture specific versions?

Thanks.

Steve Drain
Posts: 105
Joined: Tue Oct 30, 2012 2:08 pm
Location: Exeter UK

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 11:08 pm

Grumpy Mike wrote: To complete the list and the confusion:
?(address%+offset%)=val%
!(address%+offset%)=val%
works as well.
As I said, there are more things to find out about indirected variables, and that does not complete the list, yet. :)

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: RISC OS released on Raspberry Pi

Tue Oct 30, 2012 11:19 pm

Raeddie wrote that, not GM.

Pygmy_giant wrote:
Nice.

Call me a splitter but ... is there a version of GCC(SDK) available for this flavour of RISC OS?

(http://www.riscos.info/index.php/GCCSDK)

Can I just use the latest release from this page: (http://www.riscos.info/downloads/gccsdk/)

What compiled programming options are available?

for packages in general, can I just use any old RISCOS app or do I need architecture specific versions?

Thanks.

theom
Posts: 73
Joined: Wed Jun 13, 2012 2:53 pm

Re: RISC OS released on Raspberry Pi

Wed Oct 31, 2012 12:28 am

pygmy_giant wrote:Nice.

Call me a splitter but ... is there a version of GCC(SDK) available for this flavour of RISC OS?

(http://www.riscos.info/index.php/GCCSDK)

Can I just use the latest release from this page: (http://www.riscos.info/downloads/gccsdk/)
Yes, GCC 4.1.2 release 2 or later should be fine. Previous releases won't emit correct code on ARMv7 processors, which includes the Pi with the CPU set to ARMv7 strict mode (see below). GCCSDK (the cross compiler - build on Linux/Mac/etc, run on RISC OS) will also work.
for packages in general, can I just use any old RISCOS app or do I need architecture specific versions?
It's complicated. ARM keep changing the instruction set, so there have been a variety of architecture changes which affect compiled programs. There's not really any concept of building for a specific architecture (armhf, armel, etc) - almost all RISC OS programs built today can run on an ARM2 from 1987 - the problem is running old programs on new hardware:
  • Pre-2002, things used '26 bit mode'. These won't work directly (there's an emulator called 'Aemulor' that supports them).
  • Post-2002, things should have been written in '32 bit mode'. These should work on the Pi with the CPU settings (in Configure) in 'ARMv5 compatibility mode' (the default).
  • ARMv7 changed some things that broke ARMv5 programs (specifically 'unaligned loads'). Beagleboards and similar don't have an 'ARMv5 compatibility mode', so things needed recompiling to work on ARMv7. You can test this by setting 'ARMv7 strict mode' in Configure.
Rough rule of thumb:
  • Pre-2002: need Aemulor
  • 2002-2009/10ish: need ARMv5 compatibility mode on, won't work on Beagleboard/etc
  • 2010-now: should be fine whatever mode and on all hardware
  • New software you write: test in ARMv7 strict mode.

pearcecg
Posts: 17
Joined: Wed Oct 31, 2012 10:21 am

Re: RISC OS released on Raspberry Pi

Wed Oct 31, 2012 10:34 am

The first release of RiscOS for the Pi is fantastic - well done guys.

Everything seems to work well and response is very snappy - as good as if not better than Iyonix.

Network over DHCP just works - network printers up and running via ethernet (don't know what ethernet over USB means!)

Boot up says 'keyboard not detected' but works OK.

Can we arrange for more ram to be used than 128MB, particularly with the 512MB Pi?

Can we somehow use the extra memory on SD cards > 2GB? Mine is 8GB.

Machine freezes trying to write to Fat32 stick.

Still, for a first release pretty amazing

George Pearce

Return to “RISCOS”