开发 ARM 处理器需要什么?

发布于 2024-08-29 06:41:07 字数 1539 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

指尖凝香 2024-09-05 06:41:07

环境选项

  • QEMU 系统模拟器中安装 Linux。它可以模拟各种基于 ARM 的芯片组。
  • 获取适用于特定 ARM 芯片组(例如掌上游戏机)的模拟器。 Gameboy Advance 玩起来很有趣。 NoCash GBAVisualBoy Advance 是两个很棒的 GBA 模拟器。

工具链

您将需要一个工具链。工具链是低级工具的集合,例如汇编器、链接器、编译器、归档器和一堆其他有用的东西。更重要的是,您需要一个跨工具链,这意味着工具链在一个系统上运行,但为另一种体系结构构建可执行文件。通过这种方式,您可以构建在 ARM 设备上运行的应用程序,但可以在基于 x86 的 PC 上运行。它更快更方便。

如果您运行 Windows,DevkitPro 是一个相当不错的选择。对于 Unix/Linux/BSD 变体,您可以使用 CodeSourcery 的免费工具链,以及来自 gnuarm.com。还有其他几个,但您不需要更多选择。

文档

infocenter.arm.com 获取您选择的 ARM CPU 的规格。无论 CPU 是什么,您都需要的一份参考资料是《ARM 架构参考手册》(通常缩写为 ARMARM)。我正在托管一个旧版本,其中涵盖了 ARM 架构和指令集版本,最高可达 ARMv4T,此处,但您也可以在 infocenter.arm.com 上找到当前版本和更高版本。如果您选择 GBA,请注意 CPU 是 ARM7TDMI,指令集版本为 ARMv4T。

ARMARM 包含常见的详细系统编码的提示和示例、如何处理某些设计问题的提示,以及 ARM 指令集、Thumb 指令集和协处理器(如 MMU、MPU、DSP 和FPU。

如果您坚持使用 QEMU,那么这几乎就是您所需要的,因为 Linux 内核可以处理所有事情。 QEMU 还具有用户模式仿真(带有 C 库存根)。如果您选择 GBA 模拟器之一,这里有一个关于 GBA 硬件和硬件寄存器的很好的参考:CowBiteSpec。另请务必查看 http://www.gbadev.org/

任天堂 DS 可能也是一个选择,但我还不知道有什么适合该掌机的合适模拟器。祝你好运:-)

编辑:这是我几年前编写的一些 GBA 代码的简单示例: GBA 颜色填充 240x160 16 位示例

Options for environments

  • Install Linux in the QEMU system emulator. It can emulate a variety of ARM-based chipsets.
  • Get an emulator for a specific ARM-chipset like a game handheld. Gameboy Advance is fun to play with. NoCash GBA and VisualBoy Advance are two great GBA emulators.

Toolchains

You will need a toolchain. A toolchain is a collection of low-level tools like an assembler, a linker, a compiler, an archiver and a bunch of other usefull stuff. Even more, you want a cross-toolchain, which means that the toolchain runs on one system, but builds executables for another architecture. This way you can build applications that run on ARM-devices, but on your x86-based PC. It's faster and more convenient.

If you run Windows, DevkitPro is a fairly good choice. For Unix/Linux/BSD variants, you have CodeSourcery's free toolchains, and the GCC toolchain from gnuarm.com. There are several others, but you don't need more options.

Documentation

Get the specification for your ARM CPU of choice at infocenter.arm.com. One reference you need no matter the CPU is the ARM Architecture Reference Manual (Often abbreviated ARMARM). I'm hosting an older version, which covers the ARM architecture and instruction set version up to ARMv4T, here, but you will find the current and later versions on infocenter.arm.com as well. If you go for GBA, notice that the CPU is an ARM7TDMI, with the instruction set version ARMv4T.

The ARMARM contains tips and examples for usual nitty-gritty system coding, tips on how to proceed on certain design issues, as well as a reference of both the ARM instruction set, Thumb instruction set and co-processors like MMUs, MPUs, DSPs and FPUs.

If you stick with QEMU, that's pretty much all you need, since the Linux kernel handles everything. QEMU also has user-mode emulation (with a C-library stub). If you go for one of the GBA emulators, here's a nice reference over the GBA hardware and hardware registers: CowBiteSpec. Also make sure to check out http://www.gbadev.org/.

Nintendo DS is probably an option as well, but I don't know of any decent emulators for that handheld yet. Good luck to you :-)

