Shop OBEX P1 Docs P2 Docs Learn Events
PZST - an open-source Propeller IDE in development [ Version 1.0.1 released! ] - Page 3 — Parallax Forums

PZST - an open-source Propeller IDE in development [ Version 1.0.1 released! ]

135678

Comments

  • Heater.Heater. Posts: 21,230
    edited 2011-03-06 04:51
    Andrey,

    pzst is working fine here under Debian with bstc-v0.15.4-pre9 in the PATH.

    This is looking very slick.
  • jazzedjazzed Posts: 11,803
    edited 2011-03-06 07:12
    VIM-style quick search/replace - and I think I am ready for first release :)
    Thanks for that. Looking forward to a binary release.
  • SSteveSSteve Posts: 808
    edited 2011-03-06 10:19
    For Mac, I need help porting the serial port code - I do not have a mac

    I've checked out the pzst code. Can you give me links to whatever else I need to compile it?
  • tdeyletdeyle Posts: 85
    edited 2011-03-08 18:19
    Is the terminal feature enabled in the release? In my version it is grayed out, as well as when I compiled it, there was an issue:

    ../pzst-read-only/terminalwidget.ui: Warning: Z-order assignment: 'widget_2' is not a valid widget.

    Anyone else getting this?
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-08 19:17
    Terminal code is not finished yet, so it is disabled
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-18 00:29
    An update for those waiting for PZST release

    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
  • martinhmartinh Posts: 58
    edited 2011-03-19 19:13
    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?

    Hope the project for your wife will be a success.
    1024 x 576 - 87K
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-19 22:05
    Yes, I do have plans to support other languages - this is going to be implemented on per-project basis, where project type drives the compilation etc
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-03-19 22:49
    This is looking very good.

    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
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-19 23:33
    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.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-03-20 02:02
    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.
  • martinhmartinh Posts: 58
    edited 2011-03-20 07:32
    Dr_Acula wrote: »
    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 :lol:
    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.
  • Heater.Heater. Posts: 21,230
    edited 2011-03-20 09:16
    What's changed?

    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.
  • martinhmartinh Posts: 58
    edited 2011-03-20 09:40
    Heater. wrote: »
    What's changed?

    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.
  • Heater.Heater. Posts: 21,230
    edited 2011-03-20 09:56
    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!
  • martinhmartinh Posts: 58
    edited 2011-03-20 10:32
    Heater. wrote: »
    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.
  • martinhmartinh Posts: 58
    edited 2011-03-20 11:07
    martinh wrote: »
    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)
    QProcess bstc;
        bstc.setWorkingDirectory(tmpName);
        bstc.start("bstc", args);
    
    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.
  • Heater.Heater. Posts: 21,230
    edited 2011-03-21 00:22
    Andrey,
    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.

    http://svn.navi.cx/misc/trunk/propeller/usb-host/usb-fs-host.spin
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-21 01:56
    BOM is Byte Order Marker, a few bytes at the beginning of unicode text to identify encoding and byte order (UTF16/UTF32, little endian/big endian)

    The file you are referring does contain a BOM, and opens just fine here, with both PZST and VIM
  • Heater.Heater. Posts: 21,230
    edited 2011-03-21 04:11
    OK. This is weird. I have two scenarios going on:

    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.
  • rosco_pcrosco_pc Posts: 464
    edited 2011-03-21 05:00
    Heater. wrote: »
    OK. This is weird. I have two scenarios going on:

    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
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-21 05:39
    What a shame! Qt's QTextStream cannot handle files with Macintosh line endings ("\r") correctly. It just silently drops them out. And this problem is almost 5 years old! http://lists.trolltech.com/qt-interest/2006-09/msg00961.html

    I'll look for a solution (although Macintosh line endings are kinda deprecated, OSX uses "\n" as any Unix, and Windows uses "\r\n")
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-21 05:43
    Feel free to post bug reports at the project page on google code
    http://code.google.com/p/pzst/issues/list
  • martinhmartinh Posts: 58
    edited 2011-03-21 05:57
    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.
  • Heater.Heater. Posts: 21,230
    edited 2011-03-21 06:05
    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.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-21 06:11
    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
  • Heater.Heater. Posts: 21,230
    edited 2011-03-21 06:30
    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:
    00000000  ff fe 7b 00 7b 00 0d 00  0d 00 20 00 75 00 73 00  |..{.{..... .u.s.|
    00000010  62 00 2d 00 66 00 73 00  2d 00 68 00 6f 00 73 00  |b.-.f.s.-.h.o.s.|
    00000020  74 00 20 00 20 00 76 00  65 00 72 00 20 00 31 00  |t. . .v.e.r. .1.|
    00000030  2e 00 30 00 0d 00 00 25  00 25 00 25 00 25 00 25  |..0....%.%.%.%.%|
    00000040  00 25 00 25 00 25 00 25  00 25 00 25 00 25 00 25  |.%.%.%.%.%.%.%.%|
    *
    000000b0  00 25 00 25 00 25 00 25  00 25 0d 00 0d 00 54 00  |.%.%.%.%.%....T.|
    000000c0  68 00 69 00 73 00 20 00  69 00 73 00 20 00 61 00  |h.i.s. .i.s. .a.|
    000000d0  20 00 73 00 6f 00 66 00  74 00 77 00 61 00 72 00  | .s.o.f.t.w.a.r.|
    000000e0  65 00 20 00 69 00 6d 00  70 00 6c 00 65 00 6d 00  |e. .i.m.p.l.e.m.|
    000000f0  65 00 6e 00 74 00 61 00  74 00 69 00 6f 00 6e 00  |e.n.t.a.t.i.o.n.|
    

    One major difference is that I compiled with a newer Qt version here than back at home. I have to check this more.
  • Heater.Heater. Posts: 21,230
    edited 2011-03-21 07:01
    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.
  • martinhmartinh Posts: 58
    edited 2011-03-21 07:14
    Heater. wrote: »
    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
  • Heater.Heater. Posts: 21,230
    edited 2011-03-21 10:35
    OK I'm back home now. Here I try to open mac_text.spin with pzst built with Qt version 4.6.3. Result: The whole file is loaded as a single line!
Sign In or Register to comment.