ARM Cortex M3 初学者需要的建议

发布于 2024-09-25 09:40:12 字数 1166 浏览 1 评论 0原文

我很快就会通过官方培训(CPU 方面)踏上 ARM Cortex M3 的潮流。

现在,我之前接触过一些 Arduino 和 AVR,并且有一些电子基础知识,但我主要是一名软件开发人员。我已经阅读了这里的大多数主题以及其他地方有关可用工具的大部分主题,它们确实很有帮助。我需要的是将所有这些答案元素连接在一起。

我想为自己配备一个足够通用的入门套件,让我能够继续使用,并且至少可以让我尝试不同的硬件/软件组合(步进器、CAN 总线、SPI 等...)。我正在查看以下列表(请随意添加更多项目!):

  • Cortex M3 芯片
  • 评估板
  • 工具链
  • JTAG 工具

对于该芯片,我希望其中一款高端型号能够尝试一切。 NXP LPC1768 似乎是一个不错的选择,但还需要考虑 STM 和 Stellaris。

目前该板的有趣候选者是 Keil MCP1760、STM3210E-EVAL,但我担心供应商锁定,因为我希望能够在单板上尝试各种工具链。 mBed 非常有吸引力,但由于它是在线编译器(除非也可以使用常规编译器)而被排除在外。

对于工具链,我对 IAR、Rowley Associates 有一种“感觉”。与开源相比,我更喜欢易用性/完善性,并且最好是可以在多个目标上使用的工具。

我真的需要 JTAG 单元吗?如果它是一个“标准行业工具”,就像它看起来那样,我想至少获得一些经验。这看起来是供应商锁定困难的另一个原因。我是使用我自己熟悉的外部产品更好,还是只使用评估板上包含的产品更好?

基本上,我需要帮助来为上述类别选择获胜组合。这是否有可能,还是我太天真了,应该考虑节省成本,因为我最终会各买一个?

谢谢。

结果:我订购的内容:

我终于买了 Joseph Yiu 的《ARM Cortex-M3(嵌入式技术)权威指南》,找到了一些 CortexM3 平台的培训(即将推出)并购买了 STMicro 套件:STM3210C-Eval 内置大量传感器,供应商未锁定特定软件环境。我还购买了一些带有板载 JTAG 的 STm32vl-Discovery 板(来自 digikey 的 13 美元 CDN!)。我现在正在使用 Keil 的 uVision IDE 的评估版(32K),我可以说我真的印象深刻!我能够在一天之内重新构建 Discovery 的固件,将其加载回来,并使用调试器单步调试它!

谢谢大家!

I will embark on the ARM Cortex M3 bandwagon soon with an official training (CPU side).

Now, I did a bit of Arduino and AVR before and have some basics in electronics but I am mostly a software developer. I've read most topics in here and quite a bit elsewhere regarding the tools available and they have been really helpful. What I need is something to connect all those answer elements together.

I would like to equip myself with a starter kit that is general enough to get me going and that at least allows me to experiment different hardware/software combinations (Steppers, CAN-Bus, SPI etc...). I am looking at the following list (please feel free to add more items!):

  • Cortex M3 Chip
  • Evaluation board
  • Tool Chain
  • JTAG tools

For the chip I would like one of the higher-end models to be able to try a bit of everything. The NXP LPC1768 seems like a good choice but there is also STM and Stellaris to consider.

Interesting candidates for the board right now are the Keil MCP1760, the STM3210E-EVAL but I am afraid of vendor lock-in as I would like to be able to try various toolchains on a single board. mBed is very attractive but out of the equation because of it's online compiler (unless a regular compiler can be used as well)

For the Toolchain, I have a "feeling" towards IAR, Rowley Associates. I would prefer ease of use/well-doneness vs open source and preferably tools that could be used on multiple targets.

Do I really need a JTAG unit? If it's a "standard industry tool" like it seems to be I would like to at least get some experience on it. It looks like another source of vendor lock-in tough. Would I be better of using an external one I can familiarize myself with or just using one included on the evaluation board?

Basically, I need help in choosing a winning combination for the aforementioned categories. Is it even possible or am I being naive and should look at saving costs because I will end up buying one of each in the end?

Thank you.

RESULTS: What I ordered:

I finally bought Joseph Yiu's "The Definitive Guide to the ARM Cortex-M3 (Embedded Technology)", found some training for the CortexM3 platform (coming soon) and bought an STMicro kit: STM3210C-Eval which has a bunch of sensors built-in and is not vendor locked to a specific software environment. I also picked-up a few STm32vl-Discovery boards (13$cdn from digikey!) with on-board JTAG. I am now playing with an evaluation version (32K) of Keil's uVision IDE and I can say that I am REALLY impressed! I was able to re-build the Discovery's firmware, load it back, and step through it with the debugger in a single day!

Thanks everyone!

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

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

发布评论

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

