Page 1 of 2

Forth Operating System with Baking Pi roots.

Posted: Fri Mar 08, 2013 1:54 am
by pilotrhk
I have completed a fully operational Forth operating system with standard words per ANSI/IEEE X3.215
Web site lars.nocrew.org/dpans/dpans.htm , to learn forth go to http://www.forth.com/starting-forth/index.html.
Not implemented is floating point, editor, assembler, and no file system.
The Forth operating system has its roots from Alex Chadwick terminal program.

What I need are the hooks to the SD memory. I want the basic read and right routines so I can add a file system to my Forth operating system. Assembler would be preferred, but C routines will do. If you can help me I would appreciate it.

Roland pilotrhk

Re: Forth Operating System with Baking Pi roots.

Posted: Fri Mar 08, 2013 3:59 am
by DexOS
You can take a look at my assembly read SD code, the write is only one or two lines different.
See in the "SdMmc" folder:
http://www.dex-os.com/DexOS_R_PI/DexBasicSource.zip

jnc100 done a C ver here:
http://www.raspberrypi.org/phpBB3/viewt ... 72&t=35003

Re: Forth Operating System with Baking Pi roots.

Posted: Fri Mar 08, 2013 4:29 am
by pilotrhk
DexOS wrote:You can take a look at my assembly read SD code, the write is only one or two lines different.
See in the "SdMmc" folder:
http://www.dex-os.com/DexOS_R_PI/DexBasicSource.zip

jnc100 done a C ver here:
http://www.raspberrypi.org/phpBB3/viewt ... 72&t=35003
Thanks, Looks like a lot of good material there. I implemented a 2G MMC on the MSP430, the larger size has more data handling. This will keep me busy for a while and hopefully I will have a file system running on my Forth system.

This system is available to anyone who wants play with it and could add to it. It is interactive and you can compile new words, only problem is you can not save them. This file system will allow you to save your work. Thanks again.

Roland pilotRHK


Compress system is 1. 5 MB with the ansi standard included.

Re: Forth Operating System with Baking Pi roots.

Posted: Sat Mar 09, 2013 8:45 am
by bradder555
pilotrhk wrote:I have completed a fully operational Forth operating system with standard words per ANSI/IEEE X3.215
Web site lars.nocrew.org/dpans/dpans.htm , to learn forth go to http://www.forth.com/starting-forth/index.html.
Not implemented is floating point, editor, assembler, and no file system.
The Forth operating system has its roots from Alex Chadwick terminal program.

What I need are the hooks to the SD memory. I want the basic read and right routines so I can add a file system to my Forth operating system. Assembler would be preferred, but C routines will do. If you can help me I would appreciate it.

Roland pilotrhk
Hi Roland

I'd love to play around with your code! do you have a blog with your progress?

Cheers!

Re: Forth Operating System with Baking Pi roots.

Posted: Sat Mar 09, 2013 9:25 pm
by JDat
I am also interesting about FORTH on bare metal Pi. Please post link where i can find more information about Your project.

Re: Forth Operating System with Baking Pi roots.

Posted: Sat Mar 09, 2013 11:56 pm
by pilotrhk
I can email you my development package. It is essentially Baking Pi files and my large rForth file rForthcore.s. When zipped up, its size is about 2Megs, this includes a boot folder. I also have the ANS standard zipped up to 800kb.

Thus far, this Forth system has 400 compiled and executable words.
You can read and write any where in the memory and I have DUMP , so you can look any where in the system. Hey!!! :D this is petty neat. You can have a lot of fun with it.

What I have done, I completed it in one and a half months, of coarse I mostly wrote ARM code, this my first ARM project. I have completed a forth system on the MSP430 as well. I expect to get a lot more done on this project.

Ultimate goal is to build it up with a fully functioning multitasking system, so you can write code while the system is working in the background. My present project is to get a file system fully functioning. This will make it much easier to write and test code.

If interested, email me at aivatorRHK@gmail.com.
aviatorRHK (pilotrhk)

Re: Forth Operating System with Baking Pi roots.

