bradder555
Posts: 11
Joined: Fri Mar 08, 2013 3:17 am

Re: Forth Operating System with Baking Pi roots.

Mon Mar 18, 2013 11:38 pm

Git will definitely ensure that everyone is working from the same material.

I think the goals that you have identified are a good start. My suggestion would be an spi driver too.

pilotrhk
Posts: 26
Joined: Fri Mar 08, 2013 1:24 am

Re: Forth Operating System with Baking Pi roots.

Tue Mar 19, 2013 2:01 am

I will open a repository on GitHub. I will name it rpiForth. symbolically 'Raspberry Pi logo to the 4th'.
I will start a new Post when I get this done. Hopefully by tomorrow.

I have been training at the following web site on how to use Git. I think it will be easy enough to use. Watch these youtube video's a few times and I think you can handle Git and GitHub.

http://www.youtube.com/watch?v=mYjZtU1-u9Y

Roland :mrgreen:

pilotrhk
Posts: 26
Joined: Fri Mar 08, 2013 1:24 am

Re: Forth Operating System with Baking Pi roots.

Wed Mar 20, 2013 12:34 am

I finally got my rpiForth (Raspberry Pi Forth Operating System) on GitHub.
Look for aviatorRHK/rpiForth repository. I will maintain all rpiForth files here.

Have fun you all. :mrgreen:

Excalibur
Posts: 4
Joined: Wed Nov 20, 2013 5:46 pm

Re: Forth Operating System with Baking Pi roots.

Wed Nov 20, 2013 7:20 pm

Short question from a Raspberry newbie. Have searched the whole inet without an answer. How do I install the rpiForth onto the sdcard. Have tried formatting it with Fat32 and copied rpiboot directory into the root of the SD. But raspi doesn't start?! Could someone give me a hint about the correct way?

Started with JForth on Amiga 2k many years ago and a forth only system for programming the gpio will be fine. Nice Job, Roland!

bradder555
Posts: 11
Joined: Fri Mar 08, 2013 3:17 am

Re: Forth Operating System with Baking Pi roots.

Thu Nov 21, 2013 3:09 am

If you're using Linux, use dd to copy a standard RPI image I.e. raspbian, then rename the kernel kernal.backup or something then take the forth kernal and replace the original one.

Forth should then just work. Sorry I don't have more specifics, I'm on my mobile phone

I haven't seen much activity on here lately.

I hope you're well pilotrhk and everyone else?

pointfree
Posts: 4
Joined: Tue Jan 01, 2013 5:28 pm
Location: Boston, MA
Contact: Website

Re: Forth Operating System with Baking Pi roots.

Fri Nov 22, 2013 3:14 am

I have made some changes to get rpiForth working on my Pi. Take a look at my pull request:

https://github.com/aviatorRHK/rpiForth/pull/1

After those changes you only need to copy:

bootcode.bin config.txt kernel.img start.elf

to your sd card as it works with the latest firmware although you may need different hdmi settings in config.txt.

EDIT: removed libcsud.a from list
Last edited by pointfree on Sat Nov 23, 2013 1:10 am, edited 1 time in total.

bradder555
Posts: 11
Joined: Fri Mar 08, 2013 3:17 am

Re: Forth Operating System with Baking Pi roots.

Fri Nov 22, 2013 3:38 am

ahh, was i giving out-of-date advice?? My bad!!

I'm glad that this thread is being stirred up again.

I've really wanted to spend some time on this but i've been so busy!!

I think there is a real potential for FORTH to be used as a real-time operating system. I think performance-wise it'll smash microkernel linux!

Still, its probably unlikely it'll catch on in the industrial world since those guys seem to be pretty set in their ways.

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Forth Operating System with Baking Pi roots.

Fri Nov 22, 2013 2:04 pm

pointfree wrote:I have made some changes to get rpiForth working on my Pi. Take a look at my pull request:

https://github.com/aviatorRHK/rpiForth/pull/1

After those changes you only need to copy:

bootcode.bin config.txt kernel.img libcsud.a start.elf

to your sd card as it works with the latest firmware although you may need different hdmi settings in config.txt.
Are you sure about the "libcsud.a" ?
Batteries not included, Some assembly required.

Excalibur
Posts: 4
Joined: Wed Nov 20, 2013 5:46 pm

Re: Forth Operating System with Baking Pi roots.

Mon Nov 25, 2013 8:06 pm

Hi,

with a merge of the tipps of bradder555 and the changes of pointfree, it display it's first textlines :D

1.) Getting an image of openElec, because it's pretty small
2.) Replace all files on the SD with the ones are located in rpiboot
3.) Downloaded all the changed binaries and txt files for the open commit of pointfree, replace this again on SD
4.) libcsud.a is _not_ copied

No solution without problems ;) Raspi (B Model) displays the copyright line correctly and reacts on keyboard inputs for a few seconds. Had getting some "ok" reacts for "Return" key and putted an int to stack. But after a few seconds (~5) display is getting black and nothing works at this point. Have tried some resolutions from VGA, over 1024x768 (pointfree) up to full HD. Also I have turned off overclocking and speeded 700 MHz. Doesn't matter, after some seconds display disappears.

Does someone of you have an idea what could be the problem? Should I try another monitor? For my first steps used full HD TV with HDMI cable.

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Forth Operating System with Baking Pi roots.

Mon Nov 25, 2013 10:32 pm

The problem is something to do with the new firmware and the usb driver (csud).
You could try the old firmware (bootloader files), but they may not work with latter pi (B model).
You can get old firmware in this zip (part of my OS), see boot folder
http://www.dex-os.com/DexBasic/DexBasic.zip

