Atmel AVR2060: BitCloud ZigBee Light Link Quick Start Guide [APPLICATION NOTE]
42004B
−
AVR
−
08/2012
6
2.3
Programming
2.3.1 Programming with IAR Embedded Workbench
2.3.1.1
Precompiled images
When using IAR Embedded Workbench to program precompiled images provided with the SDK, the user first needs to
create a project containing the precompiled image.
1.
Start IAR Embedded Workbench for AVR.
2.
Select
File > New > Workspace
.
3.
Select
Project > Create New Project…
4.
In the
Create New Project
dialog, select
Externally build executable
in
Project templates
:
5.
Select a name for the project, and click
Save
.
6.
Follow the instructions in
readme.txt
.
7.
Once the project is set up, select
Project > Options
.
8.
In the
General options
category, set
Processor Configuration
to –
cpu=xm256a3
,
ATmega128RFA1
.
9.
Click
OK
.
10.
Select
JTAGICE
mkII
>
Fuse
Handler
(
JTAGICE 3 > Fuse Handler
).
11.
Click
Read
Fuses
, and make sure that the device fuses are set as specified in Section
.
12.
If fuses are set incorrectly, select the correct fuse settings, and click
Program
fuses
.
13.
Select
Project > Download and debug
.
14.
Once the debugging session has started, click
Stop debugging
.
The image is now installed on the board.
2.3.1.2
Application workspace
1.
Double-click on a workspace (for example,
ZLLDemo.eww
), and select
JTAGICE mkII > Fuse Handler
(
JTAGICE
3
>
Fuse
Handler
).
2.
Click
Read
Fuses
, and make sure that the device fuses are set as specified in Section
.
3.
If fuses are set incorrectly, select the correct fuse settings, and click
Program
fuses
.
4.
Select the desired application configuration from the drop-down box in the
Workspace
pane.
5.
Select
Project > Download and debug
.
6.
Once the debugging session has started, click
Stop
debugging
.
The image is now installed on the board.
Note:
Using a JTAG to program the microcontroller will erase the embedded bootloader, if present. As a result, loading of
application images with Serial Bootloader will become inoperable until the embedded bootloader is loaded to Atmel
ATmega128RFA1 again.
2.3.2 Programming with Atmel AVR Studio
1.
In AVR Studio
®
, open the
Tools > Program AVR > Connect…
dialog.
2.
Choose Atmel AVR JTAGICE mkII (JTAGICE 3) for
Platform
: and USB for
Port
:, and click
Connect
…
3.
Select the right device in the Device and Signature Bytes field on the
Main
tab of the programming dialogue.
4.
Click on the
Fuses
tab and make sure that the device fuses are set as specified in Section
.
5.
If fuses are set incorrectly, select the correct fuse settings, and click
Program
.
6.
Click on the
Program
tab.
7.
In the Flash section of the dialog, select the precompiled
.hex
file to be programmed.
8.
Click
Program
.
The image is now installed on the board.