Posted: Mon Mar 11, 2013 8:12 am
by pilotrhk
JDat wrote:I am also interesting about FORTH on bare metal Pi. Please post link where i can find more information about Your project.
Hi JDat, I could not figure out how to send the system to you via jdat@inbox.lv. It bounces back. I have sent several copies via aviatorRHK@gmail.com. If I can get a valid email address I will send it.
Roland aviatorRHK (pilotRHK)

Re: Forth Operating System with Baking Pi roots.

Posted: Mon Mar 11, 2013 5:04 pm
by JDat
Doh!

Just tried from my gmail account. The same problem to sen to You! :(
Delivery to the following recipient failed permanently:
aivatorRHK@gmail.com
Technical details of permanent failure:
The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces.
Please try send to jdat.deface [the special symbol @] gmail.com if possible.

Re: Forth Operating System with Baking Pi roots.

Posted: Mon Mar 11, 2013 7:28 pm
by arieverbeek
Hello Ronald,

Very nice that you are working on a bare metal Forth. I play around whit Gforth en GPIO libs. I love tto try your version please send me your development package.
familieverbeek [at] lijbrandt [.] nl

Bye,
Arie

Re: Forth Operating System with Baking Pi roots.

Posted: Mon Mar 11, 2013 10:03 pm
by pilotrhk
Hi JDat,
Try my email rkoluvek@att.net and see if you can get through.
aviatorRHK
JDat wrote:Doh!

Just tried from my gmail account. The same problem to sen to You! :(
Delivery to the following recipient failed permanently:
aivatorRHK@gmail.com
Technical details of permanent failure:
The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces.
Please try send to jdat.deface [the special symbol @] gmail.com if possible.

Re: Forth Operating System with Baking Pi roots.

Posted: Tue Mar 12, 2013 2:01 am
by pilotrhk
:D I am sending out a fully operational rpiForth operating system, complete with 400 words. Just look at the things it can do: HEX 8000 200 DUMP will dump 512 words starting at 0x8000. You can look at all the registers at HEX 020300000 100 DUMP (SD media controller addresses will be displayed)
If you write it as a 'colon definition' ": SD 020300000 100 DUMP ; " then you just type SD and it will dump media controller data.
Newly added words: These words execute Alex Chadwick's GPIO functions interactively
:) GETGPIOADDRESS will return 0x020200000 if in the hex mode.
:) 16 TURNOFFPIN ( 16 -- ) will turn on the OK LED; and 16 TURNONPIN will turn the OK LED off;
With scope on pin 0 -- 0 TURNONPIN will set pin 0 it high INTERACTIVELY
:) : PULSES 0 ?DO 0 TURNONPIN 0 TURNOFFPIN LOOP ; and 30 PULSES will send out 30 pulses on pin 0;
:D Look at all the fun you can have: :mrgreen: :lol:

Roland aviatorRHK (pilotRHK)
Send email to aviatorRHK@gmail.com

pilotrhk wrote:I have completed a fully operational Forth operating system with standard words per ANSI/IEEE X3.215
Web site lars.nocrew.org/dpans/dpans.htm , to learn forth go to http://www.forth.com/starting-forth/index.html.
Not implemented is floating point, editor, assembler, and no file system.
The Forth operating system has its roots from Alex Chadwick terminal program.

What I need are the hooks to the SD memory. I want the basic read and right routines so I can add a file system to my Forth operating system. Assembler would be preferred, but C routines will do. If you can help me I would appreciate it.

Roland pilotrhk

Re: Forth Operating System with Baking Pi roots.

Posted: Tue Mar 12, 2013 9:07 pm
by arieverbeek
Hi Roland,

I have problem to start your Forth OS.
On the standard Raspbian SD I have placed your files from rpiboot in the root.
Only the red led is showing. No screen action. After reinserting the HDMI cable still no sign of live.
If I replaced bootcode.bin with the Raspbian version. I see the green led flikker one time. The screen becomes black. After reinserting the HDMI cable there comes a text on the screen.
"FORTH OS ....................cap-lock}" on the next line a "+" and a flikkering cursor.
I can insert one character.
I have a Raspberry PI 512 mb 1360x768 HDMI screen.
Bye,
Arie