This problem is the same for all bare metal OS's that use that driver, i am writing my own in assembly, so maybe that will help others.
Batteries not included, Some assembly required.

bradder555
Posts: 11
Joined: Fri Mar 08, 2013 3:17 am

Re: Forth Operating System with Baking Pi roots.

Tue Nov 26, 2013 11:13 am

I had this working on RevB

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Forth Operating System with Baking Pi roots.

Tue Nov 26, 2013 12:29 pm

bradder555 wrote:I had this working on RevB
What was the date of the firmware you was using ?
Batteries not included, Some assembly required.

Excalibur
Posts: 4
Joined: Wed Nov 20, 2013 5:46 pm

Re: Forth Operating System with Baking Pi roots.

Tue Nov 26, 2013 6:00 pm

@DexOS Thanks for the archive. It doesn't work at all, played with old_kernel=0/1 option and with org/your start.elf but Raspi doesn't start and doesn't display anything :(
Because I have had a life sign from Roland, tried to reach him at his mail address, the next way is testable. Will try to compile his sources, but must install a full linux system before, because need a gcc compiler ;) I will give feedback after and about.

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Forth Operating System with Baking Pi roots.

Tue Nov 26, 2013 6:39 pm

You can try this as a temp method, go back to the settup that worked and than turned its self off.
Boot up and then turn your monitor off, i left this off for about 20mins, then it worked fine when i turned it on until i rebooted.

Don said he will try to find the problem and fix it, if people send him detail and a bug report.

I have not looked into it because i am working on my own stack and work only in ASM.
Batteries not included, Some assembly required.

pilotrhk
Posts: 26
Joined: Fri Mar 08, 2013 1:24 am

Re: Forth Operating System with Baking Pi roots.

Wed Nov 27, 2013 3:42 am

Hi you all,
I have abandon rpiForth on Bare Metal some time ago. I burned me out with the primitive development cycle. I destroyed one Raspberry Pi and about 15 SD roms. I moved most of the work on to my BeagleBone Black (BBB) and put it under Linux and call it rForth. Changing the key input and character out to Linux calls, was done in no time. I found that rpiForth ran terrible slow. BBB runs rForth extremely fast.

---- QUEST WHAT!!! Yesterday I ported it to Raspberry Pi, without any changes, compiled it under Raspbian(Linux gcc) both May 2013 version and September 2013 version. They both run much faster than the Bare Bone version.

Next Project is to connect to the GPIO.
Happy --- Bare Bones

Roland Koluvek pilotrhk :mrgreen:

bradder555
Posts: 11
Joined: Fri Mar 08, 2013 3:17 am

Re: Forth Operating System with Baking Pi roots.

Wed Nov 27, 2013 12:05 pm

Good to see you back Roland!!

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Forth Operating System with Baking Pi roots.

Wed Nov 27, 2013 1:17 pm

pilotrhk wrote:Hi you all,
I have abandon rpiForth on Bare Metal some time ago. I burned me out with the primitive development cycle. I destroyed one Raspberry Pi and about 15 SD roms. I moved most of the work on to my BeagleBone Black (BBB) and put it under Linux and call it rForth. Changing the key input and character out to Linux calls, was done in no time. I found that rpiForth ran terrible slow. BBB runs rForth extremely fast.

---- QUEST WHAT!!! Yesterday I ported it to Raspberry Pi, without any changes, compiled it under Raspbian(Linux gcc) both May 2013 version and September 2013 version. They both run much faster than the Bare Bone version.

Next Project is to connect to the GPIO.
Happy --- Bare Bones

Roland Koluvek pilotrhk :mrgreen:
Sorry to hear you have give up on bare metal and it's a common mistake that a lot of people think, that because its running under bare metal it will be faster.
This is not the case, the truth is it potentially could run faster, but need a lot of optimizing.
Good luck with your linux port.
Batteries not included, Some assembly required.

Excalibur
Posts: 4
Joined: Wed Nov 20, 2013 5:46 pm

Re: Forth Operating System with Baking Pi roots.

Wed Dec 04, 2013 6:15 pm

Compiling and running Roland's rForth:

Here comes as promised my short description about the "under linux" solution Roland mailed me days ago.
I used the normal Raspian image to boot up, luckily all packages are in actual version. Roland mailed me detailled command line options to compile his rForth.s (full of assembler) source file. This was quite easy and runs without problems in display or keyboard input, because he uses the linux background (KEY and EMIT). Only tested small benchmark with nested calls

: TEST 1000 0 DO LOOP ;
: TEST1 1000 0 DO TEST LOOP ;
: TEST2 10 0 DO TEST1 LOOP ;

Really fast reply in about 1,5 secs ~ 6,6 Mio. loops a second. I will search for my Brodie books next days to refresh my knowledge. Under a plain linux it must be possible to communicate with GPIO over the corresponding /dev, right? But for testing this I need a bridge board to experiment with GPIO, which I have to order first.

Thanks Roland for your help making my first forth steps on Raspi successful! Thanks all others for trying to help getting bare system running, should not be

bradder555
Posts: 11
Joined: Fri Mar 08, 2013 3:17 am

Re: Forth Operating System with Baking Pi roots.

Thu Dec 19, 2013 2:08 am

I guess if we're going to abandon the bare metal approach. It might be worth moving onto p-forth?

At least that way it should be optimized by the c-compiler and you don't need to run it on top of Linux..?

Return to “Bare metal, Assembly language”