Shop OBEX P1 Docs P2 Docs Learn Events
NEW: xBasic IDE and Compiler for Propeller - Page 4 — Parallax Forums

NEW: xBasic IDE and Compiler for Propeller

1246

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 08:29
    Rsadeika wrote: »
    Since the subject of SD is up, I also use the Gadget Gangster USB board which has an SD, will that be supported also? And how about the jazzed humungous RAM board, although I would like to see something replicates what the C3 has? Lets see, what other features does the C3 have, ADC, I think that is about it.

    Ray

    I don't have a Gadget Gangster USB board so I can't support that. We have a ZOG cache driver for Steve's SDRAM module so we can probably support that.
  • jazzedjazzed Posts: 11,803
    edited 2011-08-25 08:44
    Rsadeika wrote: »
    Since the subject of SD is up, I also use the Gadget Gangster USB board which has an SD, will that be supported also? And how about the jazzed humungous RAM board, although I would like to see something replicates what the C3 has? Lets see, what other features does the C3 have, ADC, I think that is about it.

    Ray

    Since the humungous RAM board is in production that will be one my priority external memory additions along with a fast cache SRAM board. The C3 ADC will be the hardest thing to add because of the C3 hardware chip select.

    I also have a few boards/projects that need SD support so I'll be looking at that. If I can get those to work (the hard part), the GadgetGangster USB SD will be a cakewalk.
  • RsadeikaRsadeika Posts: 3,837
    edited 2011-08-25 10:05
    Since I am starting to like xbasic a lot, until I run into a major problem that is, I think I will try to implement xbasic for my latest project. I will just call it Mini-weather station, for the remote unit I am using the old Gadget Gangster SD board, this is the one that had the RTC, and an SD card; a senserion temp/humidity module; and a class 1 BlueTooth module with a duck antenna.

    The xbasic would have to be able to deal with:
    RTC - at the moment I am using kye's RTCEngine.
    SD - I am using fsrw.
    Sesirion module - I am using the existing Spin object.
    BlueTooth - Ext_FDSerial object.

    So far I can see being able to handle the BlueTooth module, with xbasic, as it stands right now. One item I missed in the other post was I2C, maybe that would help out for the RTC aspect.

    Ray
  • KMyersKMyers Posts: 433
    edited 2011-08-25 10:06
    @David

    Here is the program for the BS2e I was talking about. Didn't get any more time to play other then copy/paste into the IDE. It don't like the comments Pnasic for sure. I will keep playing!
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 10:11
    KMyers wrote: »
    @David

    Here is the program for the BS2e I was talking about. Didn't get any more time to play other then copy/paste into the IDE. It don't like the comments Pnasic for sure. I will keep playing!

    Wow! That's a lot different than traditional Basic. I'm afraid you aren't likely to ever be able to just load that code into xbasic and run it. I think xbasic can probably perform most of the functions in that code but the source itself would have to be rewritten. For instance, xbasic doesn't have GOSUB. Instead, it implements functions with named arguments like most modern versions of Basic.
  • MazziniMazzini Posts: 58
    edited 2011-08-25 10:52
    Hello ,

    I'm testing some example on C3 , but the ide has crashed in debug mode ( fibo and testinput samples)

    2lqmvc.jpg
  • KMyersKMyers Posts: 433
    edited 2011-08-25 10:56
    Thanks David, I thought it was not possible with out a rewrite. Guess I am getting lazy in my old age!
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 10:58
    KMyers wrote: »
    Thanks David, I thought it was not possible with out a rewrite. Guess I am getting lazy in my old age!

    Sorry about that! It would certainly be possible to write another compiler that would handle pbasic syntax. I don't know why Parallax doesn't supply one of those for BasicStamp users who are trying to migrate to the Propeller.
  • jazzedjazzed Posts: 11,803
    edited 2011-08-25 11:04
    Rsadeika wrote: »
    The xbasic would have to be able to deal with:
    RTC - at the moment I am using kye's RTCEngine.
    SD - I am using fsrw.
    Sesirion module - I am using the existing Spin object.
    BlueTooth - Ext_FDSerial object.
    Ray I have an EEPROM,RTC,+ PASM module and interface if you want to try it. The code is included in the attached .zip. The zip is one example of xBasic code I'm running on the GameBaby hardware.

    You'll have to pick through it, but most of the code you would care about is in GbI2C.bas. Some of my comments are out of date. The main program is GameBaby.bas.

    KMyers wrote: »
    Here is the program for the BS2e I was talking about.

    @KMyers, the best I could do for you would be to translate your file into xBasic. That could take time considering all the other stuff I have going. Maybe it would be a good project for testing the usability of xBasic?
  • KMyersKMyers Posts: 433
    edited 2011-08-25 11:17
    @ David , jazzed I think this will be a good learning experience for me. I would be nice to have a PBasic friendly compiler. Perhaps I need to check out the BS2 function in Obex?
  • jazzedjazzed Posts: 11,803
    edited 2011-08-25 11:37
    Mazzini wrote: »
    Hello ,

    I'm testing some example on C3 , but the ide has crashed in debug mode ( fibo and testinput samples)
    Ouch!

    Looks like i'm trying to compile an empty project. I have reproduced the problem and provided a fix.

    Copy the xbasic-qt.exe from the attached .zip, paste into your xBasicIDE\bin, and try the program again.

    Please confirm the fix if you get a chance.

    Thanks.
  • RsadeikaRsadeika Posts: 3,837
    edited 2011-08-25 12:33
    I noticed that when you use the debug, in order for it to work correctly, you have to place a waitMS(145) in the beginning of your code, otherwise the debug terminal screen comes up empty or it has just a fraction of your beginning print statements. I guess that would only be a problem if you are starting off with some important print statements.

    I also noticed that in some cases, some error information is coming up, instead of the plain compiler error message.

    Ray
  • MazziniMazzini Posts: 58
    edited 2011-08-25 12:34
    jazzed wrote: »
    Ouch!

    Looks like i'm trying to compile an empty project. I have reproduced the problem and provided a fix.

    Copy the xbasic-qt.exe from the attached .zip, paste into your xBasicIDE\bin, and try the program again.

    Please confirm the fix if you get a chance.

    Thanks.

    Hello ,
    Yes of course we need an file in order to compile something , but my prj has become empty by clicking on "set project" several times*
    The bug is fixed now :D ( I read the message box :D)
    There is still an minor bug. When you want save all but you click cancel , the table's title become blank


    Edit
    *I confirm
    If you try to save all and click on cancel button afterward click on set project , your prj will become empty
    and if you try to open an other prj , the prj will be again empty because you have to close the previous blank tab
  • jazzedjazzed Posts: 11,803
    edited 2011-08-25 13:04
    Mazzini wrote: »
    If you try to save all and click on cancel button afterward click on set project , your prj will become empty and if you try to open an other prj , the prj will be again empty because you have to close the previous blank tab
    Yes, sorry. I forgot about this "save as" and "cancel" issue. I have a fix for this now also. Will post later.
    Rsadeika wrote: »
    I noticed that when you use the debug, in order for it to work correctly, you have to place a waitMS(145) in the beginning of your code, otherwise the debug terminal screen comes up empty or it has just a fraction of your beginning print statements. I guess that would only be a problem if you are starting off with some important print statements.

    Ray, there is a delay between closing the compiler and opening the terminal. A similar problem exists with other solutions such as Propeller Tool/PST and BST.

    David has provided an API for sharing the connection with an integrated IDE/Compiler and it might fix this issue. I haven't looked at this yet, but I plan to do that.

    Adding a delay at program start as is necessary for other solutions seems acceptable for now.
    Rsadeika wrote: »
    I also noticed that in some cases, some error information is coming up, instead of the plain compiler error message.

    Is the compiler error information helpful now?

    Thanks.
  • MazziniMazzini Posts: 58
    edited 2011-08-25 13:30
    Is this my fault ?
    Thanks

    331478-Tvdemo.jpeg
  • KMyersKMyers Posts: 433
    edited 2011-08-25 13:37
    The sample programs work fine on my C3 in both hub ram and XMM.
  • jazzedjazzed Posts: 11,803
    edited 2011-08-25 14:05
    Mazzini wrote: »
    Is this my fault ?
    Possibly. However, it doesn't tell which file. Did you make any changes?
    The line number isn't very useful without line numbers in the editor :).

    Not sure what "error reading data file" means. David?
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 14:10
    Mazzini wrote: »
    Is this my fault ?
    Thanks

    331478-Tvdemo.jpeg

    I just zoomed in on this to see the detailed error message and it is a compiler bug. Please send me the files you are trying to compile and I'll look into it.

    Thanks,
    David
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 14:14
    jazzed wrote: »
    Possibly. However, it doesn't tell which file. Did you make any changes?
    The line number isn't very useful without line numbers in the editor :).

    Not sure what "error reading data file" means. David?

    The data files are temporary files that the compiler uses to build output for each memory section (hub, ram, flash). You shouldn't have errors reading/writing those files unless your disk is almost entirely full and I doubt that is the case here. The files are very small (or should be!).
  • MazziniMazzini Posts: 58
    edited 2011-08-25 14:22
    jazzed wrote: »
    Possibly. However, it doesn't tell which file. Did you make any changes?
    The line number isn't very useful without line numbers in the editor :).

    Not sure what "error reading data file" means. David?

    sry i dont know how enable line number. The file is not modified
    line 143 is about at end (eof)
    In the previous version ( before you last fix) compiler return the same msg but doesn't add info about the line number

    Add:
    by the way , the "save as" issue causes an runtime library if you close by "X"

    Edit:
    I have 14Gb free space:)
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 14:26
    Oh, I see. You're just trying to compile an unmodified TvDemo.bas, right?
  • MazziniMazzini Posts: 58
    edited 2011-08-25 14:31
    David Betz wrote: »
    Oh, I see. You're just trying to compile an unmodified TvDemo.bas, right?

    yes
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 14:33
    Mazzini wrote: »
    yes
    Did you just select "hub" as a board configuration? I just did that compile on my Mac and didn't have a problem. I just did it from the command line though.
  • MazziniMazzini Posts: 58
    edited 2011-08-25 14:36
    I select C3 , it's wrong ?
    by Hub it works


    331480-c3.jpeg


    Edit:
    In board configuration is all "hub"
  • FriedVFriedV Posts: 77
    edited 2011-08-25 14:37
    I'm paying around with the IDE on an Macbook Air, Windows 7 64-bit.
    No problems so far, but need to dive deeper!
    Still looking for the diffs/advatages/drawbacks over Propbasic.
    XBasic is interpreted AFAIK?
    Thx for all your efforts, David & Bean and all the others!
    Fried
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 14:46
    Mazzini wrote: »
    I select C3 , it's wrong ?
    by Hub it works


    331480-c3.jpeg


    Edit:
    In board configuration is all "hub"

    You should be able to select C3. I did that and the command line compile worked for that as well. I guess I'll have to try Steve's IDE to see what is happening.

    Sorry for the trouble!
  • MazziniMazzini Posts: 58
    edited 2011-08-25 14:51
    David Betz wrote: »
    Sorry for the trouble!

    there aren't problems , i test it just for fun !
    let me know if you need feedback :)
    Regards
  • David BetzDavid Betz Posts: 14,516
    edited 2011-08-25 14:55
    Mazzini wrote: »
    there aren't problems , i test it just for fun !
    let me know if you need feedback :)
    Regards

    I can let you know right away that we appreciate any feedback. Thanks!!
  • jazzedjazzed Posts: 11,803
    edited 2011-08-25 15:16
    @FriedV, xBasic is compiled to byte-codes. It is somewhat slower than SPIN.


    @Mazzini, A few things:

    1. Can you copy the samples and include directories to a place other than "Program Files" like "C:\xBasic" ?

    Once you do that, use the wrench to set the "include path" to "C:\xBasic\include".
    Then open "C:\xBasic\samples\TvDemo\TvDemo.bas", set the project, and compile.

    2. Please try the attached xbasic-qt.exe to see if it fixes your "save as" runtime close by "X" issue.
  • MazziniMazzini Posts: 58
    edited 2011-08-25 15:37
    jazzed wrote: »
    @FriedV, xBasic is compiled to byte-codes. It is somewhat slower than SPIN.


    @Mazzini, A few things:

    1. Can you copy the samples and include directories to a place other than "Program Files" like "C:\xBasic" ?

    Once you do that, use the wrench to set the "include path" to "C:\xBasic\include".
    Then open "C:\xBasic\samples\TvDemo\TvDemo.bas", set the project, and compile.

    2. Please try the attached xbasic-qt.exe to see if it fixes your "save as" runtime close by "X" issue.

    1. I did. same error. I noticed that "ssf" has the same "bug"
    2. Fixed :)
Sign In or Register to comment.