Shop OBEX P1 Docs P2 Docs Learn Events
FlexProp Spin2 possible problems — Parallax Forums

FlexProp Spin2 possible problems

This is the results of trying to compile, using FlexProp GUI, a Spin2 file, jm_dhtxx_demo.spin2. Below I have included the zip file that Jon provided.

I wanted to run the Spin2 code visually to see what the program looked like, before I started to port it to FlexBasic.

Ray

"D:/flexprop/bin/flexspin" -2 -l -D_BAUD=230400 -O1 -I "D:/flexprop/include" "D:/programs/flexprop/spin2/cm2302/jm_dhtxx_demo.spin2"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2021 Total Spectrum Software Inc.
Version 5.0.6 Compiled on: Jan 10 2021
jm_dhtxx_demo.spin2
|-jm_dhtxx.spin2
|-jm_fullduplexserial.spin2
|-|-jm_nstr.spin2
|-jm_ansi.spin2
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:163: error: Cannot handle expression yet
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:200: error: Cannot handle expression yet
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:278: warning: ret instruction in inline asm converted to jump to end of asm
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:282: warning: ret instruction in inline asm converted to jump to end of asm
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:287: warning: ret instruction in inline asm converted to jump to end of asm
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:291: warning: ret instruction in inline asm converted to jump to end of asm
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:297: error: Cannot handle this condition on instruction in inline asm
D:/programs/flexprop/spin2/cm2302/jm_dhtxx.spin2:301: error: Cannot handle this condition on instruction in inline asm
child process exited abnormally
Finished at Mon Jan 11 09:33:29 2021

Comments

  • You know, Eric charges nothing for his compiler -- perhaps you could have tracked down the errors and provided suggestions. You are a programmer, right? :)

    It took about 2 minutes to modify the code to run in FlexProp. I'm documenting the changes here to assist @ersmith.

    This is a known issue that was reported a few days ago.
      getms()   ' Spin2 compiler
      _getms()  ' FlexProp
    

    Syntax changes:
      dht[x].[y] := b
    
    ...is changed to
      dht[x] |= b << y
    
    ...for FlexProp.

      if (dht[2].[7])
    
    ...changes to
      if (dht[2] & $80)
    
    ...for FlexProp.

    Visual proof is attached. Make sure you add -T to the Run command line.
  • @Rsadeika , @JonnyMac : Thanks for the info guys. getms() was added in 5.0.6, which is on my patreon page and will be on github soon. The dht[x].[y] syntax was supposed to work, but parsed incorrectly due to a typo in the parser. The _ret_ condition code never got implemented for inline assembly (it needs special handling because FlexProp puts inline assembly inline, in constrast to PNut which makes it a subroutine) but that should be fixed now. Both changes are checked in to github and will be in the next release.
Sign In or Register to comment.