学习嵌入式编程的最佳平台?
我希望学习嵌入式编程(主要是 C 语言,但我也希望温习我的 ASM),我想知道最好的平台是什么。 我有一些使用 Atmel AVR 并使用 stk500 对其进行编程的经验,发现这相对容易。 我特别喜欢 AVR Studio 和调试器,它可以让您查看寄存器的状态。
然而,如果我要花时间学习,我宁愿学习行业中流行的东西。 我正在考虑ARM,除非有人有更好的建议。
我还会寻找一些参考资料,我在 ARM 网站上找到了书籍部分,如果其中一本在技术上比另一本更好,我将不胜感激。
我最不想寻找的就是带有一些按钮等的原型/编程板,例如 STK500。
谢谢=]
I'm looking to learn about embedded programming (in C mainly, but I hope to brush up on my ASM as well) and I was wondering what the best platform would be. I have some experience in using Atmel AVR's and programming them with the stk500 and found that to be relatively easy. I especially like AVR Studio and the debugger that lets you view that state of registers.
However, If I was to take the time to learn, I would rather learn about something that is prevalent in industry. I am thinking ARM, that is unless someone has a better suggestion.
I would also be looking for some reference material, I have found the books section on the ARM website and if one is a technically better book than another I would appreciate a heads up.
The last thing I would be looking for is a prototyping/programming board like the STK500 that has some buttons and so forth.
Thanks =]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(21)
我建议使用Microchip的PIC18F系列。 我刚刚开始使用 RealICE 在线仿真器为他们进行开发,但就价格而言,pickit2 是一个不错的调试器。 您也可以这样说 AVR,但该设备在网络上有大量追随者。 由于所有 PIC 相关的讨论,我能够在几天内运行一个有缺陷但功能齐全的嵌入式 USB 设备。
我唯一不喜欢 PIC 的一点是,很多示例代码都非常缠绕在演示板上。 这可能会使您很难撕掉您需要的部分,但仍然有一个可以为您的应用程序构建和运行的应用程序。
I would suggest Microchip's PIC18F series. I just started developing for them with the RealICE in-circuit emulator, but the pickit2 is a decent debugger for the price. You could say this for the AVR's also, but there is a large following for the device all over the web. I was able to have a - buggy, yet functional - embedded USB device running within days due to all the PIC related chatter.
The only thing I don't like about the PICs is that a lot of the sample code is VERY entwined into the demo boards. That can make it hard to tear out sections that you need and still have an application that will build and run for your application.
对于学习来说,你不能绕过AVR。 这些芯片价格便宜,并且无需外部组件即可运行 - 它们还提供足够的电流来直接从端口驱动 LED。
您可以从便宜的编程器开始,例如 lady-ada 的 USBTinyISP(套件 22 美元) ),它可以通过 USB 端口为您的开发板提供 5V 电源。 获取免费工具 WinAVR(基于 GCC)和 AVRStudio,并立即开始一个小型项目。
是的,AVR 有局限性 - 但开发微控制器软件主要是管理资源和应对这些问题。 当您为强大的 ARM 平台制作爱好者项目时,您不太可能遇到堆栈空间、RAM 或 ROM 耗尽等问题。
也就是说,ARM 也是一个在业界广泛使用的优秀平台,但是,对于学习我强烈推荐 AVR。
For learning, you can't go past the AVR. The chips are cheap and they'll run with zero external components - they also supply enough current to drive an LED straight from the port.
You can start with a cheap programmer such as lady-ada's USBTinyISP (USD$22 for a kit) which can power your board with 5V from the USB port. Get the free tools WinAVR (GCC based) and AVRStudio and get a small project working in no time.
Yes the AVRs have limitations - but developing software for microcontrollers is largely about managing resources and coping with those problems. It's unlikely that you'll experience problems such as running out of stack space, RAM or ROM when you're making hobbist projects for powerful ARM platforms.
That said, ARM is also a great platform which is widely used in the industry, however, for learning I highly recommend AVRs.
德州仪器 (TI) 以非常低的价格发布了一款非常有趣的开发套件:eZ430-Chronos 开发工具 包含运动手表中带有显示屏和各种传感器的 MSP430,包括 USB 调试编程器和 USB 无线电接入点 50 美元
还有 一个包含大量信息的 wiki。
我已经为 eZ430-Chronos 创建了一个 stackexchange 提案成套工具。
Texas Instruments has released a very interesting development kit at a very low price: The eZ430-Chronos Development Tool contains an MSP430 with display and various sensors in a sports watch, including a usb debug programmer and a usb radio access point for 50$
There is also a wiki containing lots and lots of information.
I have already created a stackexchange proposal for the eZ430-Chronos Kit.
您应该尝试向 Embedded Artists 提供的开发人员工具包学习。 拿到套件后,查看他们的教学视频和NXP提供的视频,虽然没有想象的那么详细,但是涵盖了很多东西。 学习 ARM 作为你的第一个架构并尝试做一些实际的事情时遇到的问题是:
没有简单的方法。
You should try and learn from developpers kits provided by Embedded Artists. After you get the kit, check their instructional videos and videos provided by NXP, which are not as detailed as they could be, but they cover a lot of things. Problems with learning ARM as your first architecture and try to do something practicall are:
There is no easy way.
mikroElektronika 拥有不错的 ARM 开发板 和 C、Pascal 和 Basic 编译器
mikroElektronika has nice ARM boards and C, Pascal and Basic compilers that might suite your demands.
TI MSP430 是学习如何对微控制器进行编程的绝佳平台。 TI 拥有各种免费工具和一些廉价评估板(20 美元起)。 另外,它是一款低功耗的现代微控制器。
The TI MSP430 is a great platform for learning how to program microcontrollers. TI has a variety of FREE Tools and some cheap evaluation boards (starting at $20). Plus, it's a low-power, modern microcontroller.
许多个月前,我曾使用过 8 位芯片,例如 68HC05 和 Z80,后来又使用过 AVR 和 MSP430(16 位)。 然而,最近的项目都是在 ARM7 上进行的。 多家制造商提供各种颜色和尺寸的 ARM 控制器(好吧,不是真正的颜色)。
ARM(7) 正在取代 8 位架构:它性能更高(32 位 RISC 的指令周期比大多数 8 位架构更快),拥有更多内存,并且可用于多种 IO 配置。
我使用 NXP LPC2000 控制器,它也很便宜(32 位的不到 1 美元!)。
如果您在欧洲http://www.olimex.com/dev/index.html< /a> 有一些不错的低成本开发板。 在世界其他地方也适用:-)
Many moons ago I've worked with 8-bitters like 68HC05 and Z80, later AVR and MSP430 (16-bit). However most recent projects were on ARM7. Several manufacturers offer ARM controllers, in all colors and sizes (well, not really color).
ARM(7) is replacing 8-bit architecture: it's more performant (32-bit RISC at faster instruction cycles than most 8-bitters), has more memory and is available with several IO-configurations.
I worked with NXP LPC2000 controllers, which are also inexpensive (< 1 USD for a 32-bitter!).
If you're in Europe http://www.olimex.com/dev/index.html has some nice low-cost development boards. Works in the rest of the world too :-)
如果您只是想玩得开心,那么可以尝试 Parallax Propeller 芯片。 HYDRA 游戏平台看起来非常火爆。 现在有一个 100 美元的 C 编译器。
我从 BASIC stamps 开始,通过 SX 芯片和 PIC 升级到 8051,然后是 68332、各种 DSP、FPGA 软处理器等。8051
在现实世界中更有用……这些东西不会消失。 他们有大量的衍生品和疯狂的东西。 (远离 DS80C400)能源行业绝对充满了它们。
从一些小事开始。 如果您有外部 RAM 和大量寄存器...这与 SBC 有什么区别?
If you just want to have fun, then try the Parallax Propeller chip. The HYDRA game platform looks like a blast. There's a $100 C compiler for it now.
I started on BASIC stamps, moved up through SX chips and PICs into 8051s, then 68332s, various DSPs, FPGA soft processors, etc.
8051s are more useful in the real world... the things won't go away. There's TONS of derivatives and crazy stuff for them. (Just stay away from the DS80C400) The energy industry is absolutely full of them.
Start with something tiny. If you have external RAM and plenty of registers... what's the difference between that and a SBC?
查看 Processing 以及相关的 Arduino 和接线板。
Take a look at Processing and the associated Arduino and Wiring boards.
您的问题已在此问题中得到了解答。
除此之外,嵌入式处理器行业非常细分,没有像英特尔/x86 那样的“桌面”处理器行业的主要参与者。 ARM 处理器确实占有很大的份额,我相信 MIPS 也是如此,并且还有许多更小的、更具体的微控制器,例如可用的芯片(例如 TI 的 MSP430 等)。
至于文档,我的日常工作是进行嵌入式开发,而我们(作为软件开发人员)可以访问的文档相当稀疏。 最好的选择是使用处理器制造商网站上提供的文档。
Your question sort of has been answered in this question.
To add to that, the embedded processor industry is very segmented, it doesn't have a major player like Intel/x86 is for the "desktop" processor industry. The ARM processor does have a large share, so does MIPS I believe, and there are many smaller more specific microcontroller like chips available (like the MSP430 etc from TI).
As for documentation, I do embedded development for a day job, and the documentation we have access to (as software developers) is rather sparse. Your best bet is to use the documentation available on the processor manufacturers site.
要测试一个有趣的项目,请查看 xgamestation
但对于更工业用途的单芯片解决方案编程,查看 PIC
For a fun project to test, have a look at xgamestation
But for a more industrial used one chip solution programming, look at PIC
在我的计算机体系结构课程中,我必须同时使用 PIC 和 AVR; 在我看来,PIC 更容易使用,但这可能是因为这是我们使用最多的工具,并且我们有最多的时间来适应。 我们可能只使用了 AVR 几次,所以我无法完美掌握它的窍门,但它也没有什么太复杂的,或者至少不会比另一个更令人沮丧。
我想您也可以从 Microchip 的网站订购微处理器样品,这样您也可以开始使用吗?
For my Computer Architecture course I had to work with both a PIC and an AVR; in my opinion the PIC was easier to work with, but that's maybe because that's what we worked with the most and we had the most time to get used to. We used the AVR maybe only a couple of times so I couldn't get the hang of it perfectly but it also was nothing overly complicated, or at least not more frustrating than the other.
I think you can also order microprocessor samples from Microchip's website so you could also get started with that?
Arduino 似乎是当今初学者的首选平台,尽管还有很多其他平台。 我个人喜欢 Olimex 板,但它们并不适合初学者。
Microchip 的 PIC 系列 CPU 也非常适合初学者,特别是如果您想使用汇编程序进行编程。
顺便说一句,汇编器不再像以前那样被使用了。 嵌入式的一般规则是,如果您有 4k 或更多内存,请使用 C。您可以获得可移植性,并且可以更快地开发代码。
我想这取决于您的技能水平以及您想用芯片做什么。 我通常根据可用的外设来选择使用哪种嵌入式芯片。 如果您想要一个 USB 端口,请找到一个内置 USB 的端口,如果您想要模拟到数字的端口,请找到一个带有 ADC 的端口等。如果您有一个简单的应用程序,请使用 8 位,但如果您需要严肃的数字运算,转到 32 位。
Arduino seems to be the platform of choice these days for beginners although there are lots of others. I like the Olimex boards personally but they are not really for beginners.
Microchip's PIC range of CPUs are also excellent for beginners, especially if you want to program in assembler.
BTW, Assembler is not used as much as it used to. The general rule with embedded is if you've got 4k of memory or more, use C. You get portability and you can develop code faster.
I suppose it depends on your skill level and what you want to do with the chip. I usually choose which embedded chip to use by the available peripherals. If you want a USB port, find one with USB built in, if you want analogue-to-digital, find one with an ADC etc. If you've got a simple application, use an 8-bit but if you need serious number crunching, go 32 bits.
一个不错的选择是 Microchip 的 PIC18
互联网上有很多材料、文档、教程和项目
免费 IDE和编译器。
您可以在几分钟内拉出您自己的 Flash 编写器。
(尽管要使调试器正常工作,您需要更加努力)
如果您是学生(或有学生电子邮件地址),Microchip 将向您发送免费的示例芯片。 因此基本上您几乎不需要花任何钱就能拥有完整的开发环境。
PIC 在业界相当普遍。 由于某种原因,特别是作为机器人的控制器,尽管它们可以做更多的事情。
A nice choice would be PIC18 by Microchip
It has quite alot of material, documentation, tutorials and projects on the internet
Free IDE and compiler.
you can pull your own flash writer in a few minutes.
(Although for a debugger to work you'll need to work harder)
If you're a student (or has a student email address) Microchip will send you free sample chips. So basically you can have a full development environment for close to nothing.
PICs are quite prevalent in the industry. Specifically as controllers for robots for some reason although they can do so much more.
我自己已经在嵌入式编程领域工作了 9 年,并且拥有 TI MSP430、Atmel AVR(几种风格)的经验,并且很快就会使用 ARM。
我的建议是选择处理器中具有一些额外功能的东西,例如以太网控制器和 CAN 控制器,如果可以的话,甚至买两个或三个。 嵌入式设备很好用,但一旦它们可以通过 CAN 与其他类似设备通信或进入网络,它们就会变得更有趣。
Myself I've worked in embedded programming for 9 years now and have experience on TI MSP430, Atmel AVR (a couple of flavours) and will be using an ARM soon.
My suggestion is to pickup something that has some extra features in the processor like ethernet controller and CAN controller, even get two or three if you can. Embedded devices are nice to work with, but once they can talk to other similar devices via CAN or get onto a network, they can become much more fun to play with.
如果你只是想玩玩它,我建议使用 Arduino 平台 (http://www.arduino.cc)。 它基于 ATmega168 或 ATmega8,具体取决于版本。 它使用类C语言并有自己的IDE。
If you just want to play around with it, I'd suggest the Arduino platform (http://www.arduino.cc). It's based on the ATmega168 or ATmega8, depending on the version. It uses a C-like language and has its own IDE.
其次:
Arduino平台http://www.arduino.cc
HTH
Second that:
Arduino platform http://www.arduino.cc
HTH
ARM 拥有广泛使用的嵌入式平台中最好的指令集,使您可以自由地掌握为嵌入式平台编写软件的一般原则,而不会陷入非正交寄存器或分支延迟槽等奇怪的细节中。 有很多仿真器 - ARM 自己的仿真器虽然不是免费的,但具有周期精确性; 而且种类繁多的基于 ARM 的可编程硬件也便宜且容易获得。
ARM has the nicest instruction set of the widely used embedded platforms, leaving you free to pick up the general principles of writing software for embedded platforms without getting bogged down in weird details like non-orthogonal registers or branch delay slots. There are plenty of emulators - ARM's own, while not free, is cycle-accurate; and a huge variety of programmable ARM-based hardware is cheap and easy to come by as well.
ADI 的 Blackfin 是另一种选择,因为它是一种非常简单的编程架构,但也可以做一些相当不错的事情如果您选择走这条路,那么需要大量的 DSP 材料。 汇编语言也非常健全,这很有帮助。
Blackfin STAMP 板很便宜(我上次检查的价格约为 100 美元),而且它们支持免费的GCC工具和uClinux。
无论您选择哪种架构,我都绝对建议您首先下载工具链\SDK 并查看示例项目和教程 - 通常可以进行一些操作。 您通常可以通过模拟来非常熟悉该架构,甚至无需接触任何硬件。
ADI's Blackfin is another option since it's quite a straight forward architecture to program, yet can also do some fairly hefty DSP stuff should you choose to go down that route. It helps that the assembly language is quite sane too.
The Blackfin STAMP boards are an inexpensive (~$100 last I checked) way in, and they support the free GCC tools and uClinux.
Whatever architecture you choose I'd definitely recommend first downloading the toolchain\SDK and looking through the sample projects and tutorials - generally having a bit of a play about. You can often get quite acquainted with the architecture through simulation without even touching any hardware.
我想推荐 TI 的 beagleboard。 它上面有一个 Omap3。 这是一个 Cortex-A8 ARM11 CPU、一个 C64x+ DSP 和一个视频加速器。
该板不需要昂贵的 jtag 设备。 您开始使用时只需要一条串行电缆和一张 SD 卡。 董事会费用仅为 150 美元,并且有一个非常活跃的社区。
www.beagleboard.org
I'd like to suggest the beagleboard from TI. It has a Omap3 on it. That's a Cortex-A8 ARM11 CPU, a C64x+ DSP and a video accelerator as well.
The board does not need an expensive jtag device. A serial cable an an SD-Card is all you need to get started. Board costs only $150 and there is a very active community.
www.beagleboard.org
“嵌入式编程”是一个非常广泛的术语。 AVR 在这一类别中表现相当出色,但它比 ARM 低了一步,因为它使用起来更简单,但功能也较弱。
如果您只是想玩玩 ARM,请购买 Nintendo DS 或 Gameboy Advance。 与内部硬件相比,它们非常便宜(大规模生产的奇迹),并且它们都有基于免费开发工具链 gcc 可以编译它们。
如果你想尝试一下嵌入式 Linux,BeagleBoard 看起来是一个不错的选择,只需 150 美元,而且有很多功能的功能。
我个人认为 AVR 最适合较小尺寸的 8 位平台,而 ARM 最适合更大、更强大的 32 位平台。 和许多 AVR 粉丝一样,我不喜欢 PIC。 几乎在各个方面,情况似乎都更糟。 还要避免任何需要您编写任何类型的 BASIC 的内容。
"embedded programming" is a very broad term. AVR is pretty well in that category, but it's a step below ARM, in that it's both simpler to use, as well as less powerful.
If you just want to play around with ARM, buy a Nintendo DS or a Gameboy Advance. These are very cheap compared to the hardware inside (wonders of mass production), and they both have free development toolchains based off of gcc which can compile to them.
If you want to play around with embedded linux, BeagleBoard is looking to be a good option, only $150 and it has a ton of features.
Personally I think AVR is best for the smaller-sized 8-bit platforms, and ARM is best for the larger, more powerful 32-bit based platforms. Like many AVR fans, I don't like PIC. It just seems worse in pretty much every way. Also avoid anything that requires you to write any type of BASIC.