CubeCell HTCC AB-01 board in Arduino Error programming

Hi There I am getting an issue with SPI.h when compiling my sketch - I am running a CubeCell HTCC AB-01 board, all libraries are up to date and there are no spaces in computer name. Any help would be appreciated.

In file included from /Users/db/Documents/Arduino/libraries/RadioHead-master/RadioHead.h:778,
from /Users/db/Documents/Arduino/libraries/RadioHead-master/RHGenericDriver.h:9,
from /Users/db/Documents/Arduino/libraries/RadioHead-master/RHSPIDriver.h:9,
from /Users/db/Documents/Arduino/libraries/RadioHead-master/RH_RF95.h:15,
from /Users/db/Downloads/rf95_client/rf95_client.ino:12:
/Users/db/Library/Arduino15/packages/CubeCell/hardware/CubeCell/1.0.0/cores/asr650x/SPI/SPI.h:31:7: error: redefinition of ‘class SPIClass’
class SPIClass
^~~~~~~~
In file included from /Users/db/Downloads/rf95_client/rf95_client.ino:11:
/Users/db/Library/Arduino15/packages/CubeCell/hardware/CubeCell/1.0.0/cores/asr650x/SPI/SPI.h:31:7: note: previous definition of ‘class SPIClass’
class SPIClass
^~~~~~~~
Using library RadioHead-master in folder: /Users/db/Documents/Arduino/libraries/RadioHead-master (legacy)
exit status 1
Error compiling for board CubeCell-Board(HTCC-AB01).

Can you show your code?

I can show you were the error is occurring

line 11 and 12 which are throwing the error are:
#include <SPI.h>
#include <RH_RF95.h>

not sure if this matters but the #include <SPI.h> library is also included in radiohead.h which is referenced via a few other files via RH_RF95.h. see Radio head git hub below.

Hello @david.browne,

this is an error in the arduino core of ASR650x. In the arduino directory (don’t know where it is, as I am not on windows, but you can see it at the bottom of the preferences dialog, It’s the same directory as preferences.txt is in), find this file: packages/CubeCell/hardware/CubeCell/1.0.0/cores/asr650x/SPI/SPI.h. There you have to add

#ifndef _SPI_H_INCLUDED
#define _SPI_H_INCLUDED

at the top and

#endif

at the bottom. This prevents .h files to be included multiple times.

Regards, Edi

BTW, this was already fixed now, as I wrote an Issue in meantime. Heltec was fast! But you have to use the gitbub Version of their Arduino implementation (which is never a bad Idea as they are fixing things frequently)