self-hosted development - what is available?
K2
Posts: 693
Fresh off the success of my first-ever Propeller application, I'm still stunned and amazed at how fast it went, how well it worked, how slick it looked, how little it cost, and how much fun it was to do. I take no credit myself - it's due entirely to the fact that 1) Parallax is crazy nuts and 2) a whole lot of great help is available on the Forum.
As a result of this experience, I wonder what the current options are for a self-hosted development system...abandoning the PC entirely. Is there any system available that would enable one to create an application in BASIC, C, SPIN or Propeller Assembly, and burn it to a separate EEPROM/Propeller/crystal/voltage-regulator assembly?
A CP/M machine is pretty interesting. (Brings to memory a guy I knew in Bend, OR that ran a little magazine called Micro Cornucopia that I subscribed to till it went bust.) But I don't suppose it can actually clone portions of itself to another Prop. Is there anything that can?
As a result of this experience, I wonder what the current options are for a self-hosted development system...abandoning the PC entirely. Is there any system available that would enable one to create an application in BASIC, C, SPIN or Propeller Assembly, and burn it to a separate EEPROM/Propeller/crystal/voltage-regulator assembly?
A CP/M machine is pretty interesting. (Brings to memory a guy I knew in Bend, OR that ran a little magazine called Micro Cornucopia that I subscribed to till it went bust.) But I don't suppose it can actually clone portions of itself to another Prop. Is there anything that can?
Comments
there is something into that direction. I guess there are still some wishes left what sphinx should be able to do,
I haven't tested it myself. But I think the base is already pretty good.
http://www.sphinxcompiler.com/
http://www.cliff.biffle.org/software/propeller/forth/index.php
and here is ULTIMATE List of Propeller Languages
(you gonna feel lost if you have read through the entire list)
best regards
Stefan
Post Edited (StefanL38) : 3/16/2010 8:08:02 AM GMT
Depends what you want to do. Under CP/M on the Prop you can create C programs for example. Edit the source with WordStar and compile with BDS C. On the Prop. The resulting executable can be moved to any other CP/M machine, Prop or not. There are many other languages that can be used under CP/M on the Prop.
Now, if we could get a Spin/PASM compiler written in C that would run under CP/M then it would be able to clone itself it total. If it's possible to compile ADA under CP/M Spin should be a doddle[noparse]:)[/noparse]
For practical use go with Sphinx. Not that I know how practical that is.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
If you would like to abandon the PC entirely and have a self hosting system you are welcome to check out the N8VEM project.· Using an N8VEM SBC and a PropIO you should be able to completely leave any PC dependence behind.
The N8VEM SBC is a Z80 computer running CP/M and the PropIO is a board with two Propellers.· The first serves IO for the SBC with PS/2 keyboard, VGA, and microSD.· The second Propeller is unallocated and you can do whatever you would like with it. Both Propellers are accessable by the SBC via an ECB backplane.
What I would do is take the example PropIO code on the N8VEM wiki and expand it to include reprogramming the Propeller with loadable code.· I am not sure what kind of CP/M development tools are available for generating Propeller code like a PASM or a spin compiler.· I do recall Mike Greene working on a CP/M system for Propeller a while back so maybe he has some ideas.· There are so many Propeller development tools that you probably could find some thing that could be ported to CP/M using BDS C or something like that.
I would really appreciate it if you would consider the N8VEM system for Propeller development.· I think it would be a great pairing and there is already so much synergy between the Propeller and CP/M systems that it would leverage a lot of work already done to the benefit of all·home brew computer hobbyists.
Dave (Yoda) has already written a·working·N8VEM SBC ROM image with source code to support PS/2 keyboard and VGA for console IO.· Dave is also working on an updated ROM image to support the microSD for CP/M drive support which I believe is very similar to the existing CP/M microSD support already used by some Propeller projects.
Good luck with your project.· Thanks and have a nice day!
Andrew Lynch
Post Edited (lynchaj) : 3/16/2010 11:12:44 AM GMT
Hrm... let's take a functional 32 bit compiler and port it to an 8 bit operating system to generate 32 bit code... What?!?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
There is TriBlade, RamBlade and DracBlade. See the links in my signature for TriBlade & RamBlade. DracBlade is near the top of the thread list but is slower than a real Z80 due to the latching.
SphinxOS & Sphinx is the closest thing to what you are after. There is still some work to do but it does run now. It can compile spin & pasm programs now. All on the propeller. It can launch programs including ZiCog (with the appropriate hardware). See the link in my signature. The Sphinx compiler was written by markp who wrote homespun - the first thirdparty compiler. And we could do with help in developing SphinxOS further.
What would be nice is to be able to use the development tools such as the wordstar editor in CPM, transfer the file to FAT16, transfer control back to SphinxOS and then compile and run the developed code. Once we have a really good editor under SphinxOS this would not be necessary. However, there are some great programs that run under CPM.
Shameless Plug... If you want to add a module to an existing prop board, RamBlade should be the obvious choice - size 1.2"x1.9" $40 with complete prop + eeprom + 152KB Sram + microSD and only requires high speed 2 wire serial link to your board plus power (3V3 & Gnd). Sphinx & SphinxOS and ZiCog & CPM already runs on the RamBlade, either self-contained with a mono composite TV connection and PS2 keyboard, or via another prop running a terminal program.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
What is wrong with that? *grin*
Anyway, the Z80 could also be described as a 16 bit micro. And just when you get deep inside pasm and you want to do something really clever with some bit shifts to save some ram driver code and fit it into a cog, the critical instructions turn out not to be 32 bit but 9 bit. Aaargh, this is a fast track path to becoming follicularly challenged!
I tend to code using the fastest way possible. mbasic still wins after 30 years for testing a couple of quick instructions. Coding C on a PC then compiling on the SIMH and downloading via xmodem is the fastest CP/M way. Coding in C and downloading the raw code and compiling on the board is very close for small programs but not big ones. Catalina is the fastest C environment for the prop I have found. Propbasic is just as sweet. But coding C on the prop and compiling on the prop - the answer is yes, it can be done, but no, it isn't very practical because it is slow and because it involves constantly swapping between wordstar and the bds c compiler.
What is needed is a text IDE on CP/M. The source code for wordstar but with a compiler built in so you can hit F11 to compile. There is no reason it can't be done, the memory is there, C is portable, but I think it would work out slower.
The gauntlet has been thrown down "But I don't suppose it can actually clone portions of itself to another Prop. Is there anything that can?"
Ok, let's allow one small cheat - a pre formatted sd card. Put it into a dracblade with a serial port ready to go. I don't know the serial protocol for programming a prop, but it seems easy to trap with a serial port sniffer. I think the baud rate could be a problem 115k is jolly fast. But assuming we can output at the right baud rate, it ought to be possible to send out data as if it came from a PC. The reset line might have to be hard wired somehow. Can a prop read bits of its own eeprom? I assume so, so a CP/M program ought to be able to read the propellers own eeprom, save that onto sd card, manipulate it if needed, then send it out one byte at a time with the handshaking. Now we have another propeller running all the spin code it needs.
Next challenge - getting CP/M onto a remote SD card before CP/M is there. That would need some new spin code to grab bytes coming down the serial line and save them to sd card. Possibly an ultra simplified xmodem type protocol and some new spin code. Nothing impossible there as the building blocks already exist in code.
Repeat the process for some disk drive images. Hmm - 8mb is a big file. Maybe rejig the zicog so it only has one hard drive for the moment and just send one hard drive image.
Now reboot the propeller and it should load BOOT.DSK and CP/M and the hard drive image. That contains a real copy of xmodem, so future file transfers are a lot easier.
So I think this is entirely possible. Maybe it would have applications out in the field. I'll think about that some more, as one of the issues I'm working on is how to manage a propeller board in an inaccessable location with only a wireless link. I'm working on a solution where the propeller code doesn't change and is fairly boring and simple, but the CP/M programs are the ones updated and changed. So if the whole thing crashes, you can send simple wireless commands that reset the board but those commands can never alter spin code, they only alter CP/M programs so the spin code stays robust.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Post Edited (Dr_Acula) : 3/16/2010 1:21:14 PM GMT
At the same time, it may be worth cogitating (ouch) on possible approaches to the problem from the opposite direction; a sort-of biological approach: Start with implementing a bare bones replication ability and then add adornment and sophistication as opportunities, abilities, and needs suggest themselves.
btw, I agree that an SD card (or some other non-volatile, re-writable storage) needs to be added to the Prop/EEPROM/crystal/VR basic equipment list unless some crazy hybrid FORTH implementation miraculously saves the day. Even then...
Post Edited (David Jensen) : 3/16/2010 5:26:58 PM GMT
There has been a lot of interest with in the Propeller and Z80 home brew communities with CP/M as a development environment.· Certainly there are the *Blade devices, Mike Greene was investigating something like a Zilog development board (ez80?) at one point, and of course there is the N8VEM system.· I am sure there are many ways to accomplish what you are asking for to include just building your own system from scratch.· Using the N8VEM serial port and/or PropIO microSD would keep the link to your PC if you want it.
Personally, I recommend a real Z80 CPU as to keep the system as simple as possible.· Placing an emulation layer underneath a development environment·can make debugging a real chore.· As for compatibility IMO·an emulation will never be·as compatible with the real Z80 hardware as an actual Zilog Z80.· In addition, there are hardware tools for the real Z80 that are incredibly powerful like the Nicolet NICE Z80 ICE and the TaunTek Z80 ICE.· I have both and they are wonderful devices.
http://tauntek.com/Z80-In-Circuit-Emulator.htm
The one missing piece is the software that James alludes to which is the native CP/M Propeller environment.· In the short term, I would look at the native Propeller development environments like Sphinx or·Forth previously mentioned.· I believe it would be possible and practical to port a free/open source Propeller tool to native CP/M such as a PASM assembler or something similar.· More advanced would be to use BDS C or the like to build an actual spin or similar Propeller IDE.
All the proposed solutions fit the requirement so really it is a matter of what sort of system you would like to use.· Do you want an all Propeller solution or one that uses vintage style CP/M machine as a Propeller development environment?· Whatever you choose or don't, I wish you the best of luck with your project.· It certainly sounds interesting.
Thanks and have a nice day!
Andrew Lynch
You are absolutely right: I need to sit down (in my case, go for a hike) and think about what I'm really asking. If one were looking primarily for a PC replacement, your system takes the cake. Conversely, if one selected self-hosting, self-replicating, and simple as his three chief criteria, a PIC or AVR chip with a Forth kernel might be the answer. I guess I'm looking for something in between.
The video generation abilities of the Prop - where it does such a fabulous job, takes few resources, and plays well with other applications on the same chip - is the single biggest draw for me. I guess that's why I would be looking to stay with the Propeller, whether it was emulating something else or not.
Also, I'm in love with the multiprocessor paradigm. Miraculous things can be folded into a serial processor like the SX, but it's tedious and exacting work, especially for real-time signal processing. The Propeller is a dream in this regard. I don't think I would be so stunned with the Prop if I hadn't spent so many years grovelling with other architectures.
So I guess I'd say, initially, that Propeller-based and low-parts-count are two of the more important criteria in my own quest.
Um, as cool as ZiCog is I have to disagree with this. The Z80 is pretty solidly 8-bit, having both an 8-bit ALU and an 8-bit path to memory. Nowadays it's the ALU people tend to look at, which is the excuse IBM gave for calling the 8088 16-bit back in the day even though it only had an 8-bit path to memory (and was by all subjective real-world application observations slower than a Z80 running at the same speed).
In the other direction the 804x and 805x series are considered 4-bit, despite having an 8-bit path to memory, because they have 4-bit ALU's and as a result typically take 30 clock cycles to perform one instruction.
With respect to self replication, CP/M can be recompiled on itself from scratch, but it is much faster to use a cross compiler on a PC, so it is one of those tasks that sounds cool but when you actually have it then you don't really end up using it. I suspect the same might apply to self replicating on the propeller. The big problem I see is getting hold of the source code for a compiler so you could translate it to a language you can run on the propeller - eg spin itself or C or basic. I've never quite worked out what the rules are on that - is it that there is source code available but only to people close to Parallax?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Sphinx comes with complete source.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Sphinx comes with complete source.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
I'm pretty sure I printed out the files on the byte-code interpreter for Smalltalk-80 years ago. If the rest of the files for the system were available, implementing the interpreter in PASM would be an interesting project.
There were a couple of points raised in the discussion though I'd like to comment on but don't warrant separate posts; in particular the whole 8 bit versus 16 bit CPU topic is a bit murky and kind of arbitrary.· The Z80 and particularly the 6809 both have 8 bit·external data busses but also have numerous 16 bit internal operations.· The 8080/8085 do also to a lesser extent but all are considered 8 bit CPUs.· However, the 8088 is considered a 16 bit CPU even though it appears to meet (at least·IMO)·the same criteria with 8 bit external data bus and 16 bit internal operations.· Honestly I don't know what the dividing line is but I think it comes down to a general consensus and historical tradition.· There really is no clear line of separation IMO.
Also, does anyone know what became of Mike Greene's CP/M Propeller development project?· I recall he was working on a tiny ez80 (?) based unit for a stand alone Propeller development kit.· I think it may have been tied to the PDB in some fashion but honestly the details are rather murky.· I am not sure I even remember this correctly. Does anyone recall the project or know what became of it?· Personally I think it would be great to sever the Propeller dependency on PC technology.· I believe the default Propeller IDE·is to use a Windows based PC with the Propeller software although there are many alternatives.· Moving to a self-hosting stand alone Propeller environment makes a lot of sense·to me at least.· Obviously I'd prefer·it with the N8VEM but I think it is a good idea regardless of the implementation.
Please keep us posted on your progress.· I find this is a very interesting subject.· Thanks and have a nice day!
Andrew Lynch
The 8051 (and 8048) has an 8-bit ALU.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
The Z80 development project got shelved when I got busy with other things and ran into problems interfacing with an SD card from the Z80 board. It's still in a drawer here. It consists of a Propeller Protoboard with a piggyback adapter board for a Zilog eZ80F91A Module. It did work using the eZ80F91A's flash memory for mass storage. There was a floppy used for a work area allocated in the static RAM and two read-only floppies for libraries and executables in the flash memory.
BTW, perhaps the greatest virtue of your system over what I'm proposing is that yours exists! Mine is utter vaporware, so far. But the satisfaction is in the journey.
The way I figure it, I need to create a simple editor in Spin to execute in one cog while another generates video signals and a third interfaces to the keyboard. A fourth cog would function as the interface to external bulk storage. That's pretty much what I'm working on at the moment. At some point it would be great is if I could figure out how to create Spin tokens and how to transfer the Spin executable in Prop ROM to a cog to interpret those tokens. But I'm not going to worry about all that right now.
If you want to create your own spin tokens you can do that - not a trivial task. However, there is enough info around for you to launch an object using the spin interpreter.
There was another editor project called "PrEditor" which was a big prop based editor but I do not have a link for this.
All this will run now on basically any prop hardware with an SD adapter.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Cluso99: Thank you! A cheap and very adequate kludge that saved time and dinero.
localroger: I love your avatar! It reminds me of the actor who played Burke Devlin on Dark Shadows.