SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By tekNick
#193844
I'm working on a web controlled FM radio project and am attempting to get two Sparkfun devices to work together. Unfortunately, I seem to be running into some errors that I haven't been able to resolve. I'm running it on my Linux Mint box, but have tried it on a Windows 7 machine with identical results. I would appreciate any help that anyone might be able to provide.

The devices are a Si4703 - SparkFun FM Tuner Evaluation Board - Si4703 which I'm trying to control with a SparkFun ESP8266 Thing.

I've installed the ESP8266 Thing's board to the Arduino IDE using the Board Manager by adding http://arduino.esp8266.com/stable/packa ... index.json to the "Additional Boards Manager URLs" as per the instructions found here.

I've installed the Si4703's library by using the IDE's "Add .ZIP Library" and using the zip file found here as per these instructions.

To illustrate the error, I'm using the most simple sketch I can think of:
Code: Select all
#include <SparkFunSi4703.h>
void setup()
{
}
void loop()
{
}
but when attempting to compile, I receive the following errors:
Arduino: 1.8.1 (Linux), Board: "SparkFun ESP8266 Thing, 80 MHz, 115200"

In file included from /home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/Arduino.h:38:0,
from sketch/Si4703_Radio_Test.ino.cpp:1:
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:27:31: error: expected unqualified-id before 'volatile'
#define ESP8266_DREG(addr) *((volatile uint32_t *)(0x3FF00000+(addr)))
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:41:19: note: in expansion of macro 'ESP8266_DREG'
#define CHIPID ESP8266_DREG(0x58)
^
/home/user/Arduino/libraries/SparkFun_Si4703_Arduino_Library-master/src/SparkFunSi4703.h:82:25: note: in expansion of macro 'CHIPID'
static const uint16_t CHIPID = 0x01;
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:27:31: error: expected ')' before 'volatile'
#define ESP8266_DREG(addr) *((volatile uint32_t *)(0x3FF00000+(addr)))
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:41:19: note: in expansion of macro 'ESP8266_DREG'
#define CHIPID ESP8266_DREG(0x58)
^
/home/user/Arduino/libraries/SparkFun_Si4703_Arduino_Library-master/src/SparkFunSi4703.h:82:25: note: in expansion of macro 'CHIPID'
static const uint16_t CHIPID = 0x01;
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:27:31: error: expected ')' before 'volatile'
#define ESP8266_DREG(addr) *((volatile uint32_t *)(0x3FF00000+(addr)))
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:41:19: note: in expansion of macro 'ESP8266_DREG'
#define CHIPID ESP8266_DREG(0x58)
^
/home/user/Arduino/libraries/SparkFun_Si4703_Arduino_Library-master/src/SparkFunSi4703.h:82:25: note: in expansion of macro 'CHIPID'
static const uint16_t CHIPID = 0x01;
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:27:30: error: expected ';' at end of member declaration
#define ESP8266_DREG(addr) *((volatile uint32_t *)(0x3FF00000+(addr)))
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:41:19: note: in expansion of macro 'ESP8266_DREG'
#define CHIPID ESP8266_DREG(0x58)
^
/home/user/Arduino/libraries/SparkFun_Si4703_Arduino_Library-master/src/SparkFunSi4703.h:82:25: note: in expansion of macro 'CHIPID'
static const uint16_t CHIPID = 0x01;
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:27:50: error: expected unqualified-id before ')' token
#define ESP8266_DREG(addr) *((volatile uint32_t *)(0x3FF00000+(addr)))
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:41:19: note: in expansion of macro 'ESP8266_DREG'
#define CHIPID ESP8266_DREG(0x58)
^
/home/user/Arduino/libraries/SparkFun_Si4703_Arduino_Library-master/src/SparkFunSi4703.h:82:25: note: in expansion of macro 'CHIPID'
static const uint16_t CHIPID = 0x01;
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:27:49: error: expected ';' at end of member declaration
#define ESP8266_DREG(addr) *((volatile uint32_t *)(0x3FF00000+(addr)))
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:41:19: note: in expansion of macro 'ESP8266_DREG'
#define CHIPID ESP8266_DREG(0x58)
^
/home/user/Arduino/libraries/SparkFun_Si4703_Arduino_Library-master/src/SparkFunSi4703.h:82:25: note: in expansion of macro 'CHIPID'
static const uint16_t CHIPID = 0x01;
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:27:50: error: expected unqualified-id before ')' token
#define ESP8266_DREG(addr) *((volatile uint32_t *)(0x3FF00000+(addr)))
^
/home/user/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/esp8266_peri.h:41:19: note: in expansion of macro 'ESP8266_DREG'
#define CHIPID ESP8266_DREG(0x58)
^
/home/user/Arduino/libraries/SparkFun_Si4703_Arduino_Library-master/src/SparkFunSi4703.h:82:25: note: in expansion of macro 'CHIPID'
static const uint16_t CHIPID = 0x01;
^
exit status 1
Error compiling for board SparkFun ESP8266 Thing.
Any guidance would be most welcome.
By lynnroth
#194819
I ran into the same issue.
There is a collision in some naming
Check out the line in the SparkFunSi4703.h file

Look for this ~line 82
static const uint16_t CHIPID = 0x01;

This collides with a define in the esp8266 files.

I don't see anywhere in the code that the CHIPID is used, so I renamed it to CHIPID1 and then it compiles.

Lynn