Shop OBEX P1 Docs P2 Docs Learn Events
Suggestions for 100% Open source development on the Prop? — Parallax Forums

Suggestions for 100% Open source development on the Prop?

Nick McClickNick McClick Posts: 1,003
edited 2011-01-04 01:27 in Propeller 1
I've been asked by a few folks to put together a guide on 100% OSS development for the Prop. I've come up with a few things & wanted to see if there are better suggestions out there;
  1. Windows
    Write code in your favorite text editor, use Propellent to compile and load.
  2. Linux
    Install wine, python, and pyserial. Then use loader.py (here) with Propellent to compile and load
  3. Mac
    Install wine, python and pyserial. Then use loader.py as above.
I've done the Windows & Linux process myself & it works well. I don't have a Mac, so I can't test that method, but it looks like a pain in the rear because there's no package manager. I'm also not sure if loader.py works on Mac.

Is there a better OSS solution that I'm missing? Also, are there any OSS IDE's?
«13

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2010-12-10 12:14
    I don't understand what you mean by open source. Isn't that what the OBEX is? Is Propellent and open source tool? Please explain.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-12-10 12:19
    I, too, was confused by this. Plus, what does using Propellent with a text editor in Windows buy you that the Propeller IDE does not -- besides lack of integration?

    -Phil
  • ericballericball Posts: 774
    edited 2010-12-10 12:26
    Some assign significant importance to the availability of source code for any software tools they use. So The Propeller Tool and BST are less acceptable, even though both are freely available and free to use, because source code is not available.
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-12-10 12:43
    @dave - yep, the OBEX is open source. I'm specifically referring to OSS development tools - software that compiles & loads the code you find in the obex.

    @Phil - what Eric said. It isn't that important to me, but many developers put a lot of value in having the code freely available.
  • Dave HeinDave Hein Posts: 6,347
    edited 2010-12-10 12:58
    I still don't get it. Are you talking about Spin and PASM only? What about PropBasic and C? As a Windows user I would have to use Propellent instead of the Prop Tool? What problem are you trying to solve with your proposal?
  • David BetzDavid Betz Posts: 14,516
    edited 2010-12-10 14:13
    Is Propellent available in source form? I must have missed that. Where can I download the source?
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-12-10 14:34
    @David - yeah, you can grab it here, it's on the bottom. I think that's pretty recent, I don't remember seeing it before, either. Cool of them to release it under the MIT license!
  • RaymanRayman Posts: 14,887
    edited 2010-12-10 15:06
    It's cool they posted the source code. I was excited about the possibilities, right up until I saw it was Delphi :( Hopefully, somebody with convert it into C++...
  • David BetzDavid Betz Posts: 14,516
    edited 2010-12-10 15:14
    Well, even if most of us don't possess the tools to recompile it, it at least can serve as a reference to the "official" way of doing things with Spin and PASM. I'm assuming that the source is just a text file that can be easily inspected.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-12-10 16:12
    There is a catch, though. Unless it's buried in a file I didn't inspect, the "guts" of the compiler (Chip's assembly code for "compile1" and "compile2") seems to be missing from the zip.

    -Phil
  • David BetzDavid Betz Posts: 14,516
    edited 2010-12-10 18:14
    Ugh. My guess is that it is in pbcom.OBJ, a file with no corresponding source. I wonder if that was unintentional? Maybe someone can contact Parallax to see if they can upload the missing sources. After all, they do call this "open source software" on their web page.
  • jazzedjazzed Posts: 11,803
    edited 2010-12-10 18:59
    I, too, was confused by this. Plus, what does using Propellent with a text editor in Windows buy you that the Propeller IDE does not -- besides lack of integration?
    A serial port console that will run without having to switch windows. A library path. A pre-processor. Etc....

    It doesn't matter what Parallax does on Open Source tools. It will never be open enough for many people. Homespun is this close -><- to being open source.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-10 19:28
    Sphinx is open source. It even will compile itself on a Propeller with an SD card and TV / PS/2 Keyboard.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-12-10 20:19
    Mike Green said: Sphinx is open source. It even will compile itself on a Propeller with an SD card and TV / PS/2 Keyboard

    And it was written by Michael Park (mpark) who also wrote homespun. So I guess Michael may be happy to release Homespun source if someone wanted to embed it into an IDE.

    I am not sure where Brad (bst) stands on the Open Source either.

    However, since both of these guys will do mods/fixes, I don't really see any need to modify it - I would rather they do anything if they can as they do know how to test thoroughly.

    bst also integrates with PropBasic IIRC. What does Catalina do (Homespun?)?
  • jazzedjazzed Posts: 11,803
    edited 2010-12-10 20:47
    PropellerJVM is open source except for most Propeller Tools.
    I'm sure PropellerJVM can be compiled with Propellent with a little work.
    I seriously doubt that Sphinx will ever compile PropellerJVM.

    PropellerJVM open source components:
    • Java open source Jikes compiler thanks to IBM.
    • Javelin open source linker by Parallax.
    • Large open source class library from Parallax and users.
    • Open source Propeller booter, runner, interpreter from Parallax.
    • PropellerJVM MIT open source by me based on Peter's Spin code.
    • Full support of Javelin feature set plus.
    • Twice the Javelin performance, twice the program memory, half the price.
    • User interest: 0.5%
    Still there will be many users who will not be satisfied.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-12-10 20:52
    @Cluso99, Catalina uses homespun.

    The catalina IDE I am writing is open source. So this is vb.net code (vb.net is free, though ? fits the definition of open source), and the IDE runs Catalina, which is open source, which in turn runs Homespun, which is open source.

    Windows is not open source, but Linux is, so you could debate how far you take the definition.

    I guess a principle is that nothing should be secret. No "included DLLs" where you can't see the source of those. I like the idea of openness.

    One reason I'm using C rather than Spin is that Catalina allows programs bigger than the propeller memory. I've tried looking at the idea of "Big Spin" and in the past come up against some core pieces of code that appear to be secret. So Big Spin remains unwritten but Big C exists now, and I guess that to me is an example of where keeping things open source is better.
  • jazzedjazzed Posts: 11,803
    edited 2010-12-10 21:36
    Dr_Acula wrote: »
    @Cluso99, Catalina uses homespun.

    The catalina IDE I am writing is open source. So this is vb.net code (vb.net is free, though ? fits the definition of open source), and the IDE runs Catalina, which is open source, which in turn runs Homespun, which is open source.
    Homespun is not open source. If it wasn't for this little problem and others like it (or Michael letting go), it could be.
            public void Visit(BinaryExpr e)
            {
                object obj2;
                if (<PrivateImplementationDetails>.$$method0x60000d5-1 == null)
                {
                    Hashtable hashtable1 = new Hashtable(30, 0.5f);
                    hashtable1.Add("*", 0);
    ....
    

    Maybe we can get Michael to let Homespun go just so Propeller can be open truly source. If Sphinx could run on a PC I might consider that an alternative.
    Dr_Acula wrote: »
    ... So Big Spin remains unwritten ....

    I have "Big Ugly Spin" working :) There are restrictions such as: Single COG spin but multi-cog PASM, DAT sections unusable except for PASM, VAR works fine. Objects work. Certain features not functional: string operator, ? random, ^^ square-root, |<, and |>. Runs from EEPROM.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-12-10 22:33
    Homespun is not open source Argh. Yes, I think I can see more what Gadget Gangster is saying. Things that are open source depend on other things that are secret.

    Big C is nice... until you get stuck with the ANSI C89 keyword 'FILE' not working. Hopefully Ross will be online soon!

    Big Ugly Spin sounds interesting. And I presume it is open source?

    If so, maybe 1) it could be one answer to GG's problem of open source code and 2) it could become a very useful tool for all those people who have run out of propeller memory. @Jazzed, I'd love to brainstorm this some more, but I don't want to hijack this thread. Would you be ok starting a new thread to talk about your work?
  • mparkmpark Posts: 1,305
    edited 2010-12-10 22:40
    Cluso99 wrote: »
    And it was written by Michael Park (mpark) who also wrote homespun. So I guess Michael may be happy to release Homespun source...

    Happy? Umm, no :). Homespun, being my first attempt, is a disaster area internally and is unfit for human consumption. I tried to learn from my mistakes and took a different approach in Sphinx. It's not perfect but at least I can tolerate the idea of others looking at its source.
    jazzed wrote: »
    Homespun is not open source. If it wasn't for this little problem and others like it (or Michael letting go), it could be.
            public void Visit(BinaryExpr e)
            {
                object obj2;
                if (<PrivateImplementationDetails>.$$method0x60000d5-1 == null)
                {
                    Hashtable hashtable1 = new Hashtable(30, 0.5f);
                    hashtable1.Add("*", 0);
    ....
    

    Hey, no peeking!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-12-10 23:07
    Homespun unfit for human consumption?

    I guess I've had situations where my code has been torn apart in a public forum too. I see it as a positive experience, especially when someone takes 20 lines of code and shrinks it to one line.

    But is that the reason it is kept secret? The following is trawling through my probably leaky and inaccurate memory banks, but my understanding was that there is a secret core of code that parallax only has been willing to release to a few people. Maybe that is right, maybe not? I don't think the reason was for protecting IP - I think it was more that if there were 100 badly written compilers out there it might reflect poorly on parallax.

    I'm thinking what it would take to write a Big Spin compiler. Drilling down into the details, you can pull functions out of local memory or out of external memory and feed them through the spin interpreter, and that will work fine if the functions are small and self contained. But once you start to have global variables, and huge arrays that you might want to explicitly put in either local or external memory, you need access to the nuts and bolts of the compiler.

    Maybe there is a compromise - open source but any final product has to have the ok from parallax?

    At the moment, the solutions are either reverse engineering or going to a completely different language. Or learning Delphi.
  • BradCBradC Posts: 2,601
    edited 2010-12-11 06:20
    Dr_Acula wrote: »
    but my understanding was that there is a secret core of code that parallax only has been willing to release to a few people

    I'd re-check that if I were you. I'm not aware of Parallax releasing the compiler code to anybody. The Delphi wrapper around the binary blob that is Propellent is not really of any use in any case. It's all about the compiler.

    On the source front, I'm with Michael. My code is an absolute dogs breakfast and hardly fit for my consumption let alone anyone elses.

    In the absence of any form of communication or information, I'm assuming Parallax have started their own cross platform tool effort so I'd be expecting a compiler complete with source in a common language prior to the release of the Prop-II.

    Delphi's not hard. If you can pick up C, PASCAL is a doddle.
  • LeonLeon Posts: 7,620
    edited 2010-12-11 06:35
    Many semiconductor manufacturers seem to be moving towards cross-platform tools based on Eclipse, with Microchip bucking the trend and using NetBeans for their new MPLAB-X IDE. Both use Java, of course.
  • RossHRossH Posts: 5,519
    edited 2010-12-11 06:57
    Dr_Acula wrote: »
    Big C is nice... until you get stuck with the ANSI C89 keyword 'FILE' not working. Hopefully Ross will be online soon!

    I answered this in the Catalina thread - you need to move your FILE declaration.

    Ross.
  • BatangBatang Posts: 234
    edited 2010-12-11 08:14
    Hi mpark,

    Perhaps you may consider releasing the source to those of us who are interested in continuing the development and or modification of homespun.

    Besides anything written for dotnet (unless obfuscated) can easily be peeked at:)
  • prof_brainoprof_braino Posts: 4,313
    edited 2010-12-11 08:15
    I'm not sure if this is related to your discussion, bu the propforth material is open source under MIT license
  • jazzedjazzed Posts: 11,803
    edited 2010-12-11 09:38
    mpark wrote: »
    Happy? Umm, no :). Homespun, being my first attempt, is a disaster area internally and is unfit for human consumption. I tried to learn from my mistakes and took a different approach in Sphinx. It's not perfect but at least I can tolerate the idea of others looking at its source.
    ...
    Hey, no peeking!

    @Michael (mpark), having peeked at reverse engineered homespun source, I'm not sure where the unfitness of it is (other than the part I can't reverse engineer). I actually like the idea that every byte-code has its own class. Some things appear a little odd, but we all do that sometimes.

    You really should reconsider your position and let the community take up where you've stopped. As far as I'm concerned Homespun is a success and with a little massaging can be a good universal open-source Spin compiler that would satisfy the open source definition and 98% of people who care about that.

    BTW, Sphinx is a nice accomplishment and may serve the community well, but I can't run Sphinx on my PC.
    Dr_Acula wrote: »
    Big Ugly Spin sounds interesting. And I presume it is open source?
    ...
    @Jazzed, I'd love to brainstorm this some more, but I don't want to hijack this thread. Would you be ok starting a new thread to talk about your work?
    I posted the Big Ugly Spin source once (Spin32), but removed it. The current code is limited mainly because I wanted to run it from EEPROM which is what makes it Ugly. It shouldn't be too hard to move everything to external memory and allow at least normal STRING and DAT features.

    After all my SDRAM hardware work is done, ZOG/Catalina are running, and there are some great demos, I'll start another thread to explore Big Ugly Spin further. I agree: let's not further pollute this thread.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-12-11 12:29
    I have not looked at the Sphinx (compiler section) source. However, if Michael is happy, why can't we use a prop emulator to compile on the pc? Yes, messy, but it's a start.

    I thought at one stage Ken offered to release the compiler source to anyone who "really" wanted to re-create it in a better language??? I would have to do it in VB6 but currently no time - and it locks us into windoze. Does VB.net lock us into windoze? I do not know java and I am not good at C. Are these the 3 languages of choice???
  • Heater.Heater. Posts: 21,230
    edited 2010-12-11 14:01
    Logically there is no sense in providing an open source tool chain for the Prop, or anything else, if the source of the tool chain can only be compiled with a closed source compiler. It only moves the "closedness" down a level.

    Of course it does provide something of a reference for ones own implementation.

    As such I would say any kind of MS BASIC is out but C# would be OK as there is mono for non-windows platforms.
  • YodaYoda Posts: 132
    edited 2010-12-11 20:49
    How about Java? That runs on most platforms (windows, linux, mac, unix). You could say java is closed but it has been opening up and there is at least one or two open source implementations of the jvm. Also that would probably enable eclipse as a possibility for an ide. Would probably be pretty easy to add catalina to eclipse as well and have a common ide as well.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-12-11 21:12
    That is an interesting suggestion Yoda.

    Assuming it is possible to get hold of the compiler core source code (which seems less likely given the comments above from the authors of homespun and BST), ideally one would want a platform independant language.

    I'm a Basic programmer and I have gravitated to dialects of Basic that are similar to C, so I'm also happy with C (albeit on the steep part of the learning curve, as RossH will attest to!) so I'm looking at Java with hopefully a very unbiased viewpoint. I thought I would check out some of the building blocks:

    Graphics and text and basic I/O http://www.dgp.toronto.edu/~mjmcguff/learn/java/
    Serial port http://webcache.googleusercontent.com/search?q=cache:rjgxWW6v0bcJ:www.captain.at/howto-java-serial-port-javax-comm-rxtx.php+java+serial+port&cd=1&hl=en&ct=clnk&gl=au&client=firefox-a (this is a cached file, the website is down)
    Opening and closing files http://www.devdaily.com/java/edu/pj/pj010004/
    Differences between java and c http://www.programmersheaven.com/2/FAQ-JAVA-Differences-Between-JAVA-And-C-CPP

    Comments:
    1) programming graphics in java is 100x simpler than vb.net.
    2) The serial port would need a dll installed and this would be machine dependant but it appears there are options for linux, mac and windows.
    3) file access seems straightforward. Some of the syntax for java seems to have crept into vb.net
    4) Java vs C. To my Basic eyes they look almost the same, but that webpage explains the differences.

    I am now thinking not just open source, but whether it would be possible to have the same language for the compiler as is run on the propeller?

    I'm going to check out how easy it is to write a java applet. I am wondering if you could have the 'compiler' running as an applet on a web browser page?
Sign In or Register to comment.