beautypg.com

Load and compile the hello world example – Wavetronix Click 500 (programmable controller) (CLK-500) - Quick-reference Guide User Manual

Page 4

background image

© 2014 Wavetronix LLC. All rights reserved. Protected by US Pat. Nos. 6,556,916; 6,693,557; 7,426,450; 7,427,930; 7,573,400; 7,889,097; 7,889,098; 7,924,170; 7,991,542; 8,248,272;

8,665,113; and Cdn. Pat. Nos. 2,461,411; 2,434,756; 2,512,689; and Euro. Pat. Nos. 1435036; 1438702; 1611458. Other US and international patents pending. Wavetronix, SmartSensor, Click,

Command and all associated logos are trademarks of Wavetronix LLC. All other product or brand names as they appear are trademarks or registered trademarks of their respective hold-

ers. Product specifications are subject to change without notice. This material is provided for informational purposes only; Wavetronix assumes no liability related to its use.

6

Load and compile the Hello World example

Now that your Click 500 is powered up and communicating with your computer, try this example to learn

how to load and compile code. First, open the example:
1 Make sure you have already opened the Example.dcp project file (as discussed in part 3).

2 Select Open from the Dynamic C file menu.

3 Select ExampleCode3.1.c from the folder labeled “Chapter 3,” and then click the Open button.

Now compile and execute the example. Begin by

clicking the Run button (green triangle) located on

the Dynamic C toolbar.

While the program is compiling, the

LEDs on the Click 500 faceplate will

go blank and a pop-up window will

appear displaying the status of the

compiler and flash loader.

The compile status window will also

show you the size of the compiled program as it is being loaded into flash. For example, the program on the

preceding page requires a total of 45 K (45056) bytes. About 19 K of this memory allocation is required for

the BIOS to set up the processor and another 3 K to support the debugger.

Once the program has finished loading

on the Click 500, it will try to display

the first code file used in the application.

However, because this file is a core Click

500 library file and has been encrypted,

a warning message box will appear. Click

OK when this message box appears and

the program will being to execute.

With this Hello World example, the STDIO window will appear next and the text “Hello World!” will be

printed in the top left of the window.

WX-500-0193