-
-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Hello togehter,
i use an arduino uno wifi rev2 for a project and i got one error after an other.
I'm developing in the Visual Studio Code IDE with the platformIO plugin. The needed platform für my arduino can be added with the platformIO plugin, the microcontroller is found with the search term "atmega4809".
Because the arduino uno wifi has a different chip than the arduino uno, it needs a spi lib, which is tuned to the architecture of the processor. The needed lib I could copy from the Arduino IDE in my project, this fixed my first error messages and led immediately to the next, which I can not fix.
During compilation the following error messages occur:
In file included from .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:7:0: .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp: In static member function 'static const __FlashStringHelper* MFRC522::GetStatusCodeName(MFRC522::StatusCode)': C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1282:29: note: in expansion of macro 'F' case STATUS_OK: return F("Success."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1283:31: note: in expansion of macro 'F' case STATUS_ERROR: return F("Error in communication."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1284:34: note: in expansion of macro 'F' case STATUS_COLLISION: return F("Collission detected."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1285:32: note: in expansion of macro 'F' case STATUS_TIMEOUT: return F("Timeout in communication."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1286:32: note: in expansion of macro 'F' case STATUS_NO_ROOM: return F("A buffer is not big enough."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1287:38: note: in expansion of macro 'F' case STATUS_INTERNAL_ERROR: return F("Internal error in the code. Should not happen."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1288:32: note: in expansion of macro 'F' case STATUS_INVALID: return F("Invalid argument."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1289:34: note: in expansion of macro 'F' case STATUS_CRC_WRONG: return F("The CRC_A does not match."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1290:35: note: in expansion of macro 'F' case STATUS_MIFARE_NACK: return F("A MIFARE PICC responded with NAK."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1291:23: note: in expansion of macro 'F' default: return F("Unknown error"); ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp: In static member function 'static const __FlashStringHelper* MFRC522::PICC_GetTypeName(MFRC522::PICC_Type)': C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1330:39: note: in expansion of macro 'F' case PICC_TYPE_ISO_14443_4: return F("PICC compliant with ISO/IEC 14443-4"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1331:37: note: in expansion of macro 'F' case PICC_TYPE_ISO_18092: return F("PICC compliant with ISO/IEC 18092 (NFC)"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1332:39: note: in expansion of macro 'F' case PICC_TYPE_MIFARE_MINI: return F("MIFARE Mini, 320 bytes"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1333:37: note: in expansion of macro 'F' case PICC_TYPE_MIFARE_1K: return F("MIFARE 1KB"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1334:37: note: in expansion of macro 'F' case PICC_TYPE_MIFARE_4K: return F("MIFARE 4KB"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1335:37: note: in expansion of macro 'F' case PICC_TYPE_MIFARE_UL: return F("MIFARE Ultralight or Ultralight C"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1336:39: note: in expansion of macro 'F' case PICC_TYPE_MIFARE_PLUS: return F("MIFARE Plus"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1337:41: note: in expansion of macro 'F' case PICC_TYPE_MIFARE_DESFIRE: return F("MIFARE DESFire"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1338:36: note: in expansion of macro 'F' case PICC_TYPE_TNP3XXX: return F("MIFARE TNP3XXX"); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1339:39: note: in expansion of macro 'F' case PICC_TYPE_NOT_COMPLETE: return F("SAK indicates UID is not complete."); ^ C:\Users\phili\.platformio\packages\framework-arduino-megaavr\cores\arduino/Arduino.h:30:20: error: cannot convert 'const char*' to 'const __FlashStringHelper*' in return #define F(str) (str) ^ .pio\libdeps\uno_wifi_rev2\MFRC522_ID63\src\MFRC522.cpp:1341:24: note: in expansion of macro 'F' default: return F("Unknown type"); ^ *** [.pio\build\uno_wifi_rev2\libeb4\MFRC522_ID63\MFRC522.cpp.o] Error 1
The code which is compiled is very simple and I do not think this is a mistake:
`#include <Arduino.h>
#include <SPI.h>
#include <MFRC522.h>
void setup() {
Serial.begin(9600);
SPI.begin();
Serial.println("Hello");
// put your setup code here, to run once:
}
void loop()
{
// put your main code here, to run repeatedly:
}`
I hope someone can help me with the problem, otherwise I have to switch to the Arduino IDE, which would be very unfavorable in the complexity of my project.