Shop OBEX P1 Docs P2 Docs Learn Events
FlexProp: a complete programming system for P2 (and P1) - Page 8 — Parallax Forums

FlexProp: a complete programming system for P2 (and P1)

1568101155

Comments

  • I've posted a new version (4.4.0) of flexgui to:

    https://github.com/totalspectrum/flexgui/releases/tag/v4.4.0

    This has a lot of bug fixes in the underlying compiler, and a few minor cosmetic changes to the GUI itself.

    Note that as of this release I'm using a new signing certificate, which is a regular (ordinary validation) certificate rather than the extended validation (EV) certificate that was used before. The cost of renewing the EV certificate was ridiculous, they raised the price by approximately 700%!

    Unfortunately, the OV certificate is not as strong, so you may see a dialog box to pop up the first time you run flexgui -- just click "OK" or whatever the option is in your anti-virus to proceed. I build these binaries on a Linux system using a cross compiler, so the chance that they're infected with a Windows virus is negligible.
  • Cluso99Cluso99 Posts: 18,069
    Price gouging :(
    Nothing to stop virus writers paying for a certificate either.
  • Cluso99 wrote: »
    Price gouging :(
    Nothing to stop virus writers paying for a certificate either.

    Yeah, but when someone signs a virus, they know their name/address/etc
  • kwinnkwinn Posts: 8,697
    Wuerfel_21 wrote: »
    Cluso99 wrote: »
    Price gouging :(
    Nothing to stop virus writers paying for a certificate either.

    Yeah, but when someone signs a virus, they know their name/address/etc

    Names and addresses etc. can also be faked.
  • kwinn wrote: »
    Wuerfel_21 wrote: »
    Cluso99 wrote: »
    Price gouging :(
    Nothing to stop virus writers paying for a certificate either.

    Yeah, but when someone signs a virus, they know their name/address/etc

    Names and addresses etc. can also be faked.

    Yes, but EV certificates involve a lot of validation. If they can't find multiple corroborating sources of information about you and the address you give them, you might actually get a physical visit from a person to make sure you are who you claim to be, before it'll be issued.
  • Cluso99Cluso99 Posts: 18,069
    kwinn wrote: »
    Wuerfel_21 wrote: »
    Cluso99 wrote: »
    Price gouging :(
    Nothing to stop virus writers paying for a certificate either.

    Yeah, but when someone signs a virus, they know their name/address/etc

    Names and addresses etc. can also be faked.

    Yes, but EV certificates involve a lot of validation. If they can't find multiple corroborating sources of information about you and the address you give them, you might actually get a physical visit from a person to make sure you are who you claim to be, before it'll be issued.

    Do you actually believe this???
  • More likely they’ll just not issue the certificate.
  • Cluso99 wrote: »
    kwinn wrote: »
    Wuerfel_21 wrote: »
    Cluso99 wrote: »
    Price gouging :(
    Nothing to stop virus writers paying for a certificate either.

    Yeah, but when someone signs a virus, they know their name/address/etc

    Names and addresses etc. can also be faked.

    Yes, but EV certificates involve a lot of validation. If they can't find multiple corroborating sources of information about you and the address you give them, you might actually get a physical visit from a person to make sure you are who you claim to be, before it'll be issued.

    Do you actually believe this???

    For a proper EV certificate? Yes. That's why they're so expensive.
  • FlexGUI has been renamed to FlexPropGUI in order to avoid conflict with another software product. It's still the same thing though. There's a new version (4.5.0) with many C and BASIC improvements and bug fixes, available at:

    https://github.com/totalspectrum/flexprop/releases
  • And now I've put up a beta version of 5.0.0. This has the renaming complete, I hope. The package as a whole is called FlexProp. The GUI is technically "FlexPropGUI" but is usually abbreviated to just "FlexProp". The compilers are "flexspin" and "flexcc"; both can compile all of the languages supported by FlexProp, namely PASM, Spin 1, Spin 2, BASIC, and C. The GUI has a few minor tweaks including a new option to use fixed point math in place of floating point math.

    Please give the new beta a try. The binary is at https://github.com/totalspectrum/flexprop/releases.
  • Thanks for all your efforts!
  • RaymanRayman Posts: 14,343
    edited 2020-10-24 22:50
    @ersmith Thanks! Can I call the C compiler part of it "FlexProp C" ?

    Is there any difference between "flexspin" and "flexcc"? Or, is it basically the same binary with two different names?
  • Rayman wrote: »
    @ersmith Thanks! Can I call the C compiler part of it "FlexProp C" ?
    You can call it "FlexProp C" if you'd like. I call it "FlexC" myself because that's shorter :).
    Is there any difference between "flexspin" and "flexcc"? Or, is it basically the same binary with two different names?

    They have different options. In some cases they're different names for the same options (e.g. what might be "-a" in one might be "-b" in the other) but in a few cases there may be no equivalents, e.g. flexcc has a "-c" option to produce a .o file, and flexspin doesn't have anything like that yet (in flexspin "-c" outputs only the DAT section of a Spin file).

  • The "final" version of FlexProp 5.0.0 is available now from Patreon (actually it's been up there for a few days) and from github (https://github.com/totalspectrum/flexprop/releases). The compiler has been renamed from "fastspin" to "flexspin", which is a pretty big change. But under the hood not too much has changed. There is now a GUI option to enable fixed point (using 16.16 fixed point in place of floating point in C and BASIC). That feature has been there for a while in the compiler, but hasn't had a way to enable it from the GUI.
  • Eric,

    I am just starting out with the P2. I found out about flexprop on the last zoom session. I was able to download it and get it compiled on my mac.

    I ran into a few issues, as I am not familiar with tcl. Program compiles clean and appears to run. However I am able to click the buttons in the window "Compile for P2" "Run Binary" etc, but the pull downs in the top menu bar don't work.

    I haver tried launching with tclsh and wish. Both give the same results so I am unable to load any code.

    I am running Catalina 10.15.7.

    Also is there a way to get this to show up in Applications?

    Any insight is much appreciated.

    If this is the wrong thread for this, I apologize.
  • dgatelydgately Posts: 1,629
    edited 2020-11-01 21:25
    I've got flexprop's gui (flexprop 5.0) running on Catalina 10.15.7... I did have an instance where the menus dropped down but were all disabled... Is that what you meant? It happened once. After relaunching flexprop IDE, the menus were enabled.

    Do your Tcl/Tk versions match these?

    flexguiMenus.png

    You could make a script/app that executes flexgui.tcl, show up in Applications. But, you would have to create an AppleScript file/app (see ScriptEditor in your /Applications/Utilities directory) that launches flexgui.tcl.

    Try the attached app (it's zipped up)... It should work if flex prop is located in your home directory...

    dgately
    757 x 640 - 270K
  • Greg: I have a pretty old Mac Mini that's still running High Sierra, so I don't know if there's some incompatibility with Catalina. But I haven't heard of any, and Tcl/Tk is pretty generic (it runs on Windows, Mac, and Linux) so I'd be surprised if there's anything fundamental wrong. It's probably worth retrying, as @dgately suggested. I should also note that I tend to run it from a command line (the terminal) rather than launching it from Finder.
  • I was using the built in tcl. I have installed active-state tcl-tk via homebrew and it now works sort of. The first time it is disabled as described above, the next launch it appears to work as expected.

    I have also successfully created a .app bundle that works. I would make a suggestion to put .flexprop.config in ~/ instead of app root. This will cause issues if you do create a .app bundle and install it in /Applications. Plus it is fairly common for config folders and files top be in the users home dir.

    Right now I am running in user Applications folder.

    I am still waiting for my P2 to get here. But I did compile and load my P1.
  • Eric,

    I got it all straightened out. I had too many versions of tcl installed. I am now running on the 8.5 that is built into mac and it all runs great. There is a free tool out there called platypus that will create launchers for mac from script / tcl / python. I was able to create an installer dmg that seems to work well.

    You can grab it here https://www.dropbox.com/s/t7so9zdxaoexb7r/FlexProp.dmg?dl=0. This one has the code modified to move the config folder to ~/ so it wont get into permission issues in /Applications. It does show 2 icons on the launcher bar though, but that is normal behavior from what I can gather.

    Now I just wish my P2 would get here.


  • Thanks, Greg, glad you got it working!
  • Cluso99Cluso99 Posts: 18,069
    Just downloaded v5.0.5.
    Works great with my Z80/CPM emulation which was last compiled with v4.2.4
    Thanks for your dedication Eric :smiley:
  • RaymanRayman Posts: 14,343
    edited 2020-11-11 22:46
    This chess program seems to run correctly under Catalina, but not with FlexC.

    It runs and the pieces move, but they move badly... Also, the black pawns never move.
    Also, I had to change the goto labels C: and A: and their calls because C and A are also variables, and Flex C doesn't like that.

    But, this code is so obfuscated, it may be hard to find the problem.
    Anyway, just posting in case you might see what is wrong, right away.

    There’s a lot of recursive stuff in the code. I imagine that might have something to do with it... Or, maybe the goto...

    I just tried with latest FlexC and still has same issue...
  • Stephen MoracoStephen Moraco Posts: 316
    edited 2020-11-09 23:08
    Eric,

    Just a tiny compatibility issue.

    What are you planning to do with the debug() statements that Chip supports?

    I just got a compile error "error: syntax error, unexpected DEBUG" for my having debug() statements in the DAT section (pasm2 code).

    It would be nice not to have to comment these out as it would mean that I have to edit my code depending upon which compiler I'm using.

    -Stephen

    p.s., posted issue at github
  • Stephen MoracoStephen Moraco Posts: 316
    edited 2020-11-09 23:08
    Eric,

    Another for you. Trying to build and test my RGB LED matrix driver with your tools.
    Just found this:

    mov panelCol, #screen.MAX_DISPLAY_COLUMNS. Generates: error: Operand too complex for inline assembly

    Guess I'm stopped at this point. BTW- I'm just working with spin2/pasm2 with these tests.

    -Stephen

    p.s., posted issue at github
  • RaymanRayman Posts: 14,343
    @"Stephen Moraco" Re: Operand too complex for inline assembly

    If you change it so that it only operates on local variables, it should work...
  • Stephen MoracoStephen Moraco Posts: 316
    edited 2020-11-10 00:57
    Rayman wrote: »
    If you change it so that it only operates on local variables, it should work...

    Thank you, I do know that. I'm just recording the fact that what we can do elsewhere we can't do here yet. This works in PNut.

    To further explain. I'm taking already running code and compiling it against this toolchain to see where it is. These issues I'm noting are differences I'm finding.
  • I found that the following definition in a C program causes the compiler to hang and come back with a segmentation violation.

    void _writeWord(unsigned char register, unsigned short data);

    Can't use register as a variable.

    Mike
  • iseries wrote: »
    I found that the following definition in a C program causes the compiler to hang and come back with a segmentation violation.

    void _writeWord(unsigned char register, unsigned short data);

    Can't use register as a variable.

    Mike

    register is a (very useless) keyword, so no, can't use it as an identifier.

    Probably shouldn't crash though...
  • hinvhinv Posts: 1,255
    edited 2020-11-14 10:33
    @ersmith If one developed a text bases UI (so porting TCL/TK is not necessary) what would you say the minimum memory requirements are? Could it fit on a P2 with 16MB of external RAM?
  • I have one of the original P2 Eval Rev A boards and when I try to run programs on it they don't work. After looking at the assembled code it seems the Push/Pop routines are wrong for Rev A chips. The compiler for C code is not honoring the -2a directive.

    Also the Prop Loader program does not always load the code and generates an error several times before loading the code successfully. I used my loader program that I wrote a long time ago and it loads the code successfully every time. Some kind of timing issue I think. I have a windows 10 system with an intel i7 running at 4GHz and 32 gig of memory. When I hit the compile button it compiles before I hit the button. I have to check the date/time of the compile to see if actually compiled.

    Mike
Sign In or Register to comment.