Shop OBEX P1 Docs P2 Docs Learn Events
SpinEdit - Editor for Spin, Spin2 and FastBasic - Page 3 — Parallax Forums

SpinEdit - Editor for Spin, Spin2 and FastBasic

135

Comments

  • RaymanRayman Posts: 14,639
    Wish I could launch the native Mac version of fastspin and loadp2 from SpinEdit under Wine, but don't think I can...
  • Does a Hello-World demo exist in pure spin2 anywhere, that will compile in SpinEdit?

    (Or just toggle P56/P57... doesn't actually need to say "HelloWorld")

  • Rayman wrote: »
    Wish I could launch the native Mac version of fastspin and loadp2 from SpinEdit under Wine, but don't think I can...
    As far as I can tell (after lots of searching wine forums) you are correct... No simple way to exec macOS executables from within wine.

    dgately

  • VonSzarvas wrote: »
    Does a Hello-World demo exist in pure spin2 anywhere, that will compile in SpinEdit?

    (Or just toggle P56/P57... doesn't actually need to say "HelloWorld")

    I think any of the files from the spin2gui samples/ folder should compile in SpinEdit.
  • RaymanRayman Posts: 14,639
    edited 2019-01-11 22:48
    VonSzarvas: Sorry for the delay... If you mean samples that are not all assembly, but actual Spin code, then the samples in spin2gui are limited... And, I didn't have any at all...

    Problem is that many don't set the clock and so serial probably doesn't work...
    The new smartpin.spin2 example looks like it might work.

    I found an old example that I added clock settings to and it works.
    I just noticed "pausems" is a built in function, so added a delay with that.
    This one uses SimpleSerial.spin instead of the new SmartSerial.spin2.

    BTW: If a goal is to write code for both P1 and P2, looks tricky...
  • Mark_TMark_T Posts: 1,981
    edited 2019-01-12 20:43
    Rayman wrote: »
    Ok, I'm stuck... LoadP2.exe crashes on me now when trying to do this:
    [code]cmd.exe /C loadp2.exe -m 010c1f08 -p /dev/tty.usbserial-P2EEJWO "C:\users\ray\Desktop\SpinEdit\SimpleSerial.binary" > loadp2.out/code]

    Do I need a different binary for Mac? I don't think so...
    Actually, I think I do... It's trying to run under Wine due to .exe extension.
    And, changing filename extension to .APP doesn't work...

    Ah, that might be the problem I had, but after changing to using a symbollic link in .wine/dosdevices
    for the usb device it was happy.
  • RaymanRayman Posts: 14,639
    edited 2019-01-12 20:50
    It works for me now for small binaries with the symbolic link

    But, big ones, like vga demo, gets stuck downloading. It frees itself after about 10 minutes if you are patient enough.

    Need to figure out how to build native loadp2.
    Then I can load from terminal at least...
  • RaymanRayman Posts: 14,639
    build loadp2 for Mac using source in spin2gui. Doesn't work though...
    says 2000000 baud is unsupported so tried 230400.
    Still doesn't work, gets stuck after resetting P2.
  • RaymanRayman Posts: 14,639
    SpinEdit now supports Flex C files.
    Syntax highlighting needs more work, but good enough for getting started, I think...
  • Rayman wrote: »
    build loadp2 for Mac using source in spin2gui. Doesn't work though...
    says 2000000 baud is unsupported so tried 230400.
    Still doesn't work, gets stuck after resetting P2.
    2000000 baud is used by the loader, and there was previously no way to change it. I added a "-l" option yesterday to change the loader baud rate. Try using that to see if it works on the Mac.

  • RaymanRayman Posts: 14,639
    Thanks! I'll try to test that out this weekend.
  • RaymanRayman Posts: 14,639
    SpinEdit can now program the flash! (thanks to ozpropdev).

    On my P2 Eval board, I have to switch on the Flash and the P59 pullup next to it for programming.
    Then, switch off the P59 pullup and reset to boot from flash.
  • RaymanRayman Posts: 14,639
    I just tried the latest loadp2 binary from Zemon's site and it still hangs up with large binaries.
    tried it with -l 921600. Strange thing is that the Mac version works with same settings...
  • RaymanRayman Posts: 14,639
    Looks like almost any options will work for loading small files, but no settings work with big files...
  • So I spent a few minutes playing around with Spinedit and here are some thoughts..

    Find - CTRL + F should open find window, hopefully with highlighted text.

    Find Next / Replace - Some basic functionality would be nice.

    Spin1 source is not populating file view?

    A quick hide for the ribbon would be nice.

    Otherwise seems like a very nice editor. The only real complaint is the Find hotkey.
  • RaymanRayman Posts: 14,639
    cheezus, thanks for trying SpinEdit.

    Find hotkey is easy enough, I'll try to add that this week.

    Definitely need to work on Find Next and Replace after that.
    Also, populating the file view needs to be done.
  • Rayman, I've been putting SpinEdit through it's P1 paces and trying to find new and interesting ways to break it :joy: I've been focused on going through my libraries and seeing what works and what doesn't. I believe all my issues are with the compilers at this point, although I'm getting some interesting results. I'm just noting these here and will probably examine further in appropriate threads. My first focus has been on getting Ymodem working reliably again. I had made some significant changes, replacing fsrw with Kye'sSD, changed menu handling and some other modifications. And of course broke some things along the way.... So for testing I've rolled back to the original version that uses fsrw.

    'SDCard YModem tranfer and utilities
    '(C) 2008 Raymond Allen
    

    BST - compiler appears to compile and load to eeprom without issues, but on reset seems to not have written EEPROM.
    Fastspin - compiler error
    OpenSpin - compiles and loads correctly.
    Propellent - compiles and loads correctly.

    I need to reexamine the issues with my hotrod driver. IIRC Kye'sSD won't mount the card when compiled with Openspin. The Send appears broken in that version, need to dig into that a bit. All versions top out at 57600 baud.

    My "goal" is to be able to connect to a board with SD card, transfer a binary image and then be able to run that image. Had this working, and still have one write protected eeprom, without some of the final tweaks I was making before I massively broke things. Worked with the propplug or Bluetooth transparent serial board. In theory it should work with the WX over wifi although I can't get the ESP I have to work (need to just invest in a WX soon). I had used the SD card board options in simple ide some time back and really liked the simplicity.

    Okay, I say simplicity and all of this sounds overcomplicated but if I already have an SD card in the system it makes perfect sense to me. In all my tests, I'm loading to eeprom because loading to ram never works. Win10 can't seem to leave rts/cts alone, even with terminal settings that worked on win7. :angry: I've been reading lots of people having issues with this type of serial behavior and it can be confusing to beginners. I even spent an hour on a wild goosechase due to the propeller being reset and loading old code. :lol:

    Sorry to blog all over your thread, just some food for thought. I'm liking your editor more and more. Very nice work sir :smiley:
  • are you maybe running out of memory?

    Kye's SD driver is quite large and fastspin compiles to PASM/LMM while the other ones compile to spin bytecode, and that is way smaller.

    Mike
  • RaymanRayman Posts: 14,639
    edited 2019-02-09 22:43
    BST doesn't seem to be generating a .binary file that propellent then would use to load eeprom…

    Seems this hasn't been tested very well...
    I think I can fix this. Thanks for finding it.

    Ok, it's generating a binary file, but not in the right folder...
  • Rayman wrote: »
    BST doesn't seem to be generating a .binary file that propellent then would use to load eeprom…

    Seems this hasn't been tested very well...
    I think I can fix this. Thanks for finding it.

    Ok, it's generating a binary file, but not in the right folder...

    A couple other things I noticed..

    One was background color doesn't seem to properly update all the time as I'm adding and removing PUB and PRI. I can get more specific details but I suspect that background coloring issue may be known already.

    Also, when opening a file.. The default is spin2 so when I OpenWith/Spintool the file is always opened as P2 source. I'm not sure what the default behavior should be for opening a file but perhaps you could add an option for "all propeller source" or something of the sort. I keep telling myself it's not a bug, it's a feature. It's reminding me I need to spent more time on the P2 ;)

    I'll be doing my best to torture test the tools that are in development. My main development pc is win10 but I also have several win7 and ubuntu computers.

    Thanks for taking a look at my issues. I like the way SpinEdit is shaping up. Quite a usable tool already and could become my de facto spin development tool.
  • RaymanRayman Posts: 14,639
    The background color updating is a bit slower not than it used to be.
    The issue is with very large files, it gets bogged down...
    I'll speed it up a bit and see if it's better for you.

    I'm not completely sure I understand the OpenWith/Spintool issue...
    Are you saying that when you do "Open With" from say Windows Explorer over a spin file and then pick SpinEdit.exe it doesn't load right?

  • If the background updating is due to large file size then it's completely understandable. Not a big issue and next time i'll wait a little longer to see if things update properly.

    Let me try to explain the OpenWith issue a little better. If I open a .spin file from windows explorer using right click / OpenWith / SpinEdit, it is always opened as P2 source. When I go to the options menu, it displays the Spin2 options sheet and not the Spin1. Trying to compile dumps a ton of errors since the P1 source is trying to compile as P2 source. I'm not sure if this is just a .spin issue or if other extensions are handled the same way. So while technically the source is displayed correctly in the editor, the editor seems to think it's Spin2 code and tries to treat it as such when compiling.

    If I start SpinEdit and then open a file, the default extension is Spin2. To open a .spin file, I need to select the drop down box, select source code type and then select the file. IMO it would be really nice to have the "all propeller source" option in the dropdown box, as well as the spin2 / spin / bas / c. This might be more complicated than it seems to implement.
  • RaymanRayman Posts: 14,639
    Ok, thanks for the feedback.

    If you see a background color error that doesn't resolve in 1 second, please tell me how I can reproduce that bug here.

    I'll see if I can do something about the "Open With" from the OS issue.
  • RaymanRayman Posts: 14,639
    I think I've fixed the "Open With" issue.
    Please try the attached...
  • Seems like the "Open With" issue is resolved. Also, I'm not sure if you made any changes to background redraw but it seems much better. Keep up the great work!
  • Rayman,

    I'm using the file you just posted (11Feb19).
    There was a mysterious error, so I checked the [x] Show command line before compile in Options.

    This is the command line that pops up after pressing Compile. It seems to generate two -2 options if the file is .bas, the second of which FastSpin sometimes treats as a file it cannot find:
    "C:\Propeller\SpinEdit\FastSpin.exe" -2  -2 -L "C:\Program Files (x86)\Parallax Inc\Propeller Tool v1.3.2\Library" "C:\Propeller\spin2gui\samples\blink2.bas" > FastSpin.out
    
  • RaymanRayman Posts: 14,639
    Strange... It's obviously a bug, but somehow still works for me...
    I'll fix this...
  • RaymanRayman Posts: 14,639
    Okay, I've fixed that and made improvements to "find".
    New version in top post...
  • Thanks again @Rayman I'll dl the most recent version and try it out.

    I've noticed some strange behavior with files. I can't quite define what's happening because I really haven't investigated but.. Is it possible that spinedit is not overwriting a file, if it's open somewhere else? or am just being dumb. I also noticed there's no warning on closing a file that has not been saved. This might explain the first issue, not really sure. Too many late night "exhausted" or otherwise distracted coding sessions to really tell. These are more 'operator error' issues. Sorry, I'm rambling...

    I've moved my development over to a win7 machine for several reasons. I'll try to test on win10 to make sure behavior is at least consistent between the two. Note, Win7 machine is accessed from RDP client and only has 'user' permissions. Not as restrictive as NT Domain can be locked down but pretty close.

    I realize implementing an editor is non-trivial and you're doing a great job. With an improved find hopefully this can become my main propeller dev environment.

    I assume you plan on using the debugging section for a terminal? If so, PLEASEEEE find out how EXTRAputty handles sessions regarding DTR/RTS. Almost every other terminal program I've tried gets it wrong and won't let you disable them, causing the dreaded "reset glitch".
  • RaymanRayman Posts: 14,639
    Ok, it should ask if you want to save a modified file, but doesn't.
    I'll work on that...

    Not sure about if open somewhere else.
    Note that it does save when you compile.

    I'm using PST and seems to be working well.

    Debug could show things transmitted from code. Not sure it'll take input though.
    Probably better to have a button to launch PST...
Sign In or Register to comment.