Shop OBEX P1 Docs P2 Docs Learn Events
OSX/Win32/Linux Spin Compiler-0.15.3 - Page 5 — Parallax Forums

OSX/Win32/Linux Spin Compiler-0.15.3

1235

Comments

  • BradCBradC Posts: 2,601
    edited 2009-05-07 11:45
    Cluso99 said...
    BradC:
    I am a little lost. I am on windoze vista. I am presuming from your statement above, I can only compile ZiCog/TriBlade using the command line version and with the defines as part of the command line. It this correct?

    Not at all.. it will obey all defines in the source files also.. but heater asked if I could add command line defines the same way I added defines in the project file in bst.

    That way you can automate and switch between the hardware without altering your source files.

    In my Vista VM, I simply open zicog_demo.spin and click F8 and it compiles.. no hassles (please remember to enable Non-Parallax compatibility in the compiler preferences first though!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • BradCBradC Posts: 2,601
    edited 2009-05-07 11:48
    Check out the load time differences between 115200 BAUD Parallax compatible propeller loading and packed, double-baud rate encoding!

    brad@bkmac:~/zicog_v0_9$ bstc -Ox zicog_demo.spin -p0
    Found a USB Serial Device
    Brads Spin Tool Compiler v0.15-pre5 - Copyright 2008,2009 All rights reserved
    Compiled for i386 Linux at 19:35:20 on 2009/05/07
    Loading Object zicog_demo
    Loading Object zicog
    Loading Object sdspiqasm
    Loading Object PC_Keyboard
    Loading Object PC_Text
    Compiled 1923 Lines of Code in 0.144 Seconds
    We found a Propeller Version 1
    Propeller Load took 7.03 Seconds
    brad@bkmac:~/zicog_v0_9$ bstc -Ox zicog_demo.spin -p0 -f
    Found a USB Serial Device
    Brads Spin Tool Compiler v0.15-pre5 - Copyright 2008,2009 All rights reserved
    Compiled for i386 Linux at 19:35:20 on 2009/05/07
    Loading Object zicog_demo
    Loading Object zicog
    Loading Object sdspiqasm
    Loading Object PC_Keyboard
    Loading Object PC_Text
    Compiled 1923 Lines of Code in 0.18 Seconds
    We found a Propeller Version 1
    Propeller Load took 3.705 Seconds

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-05-07 12:51
    BradC:
    Windoze Vista w Celeron bst 18pre6
    Just started to use you program. Looks excellent. Here is a few problems..
    1. Cannot compile - fails to find some of the xxx_ret label. This is curious because before I added my code to ZiCog it compiles. With my code added, homespun will compile it. I will have another look tomorrow. If not I will send you my code.
    2. When I went to save the project it overwrote my main (demo) file - lucky I backed it up smile.gif
    3. Left pane does not allow me to show drive D:

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • BradCBradC Posts: 2,601
    edited 2009-05-07 15:03
    Cluso99 said...
    BradC:
    Windoze Vista w Celeron bst 18pre6
    Just started to use you program. Looks excellent. Here is a few problems..
    1. Cannot compile - fails to find some of the xxx_ret label. This is curious because before I added my code to ZiCog it compiles. With my code added, homespun will compile it. I will have another look tomorrow. If not I will send you my code.
    this *is* curious.. keep me posted.. it has passed my regression test which is all 1588 files in both OBEX and Hydra CD.
    Cluso99 said...

    2. When I went to save the project it overwrote my main (demo) file - lucky I backed it up smile.gif
    I really want to find out how it's overwriting files.. Baggers said the same thing..
    Cluso99 said...

    3. Left pane does not allow me to show drive D:

    Try Tools ->IDE Preferences->Editor Paths->Add and see what it does.. If it b0rks let me know..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-05-07 15:11
    Brad,
    Thanks for the quick reply.
    The overwriting occured (consistently). I opened two files Zicog_demo and Zicog. I tried to compile and it failed. I then closed the program and it asked if I wanted to save the project and I answered yes. I then overwrote my Zicog_demo file with a short file of filenames.
    I had already tried the Editor Path but that didnt work. It is as though it just sees the C drive. I only have 1 drive but it is mapped into 2 drives - Acer supplies it this way and I didn't change it when I should have [noparse]:([/noparse]

    Attached is the ZiCog v0.09 TriBlade files. These compile with homespun. You will need to remove the section of defines in ZiCog009_rr090.spin for bst.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm

    Post Edited (Cluso99) : 5/7/2009 3:30:39 PM GMT
  • BradCBradC Posts: 2,601
    edited 2009-05-08 00:18
    How are you creating a project? You can either open an existing project or select "Save As" from the project menu.
    <edit>
    Better still, what does the title bar for bst read when you have it open?

    It *looks* like you've found a bug in the #define processor which is causing your undefined _ret symbol error. I'll get it sorted this morning.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!

    Post Edited (BradC) : 5/8/2009 12:38:53 AM GMT
  • BradCBradC Posts: 2,601
    edited 2009-05-08 01:23
    Ok.. 0.15-Pre6 is up with the nested define bugfix.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-05-08 02:19
    Thanks Brad.

    Am I after 0.15Pre6 or 0.18Pre6 ??? I was using 0.18pre6. Presume its 0.18pre7 from the other thread smile.gif

    For the Project save, this may be the clue. I did not open a project. I just "open"ed the top level demo file, hit F8 to try and compile which failed. When I closed bst (X in top rh corner) it asked me if I wanted to save the project and I clicked yes. It then overwrote the file I had open. I think the top bar had the filename of the file I opened.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • BradCBradC Posts: 2,601
    edited 2009-05-08 05:59
    Cluso99 said...
    Thanks Brad.

    Am I after 0.15Pre6 or 0.18Pre6 ??? I was using 0.18pre6. Presume its 0.18pre7 from the other thread smile.gif

    For the Project save, this may be the clue. I did not open a project. I just "open"ed the top level demo file, hit F8 to try and compile which failed. When I closed bst (X in top rh corner) it asked me if I wanted to save the project and I clicked yes. It then overwrote the file I had open. I think the top bar had the filename of the file I opened.

    Right, so you must have opened the top level file from the project menu rather than the file menu. I'll add some checking in there to prevent people from opening a file that is not a project file from the project menu.

    bst is at 0.18-pre7
    bstc is at 0.15-pre6

    As this is the bstc thread I announced 0.15-pre6 here. I suspect you want bst instead unless you are command line compiling [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • T ChapT Chap Posts: 4,223
    edited 2009-05-08 17:58
    This is probably a really dumb question, but I am not sure what the purpose of having the bstc is. Can someone please explain why it would be used rather than just running bst? Also, I downloaded it to the Mac and obviously it is not a program that just runs by itself, so is there some info somewhere about how it can be used?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-08 18:38
    The purpose of having bstc is when users want to use some other kind of editor or integrated development system that will handle the "build" process for you, keeping track of what has been compiled already, particularly where there's a project with many pieces. These systems often will execute a "stand-alone" compiler / assembler / linker for you and pass it options and file names. It's less important for Spin than say C where there may be a compiler, a separate assembler, a linker, and maybe a library maintenance program, but often it's convenient to stick with one development system rather than have several that depend on the language being used.

    One example would be Apple's xCode development environment. This can be set up to run bstc to build a binary file from Spin source.

    Post Edited (Mike Green) : 5/8/2009 6:45:31 PM GMT
  • BradCBradC Posts: 2,601
    edited 2009-05-09 01:36
    In addition to what Mike said, I have various Propellers connected to various bits of networked hardware around my systems. It's nice to be able to ssh into a box, compile and download a software update to the propeller without having to tunnel X or even have any X libraries and components on the box.

    I wrote it as a cross-platform counter to Propellent, but one that did not require any graphical components to run and can be easily scripted by the end user. A little like bstl is just a command line loader. If you were distributing a product you could bundle bstl with the .binary file and your customer could do updates locally using a script you produced without requiring any understanding of the system.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • T ChapT Chap Posts: 4,223
    edited 2009-05-09 04:54
    BradC said...
    If you were distributing a product you could bundle bstl with the .binary file and your customer could do updates locally using a script you produced without requiring any understanding of the system.


    Thanks guys, this is exactly what I was thinking about doing. The only thing I am hoping for is to be able to create my own GUI in REALbasic to update the Prop operating system as needed by downloading a 'software update' binary, then running the app on OSX or PC that installs the binary.
  • dwelvedwelve Posts: 21
    edited 2009-05-26 22:18
    Ahh, great tool--I was able to load to EEPROM my large'ish program with bstc that I could not load with the Propeller Tool (using a Belkin USB-SERIAL adapter).
  • Chris MerckChris Merck Posts: 55
    edited 2009-06-13 19:52
    Brad,
    First of all thanks for creating a really great tool. I only want to see it increase in greatness.

    Now, I did find what I believe to be a compiler bug. The code snippit:

    i := tmp.BYTE
    i := i - $01

    works, but the simpler way of writing it, which compiles under the official tool, does not compile under bstc0.15-pre6 (latest as of yesterday?):

    i := tmp.BYTE - $01

    EDIT: The error I get is "Expected End of Line or Math Operator".
  • BradCBradC Posts: 2,601
    edited 2009-06-14 03:09
    Chris Merck said...
    Brad,
    First of all thanks for creating a really great tool. I only want to see it increase in greatness.

    Now, I did find what I believe to be a compiler bug. The code snippit:

    i := tmp.BYTE
    i := i - $01

    works, but the simpler way of writing it, which compiles under the official tool, does not compile under bstc0.15-pre6 (latest as of yesterday?):

    i := tmp.BYTE - $01

    EDIT: The error I get is "Expected End of Line or Math Operator".

    Yes, that is certainly a bug. Thanks for that, I'll get it fixed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eccles : How do I open the door?
    Bluebottle : You turn the knob on your side
    Eccles : I haven't got a knob on my side!
  • BradCBradC Posts: 2,601
    edited 2009-07-03 02:13
    0.15 Released.

    Changelog in top post.

    Notable changes are :
    - Unused SPIN code removal now removes *all* traces of the methods.
    - A line in the list file under each FIT informing you of how much COG memory remains
    - Loads of bugfixes

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Missed it by ->" "<- that much!
  • BradCBradC Posts: 2,601
    edited 2009-07-03 04:15
    0.15.1 Released

    More improvements / Fixes to redundant SPIN code eliminator

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Missed it by ->" "<- that much!
  • BradCBradC Posts: 2,601
    edited 2009-07-19 10:13
    0.15.2 Released

    Bug fix in error handling for large (invalid) DAT memory allocations (Ale)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Release the hounds!
  • BradCBradC Posts: 2,601
    edited 2009-07-20 00:19
    0.15.3 Released

    Fix for error reporting when using obj#const and the constant isn't. (Ale)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Release the hounds!
  • jazzedjazzed Posts: 11,803
    edited 2009-12-13 16:20
    Hi BradC,

    I find COM port trouble with BSTC v0.15.3 or BST v0.18.4 on Windoze.
    If the port enumerates as COM10, the loader fails. COM8 is no problem.
    The hardware is identical in both cases.

    Thanks.
  • BradCBradC Posts: 2,601
    edited 2009-12-14 00:08
    jazzed said...
    Hi BradC,

    I find COM port trouble with BSTC v0.15.3 or BST v0.18.4 on Windoze.
    If the port enumerates as COM10, the loader fails. COM8 is no problem.
    The hardware is identical in both cases.

    Thanks.

    Yes, that is fixed in the latest -pre release binaries of both. Cluso had the same problem and it took me a little while to find the bug.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you always do what you always did, you always get what you always got.
  • jazzedjazzed Posts: 11,803
    edited 2009-12-14 02:41
    The latest being > BSTC v0.15.3 ? That's what I'm using.

    Also, what does it take for #ifdef SYMBOL to work?
    #ifdef SYMBOL
    #endif
    
    ...
    
    SpinTest - Error at (76,1) Expected Operator, Spin Instruction, Unique Name, BYTE, WORD, LONG
    or Unary operator
    #ifdef SYMBOL
    ^
    
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-12-14 03:02
    jazzed: Take a look at ZiCog - it uses lots on #ifdef's. I suspect "SYMBOL" is a reserved word.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • BradCBradC Posts: 2,601
    edited 2009-12-14 03:23
    jazzed said...
    The latest being > BSTC v0.15.3 ? That's what I'm using.

    Yes, http://www.fnarfbargle.com/bst/snapshots/bstc-0.15.4-pre2.linux.zip
    jazzed said...

    Also, what does it take for #ifdef SYMBOL to work?
    [noparse][[/noparse]code]
    #ifdef SYMBOL
    #endif

    -Ox (Non Parallax compatible extensions)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you always do what you always did, you always get what you always got.
  • jazzedjazzed Posts: 11,803
    edited 2009-12-14 03:59
    Thanks Brad. I can't even get the Wiki example to work without -Ox ... maybe Wiki needs an update. I assume the wiki predates -Ox.

    Now that keyword highlighting is available for my favorite editor, bstc will be my standard development compiler. It's been a good ride so far and now that I can use macro's even in a limited form, I can get rid of some bad commenting habits [noparse]:)[/noparse]

    It would be nice if you also supported #elsif in addition to #elseifdef since the rest is C like. I noticed #elseif almost works.
  • BradCBradC Posts: 2,601
    edited 2009-12-14 04:09
    jazzed said...
    Thanks Brad. I can't even get the Wiki example to work without -Ox ... maybe Wiki needs an update. I assume the wiki predates -Ox.

    Nope -Ox was implemented at the same time. The Wiki needs an update. Ale kindly wrote the Wiki entry and I've not looked at it too hard except to add a few bits I thought were of interest. I'll have a look at updating it.


    jazzed said...

    Now that keyword highlighting is available for my favorite editor, bstc will be my standard development compiler. It's been a good ride so far and now that I can use macro's even in a limited form, I can get rid of some bad commenting habits [noparse]:)[/noparse]

    Normally I live in vim, but I'm so used to the environment in bst, and a quick F9 to compile / F10 to compile/load, I just have trouble going back to other editors.

    The latest -pre compiler has a -q option that spits out GCC style errors and locations (was asked for a while back), so that might make vim even easier to work with. (it also might be loaded with bugs and explode, but you never know).
    jazzed said...

    It would be nice if you also supported #elsif in addition to #elseifdef since the rest is C like. I noticed #elseif almost works.

    The reason I did not do that is I thought #elseif would kind of imply the if was capable of doing anything other than checking if a symbol was defined. If I did that, for consistency I really need to use #if / #ifn .. and so on. I wanted it to be relatively clear that this is a pretty dumb pre-processor that was not doing anything clever. And I wanted to retain as much compatibility with what Michael did in homespun.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you always do what you always did, you always get what you always got.
  • jazzedjazzed Posts: 11,803
    edited 2009-12-14 04:19
    BradC said...

    Normally I live in vim, but I'm so used to the environment in bst, and a quick F9 to compile / F10 to compile/load, I just have trouble going back to other editors.

    The latest -pre compiler has a -q option that spits out GCC style errors and locations (was asked for a while back), so that might make vim even easier to work with. (it also might be loaded with bugs and explode, but you never know).
    I often work in a softly lit room so !! is much easier to get right than F10 (which is annoyingly close to F11).
    Thanks for the -q tip. A line number error is great to have. Sometimes the other error display is hard to parse.

    Ya, I thought about #if, etc... but I didn't want to push my luck. The wiki says the preprocessor stuff is C like ... clearly that is wrong. I have a wiki account if you want me to fix it ... seems they turned of anonymous edits.

    Cheers.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2010-01-25 09:26
    BSTC reports code size in LONGs, but the figure it shows is number of BYTEs
  • BradCBradC Posts: 2,601
    edited 2010-01-25 10:04
    Andrey Demenev said...
    BSTC reports code size in LONGs, but the figure it shows is number of BYTEs

    Actually, worse than that it was incorrect entirely. A simple operator precedence error. Thanks for the report. Fix will appear in the next release.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
Sign In or Register to comment.