HomeSpun Compiler Open Source

BatangBatang Posts: 234
edited 2013-05-28 - 17:02:23 in Propeller 1
As I need a spin compiler that can be easily cuctomized for the up coming Propbasic Studio I have contacted mpark about releasing the source for his HomeSpun compiler.

mpark has generously agreed to do so and has released it under the MIT license.
http://forums.parallax.com/showthread.php/106401-Homespun-Spin-compiler-0.31-Now-open-source?p=749832#post749832

Here is a Visual Studio 2012 project using the released source code.

I have made a minor change in the dissembler module but otherwise the code is as before. Now Build Version 0.3.2.

The Zip contains the VS2012 project as well as Debug and Release binaries.

Cheers
«1

Comments

  • Heater.Heater. Posts: 21,213
    edited 2013-05-27 - 23:30:57
    Wow, way to go mpark. Thank you.

    There is some kind of irony here, considering our recent debate re. the merits of open and closed source.
  • BatangBatang Posts: 234
    edited 2013-05-27 - 23:33:48
    Fully aware of the irony when I created the thread :)

    A point I made that I think was lost in that thread was you guys needed to concentrate on the steak and not the peas, QED the compilers not the IDE.

    Cheers.
  • Cluso99Cluso99 Posts: 15,366
    edited 2013-05-28 - 00:03:25
    Fantastic news. Way to go Mark!

    FWIW, Catalina uses a modified version of homespun (not sure what the mods are).
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 22,424
    edited 2013-05-28 - 00:08:12
    Excellent, Michael! Thank you!

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 04:42:58
    Batang wrote: »
    As I need a spin compiler that can be easily cuctomized for the up coming Propbasic Studio I have contacted mpark about releasing the source for his HomeSpun compiler.

    mpark has generously agreed to do so and has released it under the MIT license.
    http://forums.parallax.com/showthread.php/106401-Homespun-Spin-compiler-0.31-Now-open-source?p=749832#post749832

    Here is a Visual Studio 2012 project using the released source code.

    I have made a minor change in the dissembler module but otherwise the code is as before. Now Build Version 0.3.2.

    The Zip contains the VS2012 project as well as Debug and Release binaries.

    Cheers
    Nice of Michael to release his code!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-05-28 - 04:58:19
    Thanks++ to Michael!
    Answers: 1) A quadcopter. 2) Very high. 3) The internet. 4) A lot. 5) No.
  • BeanBean Posts: 8,014
    edited 2013-05-28 - 05:01:06
    Thanks Michael (mpark). Thanks to you we can move ahead with PropBasic Studio.

    Bean
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 05:49:21
    Bean wrote: »
    Thanks Michael (mpark). Thanks to you we can move ahead with PropBasic Studio.

    Bean
    Is Homespun required for PropBASIC Studio? Wouldn't it be better to use Roy's compiler since that will eventually be the basis for a P2 version of Spin/PASM. Seems like it would make more sense to use that for any new work.
  • BatangBatang Posts: 234
    edited 2013-05-28 - 06:10:25
    David Betz wrote: »
    Wouldn't it be better to use Roy's compiler since that will eventually be the basis for a P2 version of Spin/PASM.

    I guess the key word in your quote is "eventually".

    However the Propbasic compiler output does not currently work with Roy's spin compiler, I do not recall the reason at the moment so perhaps Bean can elaborate.

    Despite mpark's self depreciating comments to the contrary the homespun compiler is a solid performer that has been around for several years now.

    I or others are quite capable of updating or changing it for the P2, the same undertaking will be required for Roy's compiler.

    As I doubt that there will be production release silicon for the P2 this year, this is somewhat academic.

    Cheers.
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 06:12:39
    Batang wrote: »
    I guess the key word in your quote is "eventually".

    However the Propbasic compiler output does not currently work with Roy's spin compiler, I do not recall the reason at the moment so perhaps Bean can elaborate.

    Despite mpark's self depreciating comments to the contrary the homespun compiler is a solid performer that has been around for several years now.

    I or others are quite capable of updating or changing it for the P2, the same undertaking will be required for Roy's compiler.

    As I doubt that there will be production release silicon for the P2 this year, this is somewhat academic.

    Side Note: I would like to see the homespun compiler project posted to a code repository somewhere, so if some would like to do this and maintain it I am willing to provide commits to the changes I will be doing to it..

    Cheers.
    I guess the difference is that Roy's compiler (called OpenSpin I think) is officially supported by Parallax. It would be good to know what is preventing it from working with PropBASIC. I'm sure that problem can be addressed.
  • BeanBean Posts: 8,014
    edited 2013-05-28 - 06:44:07
    @ operator.

    Bean
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 06:46:53
    Bean wrote: »
    @ operator.

    Bean
    Thanks Bean! I'm sorry to say that I don't even know what that operator does. Maybe Roy will comment on whether he can add that to OpenSpin.
  • BatangBatang Posts: 234
    edited 2013-05-28 - 06:51:22
    Homespun compiler is now at

    http://code.google.com/p/homespun-spin-compiler/

    Cheers.
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 06:54:10
    Batang wrote: »
    Homespun compiler is now at

    http://code.google.com/p/homespun-spin-compiler/

    Cheers.
    Great! Thanks! Will the Homespun compiler run on the Mac or Linux?
  • BatangBatang Posts: 234
    edited 2013-05-28 - 06:57:18
    David Betz wrote: »
    Great! Thanks! Will the Homespun compiler run on the Mac or Linux?

    If I recall it worked with mono on both, refer to the original thread for more info:

    http://forums.parallax.com/showthread.php/106401-Homespun-Spin-compiler-0.31-Now-open-source?p=749832#post749832

    Cheers
  • Mike GreenMike Green Posts: 22,914
    edited 2013-05-28 - 07:03:52
    Thanks Michael and thanks Batang for working on this.
  • Heater.Heater. Posts: 21,213
    edited 2013-05-28 - 07:43:08
    David,

    @ does what you expect @ to do but gets it right. That is is it gives the physical, actual, real HUB address of something. It works when initializing data in DAT sections, unlike the others. It gives the same result no matter where you use it, unlike @.

    HomeSpun works on Linux under the mono runtime. It even works on Raspberry Pi and other ARM machines.

    Thank you again mpark. Fantastic.
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 07:44:54
    Heater. wrote: »
    David,

    @ does what you expect @ to do but gets it right. That is is it gives the physical, actual, real HUB address of something. It works when initializing data in DAT sections, unlik ethe others. It gives the same result no matter where you use it, unlike @.

    HomeSpun works on Linux under the mono runtime. It even wors on Raspberry Pi and other ARM machines.

    Thank you again mpark. Fantastic.
    @ "sets the working bit"! I suppose @ must have some uses or they wouldn't be there though.
  • BatangBatang Posts: 234
    edited 2013-05-28 - 07:53:47
    HomeSpun works on Linux under the mono runtime. It even works on Raspberry Pi and other ARM machines.

    If that is the case then ProBasic Studio should run on those platforms as well.
  • jazzedjazzed Posts: 11,803
    edited 2013-05-28 - 08:48:04
    Batang wrote: »
    If that is the case then ProBasic Studio should run on those platforms as well.

    The problem I had with mono is with the serial port. Maybe it has been fixed, but last I checked it only ran in polled mode. MS.net serial port is event driven of course and that led me into a false sense of having excellent multi-platform support. That's why I started using Qt.
  • BatangBatang Posts: 234
    edited 2013-05-28 - 08:55:08
    jazzed wrote: »
    The problem I had with mono is with the serial port. Maybe it has been fixed, but last I checked it only ran in polled mode. MS.net serial port is event driven of course and that led me into a false sense of having excellent multi-platform support. That's why I started using Qt.

    The workaround is to run on another thread which is a blocking read, similar to sockets programming.
  • Heater.Heater. Posts: 21,213
    edited 2013-05-28 - 11:42:37
    It builds. It runs. On my Debian 7.0 PC here at least. Thanks again Michael.

    I have take the liberty of creating a git repository of the content of Batang's VS2012 project posted above here:
    https://github.com/ZiCog/HomeSpun

    I don't have any plans to tinker with that code. It's just there. I only added a README file with attributions, links to documantation and build instructions for Debian.

    Batang, I have used HomeSpun on ARM Cortex A8 based boards running Debian and Linaro. Can't remember if I tried the Raspberry Pi. Wait a minute...
  • Heater.Heater. Posts: 21,213
    edited 2013-05-28 - 12:42:10
    Yay, HomeSpun runs on the Raspberry Pi.

    I updated the github readme with a note about what you need to install to run it on the raspi.
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 12:45:17
    Heater. wrote: »
    Yay, HomeSpun runs on the Raspberry Pi.

    I updated the github readme with a note about what you need to install to run it on the raspi.
    I think Batang already put HomeSpun on Google Code. Is it going to live in two places at the same time?
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-05-28 - 13:08:55
    So I have to give my Raspberry Pi Mono?? :lol:
    MOV OUTA, PEACE <div>Rick </div><div>"I've stopped using programming languages with Garbage Collection, they keep deleting my source code!!"</div>
  • Heater.Heater. Posts: 21,213
    edited 2013-05-28 - 13:10:19
    Ah, some how I missed that little news.

    Not to worry, it's a fork, I'm most likely not going to make any changes. I'm a github man and prefere git to subversion anyway. I'll add a link in the README directing any passers by to Batang's repo.
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 13:15:43
    Heater. wrote: »
    Ah, some how I missed that little news.

    Not to worry, it's a fork, I'm most likely not going to make any changes. I'm a github man and prefere git to subversion anyway. I'll add a link in the README directing any passers by to Batang's repo.
    I like git better too but subversion was selected for propgcc so I've kind of gotten used to using it.
  • Heater.Heater. Posts: 21,213
    edited 2013-05-28 - 13:20:06
    The problem is now I find myself all the time having to run between git, svn and hg, remebering how to drive them all is a pain.
  • David BetzDavid Betz Posts: 13,472
    edited 2013-05-28 - 13:22:36
    Heater. wrote: »
    The problem is now I find myself all the time having to run between git, svn and hg, remebering how to drive them all is a pain.
    Yeah, remembering which command goes with which system is a pain. Sorry, I was wrong about propgcc. It's using Mercurial (hg) not Subversion.
  • Roy ElthamRoy Eltham Posts: 2,652
    edited 2013-05-28 - 14:00:17
    @ is on the list to be supported by OpenSpin.
Sign In or Register to comment.