 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > Catalina 2.6 - a FREE C compiler for the Propeller - The Final Frontier! | Forum Quick Jump
|
|  RossH Registered Member

       Date Joined Jun 2008 Total Posts : 1061 | Posted 9/29/2009 1:41 AM (GMT -7) |   | Catalina 2.6 has been released. Catalina is a FREE ANSI compliant C compiler for the Propeller.
From release 2.6 onwards, Catalina will be hosted and released via SourceForge - see catalina-c.sourceforge.net. At present you will see only a default sourceforge project page - but you will find a link to the project downloads on that page. Since SourceForge has generous file size limits, each of the Windows and Linux distributions are provided in a single download containing all documentation, source code and binaries - this should simplify the download and installation process. The documentation is also available separately.
You will also find a button on the Sourceforge project page that enables you to donate money to support Catalina! All donations will be used to enhance Catalina - in particular, to allow Catalina to be ported to additional Propeller platforms.
RELEASE 2.6 ========
The main addition in release 2.6 is support for running C programs on all eight Propeller cogs simultaneously. Programs demonstrating this capability are included in the demos\multicog directory. There are also other minor enhancements - see the attached README.WhatsNew file for more details.
PREVIOUS RELEASES ==============
RELEASE 2.5
The main additions/changes in this release were as follows:- Catalyst has been added. Catalyst is an enhanced program loader and a set of utility programs that simplifies the execution of Catalina programs - especially on platforms with both XMM RAM and an SD card.
- Many of the Catalina curiosities have now become fully integrated Catalyst programs, with several new additions such as the Lua scripting language and a fully ISO compliant P5 Pascal compiler. See the Catalyst Reference Manual for full details. The Catalyst source is in this thread, but pre-built binaries for various platforms are available in the Catalyst thread (here).
- RamBlade support. The SD card, XMM RAM and serial HMI options are fully supported.
- Speed improvements to Dumbo Basic - this is still a work in progress, but programs are now tokenized on load, allowing Dumbo Basic to execute between 150 and 200 BASIC statements per second (depending on XMM RAM speed).
- Various other minor speed improvements on all platforms.
- Enhancements to the command-line option processing - Catalina now detects nearly all incompatible option combinations (e.g. trying to compile an XMM program to run on the TriBladeProp CPU #3, or using the TV HMI option on Morhpeus).
- Lots of improvements in the scripts - e.g. simplified and consistent 'build_all' scripts are now included for all programs. Also, many dependencies on Catalina being installed in the default location have been fixed.
- Inclusion of the C99 standard files 'stdint.h' and 'stdtype.h'.
- Payload enhancements - Payload can now program files into EEPROM as well as just loading them into RAM.
- The inclusion of Kye's FATEngine in place of FSRW (used during program loading). This allows more sophisticated file management in Catalyst. Unfortunately, the latest version of FATEngine arrived too late to be incorporated in this release - but it may be added in future.
- Various bug fixes and minor improvements - see the attached README.WhatsNew file for details.
With this release, Catalina now provides a complete C development environment for the Propeller. While bugs will continue to be fixed and small optimizations (such as Kye's new FATEngine) may be incorporated, no further significant enhancements are expected. A code optimizer is being developed to reduce code size and increase speed, but Catalina already meets or exceeds its original design goals, so this will probably not be released until the arrival of the Prop II - on that platform Catalina will really be able to fly!
A Note on Lua
Lua is an embedded scripting language probably best known for its use within various game engines such as "World of Warcraft". My original intention was to use it in Catalyst to do the equivalent of Unix shell scripting or DOS batch files - and I may still do this in a subsequent release of Catalyst - but it is also a powerful standalone interpreted language.
RELEASE 2.4
The major functional changes in Release 2.4 were as follows:- Support for two source level debuggers - BlackBox and BlackCat.
- BlackBox is a command line debugger that runs under Linux or Windows, and is included with this release.
- BlackCat is a graphical debugger for Windows, developed by Bob Anderson, and is available here.
- Support for ViewPort. Note that you need the latest release of ViewPort available here.
- A new program loader - Payload. Payload runs under Linux or Windows, and can load normal programs, or Catalina LMM and XMM programs using a serial connection from a PC.
- Improved multi-user support under both Windows (esp. Vista & Windows 7) and Linux.
- Various bug fixes and minor improvements.
- Improved documentation - including a new tutorial style introduction to Code::Blocks and BlackBox, and a BlackBox Reference Manual (the Payload documentation is included in the Catalina Reference Manual).
The source level debugger support has taken so long that several things that were originally going to be included in this release haven't made it - they will be held over to release 2.5: - Kernel optimizations. - Command line arguments. - Multithreading support.
RELEASE 2.3:
This release added support for the Code::Blocks Integrated Development Environment, for those who prefer not to use a command line compiler. You must download and install Code::Blocks separately (here), and then see the file README.Codeblocks in the Catalina codeblocks subdirectory (included in the file Catalina_demos_utilities.zip) for details on how to configure and use Code::Blocks with Catalina. Here's a peek of what it looks like:

RELEASE 2.2:
This release added significantly improved support for Multi-CPU Propeller systems. It added support for Morpheus, and proxy driver support for all multi-CPU systems (currently supported are Morpheus and the TriBladeProp).
In multi-CPU systems, proxy drivers allow all devices to be used by a Catalina program as if they were local devices - even if those devices are physically connected to another CPU. For example, on Morpehus CPU 1 has a keyboard, mouse and SD Card interface, while CPU 2 has XMM RAM and a VGA display. You can now run a Catalina LMM program on CPU 1 and give it access to the VGA display on CPU 2, or (probably more common) you can run an XMM program on CPU 2 and give it access to the SD card, keyboard and mouse attached to CPU 1. Catalina provides a proxy device server to run on the CPU that has the devices physically attached.
The commands to build proxy programs are slightly more complex than normal, but not too difficult once you get used to it. Here is an example:
To compile a client program for Morpheus that will run on CPU 2 but use the devices connected to CPU 1, the command would be something like:
catalina Test_Program.c -lc -D MORPHEUS -D CPU_2 -D PROXY_KEYBOARD -D PROXY_MOUSE -D PROXY_SD To compile a proxy device server program to run on CPU 1, the command would be something like:
catbind -p -D MORPHEUS -D CPU_1 homespun Generic_Proxy_Server Loading the resulting programs can be complex, but the Catalina SD Card and Serial I/O program loaders can be used to do this. The Catalina documentation has been updated and the tutorial now includes examples of using proxy devices.
RELEASE 2.1:
There were no functional changes in release 2.1. Only minor bug fixes and documentation updates.
RELEASE 2.0:
The most significant change from the last 'beta' release is that Catalina now supports three different addressing modes:- Tiny - all code and data share the 32Kb of Hub RAM. This mode is used by all LMM and EMM programs, and is suitable for use on any Propeller platform.
- Small - code can be up to 16Mb, but all data (including the stack and heap) must still share the 32kb of Hub RAM. This is the original XMM mode as implemented in the various beta releases. It requires dedicated XMM hardware.
- Large - code, data and heap can be up to 16Mb (combined), and only the stack uses the 32Kb of Hub RAM. This mode uses a completely new code generator (the previous code generator remains in use for the other modes), and also an enhanced XMM Kernel. This mode also requires dedicated XMM hardware. When the Prop II eventually surfaces, the space available for stack under the Large addressing model is expected to be increased to 256Mb.
However, note that 'larger' is not always 'better' - programs that use the larger addressing modes will generally be slower than programs that use the smaller addressing modes. A programs should always use the smallest addressing mode it can.
Enjoy!
Ross.
Edit: added Patch Release (22 Jun 10) Catalina - a FREE C compiler for the Propeller - see CatalinaPost Edited (RossH) : 7/1/2010 1:06:33 PM GMT
File Attachment : README.WhatsNew 4KB (application/octet-stream)This file has been downloaded 18 time(s). | | Back to Top | | |
      |  RossH Registered Member

       Date Joined Jun 2008 Total Posts : 1061 | Posted 9/29/2009 1:47 AM (GMT -7) |   | A Catalina Curiosity ...
This is "Bywater BASIC" for the Propeller - a complete BASIC development system. Bywater BASIC provides a self-contained BASIC development environment with floating point and real-time clock support, plus file system support which can be used to load and save BASIC programs, as well as read and write arbitrary data files. Full source code and documentation is included, and is also available here.
The only problem with Bywater BASIC is that while it is 100% functional on the Propeller, it is also EXCRUTIATINGLY SLOW! - BASIC programs execute at about 10 statements per second! This is partly because of some inefficiencies in Catalina's new large addressing model, but it is primarily a problem inherent in Bywater BASIC itself - it is an extremely inefficient BASIC interpreter. Even on a 3GHz PC its performance is fairly ordinary, so it is not too surprising it struggles on an 80Mhz Propeller cog!
I don't seriously intend for anyone to use this program - I'm just kind of amused at how I have managed to turn one of the world's fastest microcontrollers into the world's slowest BASIC interpreters. In reality, I have been using Bywater BASIC as a comprehensive stress test of the new Catalina code generator and the large addressing model kernel - but eventually (as I optimise Catalina over time) I expect its performance will improve.
Catalina compiles the 33,000 lines of Bywater's ANSI C source code, requiring only one modification (a single one-line change to fix a non-ANSI 'return' statement - lcc is much pickier about ANSI compliance than gcc).
The version enclosed is Bywater Basic version 2.4 - this seems to be the most robust version, but version 2.5 also compiles and runs.
On the TriBladeProp the program should be run on blade #2, which must have 1Mb of XMM RAM and an SD card installed, or on the Hybrid with the HX512 Extreme SRAM card installed (with epmoyer's firmware modfication). Because the HX512 only has 512Kb RAM the program runs short of memory on the Hybrid and I have made some configuration changes to reduce the memory footprint - but on the TriBladeProp (with 1Mb of RAM) it runs unchanged. Note that the program cannot be run on the Hydra because the Hydra cannot simultaneously use an SD Card and the HX512 SRAM Card - and Bywater BASIC requires both.
To compile Bywater BASIC under Windows, use the enclosed 'compile.bat' batch file, specifying either TRIBLADEPROP or HYBRID on the command line (do not also use the CATALINA_DEFINE environment variable, or you will get symbols defined multiple times).
To run the program, compile it and copy the resulting binary to a FAT16 SD card (renamed with an 8.3 compilant filename such as 'BASIC.BIN'). This binary can then be loaded using the latest version of the Catalina Generic SD Card Loader (included with Catalina)
On the Hybrid, Bywater BASIC uses the built-in TV output and keyboard. On the TriBladeProp it uses PC emulation drivers for screen and keyboard, and can be used via the Parallax Serial Terminal emulator (or any other PC terminal emulator).
(And don't say I didn't warn you about it being SLOOOOOOW!)
Ross.
Edit: With the release of Catalina 2.3, all the Catalina Curiosities have been collected into the various source and binary releases. Catalina - a FREE C compiler for the Propeller - see CatalinaPost Edited (RossH) : 6/7/2010 8:29:29 AM GMT | | Back to Top | | |
     |  w8an Android Inspector

       Date Joined Jul 2009 Total Posts : 141 | Posted 9/29/2009 6:40 PM (GMT -7) |   | | | |
  |  Greg LaPolla Registered Member

       Date Joined Feb 2009 Total Posts : 148 | Posted 9/29/2009 8:44 PM (GMT -7) |   | RossH,
I like what you did with the environment issues, it's easier to install in a different location. I just upgraded to Windows 7 64bit. After recompiling (32 bit), it works like a champ.
Greg | | Back to Top | | |
  |  Javalin Got a Propeller, need some SPIN?
        Date Joined Jul 2004 Total Posts : 768 | Posted 9/30/2009 8:00 AM (GMT -7) |   | RossH,
Couple of questions - you may have been asked before but....
1) Supportability - how long do you plan to work on this / support it? Can code be moved from this to say the Imagecraft C if you stop supporting it?
2) Speed. Do you have any comparisons with SPIN for speed? IccV7 is about 5x faster.
Not downloaded it yet - but looks great - good effort.
James | | Back to Top | | |
  |  RossH Registered Member

       Date Joined Jun 2008 Total Posts : 1061 | Posted 9/30/2009 3:12 PM (GMT -7) |   | Hi Javelin,
