2
\$\begingroup\$

I'm aware of the differences between a common microcontroller and a full blown motherboard from a computer server. But consider what happens when the PC memory testing tool memtest86 is run:-

memtest86

Here the tool can be seen running on a largish core i7, accessing 16GB of RAM. Clearly it also has access to the hard disk from which it booted, loaded and ran. Access to the network, usb and serial interfaces is probably possible then too. And it's running with no operating system, just itself.

So instead of running memory tests, could some application be written that would do what I wanted it to do and control things via the available interfaces? Or are there on board devices and components that need a full blown OS?

I'm not asking if this is particularly useful, but whether it's possible?

\$\endgroup\$
  • 1
    \$\begingroup\$ You can program on "bare metal", but the non-deterministic nature of modern microprocessors make them a poor choice for hard real-time applications. \$\endgroup\$ – Ignacio Vazquez-Abrams Jul 12 '18 at 1:22
  • \$\begingroup\$ You can absolutely run bare metal code on a PC - you'll find this mainly referenced in OS development tutorials, of course. A lot (but not all) of the really simple hardware interfaces from the days of MS-DOS are still usable. \$\endgroup\$ – immibis Jul 12 '18 at 1:32
  • \$\begingroup\$ It was written in C+ and assembly language \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jul 12 '18 at 1:50
  • \$\begingroup\$ This question hurts my soul because it sounds like exactly what I do at my company... But with no OS? Blasphemy! LOL :) I work on the IoT Edgeline products at my job. Our products do support Bluetooth, serial I/O, USB interfacing, etc. If you wish to run applications then an operating system is what you need whether it be Linux or Windows. Perhaps you're looking for something that you can run straight from the processor's architecture? \$\endgroup\$ – KingDuken Jul 12 '18 at 2:28
  • 2
    \$\begingroup\$ I can't count the number of times I've had to write an operating system for the x86 family, from the ground up. Did you know that you can boot code via the keyboard interface port? (No hard disk controller required?) However, you need to seriously study the processor, support chips, how to size, identify, and configure ram, configure the APIC, use MSRs and MTTRs, etc. I used to do chipset testing at Intel, so doing this is kind of old-hat for me. Of course, I've often simply just replaced the BIOS itself, too. Regardless, it's all possible. \$\endgroup\$ – jonk Jul 12 '18 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.