Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry for the possibility dumb question: do those microcontroller board have some kind of operating system? Is that operating system open source? Could it, in theory at least, run some trimmed down Linux kernel?


1) Your program to run is the operating system. This board has USB bootloader but probably can be erased.

2) Sometimes open, sometimes shared source or sometimes supplied as binary blobs.

3) No, there's not enough RAM, nor there is DRAM interface, nor it has MMU with hardware physical-virtual memory translation that Linux requires.

Dmitry Grinberg's "uARM" ARMv5TE emulator[0] might still work if it is absolutely necessary to run Linux on this.

[0]: http://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%20...


Usually you don't run an operating system on those, or maybe what is called a Realtime Operating System (RTOS). That's basically glorified thread scheduler, with some basic synchronization primitives.

Regarding the Linux question, the larger cortex M devices can, but this one is probably too small at 264 kB, although not very far from the minimum (I could find boards with ~320 kB claiming some support). The biggest question is wether or not the Cortex-M0 architecture has all the required features for Linux (M4 and M7 can, but are much bigger chips).


I would actually venture so far as to say that the purpose is to not run an operating system. Programming i/o intensive stuff that has to work in real time, on a computer with an OS can be hard, especially for a beginner. The OS "gets in the way" if you will.

A useful approach for applications that need an OS is to run the OS on a regular computer, and connect it to a microcontroller that handles your custom i/o tasks. Connect them via USB or wireless.


I was told in school "the job of an operating system is to share resources"

and yeah, you don't want to share anything when doing microcontroller kinds of things.


These boards are designed to run whatever script you flash to it in a loop and will do so as long as the board has power. The script your write is the operating system.

Think: relatively simple, dedicated, repeatable applications (if/then scenarios)

Controlling lights in your house, simple robotic behaviors (sensor I/O and motor control, nothing ML related), or reading/displaying sensor data (temperature, light, etc), are common applications for microcontrollers.

There isn't enough onboard memory to run anything too complex like an OS. If that is the route you want to go, the Pi Zero might be more suitable for an entry-level board that can handle a Linux kernel.


Thanks everyone for the answers!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: