Shop OBEX P1 Docs P2 Docs Learn Events
PNut/Spin2 Latest Version (v47 - Cooperative multitasking added to Spin2, up to 32 tasks) - Page 22 — Parallax Forums

PNut/Spin2 Latest Version (v47 - Cooperative multitasking added to Spin2, up to 32 tasks)

1192022242570

Comments

  • Cluso99Cluso99 Posts: 18,069
    jmg wrote: »
    cgracey wrote: »
    I know monitors and keyboards are cheap, but desk space is not. And field portability is important. I think we will always need tools that run on portable big-OS devices, because that is what people need the option of using.

    There are a few things we've talked about within Parallax, like how come there is no USB class for turning your laptop/PC/phone (USB host) into a terminal display with pointer and keyboard controls (for the USB device)? I mean, it could be sandboxed and made harmless to the host machine. It would be a nice, generic means of system interfacing, providing display, input, file storage, and internet access....l.

    If you want to avoid the big-OS syndrome, and get an agile user display, things like this Wio-Terminal exist, for a quite well priced $29.00
    That could manage P2 debug support on 2 pins.

    https://www.seeedstudio.com/Wio-Terminal-p-4509.html $29, 320x240 terminal
    Nice until you read that the screen is 2.4". Need a way to turn a used phone or tablet into something like this as they have much better screens.
  • cgracey wrote: »
    David Betz wrote: »
    cgracey wrote: »
    David Betz wrote: »
    JonnyMac wrote: »
    Here's an opportunity to translate PNut from x386 Assembly to generic C and compile with a modern tool set. Keeping the C generic may allow it to be compiled for Windows, Linux, Mac, and even the P2 by using FastSpin.
    I though Chip was translating his x86 assembly Spin2 compiler to Spin2.

    I started to, but have been working on the Windows tools lately. I've almost got some really nice graphical debugging stuff working.
    Do you expect to get back to it eventually or have you abandoned the idea?

    I don't know. I like the idea, but I don't know how practical it is to get people to dedicate monitors, keyboards, and mice to our chip. If the OS world becomes increasingly constrained by freedom-killing problems, like inability to deliver software easily, it might become very compelling. I figure our computers these days are massive blobs of spyware, first, that also allow us limited use for our own purposes, but that is getting narrowed. Freedom has been evaporating for a long time and, for me, the whole computing thing has been robbed of its early promise. I can't even reliably share my Windows app, anymore, which I never saw coming. Maybe someday Microsoft will take it up ten notches in a short span of time and then I'll focus purely on self-hosting.
    That's too bad. I figured a Spin2 implementation of Spin2 was a way to get cross-platform tools. Using Eric's spin2cpp it should be possible to get the Spin2 compiler written in Spin2 running under Linux, Windows, and Mac as well as natively on the P2 itself.

  • David Betz wrote: »
    cgracey wrote: »
    David Betz wrote: »
    cgracey wrote: »
    David Betz wrote: »
    JonnyMac wrote: »
    Here's an opportunity to translate PNut from x386 Assembly to generic C and compile with a modern tool set. Keeping the C generic may allow it to be compiled for Windows, Linux, Mac, and even the P2 by using FastSpin.
    I though Chip was translating his x86 assembly Spin2 compiler to Spin2.

    I started to, but have been working on the Windows tools lately. I've almost got some really nice graphical debugging stuff working.
    Do you expect to get back to it eventually or have you abandoned the idea?

    I don't know. I like the idea, but I don't know how practical it is to get people to dedicate monitors, keyboards, and mice to our chip. If the OS world becomes increasingly constrained by freedom-killing problems, like inability to deliver software easily, it might become very compelling. I figure our computers these days are massive blobs of spyware, first, that also allow us limited use for our own purposes, but that is getting narrowed. Freedom has been evaporating for a long time and, for me, the whole computing thing has been robbed of its early promise. I can't even reliably share my Windows app, anymore, which I never saw coming. Maybe someday Microsoft will take it up ten notches in a short span of time and then I'll focus purely on self-hosting.
    That's too bad. I figured a Spin2 implementation of Spin2 was a way to get cross-platform tools. Using Eric's spin2cpp it should be possible to get the Spin2 compiler written in Spin2 running under Linux, Windows, and Mac as well as natively on the P2 itself.

    +1
  • cgracey wrote: »
    There are a few things we've talked about within Parallax, like how come there is no USB class for turning your laptop/PC/phone (USB host) into a terminal display with pointer and keyboard controls (for the USB device)? I mean, it could be sandboxed and made harmless to the host machine. It would be a nice, generic means of system interfacing, providing display, input, file storage, and internet access. I think the reason this does not exist is because it gets people around the big, branded OS monstrosities that the vendors don't want you bypassing. It cuts them out of the spyware opportunity.

    I think you're reading too deep into it there - the reason is that USB was designed to add peripherals to a host PC, not the other way around. Standardizing such a complex yet niche thing in a way that satisfies everyone would have made no sense (especially considering the 1990s tech landscape). (Not saying the questionable surveillence and/or monopolist agendas aren't ever present...)
    Still, there's the virtual COM ports and many software terminals do support mouse input, 256 colors and simple vector graphics - Windows' conhost is an outlier. Such features could be easily added into the PST though.
    cgracey wrote: »
    I don't know. I like the idea, but I don't know how practical it is to get people to dedicate monitors, keyboards, and mice to our chip. If the OS world becomes increasingly constrained by freedom-killing problems, like inability to deliver software easily, it might become very compelling. I figure our computers these days are massive blobs of spyware, first, that also allow us limited use for our own purposes, but that is getting narrowed. Freedom has been evaporating for a long time and, for me, the whole computing thing has been robbed of its early promise. I can't even reliably share my Windows app, anymore, which I never saw coming. Maybe someday Microsoft will take it up ten notches in a short span of time and then I'll focus purely on self-hosting.
    Welcome to Linux, where distributing software was never easy to begin with :) Although I must say that I never had any particular problem distributing random EXEs around, but mine are usually just MinGW compiler output without any sort of compression or obfuscations. Sometimes on Win10 the stupid SmartScreen thing pops up when you first run them, but that can be bypassed (in a very unintuitive way. 100 points on hostile UI design there) and goes away when the program is popular enough by M$'s standards.

    I also must say that I have a good portion of my desk dedicated to P1 peripherals :)


    Also, +1 for Spin2-in-Spin2.
  • cgraceycgracey Posts: 14,204
    I will probably pick up the Spin2-on-Spin2 thing again. This graphical debug stuff is coming along nicely. I have polar displays, oscilloscopes, plotting windows, terminals, etc. It is quite generic, too, and can be used with any serial output system.
  • cgraceycgracey Posts: 14,204
    rogloh wrote: »
    The point was that by doing this they will pretty much then control the entire system then including the CPUs. It will likely be far more difficult to develop/distribute any software that is built outside the sanctioned ecosystem. Right now you can still run Linux or Windows on a Mac using generically available x86 tools and do with them what you wish etc because it still mostly looks like a PC underneath. This may go away. If M$ follows this trend, then the typical PC will become a different more tightly controlled beast.

    I can really see this being the future. Not good. I think we need to make thè P2 stand alone.
  • cgracey wrote: »
    I will probably pick up the Spin2-on-Spin2 thing again. This graphical debug stuff is coming along nicely. I have polar displays, oscilloscopes, plotting windows, terminals, etc. It is quite generic, too, and can be used with any serial output system.
    Sounds good. I'll be curious to see how you use Spin2 to write a compiler. Will you be releasing the source code for the x86 compiler?

  • cgraceycgracey Posts: 14,204
    David Betz wrote: »
    cgracey wrote: »
    I will probably pick up the Spin2-on-Spin2 thing again. This graphical debug stuff is coming along nicely. I have polar displays, oscilloscopes, plotting windows, terminals, etc. It is quite generic, too, and can be used with any serial output system.
    Sounds good. I'll be curious to see how you use Spin2 to write a compiler. Will you be releasing the source code for the x86 compiler?

    I could release it, but it's a combination of x86 and Delphi. There's lots of interaction between the two domains. The compiler is 15000 lines of x86 now.
  • Chip, if you end up going down the standalone route at some point, I think with HyperRAM we would be able to put a lot of fancy graphical display stuff into either a secondary P2 used just for development/debug, or even on the target P2 itself in some cases which could be very cool selling point.

    Of course a RasPi could make a cheap dev system too if you are forced to move away from Windows but you're trying to sell P2s not RasPi's. Good thing with a RasPi vs standalone P2 however is it already has the full network infrastructure for accessing shared software objects, and a very comprehensive selection of developer tools available too.
  • I am thinking about that self hosting thing up and down and left and right for a long time now. I do even have to admit to try to slightly talk forum members into completely unreasonable(?) efforts just to kind of get the ball moving into the right direction.

    I neither have the skills nor the knowledge how to handle hardware, I am just a CodeMonkey but I think we have now everything together to build a Parallax Development System able to program P1s, P2s and maybe even Stamps.

    To avoid more keyboards and screens the proposed board could include some KVM switch for physically switching them Devices, sort of 'just plug in between and press this Butten to switch' or you just use dedicated ones.

    Using one P2 dedicated just for development opens up a lot of possibilities. We have lots of pins, thanks to @rogloh there is a Video Driver driving almost everything you can connect. With his Hyper ram Driver it can run high resolutions without hitting the P2 Hub much.

    @garryj has the USB mouse/keyboard driver we need, @ersmith has the nice SD or HOST access over USB with almost the same syntax, the team OZ has a nice Editor, and @"Peter Jakacki" knows how to attach the whole thing to Ethernet with his P1 based IOwhatever.

    So - shoot - that requires a board with a P1 and a P2, but that is something Parallax could supply for the next 20 years or what is needed.

    @RossH stated that - basically - he could adapt his P1 XMM using external ram to P2 using hyper ram, but also said that he sees no current need for, same goes for Python on the P2, they could use the driver from @rogloh to run code from XMM but are not there, yet.

    But basically most the pieces are there to build a dedicated P2 Development system, a Developer Tool to write your software completely independent of Windows/Linux/Mac/preferred OS you wish.

    Like TeamOZ one could still hook the Screen and Kbd to a parallel serial output if needed, - we have lots of pins left.

    And that is the next thing, the Developer Board could provide the simple oscilloscope @cgracey wrote, maybe some LA, - we have lots of pins left for this.

    BUT -

    @ersmith said he doubt if fastspin could run on a P2 in reasonable speed at all, @cgracey hangs in there but seems to be stuck, so only TAQOZ or Python is currently possible. Maybe @mpark's Spinx could be adapted to the P2 it did worked quite nice on the P1.

    Maybe XMM in Catalina could run fastspin, maybe @ersmith pulls another wonder out of his wizard hat, but i think it should be possible to get a Spin2 compiler running on a P2.

    Even the hard way, extending the Z80 emulator @Cluso99 is currently working on to x86 dumbing down the assembler code @cgracey has and...

    Since a while I am playing with CP/M on a Ramblade (P1+512KB RAM) from @Cluso99. It is astonishing how much stuff runs on a P1. He has working something for P2 but I have not tried it,yet.

    This 'proposal' would solve a lot of our mentioned problems, Parallax could sell one Product using P1,P2, kind of a mix between a way extended PropPlug and a PPDB used to program and watch signals while running something on your target device.

    Sorry for a @potatohead long post, but I wanted to simply get this out of my head.

    Enjoy!

    Mike
  • cgracey wrote: »
    There are a few things we've talked about within Parallax, like how come there is no USB class for turning your laptop/PC/phone (USB host) into a terminal display with pointer and keyboard controls (for the USB device)? I mean, it could be sandboxed and made harmless to the host machine. It would be a nice, generic means of system interfacing, providing display, input, file storage, and internet access. I think the reason this does not exist is because it gets people around the big, branded OS monstrosities that the vendors don't want you bypassing. It cuts them out of the spyware opportunity. I guess the closest we can get, which is even superior in some ways, is a web-page serving system that gets to use your host machine as its display, keyboard, etc. We've been talking about that, too, but we need to learn how to approach that goal.

    Parallax should certainly look at this.

    The trend you identify is clear, and is only going to get worse.

    I've thought previously about using VNC viewer to log in to a "Prop host" as the protocol isn't super complicated, but it needs a network layer. What you're proposing could be done simply with USB serial

    There are many applications that sit resident and scan whatever I connect. Eg when i plug a SD card with GoPro content in, it launches the GoPro app. Some HP software scans every USB in case it contains a 'license file' that may unlock scope/dmm functions? These are over the top (imho), yet as long as they behave "well enough" we continue to tolerate them. Perhaps a Parallax equivalent isn't so crazy, but it has to be super reliable/compatible, and perhaps limit file i/o to a single user specified directory (if at all)

    Years ago there was a Sandisk "U3" system that enabled apps to launch when you plugged a USB memory stick into a PC. I think its been discontinued, don't know for sure
  • jmgjmg Posts: 15,173
    cgracey wrote: »
    I can really see this being the future. Not good. I think we need to make thè P2 stand alone.

    The problem there, is that P2 is never truly stand alone.
    Any engineer or product development cycle, is going to need PDF viewers, web Browsers and CAD tools, Good Editors, and version control systems (etc) - and support for more than just a single MCU.
    You can offload small portions of that to P2, but all that still needs to run somewhere.

    The Python examples & demos show what P2 can do well, but they also show where the cracks start to appear.
  • cgraceycgracey Posts: 14,204
    edited 2020-07-29 05:59
    Thanks for commenting on these issues. What is clear is that there's no clear way forward. I, though, would be quite content with a P2 platform that lets me edit, compile, run, and debug programs. It could use one P2+HyperRAM as a host and another P2 (or many P2's) as target processor(s). It would be fun to have a lifeboat that works independent of all the madness. Yes, a big-OS machine would be needed to look at pdf's, videos, and such, but all that could stay out of the P2's hair.

    It would be fun to be able to think about the big-OS platforms as non-essential and totally discardable, if need be. What's to stop Microsoft from adopting the app-store-only approach to Windows software? If they want to over-control everything, it wouldn't critically hamper us.
  • RossHRossH Posts: 5,471
    cgracey wrote: »
    It would be fun to be able to think about the big-OS platforms as non-essential and totally discardable, if need be. What's to stop Microsoft from adopting the app-store-only approach to Windows software? If they want to over-control everything, it wouldn't critically hamper us.

    Apple already tries to "over-control" development on their platforms, which is why I no longer support Catalina on Mac. But if Microsoft ever decides to go down the same route, remember there is always Linux. Catalina will remain fully supported under Linux (in fact, I do most of my development under Linux now, and tend to use Windows only for the Windows installer).

    I know OpenSpin and p2asm work fine under Linux, because I use them. Not sure about FastSpin, FlexGUI or any other tools. But I would like to see Parallax support Linux with their tools.

    Then, we would be 100% "future-proof".
  • RossH wrote: »
    cgracey wrote: »
    It would be fun to be able to think about the big-OS platforms as non-essential and totally discardable, if need be. What's to stop Microsoft from adopting the app-store-only approach to Windows software? If they want to over-control everything, it wouldn't critically hamper us.

    Apple already tries to "over-control" development on their platforms, which is why I no longer support Catalina on Mac. But if Microsoft ever decides to go down the same route, remember there is always Linux. Catalina will remain fully supported under Linux (in fact, I do most of my development under Linux now, and tend to use Windows only for the Windows installer).

    I know OpenSpin and p2asm work fine under Linux, because I use them. Not sure about FastSpin, FlexGUI or any other tools. But I would like to see Parallax support Linux with their tools.

    Then, we would be 100% "future-proof".
    The last I checked it wasn't even possible to build Catalina from source on the Mac so I haven't even tried any of the newer versions including all of the P2 versions. In fact, Linux isn't a complete solution either since there are so many Linux distributions that are all incompatible with each other. I wish the Linux community would rally around a single distribution or at least a single package manager.

  • RossHRossH Posts: 5,471
    David Betz wrote: »
    RossH wrote: »
    cgracey wrote: »
    It would be fun to be able to think about the big-OS platforms as non-essential and totally discardable, if need be. What's to stop Microsoft from adopting the app-store-only approach to Windows software? If they want to over-control everything, it wouldn't critically hamper us.

    Apple already tries to "over-control" development on their platforms, which is why I no longer support Catalina on Mac. But if Microsoft ever decides to go down the same route, remember there is always Linux. Catalina will remain fully supported under Linux (in fact, I do most of my development under Linux now, and tend to use Windows only for the Windows installer).

    I know OpenSpin and p2asm work fine under Linux, because I use them. Not sure about FastSpin, FlexGUI or any other tools. But I would like to see Parallax support Linux with their tools.

    Then, we would be 100% "future-proof".
    The last I checked it wasn't even possible to build Catalina from source on the Mac so I haven't even tried any of the newer versions including all of the P2 versions. In fact, Linux isn't a complete solution either since there are so many Linux distributions that are all incompatible with each other. I wish the Linux community would rally around a single distribution or at least a single package manager.

    I used to build and run Catalina on a Mac. But the last time I did so it would build ok but not execute, because of something Apple decided you had to buy to run software on Macs - I don't remember the details now, since I decided not to buy whatever it was.

    Buy Linux is definitely the way to go if you want "future proof". Yes, there are many distributions, but they should all work if you are willing to compile from source. If you don't want to distribute sources, and want to support only one distribution, then I would recommend either Debian or Ubuntu. They are both well supported and have mature package managers.

  • David BetzDavid Betz Posts: 14,516
    edited 2020-07-29 12:56
    RossH wrote: »
    David Betz wrote: »
    RossH wrote: »
    cgracey wrote: »
    It would be fun to be able to think about the big-OS platforms as non-essential and totally discardable, if need be. What's to stop Microsoft from adopting the app-store-only approach to Windows software? If they want to over-control everything, it wouldn't critically hamper us.

    Apple already tries to "over-control" development on their platforms, which is why I no longer support Catalina on Mac. But if Microsoft ever decides to go down the same route, remember there is always Linux. Catalina will remain fully supported under Linux (in fact, I do most of my development under Linux now, and tend to use Windows only for the Windows installer).

    I know OpenSpin and p2asm work fine under Linux, because I use them. Not sure about FastSpin, FlexGUI or any other tools. But I would like to see Parallax support Linux with their tools.

    Then, we would be 100% "future-proof".
    The last I checked it wasn't even possible to build Catalina from source on the Mac so I haven't even tried any of the newer versions including all of the P2 versions. In fact, Linux isn't a complete solution either since there are so many Linux distributions that are all incompatible with each other. I wish the Linux community would rally around a single distribution or at least a single package manager.

    I used to build and run Catalina on a Mac. But the last time I did so it would build ok but not execute, because of something Apple decided you had to buy to run software on Macs - I don't remember the details now, since I decided not to buy whatever it was.

    Buy Linux is definitely the way to go if you want "future proof". Yes, there are many distributions, but they should all work if you are willing to compile from source. If you don't want to distribute sources, and want to support only one distribution, then I would recommend either Debian or Ubuntu. They are both well supported and have mature package managers.
    All you should need to build on the Mac is Xcode which is free. I can build fastspin with only free software. I'm sure Catalina would be the same. I can't remember what happened the last time I tried to build Catalina but I know it didn't work out of the box and I didn't have time to track down what was wrong. Where can I find the latest Catalina sources?

    Edit: Never mind. I found the sources. Now I just have to figure out why catalina_env is missing.

  • Where can one get old versions of PNut?

    I'm using PNut on wine. But somewhere between versions 34k and 34u the font changed. It used to be Monospace. Now it's a variable width font, probably Sans. The big problem is that the cursor moves a fixed amount as if it were a fixed font. The cursor position can be quite far from where the new characters are actually inserted. So the editor is useless.

    Is it supposed to be the Propeller font now? It's not in the zip. But copying Parallax.ttf to .wine/drive_c/windows/Fonts doesn't fix it.

  • Where can one get old versions of PNut?

    I'm using PNut on wine. But somewhere between versions 34k and 34u the font changed. It used to be Monospace. Now it's a variable width font, probably Sans. The big problem is that the cursor moves a fixed amount as if it were a fixed font. The cursor position can be quite far from where the new characters are actually inserted. So the editor is useless.

    Is it supposed to be the Propeller font now? It's not in the zip. But copying Parallax.ttf to .wine/drive_c/windows/Fonts doesn't fix it.

    What version do you need? I can go back about 6 versions.
  • @SaucySoliton If you send me a private message with your email address I will zip all of them in the attached picture and send them to you.
    Cheers
    Kevin
    121 x 424 - 4K
  • dMajodMajo Posts: 855
    edited 2020-07-29 23:37
    Publison wrote: »
    dMajo wrote: »
    @cgracey
    I've tried now to download the 34u, but as soon as I click on the google download arrov I get this msg:
    Questo file è infettato da un virus
    Solo il proprietario può scaricare i file contenenti virus.
    
    This file is infected
    Only the owner can download files containing viruses

    Try the new version 34ua by Jeff Martin 5 or 6 post above.

    Sorry for the delay, I've been away for a longer weekend.
    I have downloaded this morning 34u and 34ua with another PC running windows 7 pro 64b without problems.
    But trying to extract and run them now (on w10 pro) both trigers windows defender.
  • @dMajo
    trigers windows defender
    Please show us what you get e.g. blue dialog box? and what action you took.
  • YanomaniYanomani Posts: 1,524
    edited 2020-07-30 01:23
    The same just happened with my W8.1 system; W Defender AV database:1.321.113.0

    Attached image shows last few days timeline...

    Innocent_ET_2020_07_29.jpg

    P.S. Clarifying, portuguese-english: Grave = Severe and Padrão = Standard.
    958 x 536 - 94K
  • RossHRossH Posts: 5,471
    edited 2020-07-30 01:27
    David Betz wrote: »

    Now I just have to figure out why catalina_env is missing.

    You need to manually set the LCCDIR environment variable if Catalina is not installed in "/opt/catalina".

    EDIT: we probably should move this discussion to the Catalina thread!
  • TubularTubular Posts: 4,705
    edited 2020-07-30 01:26
    .
  • Cluso99Cluso99 Posts: 18,069
    Struggled yesterday with v34u.
    I did manage to get around the problem but I tried some many things after each unzip attempt that I forget what I did :(

    v34s runs just fine tho.
  • I have installed and used all of the PNut versions listed in the attachment. Note my version of windows in the next attachment. Note how my Windows Defender is setup in the next attachment. Once with each of the two most current versions of PNut I have asked Sophos to recover the archived PNut files which their system did. I have never been unable to run and use PNut.
    The first question is "Is your MS windows OS absolutely current?"
    Next pretend that MS Windows employs programmers that believe their AI code is more intelligent than themselves. This means that you need to be direct, consistent and positive and "Run anyway" until their brain gets it. I run PNut many times and never get a repeat performance of WD. I believe MS is saving info on your pattern of behavior.
    Next park PNut as far away from MS systems and applications as possible. I place PNut and source code in one folder not on C Drive. I start PNut by using Windows Explorer and by double clicking PNut.exe
    Next I want you to create at least 15 A4 pages of legal clauses that prevent me having any legal obligation want-so-ever!
    121 x 424 - 4K
    251 x 105 - 5K
    708 x 593 - 135K
  • Cluso99Cluso99 Posts: 18,069
    edited 2020-07-30 02:47
    I am on W10 Pro 1909 build 18363.959 (current for 1909)
    I do note that 18363.997 is available but hasn't rolled to my PC or my work PC's yet.
  • Hi @Cluso99 I wonder if a user did a new (completely new) install of MS Windows 2004 then ran PNut_v34ua and said "run anyway" what would happen?
  • Cluso99Cluso99 Posts: 18,069
    kg1 wrote: »
    Hi @Cluso99 I wonder if a user did a new (completely new) install of MS Windows 2004 then ran PNut_v34ua and said "run anyway" what would happen?
    I didn't get the run anyway option. The exe was deleted by defender as soon as I unzipped it and went to run/move it.

    It's not a case of reinstalling windoze. Besides that's not a realistic option.
Sign In or Register to comment.