User

Examples supplied with the Code Red IDE

[Note that the below details match with version 5.1.2 of the Code Red IDE. Exact details may differ slightly between tools versions, but the general principals should hold for any version.]

Within the installation directory of the Code Red IDE can be found an Examples subdirectory, the exact location depending on your tool variant and version:

* LPCXpresso 5.x / 4.x

<install_dir>\lpcxpresso\Examples

* Red Suite / Red Suite (NXP Edition) 5.x / 4.x

<install_dir>\redsuite\Examples

* Red Suite / Red Suite (NXP Edition)/ LPCXpresso 3.x

<install_dir>\Examples

This Examples directory contains a range of example projects for the MCUs supported by your versions of the tools, grouped by MCU vendor. Each MCU family subdirectory then contains one or more ZIP files, which contain the example projects for those MCUs. To import the required examples into the Code Red IDE, select:

Quickstart Panel -> Import Project(s)

The dialog that is then displayed...

... allows you to browse to the examples on disk, or else go to an appropriate web page to download new or updated examples, which can then be imported.

If you then browse to the examples subdirectory for your specific MCU, you can then import projects from the appropriate ZIP file...

Once you have select the ZIP file that you want to import projects from, then the tools will display a dialog allowing you to select which projects within that ZIP you actually are going to import. Until you are familiar with all the supplied projects, we would recommend importing all the projects. This will prevent any potential build issues - some application projects make use of other "library" projects, and if you don't import the relevant library project, then the application projects will not build successfully.

One important thing to note about the examples is that "Import Project(s)" can import projects directly out of the ZIP file. You do not need to decompress the ZIP file first.

Examples for specific MCU families

Freescale Kinetis Examples

Examples for the Freescale Kinetis MCU families supported by Red Suite can be found in the following subdirectory of your installation:

Examples - Freescale

Typically for each supported part family Red Suite provides...

A CMSIS library project

Then for some part families, there are also...

Example project(s) for specific evaluation board(s). Some of these will be CMSIS-based, others may be based on Freescale's non-CMSIS-based code.

NXP LPC examples

Examples for the NXP's LPC MCU families supported by the Code Red IDE can be found in the following subdirectory of your installation:

Examples - NXP

Typically for each supported Cortex-based part family, the Code Red IDE provides...

A CMSIS library project

Example project(s) for specific evaluation board(s).

Where an LPCXpresso board exists for a part, there may be two example bundle ZIPs - a small set of examples produced by Code Red that blink the LEDs, plus in some cases a more extensive bundle of examples provided by NXP.

For the LPC17xx and LPC407x_8x family, example bundles are also provided for Code Red's RDB1768 and RDB4078 development boards.

A wide range of additional and updated examples are also available in LPCXpresso project form (compatible with Red Suite) from NXP's websites:

TI (Luminary) Stellaris Examples

Examples for the TI Stellaris MCU families supported by Red Suite can be found in the following subdirectory of your installation:

Examples - TI

Only minimal example projects for TI Stellaris MCUs are provided in the Red Suite installation. The main examples can be download from here.

CMSIS DSP Projects

Code Red IDE (v4 and later) provides support for ARM's CMSIS DSP library. The sources for building the CMSIS DSP library can be found in the following subdirectory of your installation:

Examples - CMSIS_DSPLIB

However in most cases it will be more appropriate to use a prebuilt version of the CMSIS DSP library from the examples directories for your target MCU family. For more details, please see the CMSIS DSP Library FAQ.

Flash Driver Projects

The sources for building the supplied flash drivers for programming external flash devices with LPC18/LPC43 parts can be found in the following subdirectory of your installation:

MCU code from other sources

Sometimes MCU vendors may have example code available that is not provided in Code Red IDE compatible projects. However as such code is typically written in standard C, it is relatively straightforward to create a new Code Red IDE project yourself and import the source code in. For more information, please see the FAQ "Porting Code from other toolchains".

Software Stacks

Although some of the example projects that we supply do contain example code for specific software stacks (e.g. USB), these are typically ports of open source or MCU vendor-provided stacks. Code Red Technologies do not produce or sell software stacks.