Author Topic: Getting started with ARM  (Read 12419 times)

0 Members and 1 Guest are viewing this topic.

Offline AndyC_772Topic starter

  • Super Contributor
  • ***
  • Posts: 4265
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Getting started with ARM
« on: March 22, 2013, 06:08:35 pm »
Hi all,

A couple of years ago I bought myself a PICKIT 3 with a basic development board, downloaded MPLAB and taught myself C. It was a really worthwhile exercise, and I've designed various PICs into both hobby stuff and commercial products since.

Now I think it's time I upgraded to using ARM based microcontrollers from one or more of the major vendors (ST, TI or maybe NXP), but I'm struggling to locate and identify a similarly straightforward and inexpensive development package, ie. compiler, IDE and the necessary hardware to connect my PC to the target board.

There are plenty of commercial tools with 4 figure price tags, of course - but since world+dog is using ARM, I can't believe that's the only option. I'm happy to pay for a basic dev board with a few interesting peripherals on it to play with, but there must be an open source IDE and compiler out there which I can use and which doesn't impose arbitrary restrictions on code size... isn't there?

I'd really appreciate any pointers - especially along the lines of "look here and use this package, it's what everyone else does, can't believe you missed it".

Please bear in mind I'm a hardware guy... I'm quite good at keeping the magic smoke inside the chips, but I need software to "just work"  :-/O

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Getting started with ARM
« Reply #1 on: March 22, 2013, 06:15:12 pm »
E-bay is full of ARM boards with camera, touchscreen and all, for about 50$ a piece. Documentation for these is pretty hard to come by. They are ok if you have extensive ARM knowledge.
Almost every smart phone in existence is ARM based. On Android you can write apps in native C.
LPC line if microcontrollers are cheap, there is a thread somewhere about them.
I have two Betty-TV remotes which I bought for 4 Euro a piece. Perfect ARM dev platform since they are self-contained.
Stellaris Launchpad from TI.
ARM Cortex-M3 STM32 F103RB-based board from Maple.
ARM Cortex-M4 Freescale MK20DX128VLH5-based Teensy 3.0 from PJRC
Your smart TV; network attached storage; router; DVD player. Just search for the most hackable ones.
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: Getting started with ARM
« Reply #2 on: March 22, 2013, 06:22:15 pm »
I'm using CoIDE (http://www.coocox.org/CooCox_CoIDE.htm) with my STM32F4-Discovery board. It's not completely "install and run", but the few things that do need to be done in addition to configure it are fairly easy and straight forward.
my random ramblings mind-dump.net
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Getting started with ARM
« Reply #3 on: March 22, 2013, 08:54:10 pm »
Quote
ST, TI or maybe NXP

All those have open source toolchains. However, the hardware vendors typically like to point you to commercial versions. Just plug the eval board name or IC number into a search engin, together with keywords like gcc, open source, toolchain, and/or Eclipse and you should find something.

Biggest issues with the open source stuff are typically the programming and debugging interfaces.

Alternatively, the commercial vendors often provide limited trial versions that are sometimes good enough to get started and prolific.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27668
  • Country: nl
    • NCT Developments
Re: Getting started with ARM
« Reply #4 on: March 22, 2013, 09:21:03 pm »
Hi all,

A couple of years ago I bought myself a PICKIT 3 with a basic development board, downloaded MPLAB and taught myself C. It was a really worthwhile exercise, and I've designed various PICs into both hobby stuff and commercial products since.

Now I think it's time I upgraded to using ARM based microcontrollers from one or more of the major vendors (ST, TI or maybe NXP), but I'm struggling to locate and identify a similarly straightforward and inexpensive development package, ie. compiler, IDE and the necessary hardware to connect my PC to the target board.
NXP processors are the easiest to program. A serial port is enough. See the schematics for the Keil evaluation boards.
All ARM microcontrollers can be programmed using GCC (Codesourcery Lite which is free) and Eclipse CDT is a free IDE. There are many tutorials on how to set things up.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: ca
    • VE7XEN Blog
Re: Getting started with ARM
« Reply #5 on: March 22, 2013, 11:24:26 pm »
Most ARMs these days have a ROM-based serial bootloader you can enable, if your dev board / schematic is configured for that. Some of ST and NXP's even have DFU-mode USB bootloaders. Most of them are well-enough supported that they can be used purely with open source. Programming isn't good enough though, debug is really useful.

Thankfully at least TI and ST's dev boards include a full debug interface for just a couple pocketfuls of pennies. The ST DISCOVERY series and TI Stellaris Launchpad are $7-15 and pretty easy to use.

The hardest part about getting started for me, by far, was figuring out the linker script, startup code, and how to link the libraries. The rest is easy. If you use a popular chip like the ones on most of these devboards though you can use CooCox which has pre-baked templates for this stuff.
73 de VE7XEN
He/Him
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Getting started with ARM
« Reply #6 on: March 23, 2013, 12:05:00 am »
Not certain how hard you looked.

LPC XPresso
ST Discovery F3 or F4
TI Stellaris Launchpad
Freescale FRDM-KL25Z

