Cortex M3 - Getting Started Guide

This part of the website is due to my revived interest in micro controllers. The interest never really went away, but babies, toddlers and Hot Solder have meant my hobbies were on put on hold.

Since I have been away the Cortex-M3 from ARM seems to be on offer from most of the big micro manufacturers and the Cortex-M0 looks as though its just on the horizon.

The next few pages are intended as a guide to get up and running with a Cortex-M3, on a very limited budget. The intended audience are people who are newish to the world of low power, low cost, embedded systems. Perhaps for enthusiasts who have been using Arduino and now want something more flexible and a whole lot more powerful.

By the end of this short guide, you should have successfully written, compiled and debugged and application or two for the intended target.

As previously mentioned there are number of vendors that produce Cortex-M3 based micro's this guide is intended for the LM3S6965 IC from Luminary Micro. This IC was chosen as it has an impressive feature set, the support code is excellent and the cost is pretty reasonable.

I'm a C man, that is, I'm (lazy) really not that keen on writing in assembly, so for any project I embark on I always make sure there is a compiler available at a price I can afford. There are a handful of companies that offer compilers for the Cortex- M3, however, there is a well known free compiler called gcc. It's not the easiest compiler to get to grips with but it is certainly not impossible and when used in conjunction with a freely available IDE (Eclipse) it becomes a great tool to use. Later on, I will attempt to exlain how to get started with gcc and eclipse. For people with a larger budget I would highly recommend Crossworks from Rowley Associates.

A compiler has been indentified, now a development platform is required. Luminary have their own development kit, which is a great. However, I have plans...
The Luminary kit doesn't lend itself well to making useful products. So, I designed and built my own processor card and carrier board for development.:

LM3S6965 Processor Card

A programmer / debugger, is required, this is the device that sits in between the PC and the micro. It helps the PC communicate with micro, it' PC speak to micro speak (JTAG) with the help of some freely available software.

Over the next few pages I hope to explain a little bit about the following:

  1. Brief introduction to the Cortext M3 core.
  2. An introduction to Code Sourcery's gcc compiler and how to use it through the command line.
  3. An introduction to the make utility, including its purpose and how to write simple make files to compile programs.
  4. Understanding linker scripts.
  5. Wrapping up parts 2 - 4 using a free IDE called Eclipse.
  6. Utilising Luminary's Stellarisware.
  7. An introduction to OpenOCD and how to use it from within Eclipse.
  8. Debugging an application in eclipse using gdb.

Lets start by having a tornado tour of the Cortex M3.

Page 2