Arm (thumb-2) 组装模拟器?
有没有用于拇指 2 组装的模拟器之类的东西?我想编写简单的 ARM Thumb-2 汇编程序并对其进行测试,而无需使用实际的 ARM 设备,因此我唯一的选择是仿真。
我的目标是在拇指 2 汇编中实现大量算法作为学习练习。我什至不需要模拟其他硬件(例如 io/display/等)。只是能够运行thumb-2汇编(编译或未编译)并查看结果(也就是说,基本上能够调试程序并在程序完成后查看模拟内存的内容)。
是否存在这样的事情,或者我抓住了救命稻草?
Is there such a thing as an emulator for thumb-2 assembly? I would like to write simple ARM Thumb-2 assembly programs and test them out without needed to use an actual ARM device, so my only option is emulation.
My goal is to implement a sizable number of algorithms in thumb-2 assembly as a learning exercise. I don't even need emulation of other hardware (such as io/display/etc). Just the ability to run thumb-2 assembly (compiled or not) and view the results (that is, basically be able to debug the program and see the contents of the emulated memory after my program is finished).
Does something like this exist, or am I grasping at straws?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
QEMU 支持 Thumb-2 处理器,例如 Cortex-M3 和 Cortex-A8。它甚至包含在最新的 CodeSourcery 版本中。
QEMU has support for processors with Thumb-2, such as Cortex-M3 and Cortex-A8. It's even included in latest CodeSourcery releases.
Android 模拟器 (4.0) 建议它使用armeabi-v7a
我也在尝试查看是否有任何配备 Cortex A8 处理器的廉价硬件 Android 平板电脑在 Thumb-2 模式下运行,或者您是否可以在它们上运行本机 Thumb-2 代码
“最新版本的 NDK 支持以下 ARM 指令集:
...
ARMv7-A(包括 Thumb-2 ...”
不确定它需要什么版本的 Android
The Android emulator (4.0) suggests it uses armeabi-v7a
I'm also trying to see if any cheap hardware Android tablets with Cortex A8 processors run in Thumb-2 mode, or if you can run native Thumb-2 code on them
"The latest release of the NDK supports these ARM instruction sets:
...
ARMv7-A (including Thumb-2 ..."
not sure what version of Android it requires
Thumb2 主要是带有一些新指令的拇指。大多数拇指教育只是学习拇指。所有的thumb2处理器都对thumb指令集非常满意。与先学习arm7再学习arm11指令没有什么不同。拇指模拟器将帮助拇指指令集、基础知识,但不会帮助拇指2添加,除非你选择实现它们。
还有 Armulator,它是/曾经是 Arms 指令集模拟器,您可以找到它包含在 gdb 之类的东西中。对于了解 qemu 来说并没有什么用处,但如果您想尝试观察正在发生的情况,它比 qemu 更简单。 gdb 本身可能是您感兴趣的平台,因为它具有可见性以及指令集模拟器。
Qemu 非常适合为某些 arm/thumb 目标模拟 Linux 构建(并使其快速运行)。驱动程序就位等。但是从头开始,只是为了让您可以看到几行汇编程序,您将需要一些 I/O,并且可能很难让 qemu 启动并运行您的代码,可能与你正在做的事情适得其反。 ymmv
Thumb2 is mostly thumb with some new instructions. Most of a thumb2 education is just learning thumb. All thumb2 processors are quite happy with the thumb instruction set. Not unlike learning arm7 before learning arm11 instructions. thumbulator will help with the thumb instruction set, the basics, but not thumb2 additions unless you choose to implement them.
There is also the armulator which is/was arms instruction set emulator, which you can find included in things like gdb. Not any more useful at learning that qemu is, but simpler than qemu if you want to try to watch what is going on. gdb itself may be the platform you are interested in as it has that visibility along with an instruction set emulator.
Qemu is good for say simulating a linux build for some arm/thumb target (and having it run fast). Where drivers are in place, etc. But starting from scratch, just to get where you can see the handful of lines of assembler you will have to some I/O, and may struggle just to get qemu to boot and run your code, might be counter productive to what you are doing. ymmv
您有多种选择。我将按照从最好到最差的顺序列出它们。
说明:
QEMU 我喜欢称之为 VM 的“地铁”。您构建了一个完整的虚拟机,其中包含“您想要的一切,没有您不需要的一切”。这意味着您可以设计您想要模拟的机器的几乎每个方面(包括它使用的 ISA)。不过,还需要一些 QEMU 技术技能。
Keil uVision 是一个用于开发、测试和上传汇编/嵌入式 C 代码的好工具。 Keil 无需连接设备即可处理大量调试。
Yocto 是一个用于创建自定义 Linux 环境的开源工具。与 QEMU 类似,您正在创建自定义架构。不过,这比 QEMU 的记录更少,而且更“挑剔”。非常酷的项目 #promotions
You have several options. I will list them in order of best to worst.
Explanations:
QEMU is what I like to call the “subway” of VM’s. You build an entire virtual machine with “everything you want and nothing that you don’t”. This means you can design almost every aspect of the machine you would like to emulate (including the ISA it uses). Some QEMU tech skills needed tho.
Keil uVision is a good tool for developing, testing, and uploading assembly / embedded C code. Keil can handle a good deal of debugging without needing a device attached.
Yocto is an open source tool for creating custom Linux environments. Similar to QEMU, you’re creating a custom architecture. This is less documented and more “finicky” than QEMU though. Very cool project #promotions