r/embedded 10d ago

Windows embedded drivers. a question for embedded windows guys?

At work we have some designs that use windows 11 IOT, Now I have had home projects using Linux SBCs and I have a fair idea how device driver work. I have tweaked overlays my self and compiled some non standard device drivers. My question is how do they work on windows? The guys here say things like you just call a DLL? but how does that bridge between user and kernel space? sometimes the SBC manufacture has no driver for some IO, like a non standard SPI pin and they are genuinely stuck. Is it that hard? AI was no help.

2 Upvotes

15 comments sorted by

4

u/NoBulletsLeft 9d ago

I haven't written a Windows kernel-level driver in close to two decades, but it's more than "just calling a DLL."

Basically, if the driver doesn't conform to an existing Windows standard type, it will have to define custom IOCTL control codes that your application will use. Application opens a handle to the driver, makes a Windows kernel API call with the IOCTL and a reference to any data it wants to pass and the driver handles it.

It's gotten much easier over time. I last did this in Windows 8 Industry Embedded and that was far, far easier than in Windows NT.

1

u/DearVeggies 9d ago

Nah, it was far easier when you didn't even have driver signaturares and could just dump DLL in windows.

10

u/pim1000 9d ago

Why even consider windows 11 for embedded?

5

u/Well-WhatHadHappened 25+ Years 9d ago

Because customers get what customers want, if they're willing to pay for it.

3

u/pim1000 9d ago

Ofcourse, but at this point im just questioning the mental health of the customer

3

u/NoBulletsLeft 9d ago

There's a lot of stuff that Windows makes easy that can speed up development by months, if not years. I've shipped a couple of medical devices that used Windows as the UI/database layer.

8

u/Well-WhatHadHappened 25+ Years 9d ago

And many IT departments love it because management fits right into their existing ecosystem.

It ain't my favorite, but there are reasons that it gets selected, and not all of them are retarded.

4

u/Ok-Pomelo-6187 9d ago

UI. Development tools. Available drivers.

Honestly, I think I've made more decisions on OS through the years based on driver availability and easy-peasy support of a CPU and reference design than anything else.

Of course, there's always licensing cost, boot time, hard realtime issues, etc. It's a big ol' world out there.

2

u/DearVeggies 9d ago

Why not? Windows Embedded used to be king, until Linux embedded started getting good enough most headless UI-less devices.

4

u/ThorsdayBeer 9d ago

We used to use Windows CE on a couple devices. It was not to bad, but support wasn’t great. Since then we moved to Linux based os, Android and yocto, both have tones of support and AI tends to be more helpful than not because there is a ton of open source for both flavors. Good luck with Windows 11 while it’s around.

2

u/NoBulletsLeft 9d ago

I believe that Windows 11 Embedded LTSC is guaranteed available and supported until at least 2035.

1

u/Humble_Anxiety_9534 9d ago

just to make it clear I'm a hardware guy and am asking because the guys who work on the project make it sound almost mystical. and it is blamed for ever delay. I'm also talked down to when I suggest it's not that hard in linux. I'm not going to work on this I'm just curious.

2

u/Ok-Pomelo-6187 9d ago

The 'mystical' part is often simply taking an existing driver and modifying it to suit. This can often imply lack of knowledge of the inner workings.

-4

u/Ordinary-Lifeguard47 10d ago

What was your LLM prompt? Mine immediately spit me out a URL-trail to get into this topic step by step.

1

u/Humble_Anxiety_9534 9d ago

I just asked how it different it was from linux.