Tool/software: Code Composer Studio
Adding NPI_SPI into simple_peripheral project , but compiling failed .
My detail steps is shown as followed:
1.On CC2640 LAUNCHPAD , add NPI_SPI into simple_peripheral project according to 《Cc2640_Adding_a_UART_or_SPI_driver_to_a_Sample_Project》.
2. download the “tl.h” and “tl.c ” file . The path is shown in attachments 6(6) and 6(7).
3. add NPI_SPI into simple_peripheral project according to 《Cc2640_Adding_a_UART_or_SPI_driver_to_a_Sample_Project》.
4.compile the simple_peripheral project , but it failed , as shown in picture 1 .
5. the reason why compiling failed is that "sem" is not defined in this project .The code is shown as followed:
#if defined (NPI_USE_UART) || defined (NPI_USE_SPI) //initialize and pass information to TL TLinit(&sem, &SimpleBLEPeripheral_TLCBs, TRANSPORT_TX_DONE_EVENT, TRANSPORT_RX_EVENT, MRDY_EVENT); #endif //TL
6.Attachments
(1) TI official guide 《Cc2640_Adding_a_UART_or_SPI_driver_to_a_Sample_Project》 can de downloaded here :
(2) TI official guide 《NPI》 can de downloaded here :
(3) the location of simple_peripheral project in my computer is shown as followed:
C:\ti\simplelink_cc2640r2_sdk_1_40_00_45\examples\rtos\CC2640R2_LAUNCHXL\blestack\simple_peripheral
(4) simplelink_cc2640r2_sdk_1_40_00_45 can de downloaded here :
(5) CC2640R2 launchpad can be bought here :
(6) “tl.h” can de downloaded here :
(7) “tl.c” can de downloaded here :
7.my developing environment
CCS:Code Composer Studio 7.2.0
SDK:simplelink_cc2640r2_sdk_1_40_00_45
hardware:CC26640R2 launchpad develop kit
VS: Microsoft Visual C++ 2010 Express
OS:win7 64 bit