I am now working on a project that I have to finish before March 31 (my wife's birthday), so PZST development is paused for couple weeks. BTW, the project is using a Propeller (should I even say that ), and all code is developed in PZST. The project is going to be pretty fun, I'll post it on the forums when (if?) it is completed
Andrey,
thanks for your efforts. I just compiled pzst on my eee pc with linux (openSUSE 11.4 64bit) and it works fine with bstc-0.15.4-pre13 (I just had to find out that it needs the executable to be renamed to bstc instead of its original name bstc.linux).
I read that you pause the development for a while, but may I ask a question nevertheless: Do you plan to support other languages and compilers in the tool in the future like propbasic?
I have been looking at my Catalina IDE and thinking how it might be possible to include it in your IDE.
So many things are all the same - Copy/Paste/Select All/File Open, File Save, File Save As etc
The only unique thing is the compilation. I have 6 different Compile menu buttons, for different memory sizes and boards. But they all have one thing in common - all they do is shell out to a command line program. Some shell out to several command line programs, but all they are really doing is shelling out to a batch file and then in the batch file there are some command line options.
So somehow you would need to have some settings - eg external memory size, download baud rate, download port number.
But even that is not hard to pass through to a command line program. Save all those settings to a text file eg settings.txt. Then shell "compile.exe", and compile.exe reads that text file, creates batch files, and compiles the program and maybe downloads it as well.
The compile.exe program can be written in any language that can run on all platforms.
So all one might need from PZST is a menu. Maybe one for C, one for PropBasic etc
Dr_Acula, currently I strictly rely on all compilation done by external programs. The only source transformation currently performed by PZST itself is some preprocessing of Spin sources to overcome charset issues in string constants, but I am thinking about moving this code into separate binary.
I believe this approach makes adding other compiler backends easier.
That sounds perfect - it means you could easily add Catalina and BCX Basic to your program, because both of these are compiled with existing command line programs.
That sounds perfect - it means you could easily add Catalina and BCX Basic to your program, because both of these are compiled with existing command line programs.
I think a bit more work is involved since other languages like C and Basic need also appropriate syntax highlighting like the spin language and probably other support (for example code folding) to be useful.
IMHO an IDE based on a command line toolchain is really the best thing one can do to make it open for new languages and other enhancements. After 16 years in software development I can only second this opinion.
I tried myself to integrate catalina into eclipse based on the existing CDT plugin (not by reprogramming just by configuration) and you can make it work so far but that is overkill, I also tried codeblocks (I do not like it that much though it is a very professional environment).
So I ended up with bst for spin and pasm and gedit plus gnu makefiles for catalina. Not that this solution is bad - it is just not very integrated, esp. if you write some pasm code in bst and then a C program in an editor and want to combine that.
A self contained IDE for the propeller compilers is really something worth its weight in gold
Testing PZST a little more now I can say: What I really like besides its look and feel is that it is lightweight and fast (seems also to be faster than the bst IDE), very important when using it on a netbook.
Sorry for this long winded post from a newbie on this forum.
I just checked out the latest pzst and can no longer get it to work with bstc v0.15.4-pre9. Also tried v0.15.4-pre13 and v0.15.3.
All I get is "Compile Error" in red in the corner.
Looking at the changes list in google code (http://code.google.com/p/pzst/source/list) I cannot see changes since March 12, so the code I checked out yesterday is the latest one and works for me.
So probably I can help you with that. What operating system are you using, is it maybe something as simple as bstc being not in your PATH?
Edit: If bstc is not found the message is "Failed to start compiler" so that is not the reason.
I'm using Debian here. Pretty sure bstc is on the PATH....
Ah heck I fixed it. And I don't understand what was going on.
1) I had an old bstc in /usr/local/bin
2) I had my new bstc in the pzst directory which was also the current working directory.
3) I had a PATH like so .:/usr/local/bin:/usr/bin:/bin
3) "which bstc" replied it was using the one in the current directory.
4) Typing bstc I see the expected version running.
5) pzst would not compile.
6) I delete the old bstc from /usr/local/bin and now it works!
I'm using Debian here. Pretty sure bstc is on the PATH....
Ah heck I fixed it. And I don't understand what was going on.
1) I had an old bstc in /usr/local/bin
2) I had my new bstc in the pzst directory which was also the current working directory.
3) I had a PATH like so .:/usr/local/bin:/usr/bin:/bin
3) "which bstc" replied it was using the one in the current directory.
4) Typing bstc I see the expected version running.
5) pzst would not compile.
6) I delete the old bstc from /usr/local/bin and now it works!
Not completely sure why it did not find your local bstc first if you start pzst from the same directory. From the search order in the PATH it should find the local one first. Maybe pzst changes the current directory after it starts (?). Need to look into the source code to understand that.
Glad to hear you solved it.
Not completely sure why it did not find your local bstc first if you start pzst from the same directory. From the search order in the PATH it should find the local one first. Maybe pzst changes the current directory after it starts (?). Need to look into the source code to understand that.
Glad to hear you solved it.
So far I looked into the code and found that pszt does not change the current directory, but it spans a new process of course for the spin compiler and that is done as follows (spincompiler.cpp)
So the new process changes the directory first to the temporary dir for the compilation process and then runs bstc (from a dir which is no longer the original one). That explains the behavior.
PZST can open ASCII, UTF-8, UTF16 and UTF32 (the last two only if BOM is present) - but always saves UTF-8
Excuse my ignorance but what is "BOM" in this context?
I've just noticed that PZST does not display Micah Dowty's usb-fs-host.spin correctly.
This is recognized by the "file" command as "Little-endian UTF-16 Unicode English text, with CR line terminators"
I've tried converting it to ASCII and UTF-8 with iconv but everything seems to come out on one line. So far gedit is the only editor I have that displays this file properly.
1) My work PC, has pzst from a few days or weeks ago. It has usb-fs-host.spin from the "ADB bridge" project in OBEX: http://obex.parallax.com/objects/724/
Result: pzst can open this file just fine but vim seems to think there are no line breaks.
2) On my home PC I have pzst checked out yesterday. It has the same usb-fs-host.spin file.
Result: Neither pzst or vim can open and display the file properly.
1) My work PC, has pzst from a few days or weeks ago. It has usb-fs-host.spin from the "ADB bridge" project in OBEX: http://obex.parallax.com/objects/724/
Result: pzst can open this file just fine but vim seems to think there are no line breaks.
2) On my home PC I have pzst checked out yesterday. It has the same usb-fs-host.spin file.
Result: Neither pzst or vim can open and display the file properly.
I just checked and both usb-fs-host.spin and Parallax Serial Terminal.spin from that same obex project are shown in PZST (fresh checkout this morning) as one line without syntaxhigh-lighting.
The files both open with scite and are identified by file as Little-endian UTF-16 Unicode English text, with CR line terminators. System is Archlinux and locale is set to en_US.UTF-8
On linux the command line tool mac2linux (normally installed together with dos2linux and relatives) should do the trick to convert the line endings. I just cannot test this right now.
Of course it will be nicer to find a solution for this which can be integrated into pzst.
Still weird though because my older PZST here at work has no trouble opening the same usb-fs-host.spin from the same OBEX project fetched this morning. Which "file" identifies in the same way as the one that fails back at home. "Little-endian UTF-16 Unicode English character data, with CR line terminators"
The Mac text file type explanation does not quite fit yet.
Are you sure it is from OBEX, not SVN repository? They are different. First time you referred to SVN - that one opens just fine. And then OBEX was mentioned - file downloaded from there has mac line endings
Of course I could be getting confused running from home to work machines. But as I say this usb-fs-host.spin on my work machine opens fine PZST but not vim. It has CR terminators. As in this hex dump of the first couple of lines:
Here is a little Mac style text file that opens fine here with my PZST but is only one line in vim. This PZST was built with Qt 4.7.0 from sources a week or more old.
Here is a little Mac style text file that opens fine here with my PZST but is only one line in vim. This PZST was built with Qt 4.7.0 from sources a week or more old.
Checked this now on my machine: pzst built day before yesterday (fresh checkout then) with libqt4-4.7.1-7.1.x86_64. With that combination it shows only one line for me.
Seems to me this needs a bit tweaking to find a reliable result.
As a side note: After conversion with mac2unix it works of course and shows three lines of text.
Seems odd to me that the qt 4.7.0 gives a better result than the 4.7.1
Comments
pzst is working fine here under Debian with bstc-v0.15.4-pre9 in the PATH.
This is looking very slick.
I've checked out the pzst code. Can you give me links to whatever else I need to compile it?
../pzst-read-only/terminalwidget.ui: Warning: Z-order assignment: 'widget_2' is not a valid widget.
Anyone else getting this?
I am now working on a project that I have to finish before March 31 (my wife's birthday), so PZST development is paused for couple weeks. BTW, the project is using a Propeller (should I even say that ), and all code is developed in PZST. The project is going to be pretty fun, I'll post it on the forums when (if?) it is completed
thanks for your efforts. I just compiled pzst on my eee pc with linux (openSUSE 11.4 64bit) and it works fine with bstc-0.15.4-pre13 (I just had to find out that it needs the executable to be renamed to bstc instead of its original name bstc.linux).
I read that you pause the development for a while, but may I ask a question nevertheless: Do you plan to support other languages and compilers in the tool in the future like propbasic?
Hope the project for your wife will be a success.
I have been looking at my Catalina IDE and thinking how it might be possible to include it in your IDE.
So many things are all the same - Copy/Paste/Select All/File Open, File Save, File Save As etc
The only unique thing is the compilation. I have 6 different Compile menu buttons, for different memory sizes and boards. But they all have one thing in common - all they do is shell out to a command line program. Some shell out to several command line programs, but all they are really doing is shelling out to a batch file and then in the batch file there are some command line options.
So somehow you would need to have some settings - eg external memory size, download baud rate, download port number.
But even that is not hard to pass through to a command line program. Save all those settings to a text file eg settings.txt. Then shell "compile.exe", and compile.exe reads that text file, creates batch files, and compiles the program and maybe downloads it as well.
The compile.exe program can be written in any language that can run on all platforms.
So all one might need from PZST is a menu. Maybe one for C, one for PropBasic etc
I believe this approach makes adding other compiler backends easier.
I think a bit more work is involved since other languages like C and Basic need also appropriate syntax highlighting like the spin language and probably other support (for example code folding) to be useful.
IMHO an IDE based on a command line toolchain is really the best thing one can do to make it open for new languages and other enhancements. After 16 years in software development I can only second this opinion.
I tried myself to integrate catalina into eclipse based on the existing CDT plugin (not by reprogramming just by configuration) and you can make it work so far but that is overkill, I also tried codeblocks (I do not like it that much though it is a very professional environment).
So I ended up with bst for spin and pasm and gedit plus gnu makefiles for catalina. Not that this solution is bad - it is just not very integrated, esp. if you write some pasm code in bst and then a C program in an editor and want to combine that.
A self contained IDE for the propeller compilers is really something worth its weight in gold
Testing PZST a little more now I can say: What I really like besides its look and feel is that it is lightweight and fast (seems also to be faster than the bst IDE), very important when using it on a netbook.
Sorry for this long winded post from a newbie on this forum.
I just checked out the latest pzst and can no longer get it to work with bstc v0.15.4-pre9. Also tried v0.15.4-pre13 and v0.15.3.
All I get is "Compile Error" in red in the corner.
Looking at the changes list in google code (http://code.google.com/p/pzst/source/list) I cannot see changes since March 12, so the code I checked out yesterday is the latest one and works for me.
So probably I can help you with that. What operating system are you using, is it maybe something as simple as bstc being not in your PATH?
Edit: If bstc is not found the message is "Failed to start compiler" so that is not the reason.
Ah heck I fixed it. And I don't understand what was going on.
1) I had an old bstc in /usr/local/bin
2) I had my new bstc in the pzst directory which was also the current working directory.
3) I had a PATH like so .:/usr/local/bin:/usr/bin:/bin
3) "which bstc" replied it was using the one in the current directory.
4) Typing bstc I see the expected version running.
5) pzst would not compile.
6) I delete the old bstc from /usr/local/bin and now it works!
Not completely sure why it did not find your local bstc first if you start pzst from the same directory. From the search order in the PATH it should find the local one first. Maybe pzst changes the current directory after it starts (?). Need to look into the source code to understand that.
Glad to hear you solved it.
So the new process changes the directory first to the temporary dir for the compilation process and then runs bstc (from a dir which is no longer the original one). That explains the behavior.
Excuse my ignorance but what is "BOM" in this context?
I've just noticed that PZST does not display Micah Dowty's usb-fs-host.spin correctly.
This is recognized by the "file" command as "Little-endian UTF-16 Unicode English text, with CR line terminators"
I've tried converting it to ASCII and UTF-8 with iconv but everything seems to come out on one line. So far gedit is the only editor I have that displays this file properly.
http://svn.navi.cx/misc/trunk/propeller/usb-host/usb-fs-host.spin
The file you are referring does contain a BOM, and opens just fine here, with both PZST and VIM
1) My work PC, has pzst from a few days or weeks ago. It has usb-fs-host.spin from the "ADB bridge" project in OBEX: http://obex.parallax.com/objects/724/
Result: pzst can open this file just fine but vim seems to think there are no line breaks.
2) On my home PC I have pzst checked out yesterday. It has the same usb-fs-host.spin file.
Result: Neither pzst or vim can open and display the file properly.
I just checked and both usb-fs-host.spin and Parallax Serial Terminal.spin from that same obex project are shown in PZST (fresh checkout this morning) as one line without syntaxhigh-lighting.
The files both open with scite and are identified by file as Little-endian UTF-16 Unicode English text, with CR line terminators. System is Archlinux and locale is set to en_US.UTF-8
I'll look for a solution (although Macintosh line endings are kinda deprecated, OSX uses "\n" as any Unix, and Windows uses "\r\n")
http://code.google.com/p/pzst/issues/list
Of course it will be nicer to find a solution for this which can be integrated into pzst.
The Mac text file type explanation does not quite fit yet.
One major difference is that I compiled with a newer Qt version here than back at home. I have to check this more.
Seems to me this needs a bit tweaking to find a reliable result.
As a side note: After conversion with mac2unix it works of course and shows three lines of text.
Seems odd to me that the qt 4.7.0 gives a better result than the 4.7.1