Propellor "Operating System" (work in progress)
Mike Green
Posts: 23,101
I've been working on a sort of operating system for the Propellor. The idea is to have a version of the hires VGA text and keyboard drivers that use work areas at the high end of RAM and to have a loader that can load from a 32Kx8 or larger "boot" EEPROM or any other I2C EEPROMs attached to the Propellor. There will be a simple command interpreter to configure things (like where are the EEPROMS?) and to load and execute named SPIN programs from the EEPROMs. There will be a way to copy SPIN programs to the EEPROMs either from the boot EEPROM or eventually from an SD/MMC card. There will be a simple editor, mostly using the standard keyboard keys.
The vga, keyboard, and I2C drivers are modifications of those in the library and pretty much work (the I2C driver does work with the boot EEPROM on the demo board). The loader is mostly written, but not debugged yet. The editor mostly works, at least on the screen buffer. The hires vga text driver includes an interface derived from tv_wtext that maintains multiple text windows. This works pretty well except for some boundary conditions with the "lazy return" feature.
I'm posting it at this point in its development because the hires vga driver including the screen editor may be useful even at this point. I will continue to post updates as I fix significant bugs, and add new features. I'd appreciate comments and observations, keeping in mind that this is very fluid at this point and not documented much.
The intention is to have a simple system, mostly for loading other programs that will use the vga display and keyboard. Those programs will only need to reference a portion of the "built-in" drivers so they won't need to include the assembly routines (already loaded and running in COGs). I don't plan to support vga graphics because of the memory requirements for the screen buffer, but a loaded program can always take over the whole Propellor and run its own copy of the graphics drivers.
The vga, keyboard, and I2C drivers are modifications of those in the library and pretty much work (the I2C driver does work with the boot EEPROM on the demo board). The loader is mostly written, but not debugged yet. The editor mostly works, at least on the screen buffer. The hires vga text driver includes an interface derived from tv_wtext that maintains multiple text windows. This works pretty well except for some boundary conditions with the "lazy return" feature.
I'm posting it at this point in its development because the hires vga driver including the screen editor may be useful even at this point. I will continue to post updates as I fix significant bugs, and add new features. I'd appreciate comments and observations, keeping in mind that this is very fluid at this point and not documented much.
The intention is to have a simple system, mostly for loading other programs that will use the vga display and keyboard. Those programs will only need to reference a portion of the "built-in" drivers so they won't need to include the assembly routines (already loaded and running in COGs). I don't plan to support vga graphics because of the memory requirements for the screen buffer, but a loaded program can always take over the whole Propellor and run its own copy of the graphics drivers.
zip
34K
Comments
The ("info <file>") command will display some useful information about the named program. "edit" still is used for testing a
screen editor that will eventually be used for a file editor.
This will work on any Propeller Demo Board or any other configured with at least a compatible keyboard and VGA output. You can hang additional EEPROM on the boot I2C bus or on any other pin pair (even-SCL/odd-SDA). There are all kinds of useful routines scattered about and the documentation on them will improve.
A small gripe.
Looks like this program is cap sensitive.
After typing long paths in a very tiny text size (I have a 8 in. VGA monitor), I discover that if do not use the proper Up/Down case, you get "File not found" bit.
·
1) The "<file>" commands are incomplete and buggy at the moment. The next time I post a version, I expect them to work.
2) The program is not supposed to be case sensitive. It's not really documented yet, but filenames are currently any sequence of up to 12 non-blank characters. Lower case characters are mapped into upper case. After this is all working properly and polished up a little, I will add support for some kind of SD/MMC external device that will restrict filenames to the standard DOS/Windows 8.3 format.
2) The vga hires text driver (OS_vgaHiresTest) is Chip's driver with only slight modifications. At the beginning of the driver are three groups of constant declarations, one for each of 3 resolutions (640 x 480, 800 x 600, 1024 x 768). All but one are commented out. Currently it's set to 800 x 600, but, if you comment that one out and "uncomment" the 640 x 480 group, the rest of the program will adjust. That will look better on your 8" monitor. Similarly, if you have a big monitor and good eyes, you can switch to 1024 x 768.
I like version 15
Now is more readable.
Question:
If I go to the list for example, I got a list of line numbers.
How I can go back to the main page?
I try quit, exit, etc at not avail.
The insert mode does work. The cursor switches from a fast blink to a slow blink. In that mode, anything typed sort of pushes the rest of the text on the line to the right rather than overwriting it. Push the insert key again and the cursor speeds up and it's in overwrite mode.
Post Edited (Mike Green) : 8/2/2006 3:00:42 PM GMT
What·puzzled me·was how you planned to transfer·programs initially·into·EEPROM, think I got it now:
- compile program in propeller IDE and load into·to boot-eeprom
- compile and load your·OS into RAM
- "copy" from boot-eeprom into·another free 32K space,·assign a name.
Right?
·
Yes, that's correct. I do expect delivery of a USBwiz later this month. This provides I2C (and SPI and serial) access to a full-capability SD/MMC card as well as USB pen-drives. I plan to add a driver for that so you can save an EEPROM image to an SD card, then run it directly from the SD card using the OS on the Propeller (or copy it to another EEPROM).
Mike
Next steps: 1) Multiple byte reads and writes without readdressing the EEPROM device 2) Booting from other than the boot EEPROM.
I'v ordered some 128 and 512K eeproms, and hope to use some of the stuff you are working on with it...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller + Hardware - extra bits for the bit bucket =· 1 Coffeeless KaosKidd
·
Can't wait to take it for a test run.
Rob7.
Nico Hattink
always look on the boot EEPROM buss for other EEPROMs, but you have to use the PROBE <SCL pin> to look for EEPROMs on any other pair of pins.
Some other miscellaneous bugs have been fixed.
Next task will be to finish the simple text editor so that you can create and modify simple text files that fit within a 32K EEPROM page.
Post Edited (Mike Green) : 8/24/2006 4:49:26 AM GMT
Version·.029·"list" showed·me the filenames, but·refused·"copy" (can't create) "delete" (file not found).·I erased address $7fff in both·EEPROM pages, now "list" shows both pages·as·"uninitialized", but·still·refuses "copy". What do I do wrong, how can I make the two pages free again?
Nico Hattink
Nico Hattink
I've added a "test clear <pin> <page>" command that clears the filename area of the specified 32K page to $FF.
I looked at the searchFile routine and the checkSums routine and they seem to be doing what I expect. For now,
I do want to keep a strict definition of a deleted file (blanks for name, checksums correct) and check for that with
the exception of incorrect checksums implying an uninitialized file space. searchFile always returns the address
of the file found with the option bits in the lower 12 bits or it does an abort with a negative value. checkSums
returns either the 12 options bits or TRUE (-1).
I did clear up some comments and added a little comment stuff about the commands.
If you could give me the filename area contents of the EEPROM pages that are problematic (last 16 bytes), that
would help me figure out what isn't working. Thanks.
Mike
Nico
Nico
Mike
I'll report back when I have a clear picture of things working.
Nico
There are generally usable routines like a basic line editor and command scanner routines that can be incorporated essentially unchanged into an application program. I plan to have a simple text editor for editing short text files stored in EEPROMs and I'm working on a way to download directly from the Propeller Tool to an EEPROM "file". Anything else is the responsibility of the
application program. If someone wants to use the FullDuplexSerial object or Servo32 object or Floating Point object, they can incorporate it into their program and the OS can co-exist with it.
There is no reason why an application under this OS couldn't work with Microsoft's Robotics Studio since the OS doesn't really do much. Someone else would have to do the necessary interface routines and integration on both the Propeller and the Windows end.