ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI compilation error

Hi, I am getting an error while using the LM3S8962 EK board and running the following SPI test VI:

 

https://decibel.ni.com/content/docs/DOC-7701

 

When I run the VI, the following errors come up

 

..\Drivers\SPI\ARM_SPI.c(118): error:  #147-D: declaration is incompatible with "void ARM_SPI_CreateConfigurationReference(int, unsigned int, unsigned int, unsigned int, int *, int *)" (declared at line 59 of "C:\Program Files\National Instruments\LabVIEW 2011\Targets\Keil\Embedded\RealView\Drivers\ARM\Include\ARM_SPI.h")

 

..\Drivers\SPI\ARM_SPI.c(236): error:  #147-D: declaration is incompatible with "void ARM_SPI_WriteRead(int, T_bArray *, unsigned int, T_bArray *, int *)" (declared at line 67 of "C:\Program Files\National Instruments\LabVIEW 2011\Targets\Keil\Embedded\RealView\Drivers\ARM\Include\ARM_SPI.h")

 

And indeed, the 2 files do differ in their declaration and definition of the function.  ARM_SPI.h in the Keil directory has 6 arguments, but the C program in the project only has 5?  some kind of version mismatch between the LabVIEW C generation program and the board support?  Installation problem? (I removed the older versions before installing...)

 

..\Drivers\SPI\ARM_SPI.c(274): error: #20: identifier "SPI_SIZE_MISMATCH_ERR" is undefined
..\Drivers\SPI\ARM_SPI.c: *pErrOut = SPI_SIZE_MISMATCH_ERR;
..\Drivers\SPI\ARM_SPI.c: ^
..\Drivers\SPI\ARM_SPI.c: ..\Drivers\SPI\ARM_SPI.c: 0 warnings, 3 errors

 

 

The rest of the project compiles fine.

 

FYI, I have had no trouble with other test programs, for example blinky, and writing  a message to the OLED, writing to the SD card, etc.

 

I am using LabVIEW 2011, Embedded Module for LabView 2011, and the Keil uvision 4 compiler that comes on the disk (I have an academic licensed version, not the 60 day evaluation, if that matters).

 

The Keil toolchain is RealView MDK-ARM version: 4.11

 

Any help appreciated.

Thanks!
Sridhar 

 

 

0 Kudos
Message 1 of 3
(6,093 Views)

Solved... sort of.

 

The problem is not there if you use the ``EK-LM3S8962'' target... only if you use the ``EK-LM3S8962 USB'' version.

 

Pity, because during development it is simpler to use the USB version.

 

Sridhar

0 Kudos
Message 2 of 3
(6,082 Views)

sanandak,

 

This is a known bug which is should hopefully be fixed in the 2012 version.

 

-Sam K

National Instruments

0 Kudos
Message 3 of 3
(6,064 Views)