Application Note:
Create New Application
For SmartRF05 + CC2530
Document Number: SWRA231
Texas Instruments, Inc.
San Diego, California USA
Copyright
2008-2009 Texas Instruments, Inc. All rights reserved.
Create New Application For SmartRF05 + CC2530
SWRA231 Version 1.1
Updat 巳d for 2.2.0 release
04/02/2009
Copyright @ 2008-2009 Texas Instruments,Inc. AII rights reserved.
Create New Application For SmartRF05 + CC2530
SWRA231 Version 1.1
Table of Contents
1.
PURPOSE.............................................................................................................................................................1
2. ASSUMPTIONS ..................................................................................................................................................1
3. MAKE A NEW PROJECT.................................................................................................................................1
COPY AND RENAME FILES/FOLDERS...............................................................................................................1
EDIT PROJECT FILES .......................................................................................................................................5
EDIT SOURCE FILES ........................................................................................................................................7
TEST MODIFIED PROJECT AND SOURCE FILES...............................................................................................10
3.2
3.3
3.4
3.5
ii
Copyright
2008-2009 Texas Instruments, Inc. All rights reserved.
Create New Application For SmartRF05 + CC2530
SWRA231 Version 1.1
1. Purpose
This application note describes, step by step, how to clone a Z-Stack™ sample project, to serve as a template for the
development of a new application.
2. Assumptions
You already have an application either by :
o
using GenericApp or SerialApp, the .c and .h files have been used as templates,
and modified to make your new application files..
For this example, we will use the following:
o New application files will be Widget.c, Widget.h, and OSAL_Widget
3. Make a New Project
3.1 Release Version and Platform
In some generic screenshots below, references are made to (Release Version) and (Platform). For this document:
(Release version) refers to 2.2.0.
(Platform) refers to CC2530DB.
3.2 Copy and Rename Files/Folders
Determine what type of application you want to model. If your application is going to use the serial port to send and
receive serial data, (not Z-Tool™) you should start with the SerialApp project in...\Projects\zstack\Utilities. If your
application doesn’t have anything to do with the serial port (except Z-Tool), start with the GenericApp project
in...\Projects\zstack\Samples.
For this example, we will copy and modify the …\Projects\zstack\Samples\GenericApp project:
1
Copyright
2008-2009 Texas Instruments, Inc. All rights reserved.
Create New Application For SmartRF05 + CC2530
SWRA231 Version 1.1
Copy the GenericApp folder and rename it Widget:
Open the Source folder within the new Widget folder:
2
Copyright
2008-2009 Texas Instruments, Inc. All rights reserved.
Create New Application For SmartRF05 + CC2530
SWRA231 Version 1.1
Rename each of the files by replacing GenericApp with Widget:
Open the (Platform) folder (in this case CC2530DB) within the new Widget folder:
3
Copyright
2008-2009 Texas Instruments, Inc. All rights reserved.
Create New Application For SmartRF05 + CC2530
SWRA231 Version 1.1
Rename each of the project files by replacing GenericApp with Widget:
4
Copyright
2008-2009 Texas Instruments, Inc. All rights reserved.
Create New Application For SmartRF05 + CC2530
SWRA231 Version 1.1
3.3 Edit Project Files
In the …\Widget\(Platform) folder (in this case CC2530DB), right click on Widget.eww, then select Open With,
and then click on Notepad to open the IAR Embedded Workbench workspace file for editing:
Select Edit→Replace… , then Replace All instances of GenericApp with Widget.
Select Cancel, then File→Save, and finally File→Exit
5
Copyright
2008-2009 Texas Instruments, Inc. All rights reserved.