用于培训嵌入式开发的 x86 模拟器
我希望更多地了解计算机的内部工作原理,增强我对嵌入式系统开发的了解。
在工作中,我从不涉及低级细节(例如,GDT、从闪存到 RAM 的代码加载器等),因为所有这些都已经编写好了。
我目前不想购买任何其他硬件。 是否有一个模拟器和一个非常简单的操作系统,我可以使用,以便掌握嵌入式编程的所有这些低级方面?有没有教程可以引导我设置一个非常简单的嵌入式环境(设置内存段、GDT、进入保护模式并执行 main()
)
I wish to learn more about the inner working of the computer, to enhance my knowledge about embedded system developement.
At work, I never get involved with the low-level details (such as, the GDT, the loader of the code from flash to RAM, etc) as all these are already written.
I'd rather not buy any other hardware currently.
Is there an emulator, and a very simple OS, I can play with, in order to master with all those low level aspects of embedded programmimng? Is there a tutorial that can walk me through setting a very simple embedded environment (setting the memory segments, the GDT, getting to protected mode, and execute main()
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
x86 模拟器的常见嫌疑人是 Bochs 和 QEMU.
您可能还想查看James Molloy 的内核开发教程和资源它链接到。
The ususal suspects for x86 emulators would be Bochs and QEMU.
You might also want to take a look at James Molloy's kernel development tutorial and the resources it links to.
在我们的操作系统课程中,我们目前使用的是一个名为POTATOES的玩具操作系统。它非常基础,并且基于 James Molloy 的内核教程。您可以在此处查看。
此外,我可以推荐 Wiki 和 OSdev.org 上的讨论区。
编辑:有关 x86 架构的一些有用信息可以在 Intel 的 IA-32 架构的第 3 卷中找到软件开发人员手册。第 1 卷介绍了基本架构,在第 2 卷中您将找到 x86 汇编指令集的完整参考。
For our Operating Systems course we're currently using a toy OS called POTATOES. It's pretty basic and AFAIK based on James Molloy's kernel tutorials. You might have a look at it here.
In addition I can recommend the Wiki and discussion board at OSdev.org.
Edit: Some good information about the x86 architecture can be found in volume 3 of Intel's IA-32 Architectures Software Developer's manuals. Volume 1 features the basic architecture and in volume 2 you'll find a complete reference of the x86 assembly instruction set.
在嵌入式系统开发中,模拟器具有非常具体的含义;您实际上是在谈论“模拟器”吗?但如果您在 x86 上进行开发,当您可以使用 VM 时,指令集模拟器是不必要的且受到限制。
事实上,如果您想要“一个非常简单的嵌入式环境”,您就不会选择 x86。引导和配置这些复杂的设备(及其相关的芯片组和内存)并非易事。
如果您的平台是 x86,那么最简单的方法就是使用在真正的 x86 上运行的虚拟机。最灵活、最强大的虚拟机可从 VMWare 免费获得,另一款免费虚拟机可从 < a href="http://www.microsoft.com/windows/virtual-pc/" rel="nofollow noreferrer">微软。然而,微软的 Virtual PC 针对运行 Windows 进行了优化,让 Linux 在其上运行可能会很麻烦,更不用说一些利基 RTOS 了。
In embedded system development emulator has a very specific meaning; are you in fact talking about a "simulator"? But if you are developing on an x86, and instruction set simulator is unnecessary and limited when you can instead use a VM.
In fact if you wanted "a very simple embedded environment" you would not choose an x86. Bootstrapping and configuring these complex devices (and their associated chip-sets and memory) is non trivial.
If your platform is x86 then the simplest thing to do is to use a Virtual Machine running on a real x86. The most flexible and robust VM is available for free from VMWare, and another free one from Microsoft. Microsoft's Virtual PC however is optimised for running Windows, getting Linux to work on it can be troublesome, let alone some niche RTOS.
使用真正的嵌入式机器可能会更好。 Arduino 的开发环境非常昂贵,您可以直接在金属上工作:http://www.sparkfun.com/commerce/product_info.php?products_id=9284
AVR 是进入该领域的合理起点,但 x86 不是。
You might be better off using a real embedded machine. A development environment for an Arduino is hardy expensive, and there you get to work right down at the metal: http://www.sparkfun.com/commerce/product_info.php?products_id=9284
AVR is a reasonable start into that space, x86 isn't.