Shop OBEX P1 Docs P2 Docs Learn Events
Catalina - a C compiler for the Propeller (now with TriBladeProp support) - Page 8 — Parallax Forums

Catalina - a C compiler for the Propeller (now with TriBladeProp support)

1234568»

Comments

  • RossHRossH Posts: 5,514
    edited 2009-07-05 07:48
    @All,

    Beta 5 of Catalina is available.

    See the first post in this thread for a list of updates. The major ones are the addition of a new support package for the Hybrid board, and the additon of an SD card-based file system - this requires a Propeller board that has XMM and can access the SD card at the same time (which is possible on the Hybrid, but not - alas - on the Hydra!).

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • teraquendyateraquendya Posts: 4
    edited 2009-07-05 08:32
    Alright,

    so are you going to be implementing an easier way to use multiple cogs anytime soon, or should i look at the code and play with it myself?
  • RossHRossH Posts: 5,514
    edited 2009-07-05 09:11
    @teraquendya,

    I have a small backlog of things to complete first (mostly related to supporting other XMM platforms), but top of my list after that is to extend Catalina to support multiprocessing. That's the main reason I wrote it in the first place.

    But if you want to add your own extensions in the meantime, feel free - I don't claim any great expertise in this area - just an abiding interest.

    And I'd really like others to contribute to Catalina.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,514
    edited 2009-07-06 04:39
    @all,

    Apologies - there is a typo in one of the Hybrid target files.

    I have posted the required fix in the first post of this thread.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,514
    edited 2009-07-08 03:51
    @All,

    I've temporarily removed the Catalina source code and binaries because I've discovered a significant problem in the XMM Kernel.

    I'm testing a fix now, and expect to have a new version up later today.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,514
    edited 2009-07-08 12:13
    @All,

    A new version of beta 5 has now been uploaded. The problem I found only affected some programs compiled to run from XMM RAM and the fix turned out to be fairly minor, so I'm not creating a whole new release.

    The compiler, binder and libraries are unaffected, so if you have already downloaded the previous beta 5 release you don't need to download either the documentation or source distributions again - just get the binary distributions.

    I also noticed that the information in the demo README files was out of date, so you should also download the demo programs again.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,514
    edited 2009-07-17 05:12
    @all,

    Someone just pointed out to me that it is not sufficient to simply download the 'source' distributions to use Catalina. The source distributions contains only the source code to the compiler, libraries and utilities - they do not contain the various target packages that you will need to actually run the compiler. Those are only contained in the 'binary' distributions.

    So even if you intend to build the compiler from scratch, you should still download both the binary and the source distributions.

    I have added a note to the posts containing the various distribution files. Apologies for any confusion.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • PainlessPainless Posts: 69
    edited 2009-07-25 02:42
    Hi Ross,

    Just wanted to let you know that I finally had a chance to check out your C compiler under Linux and I have to say I'm impressed! If this is a beta release, I can't wait to see what the future holds.

    I did find the target system a bit of a stumbling block at first, but after a little reading of your reference manual I was able to figure out how to get the pin assignments where I need for the correct target. I've soldered up my PropRPM with demoboard pin standards and wanted to use TV output, I ended up modifying the hydra targets clock, tv and pin assignments to get things how I wanted.

    I spend a lot of my propeller time where I only have a serial terminal for HMI purposes and would like to see a target designed to accommodate such, perhaps when I dig deeper I'll figure out a way of achieving this.

    Congratulations and thanks for a great FREE product!

    Russ.
  • RossHRossH Posts: 5,514
    edited 2009-07-25 07:27
    Hi Painless,

    Glad you got it working, and thanks!

    You may be interested in the set of targets I'm now preparing for Cluso99's TriBladeProp - it will include a couple of new HMI plugins that allow the use of the PC as the Catalina HMI - with all the usual mouse, keyboard and screen support functions (mouse support is only available if you use PropTerminal, but if you don't the mouse then any terminal emulator will do).

    This should be available in a day or two (fingers crossed that I get enough time!).

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-07-25 08:51
  • RossHRossH Posts: 5,514
    edited 2009-07-29 15:21
    @All,

    Just a quick post to alert all TriBladeProp users that the Catalina Target Package for the TriBladeProp is now available.

    The package is avilable in the first post in this thread. The Catalina_tribladeprop.zip file contains the new sources and binaries for both Linux and Windows. It includes a new version of the Catalina Binder program (sources and binaries).

    Note that the target package is not a full release - it must be installed over the top of an existing Catalina beta 5 source/binary installation. If you don't have a TriBladeProp, it is probably not worth downloading this package just for the new Binder - I will include that in a general release soon.

    Here's a very quick summary of the TriBladeProp support:
    • All three blades can be used to run Catalina C programs. Targets are provided for all three blades:
      • Blade #1 has all the normal HMI targets are available for using the screen, keyboard and mouse. Also, this blade has an optional 512Kb of XMM RAM available.
      • Blade #2 has an SD Card and an optional 1Mb of XMM RAM available. This blade can be used to load programs from the SD Card and either execute them on this blade (using a PC terminal emulator as the HMI) or download them for execution to another blade.
      • Blade #3 can be used to execute I/O control programs. It also can use a PC terminal emulator as the HMI.
    • A new plugin to support using the PC as the HMI via a serial port is provided.
    • A new plugin to support serial communications between Propellers is provided.
    For complete informatiom, see the README.TriBladeProp - I have enclosed a copy with this post.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina

    Post Edited (RossH) : 7/29/2009 10:51:18 PM GMT
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-07-29 15:31
    Fantastic news Ross smile.gif I am finally headed for Gosford on the weekend and hopefully a few days to build another TriBlade and finish the other 2 designs too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • RossHRossH Posts: 5,514
    edited 2009-07-29 23:34
    @Painless (and others)

    The new TriBladeProp Target Package contains a plugin that is applicable to other platforms as well. The file Catalina_HMI_Plugin_PC.spin in the target_tribladeprop directory (you also need Catalina_PC_Keyboard.spin and Catalina_PC_Text.spin) use pins P30 and P31 of the Prop for serial comms, and maps them to the standard C stdin and stdout streams. This allows the use of a terminal emulator on the PC as the screen and keyboard from within Catalina C programs.

    You will have to create your own targets that use this HMI plugin - for an example, see lmm_pc.spin

    This plugin is based on drivers provided by Andy Schenk of Insonix (the creator of PropTerminal) - but will work just as well with any terminal emulator. A PropTerminal specific version (Catalina_HMI_Plugin_PropTerminal.spin) which will also support using the PC mouse is still under development, but is not working yet (I hadn't actually intended to include it in this release - please ignore it!).

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,514
    edited 2009-07-29 23:41
    @Cluso,

    That's good news - hope we get the chance to catch up. What a shame that the current shortage of DIP40 Propeller chips is likely to curtail the sales of the TriBladeProp for a while - it really is a great board (although my wife doesn't think so since it has taken up so much of my spare time for the last couple of weeks - if you develop any more boards I'll have to get you to send them to me in a plain brown wrapper so she won't get suspicious!)

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-07-30 00:33
    Ross tongue.gif

    Definately will have to·catch up.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • teraquendyateraquendya Posts: 4
    edited 2009-07-30 23:20
    Hey,
    loving it so far.

    Right now i was wondering if it would be possible to interface C code compiled with Catalina and SPIN code? I assume it would be possible to compile to assembly and copy it over, but would this cause issues with the kernel?
  • RossHRossH Posts: 5,514
    edited 2009-07-31 00:19
    Hi teraquendya,

    Thanks. I also would like to have SPIN programs coexist with Catalina. I have given it a little bit of thought, and I believe the simplest way is to allow the Hub RAM to be 'partitioned' between SPIN and Catalina.

    Instead of Catalina assuming it can use all 32Mb of Hub RAM, once it starts it would have to know to only use Hub RAM from some partition boundary up to $7FFF for Catalina programs - but it would also know how to load and execute SPIN programs in the area from Hub RAM address $0000 up to the partition boundary. Catalina would then start one cog specifically as a SPIN interpreter (maybe even using Cluso's 'improved' SPIN interpreter) as well as one cog to execute the Catalina kernel. After that, both SPIN and Catalina would compete for the remaining cogs.

    As long as both the Catalina programs and the SPIN programs behaved themselves and didn't cross the partition boundary, they should be able to coexist. To allow commmunication between SPIN and C, I would provide a 'shared memory' buffer (and provide both C and SPIN routines to access this buffer) - probably using the Propeller's 'lock' mechanism to ensure the buffer's integrity.

    The complicated part is all the changes this would require to the Catalina startup process. The process for loading Catalina programs to XMM from EEPROM, SD Card, or via serial I/O from another Prop (this last one is new for the TriBladeProp!) is already very complex - and now all the various loaders would also have to know how to load and execute SPIN programs.

    As usual, the main problem is time. At the moment I only get to work on Catalina in odd hours (unfortunately I still have to work for a living!) and there are also lots of other things I need to do first.

    For example, I need to finish Catalina's XMM support. After working on Cluso's TriBladeProp (which has two different XMM implementations on the one board) I have put a bit of effort into developing a 'standard' Catalina API for accessing XMM, and I need to get this rolled out to the other Catalina platforms (Hydra, Hybrid etc). I've also promised Bill Hennning to put Catalina on his new Morpheus platform - although after the TriBladeProp I expect this to be relatively straightforward.

    I am also working on finalizing the Kernel design I will need for what I expect to be Catalina's final XMM memory model - which I expect to support 16Mb of shared code/data/heap space (in XMM RAM) and up to 32Kb of stack space (in Hub RAM). It makes sense that while I am doing this I should implement the 'partition' concept to simplify future SPIN/Catalina coexistence.

    It's hard to put a timeframe on all this, but I'd say it will be months rather than weeks - the more complex Catalina gets (and the more platforms I support) the longer it takes me to do any significant development work.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina

    Post Edited (RossH) : 7/31/2009 12:37:19 AM GMT
  • RossHRossH Posts: 5,514
    edited 2009-07-31 02:20
    @teraquendya,

    No sooner do I write the above than I find this mentioned in another ongoing thread (credit: BradC). It seems SPIN is relocatable, so it may be a lot simpler than I thought just to execute a simple small SPIN program from C - just reserve a suitably sized block of Hub RAM space (use a static global array of longs in C unless you will also shut the SPIN program down again), load the spin program into it, then execute the appropriate coginint function.

    Anyone want to try this?

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • PainlessPainless Posts: 69
    edited 2009-07-31 18:59
    RossH said...
    @Painless (and others)

    The new TriBladeProp Target Package contains a plugin that is applicable to other platforms as well. The file Catalina_HMI_Plugin_PC.spin in the target_tribladeprop directory (you also need Catalina_PC_Keyboard.spin and Catalina_PC_Text.spin) use pins P30 and P31 of the Prop for serial comms, and maps them to the standard C stdin and stdout streams. This allows the use of a terminal emulator on the PC as the screen and keyboard from within Catalina C programs.

    You will have to create your own targets that use this HMI plugin - for an example, see lmm_pc.spin

    This plugin is based on drivers provided by Andy Schenk of Insonix (the creator of PropTerminal) - but will work just as well with any terminal emulator. A PropTerminal specific version (Catalina_HMI_Plugin_PropTerminal.spin) which will also support using the PC mouse is still under development, but is not working yet (I hadn't actually intended to include it in this release - please ignore it!).

    Ross.

    Awesome, Ross! I'll give that a try!

    Russ.
  • RossHRossH Posts: 5,514
    edited 2009-08-15 11:19
    @all

    I have updated the TriBladeProp support package (available in the first post in this thread) to include a new PropTerminal compatible HMI plugin (and also a new target and a demo program that uses it). This plugin allows the use of the PC's screen, keyboard and mouse as the Catalina HMI. The new plugin is not TriBladeProp specific, and could also be used on other platforms, such as the Hydra or Hybrid.

    The TriBladeProp update also fixes a problem with the EMM targets, and a problem that may have prevented a blade from rebooting properly after a program was loaded using the generic program loader.

    The new demo program is called test_propterm.c. To compile this program to use the new PropTerminal target, use a command such as:

    lcc test_propterm.c -lc -Wl-tpropterminal -o test_propterm

    This will produce a binary called test_propterm.binary. The easiest way to load this binary into the TriBladeProp (it can run on any blade) is by using PropTerminal itself - i.e. start PropTerminal and then use the 'File->Upload File' menu option. Note that the PropTerminal window should be set to 40 chars by 13 lines - the propterminal plugin assumes this size for compatibility reasons (but this can be modified if required).

    The demo program displays some startup information, then allows you to either type text or press a mouse button - text typed appears at the current cursor position. The cursor position is also displayed at the bottom of the screen whenever a character is typed. Mouse button 0 sets the cursor position to be the position pointed to by the mouse, and also displays the results of the m_bound functions at the bottom of the screen. Mouse button 1 does not change the cursor position, but displays the results of the m_abs functions (representing the absolute position of the ouse) at the bottom of the screen.

    The following notes apply to the new PropTerminal plugin:

    1. You must clear the keyboard - i.e. call k_clear() - at the start of your program to avoid getting a spurious first character.

    2. There appears to be something slightly amiss with the way PropTerminal scales the mouse (at least on my machine - YMMV). I have to set the mouse scaling as xscale=8, yscale=17 for my mouse to work correctly - i.e. I call m_bound_scales(8, 17, 0). The symptoms of incorrect scaling are apparent when using the demo program - press and release the left mouse button to set the cursor position and then type a character. The character should appear where the mouse is pointing - if the character appears elsewhere the scaling is probably not set correctly.

    3. PropTerminal does not implement button 2 (the middle button or scroll wheel) - only buttons 0 and 1 will work correctly.

    4. When using the mouse, you are limited to screen sizes no larger than 64 cols by 32 rows - this limitation is due to the way PropTerminal sends mouse events. If you don't need a mouse, you can use larger screen sizes. To set a new screen size, you must modify the file Catalina_PC_Text.spin, and also edit the file propterm.ini (and load the updated ini file into PropTerminal).

    5. PropTerminal only supports one cursor position. You should use either cursor 0 or cursor 1 - but not both. If you want to write to the screen at a different cursor position, save the cursor position first, set the new cursor position, write to the screen, then restore the original cursor position - the demo program illustrates how to do this.


    Ross.

    P.S. Sorry this new plugin has taken so long - I haven't had much time to work on Catalina recently. I'm still working on the next major release which will include the new XMM model - but I can't currently estimate when this release will be available.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-08-15 11:30
    Nice work Ross smile.gif
    P.S. I am back on the coast but I don't know for how long.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80), MoCog (6809)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • RossHRossH Posts: 5,514
    edited 2009-08-15 12:32
    Hi Cluso,

    This weekend and next are both pretty much a writeoff for me - SWMBO has declared this weekend to be a 'gardening' weekend because of the weather (oh, my aching back!) and next weekend we have a couple of family events we have to go to.

    Our catch up may have to wait till your next trip down this way.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,514
    edited 2009-08-16 00:17
    @all,

    One of the files in the catalina_trlblade.zip file necessary for PropTerminal mouse support was an old (broken) version. I have uploaded a new version of the package (available in the first post in this thread).

    Please download the package again - sorry.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • RossHRossH Posts: 5,514
    edited 2009-09-29 09:53
    @All,

    Catalina 2.0 (the first non-beta version) has now been released. I have started a new thread for the new series of releases here.


    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina

    Post Edited (RossH) : 9/29/2009 10:42:37 AM GMT
Sign In or Register to comment.