Examples supplied with the Code Red IDE
[Note that the below details match with version 4.1.0 of the Code Red IDE. Exact details may differ slightly between tools versions, but the general principals should hold for any version. Note that with version 3.x of the Code Red IDE, CMSIS 2.0 files are not provided - only CMSIS 1.3 files are.]
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 4.x
<install_dir>\lpcxpresso\Examples
* Red Suite 4.x / Red Suite (NXP Edition) 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. For example, for NXP's MCUs, the directory is strucutured thus...
Examples - NXP - LPC1000 - LPC11xx
- LPC12xx
- LPC13xx
- LPC17xx
- LPC2000 ...
- LPC3000 ...Each MCU specific subdirectory then contains one or more ZIP files, which contain the example projects for that MCU. To import the examples, select:
Quickstart Panel -> Import Example project(s)
The dialog that is then displayed:
then 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. You can also browse to the web examples by going here.
If you then browse to the examples subdirectory for your specific MCU, you can then import projects from the appropriate ZIP file...
Examples for specific MCU families
NXP LPC1000 examples
The examples supplied for the NXP LPC1xxx family of parts are more extensive than for those for other NXP MCU's and generally consist of a number of ZIP files.
- CMSISv2p00_LPC1xxx.zip
This simply contains the CMSIS 2.0 files for your part. This zip is included so that if you create a new project in a new workspace, you can easily import the CMSIS library project without importing all the other examples for that MCU. For more information on CMSIS, see the FAQ Support for CMSIS. Note that CMSIS 2.0 projects are only provided with Code Red IDE version 4.x, not with the earlier version 3.x.
- CMSISv1p30_LPC1xxx.zip
- This simply contains the CMSIS 1.3 files for your part. Note that with Code Red IDE version 4.x, this file is provided for backwards compatibility reasons only - we would generally recommend the use of CMSIS 2.0 instead.
- LPCXpresso1xxx_cmsis2.zip (LPCXpresso1xxx.zip in Code Red IDE v3.x)
- This is a small set of examples produced by Code Red aimed mainly at those who are using only the LPCXpresso processor card itself (without additional hardware attached). Thus they are largely various ways of controlling the flashing of the LED on the board. These examples give a good basis for initial experimentation with the LPCXpresso board and familarization with the Code Red IDE, before moving onto the more complex examples provided by 4).
- NXP_LPCXpresso1xxx*.zip / examples.lpc13xx.new.zip / examples.lpc17xx.new.zip
- This is a much more comprehensive set of examples produced by NXP which exercises many more of the peripherals of the LPC1xxx - but many of them rely upon you having additional hardware connected to the LPCXpresso processor card.
There are is an additional bundle of examples provided in the LPC1700 examples subdirectory:
- RDB1768cmsis2.zip
This zip file contains projects focussed on the Code Red RDB1768 development board.
ST Examples
Support for STMicroelectronics STM32 MCUs was introduced in Red Suite 4.1.0. For STM32F4, STM32F2 and each STM32F1 sub-family, Red Suite provides...
- A CMSIS library project
- A library project containing a port of STM's Standard Peripheral Library.
In addition, for certain evaluation boards - currently the STM3210C-Eval (mounting an STM32F107VC MCU), the STM3210E-Eval (mounting an STM32103ZE MCU), the STM3220G-Eval (mounting an STM32F207IG MCU) and the STM324xG-Eval (mounting an STM32F407IG MCU) - Red Suite also provides...
- A port of STM's evaluation board library, plus associated example.
For more details of STM32 support, please see STM32 Support FAQ.
TI / Luminary Examples
Only minimal example projects for TI/Luminary MCUs are provided in the Red Suite installation. The main examples can be download from here.
After selecting your project 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 the "Import Example project(s)" exports to import projects directly out of the ZIP file. You do not need to decompress the ZIP file first.
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".
RedState Examples
Examples for use with the RedState graphical tool for designing and generating state machines can be found in the <install_dir>\Examples\RedState. Please see the supplied Getting Started with Red State guide for more details of these examples.
CMSIS DSP Projects
Version 4.x of the Code Red IDE provides support for ARM's CMSIS DSPLib. The sources for building the DSPLib can be found in <install_dir>\Examples\CMSIS_DSPLIB subdirectory. Where appropriate, prebuilt versions of the libraries can also be found in the examples directories for individual MCUs. For more details, please see the CMSIS 2.00 DSP Library FAQ.
