Build errors in xTIMEcomposer Topic is solved

If you have a simple question and just want an answer.
SUNROC1
Member++
Posts: 16
Joined: Sat Apr 12, 2014 7:18 am

Build errors in xTIMEcomposer

Post by SUNROC1 »

I create a xTimeexposer Project ,when I build it ,many error occor

as below: 

In file included from ../src/NRF24L01.xc:8:
NRF24L01.h:17: error: `XS1_PORT_1H' undeclared here (not in a function)
In file included from ../src/NRF24L01.xc:8:
NRF24L01.h:17: error: invalid initializer
NRF24L01.h:18: error: `XS1_PORT_1E' undeclared here (not in a function)
NRF24L01.h:18: error: invalid initializer
NRF24L01.h:19: error: `XS1_PORT_1I' undeclared here (not in a function)
NRF24L01.h:19: error: invalid initializer
NRF24L01.h:20: error: `XS1_PORT_1D' undeclared here (not in a function)
NRF24L01.h:20: error: invalid initializer
NRF24L01.h:21: error: `XS1_PORT_1A' undeclared here (not in a function)
NRF24L01.h:21: error: invalid initializer
NRF24L01.h:22: error: `XS1_PORT_1C' undeclared here (not in a function)
NRF24L01.h:22: error: invalid initializer
../src/NRF24L01.xc:19: error: initializer element is not constant
../src/NRF24L01.xc:20: error: initializer element is not constant
../src/NRF24L01.xc:21: error: initializer element is not constant
../src/NRF24L01.xc: In function `init_io':
../src/NRF24L01.xc:43: error: output to an input-designated port
../src/NRF24L01.xc:44: error: unknown function identifier `delay_microseconds' (possibly missing prototype?)
../src/NRF24L01.xc: In function `SPI_RW':
../src/NRF24L01.xc:62: warning: unused variable `a'
../src/NRF24L01.xc: In function `NRF24L01_TxPacket':
../src/NRF24L01.xc:220: error: invalid operands to binary !=
../src/NRF24L01.xc: At top level:
../src/NRF24L01.xc:242: error: parse error before "bit"
../src/NRF24L01.xc: In function `Check_ACK':
../src/NRF24L01.xc:244: error: conditional expression is not arithmetic
../src/NRF24L01.xc:247: error: `clear' undeclared (first use in this function)
../src/NRF24L01.xc:247: error: (Each undeclared identifier is reported only once
../src/NRF24L01.xc:247: error: for each function it appears in.)
../src/NRF24L01.xc:250: error: output to an input-designated port
xmake[1]: *** [.build_Debug/src/NRF24L01.xc.o] Error 1
xmake: *** [bin/Debug/app_nrf24l01_soft_spi_Debug.xe] Error 2


View Solution
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Add the following to the top of your source file(s):

 

#include <xs1.h>

 

or

 

#include <platform.h>



(The latter will also include xs1.h)