Shop OBEX P1 Docs P2 Docs Learn Events
I am not able to use Project->Add File Link with SPIN and Project View. — Parallax Forums

I am not able to use Project->Add File Link with SPIN and Project View.

agsags Posts: 386
edited 2013-05-25 19:04 in Propeller 1
More specifically (the question): What is the purpose or intended use model for adding a link to a project. I'm using SPIN and if I add a link (which I took to mean a *nix soft link) to the project, the file is still not found when I try to build. If I add a copy of the file, the project will build.

Comments

  • jazzedjazzed Posts: 11,803
    edited 2013-05-24 17:52
    ags wrote: »
    More specifically (the question): What is the purpose or intended use model for adding a link to a project. I'm using SPIN and if I add a link (which I took to mean a *nix soft link) to the project, the file is still not found when I try to build. If I add a copy of the file, the project will build.

    You only need one file in the SPIN project list to get started in SimpleIDE. SPIN programs include files in the source. Trying to add a file to a SPIN project will not work. I'll review the SPIN feature later today again to make sure things are working as expected.
  • agsags Posts: 386
    edited 2013-05-24 21:29
    Thanks for looking into this jazzed. I presume it's pilot error causing the problem. More detail:

    I have a SPIN project that builds using Propeller Tool (on Windows) that I've moved to a Mac (using SimpleIDE). I created a new project and added the top file (which includes other objects). When I attempted to build. there was an error for an object not found. By adding all the objects referenced (in the SPIN source) using the "Add File Copy" item in the Project pulldown menu, the build succeeded. When I tried to use "Add File Link" the build failed as though the "linked" file was not found (and I didn't see the "linked" file in the Project pane - I assume the link was unsuccessful or I am not using this feature correctly). I'm using version 0.9.26 for Mac.

    Also, in the build status window, I'm seeing what I would describe as spurious newlines. What seem to be single line outputs are split into multiple lines. I thought it might be a line length wrapping, but it is far short of the Build Status window size, and there are other (single) lines that are more than double the length of the lines that are split.

    Finally, when compilation is complete the final message is:
    "Program size is 1
    8900 longs
    ..."

    I think this is really
    "Program sizes is 18900 longs"
    but that can't be. It loads into RAM so it must be =< 8192 longs, right? So what does this mean?
  • jazzedjazzed Posts: 11,803
    edited 2013-05-25 17:06
    ags wrote: »
    I have a SPIN project that builds using Propeller Tool (on Windows) that I've moved to a Mac (using SimpleIDE). I created a new project and added the top file (which includes other objects). When I attempted to build. there was an error for an object not found.

    Can you please reproduce this problem and open the build status window. Control click in the build status, choose select all, then copy/paste to here. I suspect that your project depends on a SPIN library file and the library is not found.
    ags wrote: »
    Also, in the build status window,.... I think this is really
    "Program sizes is 18900 longs"
    but that can't be. It loads into RAM so it must be =< 8192 longs, right? So what does this mean?

    These are all problems associated with handling the BSTC output. The SimpleIDE status bar should show 18900 bytes when the build status shows 18900 longs.


    I did find a bug in my testing. A new SPIN project in" simple view" will fail because we don't include a Blank Simple Spin Project. Please use only "project view" for SPIN.
  • agsags Posts: 386
    edited 2013-05-25 18:27
    I will submit the build status output when I have access. Until then, some clarification:

    I'm a fairly proficient user of the Propeller Tool (and SPIN). I'm a new user of SimpleIDE.
    I'm using Project View
    The only object my top source includes is Parallax Serial Terminal - which was found (I presume in /opt/parallax/spin)
    All other included objects are my own. When I tried to link to them (Project->Add File Link) the build status window error was something like "file not found". When I used Project->Add File Copy (for each of the 11 objects) the problem was resolved.
  • jazzedjazzed Posts: 11,803
    edited 2013-05-25 18:47
    Please do not use Project Add File or Add Link for SPIN projects. SPIN view is not designed to work that way. Need to update the user guide.

    There is a new Propeller-Tool like IDE coming that will make this all better.
    ags wrote: »
    I will submit the build status output when I have access. Until then, some clarification:

    I'm a fairly proficient user of the Propeller Tool (and SPIN). I'm a new user of SimpleIDE.
    I'm using Project View
    The only object my top source includes is Parallax Serial Terminal - which was found (I presume in /opt/parallax/spin)
    All other included objects are my own. When I tried to link to them (Project->Add File Link) the build status window error was something like "file not found". When I used Project->Add File Copy (for each of the 11 objects) the problem was resolved.

    Your Spin code should all be in the same folder as your main spin file (/opt/parallax/spin is separate of course).

    If you have Spin code in a separate folder, you can use the Project Manager -> Compiler -> Other Compiler Options to set another library path.

    For example, I have spin code in C:/propeller/spin, so I can add that folder to the Other Compiler Options as: -L C:/propeller/spin

    Any of these options can be added to the Other Compiler Options field.
    sh-3.1$ bstc
    Brads Spin Tool Compiler v0.15.4-pre3 - Copyright 2008,2009 All rights reserved
    Compiled for i386 Win32 at 19:57:58 on 2010/01/15
    Program Usage :- bstc (Options) Filename[.spin]
     -a            - Create Propeller object archive zipfile
     -b            - Write .binary file
     -c            - Write .dat file for C-Compiler (Drops a <filename.dat> file)
     -d <device>   - Device to load to (Default : )
     -D <define>   - Define a pre-processor symbol (may be used multiple times)
     -e            - Write .eeprom file
     -f            - Double download baud rate
     -h            - Display this help information
     -l[sm]        - Generate listfile (s) For source code / (m) for Machine readable - Debugger style listing
     -L <Lib Path> - Add a library path or file holding library path(s) to the searchpath (may be used multiple times)
     -o <filename> - Output [.list/.eeprom/.binary/.zip] Filename (Defaults to input Filename without .spin)
     -O <options>  - Optimise Binary (HIGHLY EXPERIMENTAL!!!!!)
        a          - Enable all optmisations (Be careful! No, really)
        b          - Bigger constants (should be slightly faster at the expense of code size)
        c          - Fold Constants
        g          - Generic "safe" size optimisations for smaller/faster code, however not what the Parallax compiler will
    generate
        r          - Remove unused Spin Methods
        u          - Fold Unary "-" Operations on Constants if it will make the code smaller
        x          - Non-Parallax compatible extensions
     -p[012]       - Program Chip on device (-d)
        0          - Load Ram and run
        1          - Load EEProm and shutdown
        2          - Load EEProm and run
     -w[012]       - Error/Warning level - 0 - Errors only / 1 - Error/Warning / 2 - Error/Warning/Information (Default 0)
     -q            - Be silent except for GCC style errors and warnings
     -v            - Get program version information
    
  • agsags Posts: 386
    edited 2013-05-25 19:04
    OK - as suspected, I was misusing (abusing?) the tool. I did read the doc, so until the PropellerTool-lookalike is ready, it may help others if this is included in the documentation (agreeing with what you said above).

    It appears that the way I resolved the problem was by using Project->Add File Copy, which puts the SPIN file in the Project directory with the main SPIN file - which is what you explain is required in the current implementation.

    Thanks for the reply. Great "customer service".
Sign In or Register to comment.