Re: Forth Operating System with Baking Pi roots.

Posted: Tue Mar 12, 2013 10:01 pm
by pilotrhk
Hi Arie
I have three Raspberry Pi "B" early models (256Meg?) numbered 1 to 3, I got a brand new 4 GB SandDisk SD card preformatted with FAT32 and dropped it the contents of File rpiboot. All three Raspberry Pi's worked fine. I use a Logitech K120 Keyboard. $12 at Amazon. I also had a cheap wireless Keyboard and mouse but Baking Pi does not work with it. Remember Rasbian( raspberry pi linux) has a lot of keyboard chooses, where Baking Pi has no chooses. It either works or it does not.

I do not know what else of a solution to offer.

Have you completed the Baking Pi program?
I am glad that the first line came up, there is hope.

Roland Koluvek
arieverbeek wrote:Hi Roland,

I have problem to start your Forth OS.
On the standard Raspbian SD I have placed your files from rpiboot in the root.
Only the red led is showing. No screen action. After reinserting the HDMI cable still no sign of live.
If I replaced bootcode.bin with the Raspbian version. I see the green led flikker one time. The screen becomes black. After reinserting the HDMI cable there comes a text on the screen.
"FORTH OS ....................cap-lock}" on the next line a "+" and a flikkering cursor.
I can insert one character.
I have a Raspberry PI 512 mb 1360x768 HDMI screen.
Bye,
Arie

Re: Forth Operating System with Baking Pi roots.

Posted: Wed Mar 13, 2013 1:24 am
by DexOS
@pilotrhk, the main problems is the bootloaders they have changed, so it depends on what ver (how old they are) as to how things work.
So your best bet is to supply the bootcode.bin and start.elf that you know work fine with your code, in with your os zip.
Also for the later bootloaders to work (without unpluging) you need to add 0x40000000 to your frame buffer structure address.
On top of that, theres a good chance if you use the latest bootloaders your OS will crash.
This is just a guess, as i know nothing about your OS.

Re: Forth Operating System with Baking Pi roots.

Posted: Wed Mar 13, 2013 5:58 am
by pilotrhk
I just download a new copy of Raspbian, February 2013 version. My software would not run in it. It would not even boot.
I supply with my Forth system rpiboot folder. It includes all you need to run my kernel.img. The file are from an April 19, 2012 release of Debian. The file names are bootcode.bin, loader.bin and start.elf. Also I have config.txt and put your own kernel.img.

You can buy a 4 GB SD card. Most of them come formatted with FAT32. IF you copy all the files in rpiboot folder and put then into the SD card with you kernel.img. The system should boot up.

I have not been keeping track of what is going on with new Raspberry Pi's. Maybe I need to buy a new Raspberry Pi. I need to put the Raspberry Pi's to work and get a new one.

Re: Forth Operating System with Baking Pi roots.

Posted: Wed Mar 13, 2013 8:57 am
by arieverbeek
Hi Roland,

The baking pi tutorials i have successful followed until screen03.
I have formatted an SD-cart placed your file form rpiboot on it. Put that does not work.
I know will compile your code with the framebuffer adjustment as Dextor has suggested to night.

Bye,
Arie

Re: Forth Operating System with Baking Pi roots.

Posted: Wed Mar 13, 2013 10:21 pm
by pilotrhk
Hi Arie,
I am at a loss as to why your system will not work. I do not know what to do with address of 0x40000000. My system makes a call to InitialiseFrameBuffer and it returns with a video buffer pointer.
On line 117 in main.s, you can commit out these lines:
ldr r0,=registers
stmea r0,{r1-r12} @ save registers at base
ldr r10,=vault @ load sp0 and rp0
ldmfd r10,{r11,r13}
ldr ip,=coldstart @ load ip to first word in testx
b _next
The forth operating system will not be working, you will be in Baking Pi loop of '>'.
I am back to work on my filing system.
I hope you find the problem.
Roland pilotRHK

Re: Forth Operating System with Baking Pi roots.