All of these are development boards with programmer/debugger built in and cheaper than a Pickit 3 on it's own.

They all have crippleware compilers/IDE's if you want easy.  If you want GCC, they are supported by OpenOCD (not certain about LPC Link).
Mark Higgins
 

Online BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: Getting started with ARM
« Reply #7 on: March 23, 2013, 02:36:13 am »
Just fyi, TI ide is based on popular Eclipse (open sauce) and bundled with TI's own compiler.

And the Eclipse platform it self is worth considering when in the middle of crossroads on deciding the ide.

The whole package is packed neatly and just install and its ready to go without any fuss. Also all full blown features includes the debugger and programmer are enabled without any restriction, and also no time limit as long you use their launchpad as target.

Good enough for beginner imo, especially at 80MHz with latest ARM architecture M4F core (hardware floating point), bought 2 of them when it was dirt cheap at 5 bucks while ago.
« Last Edit: March 23, 2013, 03:11:51 am by BravoV »
 

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Getting started with ARM
« Reply #8 on: March 23, 2013, 05:47:03 am »
Without trying to soyund the same horn again, i still recommend the ti stellaris. It's a bit (lot) crippleware but the tutorials will teach you a lot of things an afterwards you can always switxh to gcc. I think just the move to Eclipse is worth it since you get much nicer breakpoints and watch expressions. Unless you are used with gdb and vi; then I stand corrected.
 

Online BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: Getting started with ARM
« Reply #9 on: March 23, 2013, 05:57:01 am »
...<snip>.... It's a bit (lot) crippleware but the tutorials will teach you a lot of things an afterwards you can always switch to gcc. I think just the move to Eclipse is worth it since you get much nicer breakpoints and watch expressions. ..........

+1 , this .. <those underlined words>  :-+ ... are the key advantages apart from the switch to GCC, like when it times to jump ship to different ARM brands/manufacturers.  ;)

Really curious if anyone at TI <top management> ever thought about this strategically ?  ???

Offline AndyC_772Topic starter

  • Super Contributor
  • ***
  • Posts: 4265
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Getting started with ARM
« Reply #10 on: March 23, 2013, 10:24:36 am »
Thanks for the replies so far, most helpful. It sounds as though I should probably start looking specifically for details on Eclipse and GCC, and see where that takes me. Maybe the TI Stellaris Launchpad would be a good way to at least become familiar with the tool chain even if the full version is costly. CoIDE certainly looks worth investigating too.

What I'm trying to achieve here is the ability to buy an ARM based processor off the shelf, design it into a product, then get it to boot and exercise all the peripherals - so whichever tool chain I take the time to get to grips with, it needs to not be a dead end. That's why I've been put off boards like the Launchpad; there's no point investing a lot of time and effort in a tool if it's going to cost a small fortune to break the tether between it and the target board.