EDIT: Here's a trivial example of some GBA code I wrote years ago: GBA Color fill 240x160 16-bit example

不必了 2024-09-05 06:41:07

一些评论,不竞争海报问题的完整答案。

beagleboard 很酷,150 美元,但还需要另外 150 美元的 USB 设备才能使它有用。 Embest beagleboard 总体来说比较便宜,因为你不需要购买与之搭配的东西。但现在有了 hawkboard,也是一个基于 omap 的板,价格不到 100 美元,到目前为止看起来做得很好。我现在比beagleboard更喜欢它,远没有那么痛苦。

在该价格范围内,open-rd 板提供的功能远远超过 beagleboard,如果/当您有玩具预算时,可以考虑一下。开放式板和另外 100 美元的封闭板都有一个完整的 SATA 连接器,因此您可以在上面放置笔记本电脑驱动器,而不必使用速度缓慢的闪存设备或 USB。

发帖者没有资源购买这些玩具。我认为,如果您继续追求这一目标并擅长嵌入式 ARM,您就会有意愿并找到方法。这就是为什么我提到 Sparkfun 和其他公司有 30-50 美元的开箱即用的开发板。在购买之前向 stackoverflow 发布问题,询问哪个更好。我有很多,其中有很多我发现无法使用或太痛苦而无法打扰,我不希望你把所有的玩具预算花在不值得拥有的东西上。

我这里有一些 qemu Arm 集成器示例代码,让我将其打包并提供一个工作示例。我还有很多其他的 ARM 和 GBA 代码,也许我也会发布它们。

ARM 架构开始出现,上次我使用名为 Armulator 的模拟器(google/wikipedia it)与他们的人员/工具一起工作。因此,模仿arm的情况并不少见。

编写您自己的模拟器将/可能是一个有趣的项目,或者采用现有的模拟器并添加您自己的外围设备。 qemu 和 mame 太大了,无法按原样玩,您也许可以毫不费力地从 mame 中取出手臂。

A few comments, not competing for a complete answer to the posters question.

The beagleboard is cool, $150 but it takes another $150 in usb stuff to make it useful. The embest beagleboard is cheaper overall due to the lack of stuff you have to buy to go with it. But now there is the hawkboard, also an omap based board, costs under $100 and so far seems very well done. I am liking it more than the beagleboard at the moment, far less painful.

The open-rd board offers far more than the beagleboard for that price range, something to look into if/when you have a toy budget. both the open board and the enclosed for another $100 have a full sata connector so you can put a laptop drive on it and not have to use painfully slow flash devices or usb.

The poster doesnt have the resources to buy these toys. I would argue that if you continue to pursue this and get good at embedded ARM you will have the will and find the way. Which is why I mention Sparkfun and others have $30-$50 boards that work out of the box. Post a question to stackoverflow before you buy though asking which is better. I have many and there are a number of them I found unusable or too painful to bother with, I wouldnt want you to spend all your toy budget on something that is not worth having.

I have some qemu arm integrator example code laying around here, let me package it up and provide a working example. I have lots of other arm and gba code laying around, maybe I will post that as well.

The ARM architecture started out and last time I worked with their people/tools using an emulator called the armulator (google/wikipedia it). So emulating arm in particular is not uncommon.

Writing your own emulator would/could be a fun project or taking an existing one and adding your own peripherals. qemu and mame are too bulky to play with as-is, you might be able to extract the arm from mame without too much trouble.

笑红尘 2024-09-05 06:41:07

您可以购买诸如 BeagleBoard 之类的东西来玩 - 它们只需 200 美元左右。您可以在其上安装 Ubuntu 和 ARM 工具链。

You could get yourself something like a BeagleBoard to play with - they only cost around $200. You can install Ubuntu and the ARM toolchain on it.

瞄了个咪的 2024-09-05 06:41:07

去给你买一台 RPi3 吧。
您可以检查 https://www.element14.com/community/community/raspberry-pi

这真的很便宜而且使用起来非常简单。
您也会得到社区的大力支持。
检查 https://www.raspberrypi.org/products/raspberry- pi-3-model-b/ 了解更多信息。

Go get one RPi3 for you.
You can check https://www.element14.com/community/community/raspberry-pi.

This is really cheap and very simple to use.
And you well get great community support as well.
Check https://www.raspberrypi.org/products/raspberry-pi-3-model-b/ for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文