Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The On-Chip SDK contains an IAR workspace at onchipsdk/projects/iar/all_projects.eww. Double-click on this file to open the workspace.

 


The column on the left lists a number of IAR projects, each corresponding to a sample application. You can switch between projects by right-clicking on the project name you want, and choosing Set as Active.  We will select 00-hello if not already selected.

...

During  the build process, the bottom pane of the IAR Windows lists those steps:


 

No Format
Building configuration: 00-hello - Debug
Updating build tree... 
8 file(s) deleted. 
dnm_local.c
cli_task.c
dnm_rate_ctrl.c
dnm_service.c
hello_app.c
...
Linking
Performing Post-Build Action
 
Total number of errors: 0 
Total number of warnings: 0

 


Running it on the Mote

No Debugger

...

  • Copy the main executable ocfdk_00_hello.bin from the projects\iar\00-hello\Debug\exe directory into the ESP directory.
  • Make sure the supporting files are also copied to the ESP directory. 
  • Program the part

...


No Format
ESP -E
ESP -P FT-DC9003A-M4-115K-680-0222-0004REV1.bin 0  (or other fuse table as appropriate)
ESP -P mote_part_r52074.bin 800
ESP -P ocfdk_00_hello.bin 1000
ESP -P loader_1_0_5_4_oski.bin 77800

...

  • Connect the debugging pod to the DC9006 and the DC9003 to the DC9006 If you have different hardware, connect the debugging pod to the the JTAG header on your board.
  • If you haven't done so already, select the debugger under Project->Options->Debugger and configure it.  See Setting Up a New Project for details.
  • Select Download->Download Active application from the Project menu or press Alt-D.
  • Connect to the mote CLI using a terminal program, reset the part, and see "Hello World!" print out.
  • If the application fails to run, it may be that the part is programmed with an older loader.  Try running the programming steps above, omitting the main executable before downloading via the debugging pod.  This step is only needed once.

...

You may see a dialog box requesting an "Alternative file" similar to that shown:

Image Added

This is the debugger asking for an OCSDK stack library source file (which are not distributed to customers) - select the "If possible, do not show this dialog again" and press the Skip button.


Note

If you are using a DC9003 or similar device that was previously programmed as a mote, it came with loader 1.0.3.12. The part will run on the debugger, but appear to be dead after reset, since the older loader cannot execute the signed code (the loader is bypassed when running the debugger.) See the "No Debugger" steps above to reprogram with a 1.0.5.4 loader.

...


Next Step: Understand What Your Application Can Do