STM MP157C DK2 Is Node.js possible? - node.js

Currently i am running a Raspberry PI and STM32 in a project and i was looking into the MP1 to replace it with. As its an easier setup.
I am running a node.js application on the raspberry and I am trying to get that application to run on the MP1. I have tried to follow the tutorials from stm32 but doesnt help that much. Has anyone done anything like this? I know the microcontroller is new as it has been released in Oktober.
I know its a broad question. But anything helps as i cant find a lot about it.
Thanks

If you run an embedded OS like Embedded Linux or RTOS on the ARM you can run node.js and see https://elinux.org/images/1/14/Karagoz-nodejs-presentation_0.pdfhttps://stackoverflow.com/questions/44753321/is-it-possible-to-run-node-js-on-an-rtos. On a completely bare metal machine it may also be possible however this is very effortful to implement a JavaScript runtime like it was done for the ESP32-WROVER module (https://www.neonious.com/lowjs/)
You can implement websockets also in C/C++ that can run on bare metal ARM see https://github.com/zaphoyd/websocketpp

Related

What would be the recommended way to exchange data from a WebGL application running on a Raspberry Pi to write to the Pi's serial interface?

Here's the full problem:
I have a WebGL build of a Unity project running on a Pi, and I need the data from this process written to the Pi's serial interface (and vice versa). The best possible solution I can think of is hosting the WebGL server using Express, and utilizing nodejs for the backend process of somehow running some python code that works the serial interface. Problem is, I'm super inexperienced with these platforms and I don't have enough familiarity with how they all work together to intuitively feel out what to do. Hoping I can get some guidance on any recommended paths.
Pre answered questions:
Unity project on a Pi?: I have a simulation running in Unity, and I need it running on a lightweight computing platform. The only way to run this on a Pi is in a WebGL build.
What are you trying to achieve?: I'm trying to achieve a communication pipeline with this WebGL process and an Arduino, specifically over serial.
What I've tried:
I've tried running the WebGL process utilizing systems like Banyan, which would allow communication with a server, but it seems the WebGL build does not allow sockets.
I've tried hosting the server using Express through nodejs, and the app does actually work, I just need help understanding how this system works such that I can exchange data from the WebGL app and a python script that is running the serial comms. As stated above, I'm very new to the nodejs system so I may not even be using the nomenclature properly.

writing node.js raspberrypi programs on windows/ubuntu

