Ok, just saw your responses, and I'm back to being stumped again. If standard Geany crashes as well, then it may not be a Catalina problem at all.
I have gotten to the point where I can use Catalina reliably on all the machines I have available, but I can't seem to reproduce what you are seeing. I saw something similar once on one machine, but it went away by itself and now I cannot reproduce it even on _that _machine.
One thing to try is deleting your Geany configuration files. They may be corrupted. These should be in %HOMEPATH%\Appdata\Roaming\geany. Just delete that whole folder - it will be rebuilt automatically next time you start Geany.
Ross.
P.S. Catalina's version of Geany has some changes to better support Catalina. If you use standard Geany you will not be able to use the project files and Makefiles provided with Catalina, and will instead have to configure everything for yourself manually.
One more thing to try - part of the problem appears to be permissions related, so give yourself full permissions on all the files in the Catalina directory and see if that helps.
The easiest way to do this is by using File Explorer: right click on the Catalina program directory (e.g. C:\Program Files (x86)\Catalina_4.9) and select Properties. On the Security tab, click the Edit button, select "Users" in the top pane and tick n the "Allow" & "Full Control" box in the bottom pane. Then say OK.
Good news - I now have a virtual machine on which I can reproduce your problem. It makes no sense to me yet - I can fix it with enough frigging about, but I cannot understand what causes it. On other machines everything just works fine every time. Windows is doing something odd, but I am yet to identify exactly what.
I'd suggest ignoring this release for a while - I will post again when I have a reliable solution.
FWIW: On the computer that I've installed Geany separately AND THEN REBOOTED, everything seems fine. Other two computers still crash the program after opening a file even after reboot.
On one of the computers where geany is crashing: Installed Geany 1.38 separately. This didn't help the Catalina Geany at first.
But, after opening both a .c and a .geany file with Geany 1.38, the Catalina Geany no longer crashes!
No idea what this means though. Feels like some sort of strange registry problem...
I have added an errata file to the first post in this thread that includes a workaround to the problem of Catalina Geany crashing on startup on some Windows systems. Just unzip that file over your Catalina installation (you will need Administrator permission).
The problem is with Geany, but the Geany developers claimed to have fixed it. However, I tried their fix and it does not work in all instances. The workaround just adds the -s option to Catalina Geany on startup, which prevents it trying to load any files from a previous session.
This workaround works on all the systems I have. Let me know how it goes on yours. I will issue a better fix in the next release.
@Rayman said:
Can you pls remind me what I need to do to have the Execute button work for P2, if anything?
It couldn’t find my P2 although think connected…
Nothing special. I just compiled and downloaded the Geany startrek example project to my P2. Here is how I did it:
Start a Catalina Command Line window (we do this so we can set the CATALINA_DEFINE environment variable, which means we don't need to modify any of the project settings).
Enter the following commands (assuming you have a P2_EVAL):
set CATALINA_DEFINE=P2_EVAL
cd %LCCDIR%\demos\games
catalina_geany startrek.geany
Then, in Geany, do Build->Clean then Build->Make (the Clean is just in case there is an existing binary).
This will compile the program to use the serial interface - so to download, execute and interact with it use the command Build->Download and Interact. Your problem may be that the Execute button just downloads - it does not start the serial terminal to interact with the program. To do that you need to use the menus.
That's all. The only thing you may need to check is the Baudrate in Project->Properties. For the Propeller 2, make sure it is set to 230400.
If you still have problems, try doing it without using Geany. Open a Catalina Command Line window and enter the following commands:
set CATALINA_DEFINE=P2_EVAL
cd %LCCDIR%\demos\games
make clean startrek
payload -i -b230400 startrek
@Rayman said:
Any way to move the project open commands tab all the way to the left?
Or, put it under files?
It’s strange being in the middle like that…
I didn't want to change the basic Geany interface since that would confuse people who were familiar with it.
The silliest thing is that you can open a project file using the normal File->Open menu entry but it opens it as a text file, not as a project. This would hardly ever be what you intended.
It would make sense if Geany recognized you are opening a project file and give you the option to open it as a project instead. I may think about doing that as a Catalina customization in a future release.
Spin2 and FlexProp recently added defined values for all the smartpin settings. Have you added this yet?
Also, the pinstart macro (?) would be nice so you can set up a smartpin in one line like this: _pinstart(8, P_NCO_FREQ+P_OE, 12, 0x8000_0000);
BTW: I believe there's a typo in that example. Repository mode is actually 0x02 instead of 0x06. Although, it seems 0x06 also works.
@Rayman said:
Ok, got Geany to load p2 by adding the -o2 option to project:
Can you replace the "Execute" menu item with "Download and Interact"?
You can do this yourself in a few ways:
Add -i to the Loader field in Project->Properties.
Add -i to the Download and Execute command in Project->Set Build Commands.
Edit the file "%LCCDIR%\catalina_geany\data\filedefs\filetypes.c", find the following line: EX_00_CM=payload %x "%e" -b%b
and change it to EX_00_CM=payload %x "%e" -b%b -i
The first two will only work for the current project. The third method will work for all projects. And of course you can also add the -o2 flag to any of these methods if you find it necessary.
@Rayman said:
@RossH Looking at your "chimaera" example...
Spin2 and FlexProp recently added defined values for all the smartpin settings. Have you added this yet?
Also, the pinstart macro (?) would be nice so you can set up a smartpin in one line like this: _pinstart(8, P_NCO_FREQ+P_OE, 12, 0x8000_0000);
BTW: I believe there's a typo in that example. Repository mode is actually 0x02 instead of 0x06. Although, it seems 0x06 also works.
... and ...
@evanh said:
WRPIN #2, #4 and #6 will all work as a repository smartpin. They overlay the three DAC dither modes.
Thanks guys. Yes, I added "smartpins.h" header file to Catalina. I will check out the pinstart macro and example this afternoon. But if it's just a macro, then I'm fairly sure you could add it yourself if you need it.
Also, the pinstart macro (?) would be nice so you can set up a smartpin in one line like this: _pinstart(8, P_NCO_FREQ+P_OE, 12, 0x8000_0000);
Turns out I had to add a "pinstart" function for the recently added 8 port serial driver - but I didn't realize it would be generally useful, so I left it internal to that code.
I could add it to the standard libraries, or else add a macro version to the standard header.
Or you can do either or both yourself. Here is some example code that implements it both ways:
#include <propeller2.h>
#include <smartpins.h>
/*
* pinstart.c - a demonstration of pinstart as a macro and as a function.
*
* Compile this program with a command like ...
*
* catalina -p2 pinstart.c -y -lci -O5
*
* ... and examine the listing output
*/
/*
* example of a _pinstart macro
*/
#define _pinstart(pinfield, mode, xval, yval) \
{ \
_dirl(pinfield); \
_wrpin(pinfield, mode); \
_wxpin(pinfield, xval); \
_wypin(pinfield, yval); \
_dirh(pinfield); \
}
/*
* example of a pinstart function
*/
static void pinstart(int pinfield, uint32_t mode, uint32_t xval, uint32_t yval) {
_dirl(pinfield);
_wrpin(pinfield, mode);
_wxpin(pinfield, xval);
_wypin(pinfield, yval);
_dirh(pinfield);
}
void main() {
// the following two lines of code are functionally identical ...
// using the function ...
pinstart(8, P_NCO_FREQ+P_OE, 12, 0x80000000);
// using the macro ...
_pinstart(8, P_NCO_FREQ+P_OE, 12, 0x80000000);
// using the macro method is faster, but using the
// function will give you smaller code sizes.
}
I don't mind implementing it the same way others have done for compatibility, if someone can tell me which way they do it.
Comments
Tried a third PC, a relatively good one, and got the same result, even by command line.
This PC still has that other issue where the Catalina command line does not appear in the start menu. There is an icon for it on the desktop though...
@RossH I've installed Geany from here: https://www.geany.org/download/releases/
Now, this and the Catalina version seem to work.
Just need to read the help on how to target P2.
Ok, at least it doesn't always crash on file open now, but it does still crash when opening a different file...
So, something is still wrong...
I was able to add "-P2" to the project options and then compile and build.
But, I'm not seeing how to load into P2 RAM..
The Execute button is just for P1, is that right?
Anyway, Geany looks promising, but need to figure out how to make stable...
Hi Rayman
Ok - I think I have it.
Can you confirm that you can start Geany reliably from the Catalina command line (i.e. using the "start_geany" command?)
If so, I will issue another small errata with a simple fix for those shortcuts.
Ross.
I don't think I have "start_geany"...
catalina_geany.bat starts geany just fine. It just crashes when I open a file...
Except for the computer where I also installed geany independently...
Ok, just saw your responses, and I'm back to being stumped again. If standard Geany crashes as well, then it may not be a Catalina problem at all.
I have gotten to the point where I can use Catalina reliably on all the machines I have available, but I can't seem to reproduce what you are seeing. I saw something similar once on one machine, but it went away by itself and now I cannot reproduce it even on _that _machine.
One thing to try is deleting your Geany configuration files. They may be corrupted. These should be in %HOMEPATH%\Appdata\Roaming\geany. Just delete that whole folder - it will be rebuilt automatically next time you start Geany.
Ross.
P.S. Catalina's version of Geany has some changes to better support Catalina. If you use standard Geany you will not be able to use the project files and Makefiles provided with Catalina, and will instead have to configure everything for yourself manually.
HI Rayman
One more thing to try - part of the problem appears to be permissions related, so give yourself full permissions on all the files in the Catalina directory and see if that helps.
The easiest way to do this is by using File Explorer: right click on the Catalina program directory (e.g. C:\Program Files (x86)\Catalina_4.9) and select Properties. On the Security tab, click the Edit button, select "Users" in the top pane and tick n the "Allow" & "Full Control" box in the bottom pane. Then say OK.
Ross.
Sorry, yes I meant "catalina_geany". The permissions change I just recommended may help.
Hello Rayman
Good news - I now have a virtual machine on which I can reproduce your problem. It makes no sense to me yet - I can fix it with enough frigging about, but I cannot understand what causes it. On other machines everything just works fine every time. Windows is doing something odd, but I am yet to identify exactly what.
I'd suggest ignoring this release for a while - I will post again when I have a reliable solution.
Ross.
Glad you are able to reproduce…
Permissions didn’t help?
FWIW: On the computer that I've installed Geany separately AND THEN REBOOTED, everything seems fine. Other two computers still crash the program after opening a file even after reboot.
With Geany, can compile some things, but some of the games I've tried are giving floating point errors like this:
Never mind, I figured it out... Was using othello.geany project instead of the one for star trek.
Seems it needs the "-lm" build option...
Another clue for you...
On one of the computers where geany is crashing: Installed Geany 1.38 separately. This didn't help the Catalina Geany at first.
But, after opening both a .c and a .geany file with Geany 1.38, the Catalina Geany no longer crashes!
No idea what this means though. Feels like some sort of strange registry problem...
Hello Rayman
I have added an errata file to the first post in this thread that includes a workaround to the problem of Catalina Geany crashing on startup on some Windows systems. Just unzip that file over your Catalina installation (you will need Administrator permission).
The problem is with Geany, but the Geany developers claimed to have fixed it. However, I tried their fix and it does not work in all instances. The workaround just adds the -s option to Catalina Geany on startup, which prevents it trying to load any files from a previous session.
This workaround works on all the systems I have. Let me know how it goes on yours. I will issue a better fix in the next release.
Ross.
It works!
Tried this errata file out on my 1 PC that wasn't already fixed by installing geany separately, and it did fix the crashing issue.
Thanks, Rayman. I have a better fix almost ready to go. Just need to do a bit more testing before releasing it.
Ross.
Can you pls remind me what I need to do to have the Execute button work for P2, if anything?
It couldn’t find my P2 although think connected…
Any way to move the project open commands tab all the way to the left?
Or, put it under files?
It’s strange being in the middle like that…
Glad you found an IDE that works BTW. This is great for quick testing.
I’ll probably stick to visual studio for large projects though.
Nothing special. I just compiled and downloaded the Geany startrek example project to my P2. Here is how I did it:
Start a Catalina Command Line window (we do this so we can set the CATALINA_DEFINE environment variable, which means we don't need to modify any of the project settings).
Enter the following commands (assuming you have a P2_EVAL):
Then, in Geany, do Build->Clean then Build->Make (the Clean is just in case there is an existing binary).
This will compile the program to use the serial interface - so to download, execute and interact with it use the command Build->Download and Interact. Your problem may be that the Execute button just downloads - it does not start the serial terminal to interact with the program. To do that you need to use the menus.
That's all. The only thing you may need to check is the Baudrate in Project->Properties. For the Propeller 2, make sure it is set to 230400.
If you still have problems, try doing it without using Geany. Open a Catalina Command Line window and enter the following commands:
Ross.
I didn't want to change the basic Geany interface since that would confuse people who were familiar with it.
The silliest thing is that you can open a project file using the normal File->Open menu entry but it opens it as a text file, not as a project. This would hardly ever be what you intended.
It would make sense if Geany recognized you are opening a project file and give you the option to open it as a project instead. I may think about doing that as a Catalina customization in a future release.
@RossH The above didn't work for loading into P2 Eval Board. But, giving payload the "-o2" option did work.
Ok, got Geany to load p2 by adding the -o2 option to project:
Can you replace the "Execute" menu item with "Download and Interact"?
@RossH Looking at your "chimaera" example...
Spin2 and FlexProp recently added defined values for all the smartpin settings. Have you added this yet?
Also, the pinstart macro (?) would be nice so you can set up a smartpin in one line like this: _pinstart(8, P_NCO_FREQ+P_OE, 12, 0x8000_0000);
BTW: I believe there's a typo in that example. Repository mode is actually 0x02 instead of 0x06. Although, it seems 0x06 also works.
WRPIN #2, #4 and #6 will all work as a repository smartpin. They overlay the three DAC dither modes.
You can do this yourself in a few ways:
EX_00_CM=payload %x "%e" -b%b
and change it to
EX_00_CM=payload %x "%e" -b%b -i
The first two will only work for the current project. The third method will work for all projects. And of course you can also add the -o2 flag to any of these methods if you find it necessary.
Ross.
... and ...
Thanks guys. Yes, I added "smartpins.h" header file to Catalina. I will check out the pinstart macro and example this afternoon. But if it's just a macro, then I'm fairly sure you could add it yourself if you need it.
Turns out I had to add a "pinstart" function for the recently added 8 port serial driver - but I didn't realize it would be generally useful, so I left it internal to that code.
I could add it to the standard libraries, or else add a macro version to the standard header.
Or you can do either or both yourself. Here is some example code that implements it both ways:
I don't mind implementing it the same way others have done for compatibility, if someone can tell me which way they do it.