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:
Does anyone know of a good primer (online or book) to programming/debugging the ARM?
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:
Are there other alternatives you recommend?
If not, which one is easier to set up and use?
Do you know if IAR have a similar “personal license” scheme for hobbyists?
“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.
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!
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.
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.