I've spent the past two days trying to get the node wiring-pi module running on either windows or ubuntu. It installed no problem on my RaspberryPi, but developing on RPi isn't ideal. After a ton of error messages that don't lead me very close to a solution, I'm beginning to realize that trying to set-up a node module which was designed to run on an ARM processor and getting it working on an x86 machine for development may not be the best idea.
Has anybody else dealt with this sort of thing before? How do you write your ARM based programs in an x86 environment? Developing directly on the Pi has it's own set of issues.
What I was thinking of doing was to require the wiring-pi module like this
var wpi = require('wiring-pi')|| { //recreate the required wiring-pi methods for testing on x86};
however, that would mean my npm install would also fail, or need to be different depending on if I was building directly on the raspberyPi or on the windows/ubuntu x86 system.
Anybody else have another solution to working around these sorts of issues?
I have the same problem, and came to the same realization that trying to get the ARM modules working on X86 was not feasible. Hopefully your Raspberry Pi specific calls are isolated in a module that you can then easily replace on x86. I've not found a more clever solution than that.

Operating System in Java

We a team of 10 people are set out to build an Operating System for mobiles/tablet from scratch.
I then came by this link awesome-link
which has a load of OS briefed. But we would like to build the OS in Java on top of linux kernel(possible?) .
I would like to know whether the project is feasible and if yes, from where should I start ?
And with all the knowledge and right resources(assume), will it be possible to build an OS with all the mobile functionalities within 6 months?
Any help is much appreciated. Thanks.
But we would like to build the OS in Java on top of linux kernel(possible?)
Yes, what do you think Android is made of (of course it's not just Java + Linux kernel, but both are inside Android)?
I would like to know whether the project is feasible and if yes, from where should I start ?
Ever written an OS? How well do you know Linux kernel APIs? Do you know what's missing from Linux kernel to build a full featured OS? Answer those, they're your starting point.
And with all the knowledge and right resources(assume), will it be possible to build an OS with all the mobile functionalities within 6 months?
"All mobile functionalities" is biased, what is "all"? Be specific.
Please make enough research and planning before you are set out to start such a difficult, yet excellent journey.
Make sure you know what you should do, right from the technologies you are gonna use, the architecture you are planning to establish upon, the pros and cons of all the approach, the issues with the current OS and your idea of correcting those issues.
With a site like SO for your help, it is never a question of feasibility, but you would require the determination and the perseverance to achieve it.
Finally, all the best!!
You have Android build on scaled down Linux Kernel and apk is build through java & sdk manager. So you have the things in your hand, similarly ubuntu touch is also coming. What you can do is to customize things as per your requirements as per your architecture.
For ubuntu touch :- https://wiki.ubuntu.com/Touch/Building
For Your own customized Android:- http://source.android.com/source/index.html
Thanks & Regards,
Alok Thaker

NFC Chipset evaluation tool

I need to develope a NFC chipset evaluation tool. i need to connect the NFC board (that includes the NFC chip) to PC (running in Windows). then i need to get all the data of the chip to my PC using a software tool. this is the first time i am trying to do it. i need some advises regarding the first steps. i suppose, i would use a TCP-IP protocol to connect with the chipset. but how exactly it would work? for example, there is a USB-tester... http://www.vconsole.com/client/?page=page&id=13. my tool will be similar to this.
i also need to validate in the low level entry, for the framework.
i need to have a process description for the development of the tool. what are the steps?
thanks for your advices.
You cannot use TCP/IP over a USB/I2C connection. Most test boards come with software that you can use to connect to the board. What you are asking is a very broad question. If you are trying to write your own question, or hook it up to Excel to run tests with, you are progressing down a very time consuming path. People here are willing to help you figure out a question you are stuck on, but not to do all the hard work for you.
Like I said, you are starting on a BIG project, and will need to research A LOT. Then I'd recommend asking specific questions rather than very general questions.
As far as where to start, I'd start by writing down everything you want to know, and then start figuring out how to get each individual piece.

Need some advise to begin programming on ARM (with linux) platform

I will have (maybe) to work soon on ARM platform hosting a linux distribution (I don't know which distribution ..).
I know the project concerns video streaming, but I can't tell you more. Actually I only received the announe, and meet nobody yet.
I've never worked on such platform. So the idea for me is to test before the project starts.
What would you advise me to undestand how works such platform ? Internet links? Tutorials? Tools
Morevover, as I don't have any ARM processor at home (well only my iPhone ..) Which virtual machine would you advise me? (I clearly don't want to lose time installing and testing every one of them.)
I am aware of this page on wikipedia. Which one is the more appropriate running on a MacOS X 10.5/intel platform? Which linux distribution to install on the virtual machine?
I know the topic is quite wide, so any idea is welcomed! :-)
For a virtual machine that can emulate a ARM platform try QEMU. You can install a ARM-based Debian Linux distribution and tinker around with it. A google search on ARM, QEMU and Debian will get you started.
Also: Don't worry to much about the ARM CPU. You will use linux, so all the low-level stuff is already done for you. It's much more important to learn how the linux boot process works. How to install stuff ect. You will rarely (if ever) notice that you're running on a ARM device. The big difference to a PC running linux is, that the ARM will be a lot slower.
If you're looking for a real piece of hardware to play around with I suggest that you take a look at the beagleboard (www.beagleboard.org). It's cheap (around $150) and runs (among other things) various linux distributions.
With the beagleboard you'll get the whole linux cross compilation experience if you want (be warned: you'll pull your hair out).
I can't answer all of your questions, but there's a full port of Debian GNU/Linux on ARM. Works fabulously in my experience (I've tried it on a QNAP). Everything that's available in Debian works on QNAP now! So it's probably easiest to first try Debian tools and packages that come close to your project, and then continue from there.

Resources