Starting with ARM

Hi Everyone!

After fiddling around quite a lot with PIC microcontrollers (I was mainly using PIC16s with Sourceboost IDE/Compiler/Emulator), I have decided that I will take the plunge and start on ARM MCUs.

To that end, I intend to buy a development board (probably LPC2138-based) and a JTAG interface (USB or Wiggler-type, not decided yet). My intention is to program in C and to keep it as simple as possible (especially the setting up of tools).

My questions are:

  1. Does anyone know of a good primer (online or book) to programming/debugging the ARM?

  2. I may have missed it, but the LPC2138 datasheet seemed a bit… missing in information. After dealing with PIC datasheets, where you can actually see how to initialize and use the internal “peripherals” (ADC, PWM, SPI, etc.). Where can I find this information?

Even though I am pretty much into OSS, I am strongly tempted (actually, I have to reconcile work, family life and hobbies - and of course it is the time for hobbies that take the hit) to use a solution that works “out of the box” (as much as possible) as IDE, for programming the device and for debugging. I am hesitating between Rowley’s Crossworks (which have a license scheme for personal use that is a bit expensive but within the realms of possibility) or IAR’s EW-ARM (which have a free kickstart version with a limitation on code size). I wondered:

  1. Are there other alternatives you recommend?

  2. If not, which one is easier to set up and use?

  3. Do you know if IAR have a similar “personal license” scheme for hobbyists?

Thanks a ton!

Cheers,

Gonzalo

“2) I may have missed it, but the LPC2138 datasheet seemed a bit… missing in information. After dealing with PIC datasheets, where you can actually see how to initialize and use the internal “peripherals” (ADC, PWM, SPI, etc.). Where can I find this information?”

First try to successfully compile and run a couple of “Hello World” examples. (I think they’re usually called “Blinky.c” or something similar). Deal with the peripherals later.

Application notes usually clear things up.

Since you’re a beginner, go with that “free” IAR toolchain. It won’t cost you a lot (you’ll have to get a JTAG) and at the time when you hit that 32k limit you will probably have enough knowledge to select some other toolchain.

If you do not have some previous experience with the GCC, do not try to build your own development environment (compiler/IDE/debugger). You will loose a couple of days wandering through forums-wiki-help looking for solutions.

For less than $12 you can get a complete hardware/software tool suite (development board, USB programmer/debugger, unlimited C compiler, IDE with integrated breakpoint debugger, etc.) for the ARM Cortex-M3. Do a search for the ST VL Discovery system.

You need the user guide as well as the data sheet for the NXP ARM chips.

winterhunter:

  1. Does anyone know of a good primer (online or book) to programming/debugging the ARM?
"The Insider's Guide To The NXP LPC2000 Based Microcontrollers". You only need to register your details to download a copy from:

http://www.hitex.com/index.php?id=downl … ers-guides

Or

Coridium Corp’s low cost ARM boards, esp. the ARM in the Arduino package.

or mbed.org

Olimex boards

or many others.

Hi everyone!

Thanks a ton for the insights!

Before deciding, I had considered as “finalists” the following combinations:

Mbed, since it is quite simple to use (overall).

Olimex board + USB JTAG + IAR’s “free” version of EW-ARM

LPCXpresso

I have decided to go for a LPCXpresso, since:

The complete solution (MCU, IDE, JTAG interface) is quite cheap (actually is the cheapest of the “finalists” I had).

It should work “out of the box” (in this point, the Mbed looked even better).

It has a JTAG interface (and therefore it would be easier to debug - that was the show-stopper for me as regards the Mbed).

Have a nice day!

Gonzalo

See here http://knowledgebase.nxp.com/forumdisplay.php?f=4

winterhunter:
I have decided to go for a LPCXpresso, since:

The complete solution (MCU, IDE, JTAG interface) is quite cheap (actually is the cheapest of the “finalists” I had).

It should work “out of the box” (in this point, the Mbed looked even better).

It has a JTAG interface (and therefore it would be easier to debug - that was the show-stopper for me as regards the Mbed).

Gonzalo

Good choice - if - the memory size is adequate.

The biggest PIC16 has 28K Flash and 1.5K RAM so the 512K/64K of the LPC1769 should last for a while. :lol: :lol: :lol:

rmteo1:
The biggest PIC16 has 28K Flash and 1.5K RAM so the 512K/64K of the LPC1769 should last for a while. :lol: :lol: :lol:

The big deal for me in the ARM7 or Cortex is that the Flash and RAM are in the SAME linear address space. PICs bank switch. AVRs do too though at 64KB. The single linear address space means no more crud with declaring constants or variables differently according to whether they’re in flash, near or far, and all that rot.

So w.r.t. memory size: Yes, size matters, but style does too!

LPCXpresso limits code size to 128k, which is still good when starting with ARM.

Angelo

Polux rsv:
LPCXpresso limits code size to 128k, which is still good when starting with ARM.

Angelo

This is the official word:

The LPCXpresso IDE can build an executable of any size with full code optimization, and it supports a download limit of 128KB after registration.

Atollic TrueStudio (for the STM32) does not have any size limitations.

Why do you want to start with a LPC2138? This MCU is based on the older ARM7TDMI-S architecture.

I’d take a look at one of the newer Cortex-M3 parts–perhaps something in the LPC17xx series. The M3 architecture is much cleaner, especially with respect to interrupts.

See this from ARM http://www.arm.com/products/processors/ … /index.php

Note: The ARM7 processor family (ARM7TDMI(S) and ARM7EJ-S) is not recommended for new designs.

Introduced in 1994, the ARM7™ processor family has been immensely successful, and has helped establish ARM as the architecture of choice in the digital world. Over the years, more than 10 billion ARM7 processor family-based devices have powered a wide variety of cost and power-sensitive applications.

While the ARM7 processor family continues to be used today for simple 32-bit devices, newer embedded designs are increasingly making use of latest ARM processors such as the Cortex™-M0 and Cortex-M3 processors, both of which offer significant technical enhancements over the ARM7 family.

SodaAnt:
Why do you want to start with a LPC2138? This MCU is based on the older ARM7TDMI-S architecture.

I’d take a look at one of the newer Cortex-M3 parts–perhaps something in the LPC17xx series. The M3 architecture is much cleaner, especially with respect to interrupts.

I had thought about the LPC2138 since it has the amount of peripherals that I was looking for, plus there is an economical board produced by Olimex…

However, now I have decided to buy (I have just received it) a LPCXpresso LPC1769, which is apparently simpler to set up and use, is very economical and also has the peripherals that I need…

winterhunter:
However, now I have decided to buy (I have just received it) a LPCXpresso LPC1769, which is apparently simpler to set up and use, is very economical and also has the peripherals that I need…

Excellent choice. You’ll be much happier with the newer parts.

SodaAnt:
However, now I have decided to buy (I have just received it) a LPCXpresso LPC1769,

Who has this board in stock?

stevech:

SodaAnt:
However, now I have decided to buy (I have just received it) a LPCXpresso LPC1769,

Who has this board in stock?

Got mine from Embedded Artists (http://www.embeddedartists.com/)… Very good service.

thanks.

EA as well is temporarily out of stock, projecting availability on one month.