flexGUI P1 questions

2»

Comments

  • CON
      _clkmode = xtal1 + pll16x
      _clkfreq = 80_000_000
      rx_pin = 31
      tx_pin = 30
      baud = 115200
    OBJ
      ser : "spin/FullDuplexSerial.spin"
    PUB hello
      ser.start(rx_pin, tx_pin, 0, baud)
      repeat
        ser.printf("Hello, world!\n")
    


    hello.spin
    Program size is 3072 bytes
  • Thanks dgately for the Spin equivalent of test1.x. There is one more component missing, PASM. I wonder if there is a PASM professional that could donate a pure PASM version for test1.x. Just to see the code size difference and coding efficiency.

    The FlexBasic and FlexC code size was exactly the same, while the Spin version came in at less than half the code size. I wonder if the PASM version would come in even less than the Spin version, in code size.

    In FlexGUI, so far, we have three choices for comparison, FlexC, FlexBasic, and Spin. Since test1.bas and test1.c come in at the same size, it seems like FlexBasic is the most desirable, for simplicity to work with, so far. The Spin version, comes in with a smaller code size, but it is a little bit more involved, code wise.

    Ray
  • The FlaxBasic and FlexC versions are using the full printf functionality (even if you use simpletools.h print()). The spin one is not.

    Also, dgately, is your spin one compiled with FlexGui (fastspin) or with proptool/pnut?

    Both of these will factor in to the final file size. Especially if the spin size is from compiling with proptool/pnut since those produce bytecode and FlexGui produces PASM.
  • FWIW, In the FlexBASIC example you can save ~150 bytes by enabling full optimization. Not huge, but on the P1 every byte counts.
  • Roy Eltham wrote: »
    Also, dgately, is your spin one compiled with FlexGui (fastspin) or with proptool/pnut?

    Yes, compiled with FlexGui (Fastspin)!

  • I just took a look at dgately hello.spin program, and I did not notice, at first look, the printf(). When did that get added.

    Also I noticed in the /spin folder, std_text_routines.spinh, but I am not seeing how this file gets added to hello.spin. I do not see it being called in the OBJ.

    I also just recompiled hello.spin with full optimization, and got a 188 byte reduction, in code size.

    If some of the existing Spin device drivers get cleaned up, as they are added to FlexGUI, I might have to reconsider Spin.

    Ray
  • Rsadeika wrote: »
    Also I noticed in the /spin folder, std_text_routines.spinh, but I am not seeing how this file gets added to hello.spin. I do not see it being called in the OBJ.
    It's #include'd inside spin/FullDuplexSerial.spin.

Sign In or Register to comment.