C/C++ on the P2 and Nano FPGA ?
Heater.
Posts: 21,230
in Propeller 2
Is it now possible to compile and run C/C++ for the P2 and run it on a DE0 Nano FPGA?
I have a little idea....
More on the idea if it looks like it's even possible.
I have a little idea....
More on the idea if it looks like it's even possible.
Comments
Could the work be divided up among a small number of volunteers? I'm sure there are at least a handful of people interested in working on this. We would just need some direction on what needs to be done.
No, no, this idea is much worse than that
However....getting Zog working on the P2 might happen one day. It would be a bit slow for my current bad idea.
Yes it has to do with Javascript.
However, it's not the same bad idea to do with Javascript I had before...
No, I don't have any ESP8266 yet. I was intrigued by the Espruino on ESP8266 idea though.
As it happens a while ago I started work on a Propeller loader in Javascript. Basically a rewrite of your PLoadLib from prop-gcc in JS
The idea was to have a Prop loader in JS that could be used with node.js or from a Chrome browser extension.
Well, life over tool me and that came to a halt before I could even start testing it against a real Propeller.
The code is here: https://github.com/ZiCog/propeller-loader.js
I have no idea if this would run fast enough to program a Prop from an ESP8266 or an Espruino though.
It would be great on the ESP8266. Just send a binary over the net and the ESP8266 programs the Prop with it.
Perhaps I should get back to that.
Just now I can't think about second stage loaders. If the JS loader worked at all I would be amazed!
I think you have inspired me to pick that up and continue with it...
Perhaps JS running on raw hardware like an Espruino or ESP can do it. On the one hand it has no OS in the way and everything is event driven. On the other hand, is the interpreter fast enough?
We shall see.
Aside: Crazy guys around here have the idea of booting a Linux machine straight into node.js. Skip all the other layers of operating system guff.
A friend and I did that in the 00's with FreeBSD. Basically whittled it down to the target application and ssh for admin. For dedicated type tasks, it's really lean, once you get the hard work done. Mostly, just sits there and does what it does. Boring, but absolutely great from a sysadmin standpoint. Lots more YouTube and mp3 time, when the stuff is boring and just works.
Well, how about we boot to Linux and the run node.js?
In node we can do whatever we want in JS. None of that old baggage required.
Of course if you are creating some web service with it you may need a database or two.
No problem, those data bases can be on some other machine. Which is often the case in the modern world.
For example, my little demo here: https://xn--2-umb.net/login currently only needs access to a an authentication server. The later is provided by stormpath.com but any other would do. Even one of my own.
I could see npm requiring a DB engine. Perhaps that's what you were thinking of?
npm only wants your package.json file in your project directory so it can install the required module versions for your project.
If you choose to use a package.json file that is.
*by server, of course in today's world, that can be anything from a physical server to a tennant running in a cloud someplace.
It's a distributed mess of machines, real and or virtual, running things like load balancers, web page servers, RESTful API servers, authentication servers, database servers, compute engines etc, etc, etc. Quite likely with different parts distributed over different data centres in different continents.
At that point your realize LAMP is not going to cut it, especially with todays "web apps" with real-time data feeds. Node was built to exploit the event driven nature of JS to make all this much easier.
Are there large web sites using node? Sure: ebay, Dow Johnes, LinkedIn, Uber. Here is a list https://github.com/nodejs/node-v0.x-archive/wiki/Projects,-Applications,-and-Companies-Using-Node
How'd we get off on this tangent anyway??
Oh, yeah Proploader written node/espruino/javascript/etc....cool, if it can be done, opens up a lot of platforms for proploading....the more proploading going on, the more props getting loaded and that's a good thing!!