Posted: Thu Mar 14, 2013 1:28 am
by DexOS
pilotrhk wrote:Hi Arie,
I am at a loss as to why your system will not work. I do not know what to do with address of 0x40000000.
If you see my example here: http://www.raspberrypi.org/phpBB3/viewt ... 70#p309370
You will see this

Code: Select all

        imm32  r0,0xA00000 + BUS_ADDRESSES_l2CACHE_ENABLED  
The 0xA00000 is the address of the frame buffer strut you send to the MailBox
But you also need to add 0x40000000 to it, thats what this is

Code: Select all

BUS_ADDRESSES_l2CACHE_ENABLED   = 0x40000000 
Also whats your start org of your OS ?, if its 0 than you need to add
kernel_old=1
To your config.txt
if it org 0x8000 your ok.
If you do not have a config.txt just make a txt file called config.txt and add the kernel_old=1
line to it and put it with your kernel.img on your sd card.

Re: Forth Operating System with Baking Pi roots.

Posted: Thu Mar 14, 2013 3:52 pm
by arieverbeek
Hi,

I made adjustments to the linker script and the framebuffer and compiled a new kernel.
There was also a problem with my keyboard, but now its working.
I can change the raspian kernel for the forth kernel and forth is running.
So I can play with a real Forth ;-).

Bye,
Arie

Re: Forth Operating System with Baking Pi roots.

Posted: Thu Mar 14, 2013 10:59 pm
by pilotrhk
Hi guys,
A lot of good information here. I happy to see Arie get his Forth system up and running. I will put all this information in my notes and update my system. Good Work :D
Roland

Re: Forth Operating System with Baking Pi roots.

Posted: Fri Mar 15, 2013 2:52 pm
by JDat
Hello Roland!

Thank You for code in e-mail. I just look a little on source, but I didn't have time to test it on Real PRi. Anyway, interesting idea and great job! Seem that You are the first who made bare metal Forth for PRi!
But... Is it possible to use github for Your source? It would be great that everyone can access to Your source code and this could significantly improve development. I hope that there are lot of FORTHists and ASMists who can help to extent Your Forth.

Thank You for great job!

Re: Forth Operating System with Baking Pi roots.

Posted: Sun Mar 17, 2013 5:13 am
by pilotrhk
Hi JDat,
I will talk it over tomorrow with my close friend and probably set up a place for you all to get the system directly and can get update. I am not sure it will be GitHub but my friend is a internet service provider and set up access there.
Roland

Re: Forth Operating System with Baking Pi roots.

Posted: Sun Mar 17, 2013 1:03 pm
by bradder555
Hay Roland

I would be happy to host your stuff from my site (the website is currently under construction, it can be accessed from bradphillips.synology.me) i own the domain usolutions.net (although i've forgotten my login details for now).

But if you give me your permission, i'll build a site and host the files.

Re: Forth Operating System with Baking Pi roots.

Posted: Sun Mar 17, 2013 1:27 pm
by bradder555
gosh its been so long since i last changed/modified my website, its actually musolutions.net i'll get it all forwarded properly tonight

Re: Forth Operating System with Baking Pi roots.

Posted: Mon Mar 18, 2013 9:36 pm
by pilotrhk
I found out that Git is a complete revision control system with checkout procedures and so on. I have not been involved is a program like this in 10 years. Git has a 230 page book you need to learn before you could manage the project properly. I got a GitHub account and it is free to open source projects. I installed Git on system and started reading the material. I am not sure how hard it is to use, but it would keep all of us working on the same system.
Any commits from you all. If you think this is the right path give me a thumbs up.
Personally, I have not been trained as a software programmer although I worked on formal projects. I am sure that some of you are well trained with good programming procedures. You all that received a copy of the work I have done. It is mostly simple and straight forward.
Some Immediate project goals:
A) A file system on the SD card.
B) A text editor for writing programmings and storing them ( no more assembler ).
C) A forth ARM assembler to write high performance forth words.
D) A multi-tasking operating system, you can fire up a task and let it run.
E) A floating point package per ANSI.
F) I can see for a good I2C driver.
These are some of the things that come to mind.

Let me know what you all think and we will proceed for there. :mrgreen: