Shop OBEX P1 Docs P2 Docs Learn Events
flexspin compiler for P2: Assembly, Spin, BASIC, and C in one compiler - Page 42 — Parallax Forums

flexspin compiler for P2: Assembly, Spin, BASIC, and C in one compiler

13940424445122

Comments

  • Rest to heal both physically and mentally.
    Get well soon!
  • + 1
    Jim
  • Thanks everyone. This is such an awesome community in so many ways, not just technically
  • RaymanRayman Posts: 14,646
    Eric,

    Hope you're still getting better!

    I'm holding back on error reports.
    But, this one is more of a user error report...
    I did this by accident:
    PRI DrawNumberEdit(p):c,x,y,w,h,i,j,n,s,d,b
    

    Obviously, the ":" should be a "|".
    The compiler appears to have not expected such a bad mistake :)
  • @Rayman you just declared a function with multiple (11 I think) return values. If it worked, then it's a feature :smiley: If it didn't work, then I missed an error case. I can't remember what the limit is on number of return values is supposed to be.
  • RaymanRayman Posts: 14,646
    This has me thinking...

    Does Spin2 even need to differentiate between local variables and return variables?

    Why not just let the first 8 or so be always returned and the rest not...
  • cgraceycgracey Posts: 14,152
    Rayman wrote: »
    This has me thinking...

    Does Spin2 even need to differentiate between local variables and return variables?

    Why not just let the first 8 or so be always returned and the rest not...

    That is an interesting idea. It might simplify things.
  • RaymanRayman Posts: 14,646
    edited 2020-03-10 19:16
    Eric,

    I'm trying hard not to tell you about any potential Fastspin issues I find until I hear you're home and all caught up.
    They usually turn out to be my own fault anyway these days...

    But, I know I'll forget if I don't mention this now...
    This section of code goes off the rails if I don't use "x" instead of long[p][..]
    It does work if I compile with a "-O0" option.
    So, I think it's some kind of optimization thing...
        'Check limits 
        x:=long[p][14]  'Something strange here!  If I don't use x and use long[][] below it doesn't work!!!
        if n > x'long[p][14]' 'in range?
            n:=x'long[p][14]        
        
        x:= long[p][13]   
        if n < x'long[p][13] 'in range?
            n:=x'long[p][13]
    
  • Just wanted to apologize to everyone for being MIA, but my brain is still recovering from a pretty serious illness and I'm under orders not to work for a few weeks Looking at screens gives me a headache anyway :(. The eventual prognosis is promising but I think its wise to listen to my doctor, so I won't be able to contribute much for a little while longer.
  • cgraceycgracey Posts: 14,152
    Hang in there, Eric! Good thing you were able to get the attention you needed. I'm getting sick of looking at screens, too.
  • ersmith wrote: »
    Just wanted to apologize to everyone for being MIA, but my brain is still recovering from a pretty serious illness and I'm under orders not to work for a few weeks Looking at screens gives me a headache anyway :(. The eventual prognosis is promising but I think its wise to listen to my doctor, so I won't be able to contribute much for a little while longer.
    I'm glad to hear you're recovering. Take whatever time you need and don't feel obligated to respond to any messages here until it's safe for you to do so. We hope to see you back when you are well.

  • kwinnkwinn Posts: 8,697
    ersmith wrote: »
    Just wanted to apologize to everyone for being MIA, but my brain is still recovering from a pretty serious illness and I'm under orders not to work for a few weeks Looking at screens gives me a headache anyway :(. The eventual prognosis is promising but I think its wise to listen to my doctor, so I won't be able to contribute much for a little while longer.

    Absolutely listen to the doctor. Great to hear you are on the road to recovery. You have already contributed more than a lot of us, so relax and take care of your health.
  • RaymanRayman Posts: 14,646
    edited 2020-03-19 13:59
    Hang in there! Fastspin is in a pretty good place right now. Nothing urgent here...
    Get well soon!
  • flexgui/fastspin have been a huge part of getting up & running on P2... No need for apologizing for taking a break for your health. Best wishes Eric & get well soon!


    dgately
  • You've gone above and beyond with FlexGUI and all the languages FastSpin supports, plus self-hosted Python.
    Listen to your doc and take all the time you need to recover. You have definitely earned it!
  • Cluso99Cluso99 Posts: 18,069
    I can only echo the above comments.
    Take it easy and take the time to recover fully :smiley:
  • ersmith,
    Ditto what others have said. :)
  • I agree. But don’t read these comments until you are better ;-)
  • take care and take time Eric. All the best
  • evanhevanh Posts: 15,915
    edited 2020-03-20 04:53
    ersmith wrote: »
    ... but my brain is still recovering from a pretty serious illness and I'm under orders not to work for a few weeks Looking at screens gives me a headache anyway :(. The eventual prognosis is promising but I think its wise to listen to my doctor, so I won't be able to contribute much for a little while longer.
    Yes, after a brain injury, a long rest is best from what I've heard. I've a got neighbour now regretting quickly getting back on his mountain bike against doctor's orders.

  • kwinnkwinn Posts: 8,697
    evanh wrote: »
    ersmith wrote: »
    ... but my brain is still recovering from a pretty serious illness and I'm under orders not to work for a few weeks Looking at screens gives me a headache anyway :(. The eventual prognosis is promising but I think its wise to listen to my doctor, so I won't be able to contribute much for a little while longer.
    Yes, after a brain injury, a long rest is best from what I've heard. I've a got neighbour now regretting quickly getting back on his mountain bike against doctor's orders.

    Never could understand the reasoning behind paying for an expert opinion and then ignoring it. I have an older brother in law that does that regularly.
  • RaymanRayman Posts: 14,646
    Still can't get numbers to work, but the stdio way that yeti showed works.
    I think I might even like it better...
        repeat
            io.sprintf(@buffer,@format,123.56,67)
            ser.str(@buffer)
            ser.tx(13)
            ser.tx(".")
            waitcnt(cnt+clkfreq)
            
    
    
    dat
    format byte "%8.1f = 0x%.3x",0
    buffer byte "                    ",0 ' 20 should be enough
    
  • An interesting discovery I just made: the FlexGUI viewport supports ANSI / VT100 control codes. So far, changing foreground and background colors, bold, underline, as well as cursor positioning, viewports, etc all work.

    Is this another @ersmith easter-egg, or was this generally well-known?

    If there is any interest, I'll post the codes that work once I've reached my way to the bottom of the possibilities.
  • Not well known, but already mentioned. It seems there is some setting you can do to the Windows cmd/terminal to switch it to ANSI and he does it.

    It seems to support full VT100.

    Enjoy!

    Mike
  • @msrobots That's very cool. Leave it to Eric. :)

    This "discovery" (humor me) makes debugging some things a bit easier for me. The perfect example is GPS data. I was getting clobbered trying to display the various values from a fast stream. Now I can make a debug screen that doesn't scroll when it updates, and use colors to flag values that are changing, out of range, or misbehaving.
  • yetiyeti Posts: 818
    edited 2020-03-23 06:32
    With some terminals you even can get graphics.
    I was too lazy for using more than black and green but more colours would have been possible.
    Ask Marjory about "SIXEL".
  • evanhevanh Posts: 15,915
    I think the extended terminal support came from a request. And ANSI support was a side effect of that effort.

  • Slowly (very slowly) starting to get back to work. If you can compile fastspin from source, please give it a try; there are a number of bug fixes, including some contributed by @"Roy Eltham" and @avsa242 . There's also a binary of the 4.1.4 beta on my Patreon page. I hope to have a "real" release later this week. It won't be as complete as I had wished, but it will be a definite improvement over 4.1.3.

    Regards,
    Eric
  • RaymanRayman Posts: 14,646
    edited 2020-03-31 23:55
    Glad you're back! There's something I've been meaning to tell you about...

    Somehow braces are not overridden by comments (single quote) (I think this is the problem).
    I get strange errors if delete bottom of commented out brace, but not the top:
    PRI HandleMouseUpForm1(p)|i 'app specific stuff  
        if (p==@Form1Option1) or (p==@Form1Option2) 
            i:=GetOptionValue(@Form1Option1) 'Rising Edge?
            if i==1
                dig.SetEdgeMode(0) 'rising edge
            else
                dig.SetEdgeMode(1) 'Falling edge
            SetAnalogTrigger() 'change trigger settings
                '{
            'need to restart acquistion
            asm
                cogatn  #(1<<digCog)
            endasm
            '}  Something to tell Eric Smith about... Removing this line breaks Fastspin.  Gives bizare error in USB code
    
  • dgatelydgately Posts: 1,630
    edited 2020-04-01 03:05
    EDIT: This is obviously about building flexgui as a whole which includes fastspin/spin2cpp/loadp2/PropLoader... The spin2cpp project itself builds without issue.

    On macOS, I'm now getting an error when flexgui tries to build and link proploader... This happens on my Mac as well as the TeamCity build server that David Zemon had set up on my old iMac server. On my Mac I was able to get the build to complete by building proploader before running make within the top "flexgui" directory. The build states "o64-clang++ command not found", so I think the Makefile may be at fault.

    Here's the log from the TeamCity build server:
    /Users/myUser/Documents/buildAgent/work/497917564a46784a/proploader-macosx-build/bin/split /Users/myUser/Documents/buildAgent/work/497917564a46784a/proploader-macosx-build/obj/IP_Loader.binary /Users/myUser/Documents/buildAgent/work/497917564a46784a/proploader-macosx-build/obj/IP_Loader.h
    16:07:50
      o64-clang++ -Wall -DVERSION=\""v1.0-45 (2020-03-29 09:07:50 gb900b3c)"\" -DMACOSX -I/Users/myUser/Documents/buildAgent/work/497917564a46784a/proploader-macosx-build/obj -c src/main.cpp -o /Users/myUser/Documents/buildAgent/work/497917564a46784a/proploader-macosx-build/obj/main.o
    16:07:50
      /bin/sh: o64-clang++: command not found
    16:07:50
      make[1]: *** [/Users/myUser/Documents/buildAgent/work/497917564a46784a/proploader-macosx-build/obj/main.o] Error 127
    16:07:50
      make: *** [proploader-macosx-build/bin/proploader] Error 2
    16:07:50
      Process exited with code 2
    16:07:50
      Process exited with code 2 (Step: Build (GNU Make))
    16:07:50
      Step Build (GNU Make) failed
    16:07:50
    Publishing internal artifacts
    

    PropLoader's Makefile includes:
    ifeq ($(CROSS),)
       PREFIX=
       CC=gcc
       CPP=g++
     else ifeq ($(CROSS),win32)
       CC=i686-w64-mingw32-gcc
       CPP=i686-w64-mingw32-g++
       OS=msys
     else ifeq ($(CROSS),macosx)
       CC=o64-clang                                                             <== o64-clang ???
       CPP=o64-clang++                                                       <== 064-clang++ ???
       OS=macosx
    

    dgately
Sign In or Register to comment.