I expect to work on Catalina till I have all the bugs ironed out - maybe forever But seriously, I believe it's very close to the level of maturity where I won't need to be the only one willing or able to support it. That's what the open source model is about, after all. If it's not there yet then I expect to reach this point within the next release or two - now that the design is finalized, it's more about just tracking down a few annoying bugs and improving the documentation than anything else.
As to portability, Catalina will always be as close to ANSI C as I can make it. This is what makes it possible to take C programs off the net (like 33,000 lines of Bywater Basic source code) and compile and run them essentially unchanged. This should also mean that any software developed for Catalina should also be very portable - except possibly for the Propeller-specific stuff (such as cog/hub interactions). But there I've tried to keep the code as simple and as close to the original Parallax model as possible, so even this should just require a small tweak or two to port to another C compiler. To be honest, I've not even looked at what Imagecraft does in this area, but I'd be fairly confident in saying that a simple set of "wapper" functions (or possibly even just a set of macros) would be enough to insulate C programs from any differences here.
I haven't done any speed comparisons, but I would expect Catalina's LMM kernel to run at a comparable speed to Imagecraft - perhaps a bit faster in some areas, perhaps a bit slower in others. There are lots of speed optimizations yet to do - these have been left out ot the current release due to lack of time & space. Of course Catalina slows down considerably when using the XMM kernel - this is largely dependent on the XMM hardware and is outside software control. But I expect that with good XMM hardware Catalina C might still have a speed advantage over SPIN.
Ross. Catalina - a FREE C compiler for the Propeller - see CatalinaPost Edited (RossH) : 9/30/2009 11:18:07 PM GMT | | Back to Top | | |
  |  Baggers Registered Member

       Date Joined Mar 2007 Total Posts : 2133 | Posted 10/1/2009 1:14 AM (GMT -7) |   | | | |
 |  Drone Registered Member

       Date Joined Mar 2007 Total Posts : 417 | Posted 10/1/2009 2:35 AM (GMT -7) |   | Does Catalina 2.0 support double precision math?
