Hi,
I want to test the flash of my XK-EVK-XU316 board by running this program on her :
void setup()
{
int LED = 0;
pinMode (LED, OUTPUT);
}
void loop()
{
digitalWrite(LED, HIGH);
}
I found on a datasheet how to run C programs but nothing for ce c++ programs. I think I have all the software that my board need but when I want to run my cpp program it dit not run.
can you guys help me ?
How to run cpp programs on XTC Tools
-
- Junior Member
- Posts: 6
- Joined: Wed May 10, 2023 10:01 am
-
- Junior Member
- Posts: 6
- Joined: Wed May 10, 2023 10:01 am
I modify a little bit my program :
#include "stdio.h"
void setup()
{
pinMode (14, OUTPUT);
}
void loop()
{
digitalWrite(14, HIGH);
}
I try to run my program with this command line :
xcc -O2 -Wall -target=XCORE-AI-EXPLORER TestFlash.cpp -o TestFlash.xe
and It happens that :
TestFlash.cpp:6:16: error: use of undeclared identifier 'OUTPUT'
pinMode (14, OUTPUT);
^
TestFlash.cpp:11:20: error: use of undeclared identifier 'HIGH'
digitalWrite(14, HIGH);
^
2 errors generated.
I think its a library problem. Do you guys have an idea ?
#include "stdio.h"
void setup()
{
pinMode (14, OUTPUT);
}
void loop()
{
digitalWrite(14, HIGH);
}
I try to run my program with this command line :
xcc -O2 -Wall -target=XCORE-AI-EXPLORER TestFlash.cpp -o TestFlash.xe
and It happens that :
TestFlash.cpp:6:16: error: use of undeclared identifier 'OUTPUT'
pinMode (14, OUTPUT);
^
TestFlash.cpp:11:20: error: use of undeclared identifier 'HIGH'
digitalWrite(14, HIGH);
^
2 errors generated.
I think its a library problem. Do you guys have an idea ?