Catalina

I have just added the release version of Catalina 4.9.4 to SourceForge. This release is for both Windows and Linux.
The main purpose of this release is to add a new serial interface option that saves a cog.
Here is the relevant section of the README file:
Ross.
The main purpose of this release is to add a new serial interface option that saves a cog.
Here is the relevant section of the README file:
RELEASE 4.9.4 New Functionality ----------------- 1. Added a new serial HMI option called SIMPLE (supported on the P2 only). This option uses P2 smartpins to implement a very simple serial interface. The advantage of the new HMI option is that it saves a cog over the default serial HMI option (TTY). The disadvantage is that may not support very high baud rates - but baud rates up to 230400 are supported, which means it is sufficient for a serial terminal. To use it, define the symbol SIMPLE on the command line. For example: catalina -p2 -lci hello_world.c -C SIMPLE payload -i -b230400 hello_world.bin 2. The serial baud rate can now be specified on the command line, either by using the -B command line option, or by defining the symbol _BAUDRATE using a complex definition such as -C "_BAUDRATE=xxx". This is supported on the Propeller 2 only. The payload loader now also accepts -B to specify the baud rate - i.e. payload now accepts either -b or -B (whereas catalina only accepts -B since -b already meant something else). For example: catalina -p2 -lci -B9600 hello_world.c payload -i -B9600 hello_world.bin or catalina -p2 -lci -C "_BAUDRATE=9600" hello_world.c payload -i -B9600 hello_world.bin If it is not specified on the catalina command line, the default baud rate defined for the platform (in Catalina_platforms.inc in the target_p2 directory) will be used. Other Changes ------------- 1. Complex symbols had not been implemented in the Catalina Optimizer, which meant that the optimizer could not be used if the command line contained a complex definition such as: -C "name=value" 2. Payload now allows baud rates down to 300 baud. There was really no reason payload ever limited the baud rates (it used to impose a minimum of 19200 baud) except that at the lower baud rates the program load times become so long that it was not much use. However, this was before payload could also be used as a serial terminal emulator, and in some cases low baud rates are useful for testing. However, note that the P2 smart pin UARTs use a 16-bit value for baud timing which can limit baud rates - to use baud rates lower than 4800 baud you may need to also specify a lower system clock frequency. For instance, to use a baud rate of 300 baud, you may need to use a clock speed of 12Mhz or lower: catalina -p2 -lci hello_world.c -C SIMPLE -B300 -f12Mhz 3. There was a bug in the Catalina HMI "t_bin()" function, which prints the 32 bit binary representation of its integer or unsigned argument. The value was effectively being shifted left by 3 bits.
Ross.
Comments
I just installed the latest version to see if it could run this MicroMax Chess code...
It compiles and run, but just like FlexC, it hangs if you hit enter when it is supposed to look for a move.
You can manually move pieces by entering moves like "e2e4", but also just like FlexC, there is something wrong with the black pawns... They don't move, for example.
Anyway, don't expect you to do anything about it, just letting you know I'm testing out Catalina.
This code was designed to use as few a characters as possible, which seems very silly to me... I imagine why that is why compilers might have a hard time with it...
The interface asks how many seconds to give computer. If you say "0", it moves right away. If you say "1", it thinks longer that I could wait for...
Also, it can't find the opening book file even though I put it on the uSD card of the Eval board...
I did the compile and load like this:
Seems to work ok for me. But I must admit I only played a few moves, because each move takes a looooonnnnnggg time!
What are you running it on, and what command did you use? I ran it on a P2, and used the command:
I haven't looked at the code, but to use the SD Card you need to use -lcx instead of -lc
I was interested as to why the MicroMax chess program is so slow, so I did some measurements on it. I only did a couple of runs, but the reason becomes clear almost immediately - most of the work is done by one function (D), which is recursive. This very complex function gets called anywhere between 200,000 and 500,000 times while searching for the best move, and it recurses to a depth of 25 or so calls.
I think the author was concentrating on program size, not speed!
Ross.
This code seems to work with Catalina. Rigged for computer vs computer.
Had to bypass the millis() function though.
In FlexProp, there is now _getms().
Not sure this is really used by the chess engine itself, so I didn't bother to fix it.
BTW: Is there a way to escape from the payload terminal and get back to command line?
CTRL-D
Catalina 4.7 has been released (currently, Windows only). See the first post in this thread for details.
Just installed... Windows complained a lot, but was able to get it to install.
Seem to be missing the "Catalina Command Line" shortcut in the start menu. But, I found it in the install folder.
It does still build a chess program I tried before with Catalina, NGplay_61.c, so that's good.
Tried to compile lvgl (https://github.com/lvgl/lvgl), but it's not finding the include files...
There are about a thousand include files...
Catalina does not seem to be finding them.
I'm sure I'm doing something wrong...
This is asking a lot, but if you want to see what I'm looking at...
The build.bat file in the attached tries to compile lvgl_test1.c
It looks like it finds include files in the current directory, but not in the \src directory tree...
Hi Rayman
Will have a look tomorrow.
rossh
There is something wrong with your directory structure. Here is first error message I get, with an example of the problem:
So, decoding that:
lvgl_test1.c includes ./lvgl.h at line 3
./lvgl.h includes ./src/misc/lv_log.h at line 25
./src/misc/lv_log.h includes ./lv_conf_internal.h at line 16
./lv_conf_internal.h includes ../../lv_conf.h at line 41
But from the location you are compiling lvgl_test1.c there is no ../../lv_conf.h - however, there is one at ./lv_conf.h
rossh
Odd. Works ok for me. What version of Windows are you using?
rossh
Latest Win10. I still had the last version installed though. Maybe that messed it up somehow…
Thanks for looking at the code issue. Looks like an easy fix.
I have updated payload to allow it to be used to program FLASH RAM on the P2 without needing to reset the microswitches on the P2_EVAL board. This required a modification to the Propeller version detection code (basically, you can now override it and manually specify your Propeller version). This update allows payload to correctly use the 100ms serial window on the Propeller 2.
Attached is a zip file containing the new version of payload and the updated README_P2.TXT file. This version will be included in Catalina 4.7 when I have finished testing the current beta release. Here is an extract from the updated README_P2.TXT file:
rossh
I have just uploaded a validated (i.e. non-beta) release of Catalina 4.7 to sourceforge. This release is for both Linux and Windows. There are a few changes from the beta release:
See the first post in this thread for more details.
rossh
I've just uploaded Catalina 4.8 to Sourceforge. There aren't many differences to 4.7, so I've also uploaded some small "patch" files to the errata directory (https://sourceforge.net/projects/catalina-c/files/errata/) which you can use to upgrade an existing 4.7 release to 4.8 without having to download and install the whole new release.
The differences are very minor (mostly some missing documentation updates and an update to the inline PASM function).
Here is an extract from the README.TXT:
The bug mentioned in point 2 was very minor and is unlikely to have affected anyone's C programs except mine (the compiler was defining both __CATALINA_NATIVE and __CATALINA_TINY in some cases when it should have defined just __CATALINA_NATIVE).
Ross.
I have no plans for another release of Catalina just yet, but I have a question ...
I recently dropped support for the Code::Blocks IDE under Linux (I can no longer get it to compile), and I expect to do so in Windows soon (same reason - it is becoming almost impossible to compile). Also, Code::Blocks is far too complex for the type of projects we typically build on the Propeller.
The Catalina Geany IDE (which will remain supported) is much simpler and easier to use.
However, one advantage Code:Blocks did have is that you didn't have to have a make utility installed - it has an equivalent built in. Geany does not have this - it can build simple projects very easily, but complex projects must use an external Makefile, and therefore (on Windows) this requires you to also install a version of make.
So ... here is the question ...
Would it be ok to assume Windows users can install and use a version of make (e.g. from http://gnuwin32.sourceforge.net/packages/make.htm) to build all the example programs and demos? Doing so would mean that I would no longer have to support different batch scripts on Windows and Linux - I could just use a common Makefile.
Obviously, I am thinking 'yes' because it would save me quite a lot of work - but I am interested in hearing other opinions before I finally decide.
Rossh
P.S. Also, just an early warning - the next version of Catalina will probably remove the -F compiler option, which allowed the binary output to be produced in different formats (e.g. Motorola S record or Intel Hex format). You will of course still be able to generate the standard Parallax formats - .bin on the P2, or .binary or .eeprom on the P1. If anyone still needs this capability (I can't even remember now who originally requested it) then the srecord utility (which is what -F invokes) has a stand-alone version you can use to do the same job. It no longer seems necessary to have this capability embedded within Catalina. Again, comments welcome.
Ross.
Would CodeLite be a replacement worth looking at? I think it's a maintained fork of Code::Blocks. Otherwise, is there any accessible/reusable portion of LccWin32?
Sorry, just saw this - been busy. I think CodeLite would have the same compilation nightmares as Code::Blocks, since it also uses wxWidgets (which was Code::Blocks downfall).
Geany does everything I need, is much simpler to modify, build and use, so I have decided to go with that. The only thing missing from Geany on Windows was the lack of a built-in ability to build complex programs (which Code::Blocks had). But since I have now added **make **to do that particular task, this deficiency has been very neatly solved.
Ross.
All
I have just released Catalina 4.9. See the first post in this thread for details. It is primarily a Propeller 1 "bug fix" release, but it also adds better integration between Catalina, Geany and make on the Propeller 2.
I would appreciate feedback on the installation process from Windows users. I have seen some odd initial behavior - basically, on initial install some programs (most notably Geany) seem to crash or not run at all ... then, a few minutes later, everything seems to work fine without further intervention. I am presuming this is some weird new Windows 10 behavior, but every time I try and reproduce it, it just seems to go away by itself before I can figure out what's wrong.
Ross.
Errata file deleted, as it would cause problems with release 4.9.1. It is still available on SourceForge for 4.9 users - but better to upgrade to 4.9.1.
@RossH Just download and installed on a relatively old computer running Win10 that didn't have Catalina before.
The install went as expected. Having trouble with Geany though...
The file->Open command takes a very long time to bring up the file browser, but eventually does.
When I try to open the star trek game example, startrek.c, it crashes.
Rebooted, but it still does this.
Tried on a better Win10 computer after uninstalling Catalina 3.15.4.
Same thing.
Well, the file-Open was lightning fast. But, it crashed after opening startrek.c.
It shows the code for about 3 seconds then crashes with no user input.
Thanks, Rayman. My problem is that on every computer I have installed it, it ends up working after a while ... but I'm not sure how or why.
One thing to try - it doesn't seem to like being opened from the Start Menu straight after the install. Can you try opening a Catalina Command Line window and start geany from that using the command "catalina_geany"? It seems that once it has run successfully once, it runs ok thereafter no matter how it is started. Also, if you get it to run once, go into the Edit->Preferences menu, and on the Miscellaneous tab, select both the Project Options - i.e.:
I'll investigate further now that I know it is not just my imagination!
Ross.
@RossH Tried that, but it still crashes a couple seconds after loading...