David | | Back to Top | | |
   |  RossH Registered Member

       Date Joined Jun 2008 Total Posts : 1061 | Posted 10/1/2009 4:59 AM (GMT -7) |   | Another Catalina Curiosity ...
This is JZIP - an Infocom game interpreter from the grand old days of text-based computer games.
With this interpreter, and suitable game files, you can play all the Infocom greats - Zork, Deadline, Suspended, Witness, Hitchhikers Guide to the Galaxy, A Mind Forever Voyaging, Starcrossed ... etc etc ... all on the Propeller!
I have included a binary of JZIP for both the Hybrid (H_JZIP.BIN) and for the TriBladeProp (T_JZIP.BIN) as well as game files for Zork I, Zork II and Zork III - downloaded (legally) from http://www.infocom-if.org.
Other Infocom game files can be located on the internet, but they are probably illegal. However, if you happen to have a copy of these games, I believe all you need to do is copy the appropriate ".DAT" file from your original disks.
To play these games using the JZIP binaries enclosed, you will need a Hybrid with a HX512 SRAM card (with epmoyer's firmware mod), or a TriBladeProp with 1Mb SRAM installed on Blade #2. As with Bywater Basic, on the Hybrid I use drivers for the built in TV and keyboard, and on the TriBladeProp I use the PC terminal emulation drivers.
You need to copy the file H_JZIP.BIN or T_JZIP.BIN onto a FAT16 SD card along with the game you want to play - note that you must rename the game file to be GAME.DAT, since you cannot specify the file name to JZIP at run time.
You must load the executable with the Catalina Generic Program Loader (available as part of Catalina).
I have included the source, along with a dummy "wrapper" program called "catalina_jzip.c" which simulates the entry of a command line to jzip. There is a makefile called Catalina.mak which will work under MinGW - you can compile it for the TRIBLADEPROP using:
set CATALINA_DEFINE=TRIBLADEPROP BLADE_2 PC make -f catalina.mak clean make -f catalina.mak
or for the HYBRID using:
set CATALINA_DEFINE=HYBRID make -f catalina.mak clean make -f catalina.mak
HOWEVER, please note that while the binaries included are ok, this source will NOT COMPILE CORRECTLY under release 2.0 of Catalina - I found a bug (drat!) while testing it that means they have to be compiled under release 2.1 - which I will release as soon as I finish completely testing a few more things - I just though that this was too cute to wait for!
UPDATE: This program now compiles correctly under Catalina release 2.1.
I can't claim the performance of the games is outstanding, but they are quite playable. The only problem (for me at least, since I'm such a lousy typist) is that the backspace key doesn't work!
Note there are NO changes to the original JZIP source code required to compile and run JZIP under Catalina - but I have added a couple of progress messages that are displayed while the game is loading and initializing from the SD Card, since this can take about 30 seconds.
Enjoy!
Ross.
Edit: With the release of Catalina 2.3, all the Catalina Curiosities have been collected into a single zip file - see the second post in this thread. Catalina - a FREE C compiler for the Propeller - see CatalinaPost Edited (RossH) : 12/29/2009 6:43:45 AM GMT | | Back to Top | | |
 |  Rayman Registered Member
        Date Joined Jul 2007 Total Posts : 3127 | Posted 10/1/2009 5:33 AM (GMT -7) |   | | | |
 | 327 posts in this thread. Viewing Page : | | Forum Information | Currently it is Thursday, July 29, 2010 5:21 PM (GMT -7) There are a total of 462,441 posts in 62,066 threads. In the last 3 days there were 90 new threads and 802 reply posts. View Active Threads
| | Who's Online | This forum has 20143 registered members. Please welcome our newest member, ME01. 58 Guest(s), 14 Registered Member(s) are currently online. Details John Abshier, Erik Friesen, Kevin Wood, simpsonmichael1, BradC, David Betz, Julian800, Martin Hodge, prof_braino, Harley, Sapieha, wiresalot, Ravenkallen, Tubular |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2010 |
|
|