XK-1A Development Board Tutorial
t i m e r tmrF , t m r C ;
u n s i g n e d timeF , t i m e C ;
t m r F : > t i m e F ;
t m r C : > t i m e C ;
w h i l e (1) {
s e l e c t {
c a s e t m r F w h e n t i m e r a f t e r ( t i m e F ) : > v o i d :
l e d O n = ! l e d O n ;
if ( l e d O n )
led <: l e d V a l ;
e l s e
led <: 0;
t i m e F += F L A S H _ P E R I O D ;
b r e a k ;
c a s e t m r C w h e n t i m e r a f t e r ( t i m e C ) : > v o i d :
l e d V a l
< <= 1;
if ( l e d V a l == 0 x10 )
l e d V a l = 1;
t i m e C += C Y C L E _ P E R I O D ;
b r e a k ;
}
}
r e t u r n 0;
}
2. Build your project, create a new Run Configuration, and run it.
Show reminder..
Follow these steps:
3. In the
Project Explorer
, click your project to select it, and then choose the
menu option
Project
·
Build Project
(
).
If any errors are reported in the
Console
, double-click an error to locate it in
the editor, fix the error and then re-build your application.
4. Choose
Run
·
Run Configurations
.
5. In the
Run Configurations
dialog, in the left panel, double-click
XCore Appli-
cation
.
6. In the right panel, in
Name
, enter a name for the Run Configuration.
7. In
Project
, ensure that your project is displayed. If not, click
Browse
to open
the
Project Selection
dialog, select your project, and then click
OK
.
8. In
C/C++ Application
, click
Search Project
to open the
Program Selection
dialog, select your application binary, and then click
OK
.
9. In
Device options
, in
Run on
, select the option
hardware
, and in
Target
,
ensure that the option “XMOS XTAG-2 connected to L1[0]” is selected.
X7366A