I'm trying to compile this project and it worked great before updating to 1.8.8. I also got reports of it compiling just fine on 1.8.9.
Anyone know if there was some breaking changes introduced in 1.8.8?
My errors is:
Arduino:1.8.8 (Mac OS X), Kort:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Enabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
WARNING: Category 'LED' in library CHT16K33 LED Matrix Library is not valid. Setting to 'Uncategorized'
WARNING: Category 'Input' in library MechInputs is not valid. Setting to 'Uncategorized'
EspSparsnasGateway:361:17: error: 'uint32_t' was not declared in this scope
bool initialize(uint32_t frequency) {
^
EspSparsnasGateway:628:14: error: variable or field 'setMode' declared void
void setMode(uint8_t newMode) {
^
EspSparsnasGateway:628:14: error: 'uint8_t' was not declared in this scope
RFM69functions:1:1: error: 'uint32_t' does not name a type
uint32_t getFrequency() {
^
RFM69functions:16:1: error: 'uint8_t' does not name a type
uint8_t readReg(uint8_t addr) {
^
RFM69functions:24:15: error: variable or field 'writeReg' declared void
void writeReg(uint8_t addr, uint8_t value) {
^
RFM69functions:24:15: error: 'uint8_t' was not declared in this scope
RFM69functions:24:29: error: 'uint8_t' was not declared in this scope
void writeReg(uint8_t addr, uint8_t value) {
^
Entire error is here: Arduino:1.8.8 (Mac OS X), Kort:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Ena - Pastebin.com
Try adding #include <stdint.h>
.
pert
January 21, 2019, 9:13am
3
You can find my explanation of the problem and suggestions for fixing it here:
opened 07:06PM - 06 Jan 19 UTC
closed 11:52AM - 23 Jan 19 UTC
I get error messages like this:
```
EspSparsnasGateway:349:17: error: 'uint3… 2_t' was not declared in this scope
bool initialize(uint32_t frequency) {
^
EspSparsnasGateway:604:14: error: variable or field 'setMode' declared void
void setMode(uint8_t newMode) {
^
EspSparsnasGateway:604:14: error: 'uint8_t' was not declared in this scope
RFM69functions:1:1: error: 'uint32_t' does not name a type
uint32_t getFrequency() {
^
RFM69functions:16:1: error: 'uint8_t' does not name a type
uint8_t readReg(uint8_t addr) {
^
RFM69functions:24:15: error: variable or field 'writeReg' declared void
void writeReg(uint8_t addr, uint8_t value) {
^
RFM69functions:24:15: error: 'uint8_t' was not declared in this scope
RFM69functions:24:29: error: 'uint8_t' was not declared in this scope
void writeReg(uint8_t addr, uint8_t value) {
^
RFM69functions:82:1: error: 'uint16_t' does not name a type
uint16_t crc16(volatile uint8_t *data, size_t n) {
^
callback:2:28: error: 'byte' has not been declared
void callback(char* topic, byte* payload, unsigned int length) {
^
EspSparsnasGateway:109:6: error: previous declaration of 'void setup()' with 'C++' linkage
void setup() {
^
In file included from /home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino:47:0:
/home/kalle/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/Arduino.h:221:16: error: conflicts with new declaration with 'C' linkage
void setup(void);
^
EspSparsnasGateway:650:6: error: previous declaration of 'void loop()' with 'C++' linkage
void loop() {
^
In file included from /home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino:47:0:
/home/kalle/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/Arduino.h:222:15: error: conflicts with new declaration with 'C' linkage
void loop(void);
^
/home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino: In function 'void setup()':
EspSparsnasGateway:134:30: error: no matching function for call to 'PubSubClient::setCallback(void (&)(char*, int*, unsigned int))'
client.setCallback(callback); // What to do when a Mqtt message arrives
^
/home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino:134:30: note: candidate is:
In file included from /home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino:71:0:
/home/kalle/code/Arduino/libraries/PubSubClient/src/PubSubClient.h:121:18: note: PubSubClient& PubSubClient::setCallback(std::function<void(char*, unsigned char*, unsigned int)>)
PubSubClient& setCallback(MQTT_CALLBACK_SIGNATURE);
^
/home/kalle/code/Arduino/libraries/PubSubClient/src/PubSubClient.h:121:18: note: no known conversion for argument 1 from 'void(char*, int*, unsigned int)' to 'std::function<void(char*, unsigned char*, unsigned int)>'
EspSparsnasGateway:319:24: error: 'initialize' cannot be used as a function
if (!initialize(ifreq)) {
^
EspSparsnasGateway:340:57: error: 'getFrequency' was not declared in this scope
String temp = "Listening on " + String(getFrequency()) + "hz. Done in setup.";
^
/home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino: In function 'bool initialize(uint32_t)':
EspSparsnasGateway:349:35: error: 'bool initialize(uint32_t)' redeclared as different kind of symbol
bool initialize(uint32_t frequency) {
^
EspSparsnasGateway:349:6: error: previous declaration of 'bool initialize'
bool initialize(uint32_t frequency) {
^
EspSparsnasGateway:397:34: error: 'writeReg' was not declared in this scope
writeReg(REG_SYNCVALUE1, 0xAA);
^
EspSparsnasGateway:399:34: error: 'readReg' was not declared in this scope
} while (readReg(REG_SYNCVALUE1) != 0xaa && millis() - start < timeout);
^
EspSparsnasGateway:402:34: error: 'writeReg' was not declared in this scope
writeReg(REG_SYNCVALUE1, 0x55);
^
EspSparsnasGateway:407:40: error: 'writeReg' was not declared in this scope
writeReg(CONFIG[i][0], CONFIG[i][1]);
^
EspSparsnasGateway:411:28: error: 'setMode' was not declared in this scope
setMode(RF69_MODE_STANDBY);
^
/home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino: In function 'void interruptHandler()':
EspSparsnasGateway:458:54: error: 'readReg' was not declared in this scope
if (_mode == RF69_MODE_RX && (readReg(REG_IRQFLAGS2) & RF_IRQFLAGS2_PAYLOADREADY)) {
^
EspSparsnasGateway:466:30: error: 'setMode' was not declared in this scope
setMode(RF69_MODE_STANDBY);
^
EspSparsnasGateway:479:38: error: 'crc16' was not declared in this scope
uint16_t crc = crc16(TEMPDATA, 18);
^
/home/kalle/code/Arduino/EspSparsnasGateway/EspSparsnasGateway.ino: In function 'void setMode(uint8_t)':
EspSparsnasGateway:613:35: error: 'readReg' was not declared in this scope
uint8_t val = readReg(REG_OPMODE);
^
EspSparsnasGateway:616:64: error: 'writeReg' was not declared in this scope
writeReg(REG_OPMODE, (val & 0xE3) | RF_OPMODE_TRANSMITTER);
^
/home/kalle/code/Arduino/EspSparsnasGateway/RFM69functions.ino: In function 'uint32_t getFrequency()':
RFM69functions:2:53: error: 'readReg' was not declared in this scope
return RF69_FSTEP * (((uint32_t)readReg(REG_FRFMSB) << 16) + ((uint16_t)readReg(REG_FRFMID) << 8) + readReg(REG_FRFLSB));
^
/home/kalle/code/Arduino/EspSparsnasGateway/RFM69functions.ino: In function 'void receiveBegin()':
RFM69functions:7:28: error: 'readReg' was not declared in this scope
if (readReg(REG_IRQFLAGS2) & RF_IRQFLAGS2_PAYLOADREADY) {
^
RFM69functions:10:68: error: 'writeReg' was not declared in this scope
writeReg(REG_PACKETCONFIG2, (val & 0xFB) | RF_PACKET2_RXRESTART);
```
I had to downgrade to Arduino IDE 1.6.13
PieterP:
Try adding #include <stdint.h>
.
Nope, didn't do any difference!
pert:
You can find my explanation of the problem and suggestions for fixing it here:
Compilation errors with Arduino IDE 1.8.8 · Issue #24 · bphermansson/EspSparsnasGateway · GitHub
Sweet, I'll just continue on that issue instead of here!
for everyone else that might run into the same problem, move all #include
to the top of the file!