P2 Links for where to obtain Tools & Sample/Test Code (reference only)

2»

Comments

  • cgraceycgracey Posts: 12,451
    edited 2020-01-03 - 23:47:38
    I made a change to PNut.exe for Tubular to enable compiling and downloading from the command line:

    https://drive.google.com/file/d/1W3sVAx9TeI9mCRsaywBB7_SIYmX8zYpU/view?usp=sharing

    To just compile your PASM code:
    PNut_v33p yourpasmfile.spin2 -p
    

    To also download your PASM code:
    PNut_v33p yourpasmfile.spin2 -p -r
    

    To compile from a batch file, make a batch file like this:
    start "PNut Compiler" /wait PNut_v33p.exe yourpasmfile.spin2 -p
    echo %errorlevel%
    

    It will report 0 for no compiler error or 1 for compiler error.

    You can add -r to also download and run. Download won't happen unless compilation was successful.
  • Thanks chip!
  • Publison wrote: »
    I had problems trying to read the Google Docs Instruction Set even when printing off on 24"x36" pages.
    I have taken the XLS files to a more readable letter size for my desk reference.

    Good idea. And here's my version. I think the bit encoding is not so important except for compiler developers. For me as beginner the verbose description is more helpful.

  • Peter JakackiPeter Jakacki Posts: 8,938
    edited 2020-01-09 - 16:06:32
    I just group the columns after the description and then collapse that to hide it. If I print the result out then there are 8 pages.
    Here's a screenshot.
  • cgracey wrote: »
    I made a change to PNut.exe for Tubular to enable compiling and downloading from the command line:

    https://drive.google.com/file/d/1W3sVAx9TeI9mCRsaywBB7_SIYmX8zYpU/view?usp=sharing

    To just compile your PASM code:
    PNut_v33p yourpasmfile.spin2 -p
    

    To also download your PASM code:
    PNut_v33p yourpasmfile.spin2 -p -r
    

    To compile from a batch file, make a batch file like this:
    start "PNut Compiler" /wait PNut_v33p.exe yourpasmfile.spin2 -p
    echo %errorlevel%
    

    It will report 0 for no compiler error or 1 for compiler error.

    You can add -r to also download and run. Download won't happen unless compilation was successful.

    Chip: Is it possible to change the errorlevel value to the offending line # in the code -- that would make bug hunting with external editors a bit easier.
  • Good idea but just be careful, %errorlevel% used to have a max value of 255. It may go higher now, or not.
  • It could be done. Any way of knowing if errorlevel goes over 255 these days?
  • I think Win NT allows arbitrary 32 bit integers.
    However, I think one'd probably want the file name the error is in, too.
Sign In or Register to comment.