评论(4

殊姿 2024-10-02 09:40:12

llvm和gcc都很好,不需要购买任何软件。这里提供免费帮助的大多数人都将是 gcc 用户。 Codesourcery 是当前获取更新/更好的 gcc(适用于arm)的地方。精简版完全没问题。滚动你自己的 gcc 是一件相对容易的事情,但也许不是你喜欢的事情。 llvm 的一个好处是它始终是一个交叉编译器,并且预构建通常具有多个/所有目标。

我还有 stellaris 和 mbed 以及其他 cortex-m3 示例。我喜欢stellaris,不喜欢lpc,避免expresso,mbed其实还不错。疯狂的亮蓝色 LED 灯让我感到头晕,所以我把它们换成了绿色,否则它工作得很好,很容易使用。伊戈尔是对的,你没有像 Expresso 那样被锁定在他们的沙箱中,我有一个例子,使用 gcc 来编译某个地方的 LED 闪烁。您只需将 .bin 文件复制到看起来像闪存拇指驱动器的东西中,然后按重置按钮即可加载新文件。

Sparkfun.com 提供 stm32 头板,价格不到 50 美元,外加 mbed,谁知道还有什么。 stellaris 板的价格在 100 美元以下,而且质量非常好。由于不小心做了警告所禁止的事情,我的 811 几乎立刻就变砖了。把我的 jtag GPIO 引脚转错方向了……游戏结束了。 1968 和其他非 811 系列要么不可变砖,要么不易变砖。 Stellaris 板通过板载外设消耗了所有 io,这在一段时间很有趣,但如果你想做的不仅仅是如何使用这些外设之外的事情,那就不是了。如果您使用 stm32 标头(避免使用 stm 引物),您将需要一个 jtag wiggler,amontek 制作了一个很好的 jtag-tiny,而 olimex 应该可以正常工作,但我实际上不知道我曾经把我的从盒子。理论上,一个 Stellaris 板可以用作另一个或其他 cortex-m3 的 jtag 摆动器。如果您有 Stellaris 板,您不需要任何其他东西,您需要的所有东西都以一个价格提供,如果您不想使用该工具链,那么您可以下载上面列出的工具链。

both llvm and gcc are perfectly fine, no need to buy any software. Most folks out here providing free help are going to be gcc users. Codesourcery is the current place to get the newer/better gcc (for arm). The lite version is perfectly fine. Rolling your own gcc is a relatively easy thing, but maybe not something you are into. A nice thing about llvm is that it is always a cross compiler and pre-builts usually have several/all targets.

I also have stellaris and mbed and other cortex-m3 examples out there. I like stellaris, not a fan of lpc, avoid the expresso, the mbed is actually not bad. The crazy bright blue leds give me a migrane so I replaced them with green, otherwise it works just fine, easy to use. Igor is right you are not locked into their sandbox like you are with the expresso, I have an example blink the leds using gcc to compile out there somewhere. you simply copy the .bin file to the thing which looks like a flash thumb drive and press the reset button to load the new file.

sparkfun.com has the stm32 header board for under $50 plus the mbed and who knows what else. The stellaris boards are in the sub $100 range and are perfectly fine. I bricked my 811 almost immediately by accidentally doing exactly what the warning said not to do. Turned my jtag gpio pins the wrong way and...game over. The 1968 and other non-811 series are either non-brickable or not as easy to brick. The stellaris boards chew up all the io with onboard peripherals which is fun for a while, but not if you want to do something other than just how to use those peripherals. You will want a jtag wiggler if you are using the stm32 header (avoid the stm primers) amontek makes a good one, the jtag-tiny, and the olimex one should work fine, but I actually dont know that I ever got mine out of the box. In theory one stellaris board can be used as a jtag wiggler for another or for other cortex-m3s. if you have a stellaris board you wont need anything else, everything you need comes in the box for one price, well if you dont want to use that toolchain then you can download one listed above.

羁〃客ぐ 2024-10-02 09:40:12

您可能需要查看 Atmel ATSAM3U-EK 开发套件(大约 来自 Digi-Key 的 200 美元< /a>)。它具有 LCD 触摸屏、加速度计、温度传感器、模拟输入、JTAG、两个串行端口和 USB 2.0(内置于 SAM3U 中)。

我喜欢 SAM3 系列的一点是易于使用。它具有板载 ROM 以及用于程序存储的闪存。它在出厂时会启动 ROM(稍后将其更改为从闪存启动),从而启动 USB 端口(声明自己是 USB 通信设备类 (CDC)),并运行 SAM-BA 启动监视器。它还具有一个片上擦除引脚,可以将整个设备重置为出厂设置。

因此,要从头开始重新编程,您所要做的就是:

  • 跳线擦除至少 200 毫秒,同时上电复位
  • 并将电路板插入 USB 端口
  • 在 Windows 或 Linux 上运行 Atmel 的 SAM-BA 程序
  • 选择串行端口
  • 启用闪存写入
  • 选择您的二进制文件并将其发送
  • 将其设置为从闪存启动
  • 拔下 USB 并再次点击重置。

无需加密狗或 JTAG 盒。我知道通过 IAR 通过 JTAG 重新编程可能需要更少的步骤,但我喜欢知道如果其他工具出现故障,有一种方法可以进入已知状态。

IAR工具链支持SAM3系列,并且有一个端口FreeRTOS 到 SAM3U + IAR(我现在正在尝试将其移植到 SAM3U + GCC,因为 IAR 的 5K 美元许可证对我们来说太丰富了)。

SAM3U-EK 的另一个优点是:它板上有一个 NAND 闪存,如果您在运行演示时将板插入计算机,它会将闪存作为“闪存驱动器”安装在您的计算机上。在此闪存上,您将找到 GCC、IAR 和 Keil 工具链的文档、原理图、演示程序和库,以及用于将演示程序恢复到电路板的说明和文件(如果您认为自己损坏了某些东西,则很有用)。

You might want to look at the Atmel ATSAM3U-EK dev kit (approx. $200 from Digi-Key). It has an LCD touchscreen, accelerometer, temperature sensor, analog inputs, JTAG, two serial ports, and USB 2.0 (built into the SAM3U).

The thing I like about the SAM3 series is the easy bring-up. It has an on-board ROM as well as flash for program storage. From the factory, it boots the ROM (you later change it to boot from flash), which fires up the USB port, which declares itself to be a USB Communication Device Class (CDC), and runs the SAM-BA boot monitor. It also has an on-chip ERASE pin that resets the whole thing to factory settings.

So all you have to do, to reprogram from scratch, is:

  • Jumper ERASE for at least 200 ms with the power on
  • reset and plug the board into a USB port
  • run Atmel's SAM-BA program on either Windows or Linux
  • select the serial port
  • enable flash writing
  • select your binary file and send it
  • set it to boot from flash
  • unhook the USB and hit reset again.

No dongle or JTAG box needed. I know that reprogramming via JTAG through IAR is probably fewer steps, but I like knowing that there's a way to get to a known state if the other tools break.

The IAR toolchain supports the SAM3 series, and there is a port of FreeRTOS to SAM3U + IAR (which I'm now trying to port to SAM3U + GCC since IAR's $5K licenses are too rich for us).

Another neat thing about the SAM3U-EK: It has a NAND flash on board, and if you plug the board into a computer while it's running the demo, it will mount the flash on your computer as a "flash drive". On this flash you will find the documentation, schematics, demo programs and libraries for GCC, IAR, and Keil toolchains, and instructions and files for restoring the demo program to the board (useful in case you think you broke something).

像极了他 2024-10-02 09:40:12

就我而言,我喜欢 LPC1768 的 LPCXpresso 板。它具有内置 USB JTAG 接口,并附带免费版本的 Code Red IDE(基于 Eclipse)。我发现JTAG交互式调试在学习使用该芯片时非常有帮助。通常我在编程时不会使用交互式调试,但对于嵌入式编程我发现它越来越重要。

整个产品在 DigiKey 上只需 33 美元。

For my part, I like the LPCXpresso board for LPC1768. It has a built-in USB JTAG interface and it comes with a free version of the Code Red IDE (Eclipse-based). I found the JTAG interactive debugging very helpful when learning to use this chip. Normally I don't use interactive debugging when I program, but for embedded programming I find it more and more essential.

The whole thing only costs $33 on DigiKey.

凯凯我们等你回来 2024-10-02 09:40:12

我本来也是一名软件开发人员。我使用了几个不同的套件,但我发现最容易使用且使用最多的是 mbed。打开盒子后,您实际上可以在五分钟内启动并运行它。无需从 CD 安装任何 IDE,无需 JTAG 加密狗,无需翻阅数据表 - 只需编写代码、编译并运行即可。
是的,有些人抱怨它与在线编译器“绑定”。但我只是从没有真正尝试过的人那里听说的。这只是不正确 - 您仍然可以使用任何其他可以为 LPC1768 生成二进制文件的工具链:IAR、Keil、CodeSourcery、Yagarto 或您自己的工具链。我自己还没有找到这样的案例,但这当然是可能的。
mbed 的最大缺点可能是它不公开 JTAG 接口,因此您无法进行交互式调试。到目前为止,我还没有发现这一点很重要,但如果您做了很多低级别的工作,它可能很重要。

I'm also a software developer originally. I used a couple of different kits, but the one I found most easy to use and did most with is mbed. You can literally get it up and running in five minutes from opening the box. No need to install any IDEs from the CD, no need for the JTAG dongles, no need to pour over datasheets - just write the code, compile and run.
Yes, some complain that it's "tied" to the online compiler. But I only heard that from people who did not actually try it. And it's just not true - you can still use any other toolchain that can produce binaries for LPC1768: IAR, Keil, CodeSourcery, Yagarto, or your own toolchain. I did not myself yet find a case for that, but it's certainly possible.
Probably the biggest disadvantage of mbed is that it does not expose the JTAG interface and so you cannot debug interactively. So far I did not find this critical but it might be important if you do a lot of low-level work.

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