Still amazed that nobody seems to sell a basic, but fully functional, package like the Pickit... :(

Offline M. András

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: hu
Re: Getting started with ARM
« Reply #11 on: March 23, 2013, 10:46:57 am »
if you like limited code size there is the keil free version 32k code limit, i saw a few ulink 2 on ebay for a few bucks while their official one costs more then 200bucks
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: gb
Re: Getting started with ARM
« Reply #12 on: March 23, 2013, 11:11:03 am »
What about beagleboard (http://beagleboard.org/#&slider1=2)? There seems to be a lively community surrounding it. I've not looked in great detail at it though.

David.
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

alm

  • Guest
Re: Getting started with ARM
« Reply #13 on: March 23, 2013, 11:36:53 am »
The BeagleBoard / BeagleBone contain a TI OMAP processor with clock speeds in the hundreds of MHz and ~100 MB of memory. Not exactly a competitor for an ARM Cortex M0/M3/M4 board, and not considered a micro-controller. This is a much more complex system aimed at people requiring much more muscle power and fast I/O (eg. DVI).
 

Offline AndyC_772Topic starter

  • Super Contributor
  • ***
  • Posts: 4265
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Getting started with ARM
« Reply #14 on: March 23, 2013, 11:51:29 am »
I've had a quick look, and it appears at first glance to be the opposite of what I'm looking for. I'm after a general purpose development environment that I can use with a 'bare' IC on my own hardware, not just one ready-made board with a set of tools that are unique to it.

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: gb
Re: Getting started with ARM
« Reply #15 on: March 23, 2013, 11:56:58 am »
You are right. The BeagleBoard is totally unsuitable for learning the basics on :palm: Sorry :-[
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Getting started with ARM
« Reply #16 on: March 23, 2013, 12:18:34 pm »
I've had a quick look, and it appears at first glance to be the opposite of what I'm looking for. I'm after a general purpose development environment that I can use with a 'bare' IC on my own hardware, not just one ready-made board with a set of tools that are unique to it.

It does not exist. Every Arm cpu has a diferent pinout, I assume.
 

Offline AndyC_772Topic starter

  • Super Contributor
  • ***
  • Posts: 4265
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Getting started with ARM
« Reply #17 on: March 23, 2013, 02:01:49 pm »
Sorry djsb, it seems like we've misunderstood each other. Perhaps what I should have made clearer is that I'm looking to learn whatever (software) tools are necessary to allow me to use ARM-based microcontrollers in my own products, and not anything that's specific to one particular manufacturer's pre-built board.

If I've misunderstood what a BeagleBone is, and it's actually just a target board which happens to be provided with a completely general purpose compiler and IDE that will work equally well on any other board with a related processor on it, then I apologise.

@brainwash: Of course not - but I do want to be able to choose a suitable microcontroller from a manufacturer's range, design it into my board, build it, then attach my PC and program / debug the code. The key thing is that I don't want to be tied to a specific board made by someone else, or reliant on the device being pre-programmed. Think PIC and AVR, not PICAXE and Arduino.

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: Getting started with ARM
« Reply #18 on: March 23, 2013, 03:13:39 pm »
Mikroelektronika make some very decent dev boards and compilers for lots of microcontroller architectures including PIC and ARM. I use their C compilers for PIC and dsPIC, but haven't played with ARM yet. They are very good and pretty cheap with many library functions to get you started.

Dev boards for ARM:  http://www.mikroe.com/arm/development-boards/
C compiler/IDE for ARM: http://www.mikroe.com/mikroc/arm/

There's a discount if you buy the compiler with a dev board, but the compiler can be used for free (fully functional with all optimisations but limited to 8K code size) so it's worth a try.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Getting started with ARM
« Reply #19 on: March 23, 2013, 03:28:48 pm »
Still amazed that nobody seems to sell a basic, but fully functional, package like the Pickit... :(

I'm not understanding you.  The PicKit 3 is just a basic programmer/debugger.  All of these boards have that built into them and a few of them you can just cut that part off and use it standalone.  All of these board allow you to use the programmer/debugger to program/debug chips on other boards exactly like the PicKit 3.  Like the PicKit 3 and MicroChips compilers they all come with crippled (code size rather than optimization cripple) IDE/compilers that are directly supported.  They can all be used with a GCC toolchain and OpenOCD if you want an open source toolchain.

LPC and ST are the most popular and probably the best to start so you can expand later on.  Buying both of these development kits will be cheaper than buying one PicKit 3.

People suggesting the TI are missing the huge limitation that you can't actually buy the TI LM4F chips anywhere, yet.  It's nice to play with, but it's a dead end at the moment.  Also all their planned LM4F chips are high end.  With the ST and LPC you have access to their CM0, CM3, CM4, and hopefully the CM0+ coming out.

LPC XPresso
ST Discovery F3 or F4
TI Stellaris Launchpad
Freescale FRDM-KL25Z
Mark Higgins
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: gb
Re: Getting started with ARM
« Reply #20 on: March 23, 2013, 05:11:49 pm »
It's all very confusing? I'd really like to pick up some skills on ARM myself especially if the skills are scalable to later use on for instance the rasberry PI (or indeed the beagleboard). I will be following this post with interest.






PS Wished I'd had the chance to learn on a BBC Micro in the early days. Had not even heard of them until a few years ago. I know the Micro was not a Microcontroller but it did use an ARM device.
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27668
  • Country: nl
    • NCT Developments
Re: Getting started with ARM
« Reply #21 on: March 23, 2013, 06:09:33 pm »
If you want skills for Raspberry PI or Beagle board then you should learn about programming for Linux. The fact these boards use an ARM CPU isn't even relevant.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12284
  • Country: us
Re: Getting started with ARM
« Reply #22 on: March 23, 2013, 06:46:09 pm »
PS Wished I'd had the chance to learn on a BBC Micro in the early days. Had not even heard of them until a few years ago. I know the Micro was not a Microcontroller but it did use an ARM device.

The BBC Micro in fact dates from about 1982 and used the 6502 processor, predating ARM by several years. It was a very well designed product and it made me very sad that I couldn't afford one at the time. It was an excellent learning machine with all sorts of peripherals and expansion capabilities.

The ARM based micro that followed it was the Acorn Archimedes (ARM stands for Acorn RISC Machine). It also was very well designed and had incredible performance compared to other computers of its era. As I understand it the design of the ARM chip was inspired by the simplicity and elegance of the 6502 in the earlier BBC micro.

It might be possible to pick up an old Archimedes today for a song and use it to learn the ARM instruction set. Although the hardware has changed tremendously the core of the instruction set is essentially the same.
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: gb
Re: Getting started with ARM
« Reply #23 on: March 23, 2013, 07:00:17 pm »
Yes that was the point I was trying to make (that the core instruction set was essentially the same). If the OP is just trying to complete a particular task and program in C then surely the architecture is not that important. However if the aim is to learn ARM my approach would be to use whatever hardware is supplemented by plenty of tutorials and online examples (either online or preferably book form).
I will have a look myself over the next couple of weeks as I'd like to get started on ARM myself.


David.
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: Getting started with ARM
« Reply #24 on: March 23, 2013, 07:30:58 pm »
If the OP is just trying to complete a particular task and program in C then surely the architecture is not that important.

It is ESSENTIAL to have an understanding of the underlying architecture when programming any microcontroller in my opinion. Just try to write even a moderately simple program without looking at the datasheet!
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf