Different views on Bare Metal Programming

The thread :man_juggling: Bare Metal or RTOS, NORDIC brings the Receipts. (saving Nrf54 Xiao) of @PJ_Glasso has shown the view of Nordic engineers: Bare Metal is just anything (including Soft Devices) without an OS (or RTOS). But that is (was) not my view.

For me, Bare Metal Programming is the direct access to the registers of the MCU. When I was young, I programmed a lot in Assembler (6502/Z80/8051, even on a PC with 80286) and that was bare metal from 2 aspects, one accessing the specific registers and another with using a specific language.

Today, with the RISC structure of modern MCUs (mostly ARM or RISC V), there is only the aspect of addressing memory mapped registers. The optimizing C/C++ compilers create a machine language which cannot be improved, unless there are special machine commands which replace many C code lines (I remember a repetition command with the 286 doing a whole memory copy with one assembler line). So from this view to the language, all MCUs are compatible today.

We also can find Bare Metal Servers and the explanation ist, that this are simply physical existing computers and not virtual resources in a cloud. If I take this definition, Bare Metal Programming is my physical access to the MCU. If we assume the RTOS being a shell around the hardware which is hindering my direct access to the MCU, the Nordic definition is just that. But what about using libraries (soft devices) or interrupt based drivers? Is it Bare Metal Programming when using libraries and drivers?

Ok, if that is the fact, I will have to find another wording for my kind of programming. May be it is Register Access Programming or Direct MCU Access Programming. And just this kind of programming is what I like most. My basic literature is the datasheet (product description) of the MCU and from that view I select the good and the better MCUs. In that environment, only your fantasy is the limit.

Hi there,

So it is revealed… :old_man: Holly smokes. I started with the same 6502, Z80, Z80A,B,C all the peripherals CTC, PIO , SIO all of them, PAL chips , GAL chips (glue logic) DTACK type , 68000, 68020 You know what I’m saying. MASM or ASSembly there where no “Interpetures” LOL , Hell “C” was still B. :grin:
but I digress.
I totally hear you — anyone who lived through the 6502/Z80/8051 era earned their stripes the hard way. Back then, ‘bare metal’ literally was register twiddling because there was nothing else. No HALs, no CMSIS, no middleware… just you, the silicon, and the datasheet. (always stamped “Preliminary”) :grin:

But the landscape changed. Modern ARM and RISC-V parts ship with layered abstractions, toolchains, drivers, and an RTOS that barely gets in your way if you don’t want it. Nordic’s definition isn’t marketing fluff — on today’s MCUs, ‘bare-metal’ means no OS scheduler, but you still get to talk straight to registers whenever you want. The toolchain doesn’t stop you. Zephyr doesn’t stop you. Even MCUBoot doesn’t stop you.

If someone wants to keep doing ‘Direct Register Programming,’ that’s still absolutely possible. It’s just no longer the only way to run on the metal. The world evolved, and Nordic evolved with it.

End of the day, whether you type *(volatile uint32_t*)0x40004000 = 1; or use a driver call, you’re still in full control. That’s the spirit that matters.”

HTH
GL :slight_smile: PJ :v:

I’m betting in 3 hours, You could be up to 3/4 speed on the Nrf_sdk.
Grab a Libation, go watch the DEV academy videos, try some of the examples and Bob’s your uncle :+1: if you can handle Arduino, it’s truly the next step.

don’t get too nostalgic :grin: some then and now pics I used in a presentation…LOL :+1: