7
\$\begingroup\$

I asked this question ago. (Don't need to read it to answer this one)

out growing 8-bit AVRs, not sure where to move on to

I really liked the answers about the NXP line of microcontrollers. I'm about to invest in some hardware to get started playing with them, and I wanted to run it by this forum to make sure that I'm not paying too much or buying the wrong part.

I'm not interested in the mbed chip. I prefer to have the option to build something from scratch using the full line of micro-controllers. That means I have to buy a programmer.

I'm interested in the ULINK2 from Keil. It is 411 CND on digikey.ca. http://www.keil.com/ulink2/

It integrates with the Keil Development environment. If it turns out I can't or don't want to use the Keil IDE can I use the ULINK2 with FOSS on Linux? What about on windows without Keil? If I decide now that I don't want to go with Keil, is it worth getting another generic JTAG programmer?

Ultimately the goal is to be able to compile and program

  • LPC2921/2923/2925 (ARM9) (this is the least important category for me)
  • All LPC21/22/23 (ARM7)
  • All Cortex M0 and M3

I wasn't able to find any instructions on setting up a toolchain and flash/debugger program for NXP microcontrollers, and that is the only reason I'm talking about Keil related products. I would rather just use GCC and some other uploader. I'm used to avrdude for AVRs.

What kind of setup do you guys use for ARM or NXP uCs? What JTAG programmers do you recommend? Any other FOSS toolchain instructions or other software I should know about?

\$\endgroup\$

6 Answers 6

2
\$\begingroup\$

For professional type use, your major options are IAR, Keil or Rowley CrossWorks. Keil is owned by ARM, which may or may not give them a slight advantage. I'd say the performance between IAR and Keil is nearly identical. Rowley is bargain of the 3. Rowley also let's you use cheaper debuggers, such as the J-link. You might be able to use the J-link with IAR as well, but I think Keil forces you to use their Ulink products, which can be a bit more expensive. As far as support, I believe Rowley is purely through their website. IAR and Keil offer 1 year or so of phone support. From what I've been told, Keil seems to offer better support in the US, while IAR is more focused on Europe. I've used Keil without any issues and support was good. That being said, any of these 3 will probably perform just as well.

\$\endgroup\$
1
  • \$\begingroup\$ I`ve used exclusively Keil for 10 years and found the compiler, hardware and support to be very good. However they are the most expensive of the 3 you mention! \$\endgroup\$ Commented Jan 15, 2011 at 22:12
3
\$\begingroup\$

Have you checked out the LPC1343 (Cortex M3) board from Microbuilder? (http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign.aspx)

Could be a cheap stepping stone to get familiar with ARM dev environments. You can easily upload the program via USB (it appears as a USB flash drive, and you just dump your hex file in there).

Microbuilder also has tutorials to get you up and programming with free tools (Codelite/YAGARTO).

\$\endgroup\$
2
  • \$\begingroup\$ +1: Didn't know about YAGARTO, thanks. Microbuilder is also a nice site. thanks again. Not interested in their reference boards, since they are in the same category as mbed, and YAGARTO was for windows. I know I can build an arm toolchain under linux, I've already done it, but I don't know if there are any special things I need to do to a toolchain for NXP micros. Also have no idea how to use a JTAG programmer/debugger under linux. \$\endgroup\$
    – Chris H
    Commented Nov 29, 2010 at 5:54
  • \$\begingroup\$ Have you looked at OpenOCD? \$\endgroup\$
    – XTL
    Commented Nov 29, 2010 at 9:30
1
\$\begingroup\$

LPC2138/48 would be a good start. There lots of examples written for these micros.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Can you link us to these examples? \$\endgroup\$
    – Kortuk
    Commented Jan 16, 2011 at 4:07
1
\$\begingroup\$

I use Rowley CrossWorks with their CrossConnect Pro for ARM development. Support is very good.

\$\endgroup\$
1
  • \$\begingroup\$ Give us links! They help users dive right in. \$\endgroup\$
    – Kortuk
    Commented Jan 16, 2011 at 4:08
0
\$\begingroup\$

No too familiar with all the options but make sure you get something that will do JTAG and SWD - later Cortex parts use the latter, which uses fewer pins for debug.

\$\endgroup\$
0
\$\begingroup\$

You can use Yagarto to compile for any ARM micro controller (NXP included of course), and I have done this for NXP's lpc4330. HOWEVER, Yagarto only has support for soft floating point (At least, I've tried to use it for hard FP and it complains because of lack of support, so I have to presume it wasn't compiled with hard FP built in). If you ever want to use hard floating point (my NXP lpc4330 supports this), you'll need to build your own compiler, or use the IAR, Keil, or some other prebuilt one that has hard floating point support. Just something to be aware of. Also, lpc_dfu comes in handy if you don't develop in a Windows environ and would like to flash something to SPIFI. Works extremely well.

Basically, I use:

dfu-util --> You need this to talk to send anything to NXP's boot loader. Plus, you need to use -L to add the LPC header (at least for the lpc4330... Maybe the other's are different, but I wouldn't think NXP would change their boot loader that much).

lpc_dfu --> I use this to talk to NXP's spi flashing tool. You send over the tool first with dfu-util, then you use this to flash your code.

gcc --> I built my own here, but as I said above, Yagarto works (I've used it), and there are a few others you can get. Basically, just about anything that will turn out an ARM binary will work here. HOWEVER, familiarize yourself with linker scripts. If you fail to do this, you will be wondering why your processor doesn't work. If you've used AVR though, I suspect you probably already ARE familiar with these, although there are a number of tools for AVR products, so maybe not. It really is pretty easy to write linker scripts for the NXP products though. And I like knowing precisely where my code goes.

If you decide to use something like OpenOCD with the lpc4330 (I have an lpc4330-xplorer that is pretty nice. Has a few issues, but its got me really liking their lpc4330 chip. I LOVE the SCT. That is a really nice peripheral.), be aware there might be an issue. My lpc4330-xplorer has to typically have 2 resets when booting from SPI flash. This causes OpenOCD difficulty. Other NXP demo boards, or chips likely don't have this issue, but it is something to be aware of with the lpc4330. Anyway, hope you find the right setup for you.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.