Mac driver development

半世苍凉 提交于 2019-12-20 08:50:19

问题


I am thinking about migrating a Windows driver into OS X. Now I am just starting to look around to see what is available and there is a lot about objective C and cocoa. Seems that the language and the cocoa framework are high level APIs, am I right to assume that?

I have strong C++ skills and I use them for kernel development, can I use the same skills for Mac driver development (I imagine the answer is yes). Has Macintosh any type of application/dev environment for building drivers?


回答1:


The Apple Hardware & Drivers page has lots of information about Mac driver development. It should be enough to get you started. Some of the highlights:

  • Getting Started - A guided learning path for hardware and driver developers new to Mac OS X.

  • Frameworks - API references organized by framework.

  • USB Sample Code - Resources for developing USB devices and software to access them.

  • FireWire Sample Code - Resources for developing FireWire devices and software to access them.




回答2:


Start here http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/About/About.html

Mac development is generally done using Xcode, as it handles various Mac-specific concepts like bundles and frameworks. You will most likely be working in pure C. You will not be using Cocoa for driver development, as that is an application-oriented framework.




回答3:


First, C++ works just fine, although Objective C is not all that hard to learn. If you have a background in Windows drivers you know some of the essentials- memory management is critical, time is critical, etc.

You will probably be using the IOKit. I suggest starting here for a good, step by step intro to getting the driver to work.

Kernel Extensions

There are a few things that don't seem to work the way they say they will, and I'm trying to figure out if it really is not possible to debug a driver on a single machine, but it's better than most Apple documentation.



来源:https://stackoverflow.com/questions/1001374/mac-driver-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!