Shop OBEX P1 Docs P2 Docs Learn Events
New PNut-TS compiler for P2 development on Windows, Mac, Linux (yes, RPi) - Page 2 — Parallax Forums

New PNut-TS compiler for P2 development on Windows, Mac, Linux (yes, RPi)

2»

Comments

  • NEWS

    We've just released v1.51.0, bringing PNut_TS up to par with PNut v51a

    Here's what's new/fixed:

    v1.51.0

    Updated Language Support

    • Add language version support through {Spin2_v51}.
    • Add command-line -F option which, when specified, causes the .flash file to be written (PNut -ci equiv.)
    • Preprocessor intermediate files now end with __pre.spin2 (vs. '-pre.spin2')
    • Preprocessor: #define is no longer affected by command-line -U options
    • Added #pragma exportdef SYMBOL which makes SYMBOL present as if added with -DSYMBOL on the command line but affects all files compiled after the file containing the #pragma (place in top-most file for best results)
    • {Spin2_v44} is no longer supported due to changes in data structures beginning in v45
    • Compatible with PNut versions through PNut_v51a.exe (except for PNut_v44.exe, which is no longer supported)
    • Performance fix: Issue #2 Compiling FILEs in DAT section needs attention - is slow

    PNut-TS is found at its new Public Repository, while the latest Releases are also found there at the Releases Page

    We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing

    If you spot any issues with code generation or compilation, you can review the testing process. This should help you identify differences between PNut v51a and PNut_TS v1.51.0.

    We look forward to hearing what you find.

    As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)

    Stephen & Chip

  • maccamacca Posts: 876
    edited 2025-05-02 08:36

    @"Stephen Moraco" said:
    PNut-TS is found at its new Public Repository, while the latest Releases are also found there at the Releases Page

    Seems that the Linux x64 package contains the ARM executable (same as the Linux arm64 package).

    $ unzip pnut-ts-linux-x64-015100.zip 
    Archive:  pnut-ts-linux-x64-015100.zip
       creating: pnut_ts/
      inflating: pnut_ts/LICENSE         
      inflating: pnut_ts/CHANGELOG.md    
      inflating: pnut_ts/AUTHORS         
      inflating: pnut_ts/pnut_ts         
      inflating: pnut_ts/README.md       
      inflating: pnut_ts/Preprocessor.md  
      inflating: pnut_ts/copyright       
      inflating: pnut_ts/CommandLine.md  
      inflating: pnut_ts/Goals.md        
    $ file pnut_ts/pnut_ts
    pnut_ts/pnut_ts: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=4786c866c75e9a87a389393cd98b619259af30dd, for GNU/Linux 3.7.0, stripped
    
  • again?

  • @macca i’ve uploaded one with correct content please let me know if fixed.

    @Wuerfel_21 yep, i’m a creature of scripts. Guess I better fix one of them! 😋

  • maccamacca Posts: 876

    @"Stephen Moraco" said:
    @macca i’ve uploaded one with correct content please let me know if fixed.

    Aside from the MacOS garbage :smile:, yes, it works.

    I think there are some missing things, the following sample source is what I used recently to fix most of my issues with pointers, it works with PNut v51a but not with pnut_ts:

    {Spin2_v51}
    CON
        STRUCT sPoint(word x, word y, byte c)
    
    PUB main() | a, b, ^sPoint ptr
    
        a := ptr.x++
        a := ++ptr.x
    
        a := [ptr]
        a := [ptr]++
        a := ++[ptr]
    
        a := ptr[++].x
        a := ptr[++].x--
        a := --ptr[++].x
        a := [++]ptr.x
        a := [++]ptr.x--
        a := --[++]ptr.x
    
        ptr.x := a
        [ptr] := a
    
        ptr[++].x := a
        [++]ptr.x := a
    
        a := ptr.x := b
        a := ptr[++].x := b
        a := [++]ptr.x := b
    
    /home/marco/pnut_ts/pnut_ts -I /home/marco/workspace/spin-tools-ide/library/spin2 StructTest.spin2
    pnut-ts: * Propeller Spin2/PASM2 Compiler 'pnut_ts' (c) 2024 Iron Sheep Productions, LLC., Parallax Inc.
    pnut-ts: * Version 1.51.0, Build date: 5/1/2025
    pnut-ts: * pnut_ts -I /home/marco/workspace/spin-tools-ide/library/spin2 StructTest.spin2
    pnut-ts: Wrote StructTest.obj (53 bytes)
    StructTest.spin2:7:error:Expected end of line (m281)
    StructTest.spin2:7:error:Expected end of line (m281)
    pnut-ts: Done
    

    Commenting line 7, show same error on line 15.

  • Stephen MoracoStephen Moraco Posts: 332
    edited 2025-05-02 17:34

    We will add that to our regression test next week.
    Thank you for reporting this.

    And yeah, packaged that pretty quickly for you as I was heading to the airport 😊

  • Stephen MoracoStephen Moraco Posts: 332
    edited 2025-05-05 23:59

    NEWS

    We've just released v1.51.1, bringing PNut_TS up to par with PNut v51a

    Here's what's new/fixed:

    v1.51.1

    Bugfix Release

    • BUGFIX: Issue (#7): Compile failure for post increment/decrement (Thank you, Macca, for reporting this!).

    PNut-TS is found at its Public Repository, while the latest Releases are also found there at the Releases Page

    We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing

    If you spot any issues with code generation or compilation, you can review the testing process. This should help you identify differences between PNut v51a and PNut_TS v1.51.1.

    We look forward to hearing what you find.

    As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)

    Stephen & Chip

  • @macca your fixes are in. Thank you for reporting this.

Sign In or Register to comment.