启动微控制器模拟器/仿真器 [英] starting a microcontroller simulator/emulator

查看:104
本文介绍了启动微控制器模拟器/仿真器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为以下微控制器板创建/启动模拟器: http://www.sparkfun.com/commerce/product_info.php?products_id=707#

I would like to create/start a simulator for the following microcontroller board: http://www.sparkfun.com/commerce/product_info.php?products_id=707#

固件是用汇编语言编写的,因此我正在寻找一些有关如何模拟硬件将接收的输入,然后模拟器将响应固件输出的指示. (这还需要在模拟环境中运行固件).

The firmware is written in assembly so I'm looking for some pointers on how one would go about simulating the inputs that the hardware would receive and then the simulator would respond to the outputs from the firmware. (which would also require running the firmware in the simulated environment).

任何有关如何启动的指针?

Any pointers on how to start?

谢谢 克里斯

推荐答案

编写整个仿真器将是一个真正的挑战.我之前曾尝试编写一个ARM仿真器,然后告诉我,这不是一个小项目.您将不得不仿真整个CPU内核,或者找到已经编写的内核.

Writing a whole emulator is going to be a real challenge. I've attempted to write an ARM emulator before, and let me tell you, it's not a small project. You're going to either have to emulate the entire CPU core, or find one that's already written.

您还需要弄清楚所有IO的工作方式. sparkfun可能有关于该主板的文档,但是如果它使用MMIO等,则需要编写一个内存管理器.

You'll also need to figure out how all the IO works. There may be docs from sparkfun about that board, but you'll need to write a memory manager if it uses MMIO, etc.

仿真器的概念与解释器之间的距离并不遥远.您需要解释固件代码,并基本上按照说明进行操作.

The concept of an emulator isn't that far away from an interpreter, really. You need to interpret the firmware code, and basically follow along with the instructions.

我会推荐一个好的交互式调试器,而不是仿真器.破坏硬件的机会很低,但是,实际上,您是愿意购买一块新的板还是花9个月的时间编写一些无法实现整个系统的东西?

I would recommend a good interactive debugger instead of tackling an emulator. The chances of destroying the hardware is low, but really, would you rather buy a new board or spend 9 months writing something that won't implement the entire system?

PIC 18F2520可能已经为此编写了一个仿真器内核,但是您需要深入研究所有硬件规范才能了解如何映射所有IO.如果您愿意的话,那将是一个不错的项目,但是我会考虑只使用远程调试器.

It's likely that the PIC 18F2520 already has an emulator core written for it, but you'll need to delve into all the hardware specs to see how all the IO is mapped still. If you're feeling up to it, it would be a good project, but I would consider just using a remote debugger instead.

这篇关于启动微控制器模拟器/仿真器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