Trouble compiling using arduinodroid

I'm trying to compile one of the example sketches included with the Wifinina library. It's the scannetworks example, although these compilation errors happen when trying to compile any of the examples included with the library.
Also, thise project example compiles just fine on my pc.

Here are the compilation errors

/sdk/hardware/tools/avr/bin/avr-g++ -no-canonical-prefixes -std=gnu++11 -c -g -Os -w -mmcu=atmega328p -DF_CPU=16000000L -DUSB_VID=null -DUSB_PID=null -DARDUINO=10812 -DIDE="ArduinoDroid" -DARDUINO_ARCH_AVR -DARDUINO_AVR_NANO /WiFiNINA/src/WiFi.cpp -o /librariesBuild/WiFiNINA/WiFi.cpp.o In file included from /WiFiNINA/src/WiFi.cpp:21:0:
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::readFile(const char*, uint8_t, uint32_t, uint8_t*, uint32_t)':
/WiFiNINA/src/utility/wifi_drv.h:303:30: error: 'READ_FILE' was not declared in this scope
         return fileOperation(READ_FILE, filename, filename_len, offset, buffer, buffer_len);
                              ^
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::writeFile(const char*, uint8_t, uint32_t, uint8_t*, uint32_t)':
/WiFiNINA/src/utility/wifi_drv.h:306:30: error: 'WRITE_FILE' was not declared in this scope
         return fileOperation(WRITE_FILE, filename, filename_len, offset, buffer, buffer_len);
                              ^
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::deleteFile(const char*, uint8_t)':
/WiFiNINA/src/utility/wifi_drv.h:309:30: error: 'DELETE_FILE' was not declared in this scope
         return fileOperation(DELETE_FILE, filename, filename_len, 0, NULL, 0);
                              ^
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::existsFile(const char*, uint8_t, uint32_t*)':
/WiFiNINA/src/utility/wifi_drv.h:313:23: error: 'EXISTS_FILE' was not declared in this scope
         fileOperation(EXISTS_FILE, filename, filename_len, 0, (uint8_t*)&length, sizeof(length));
                       ^
/WiFiNINA/src/WiFi.cpp: In member function 'uint8_t WiFiClass::beginAP(const char*, uint8_t)':
/WiFiNINA/src/WiFi.cpp:128:14: error: 'WL_AP_FAILED' was not declared in this scope
     status = WL_AP_FAILED;
              ^
/WiFiNINA/src/WiFi.cpp: In member function 'uint8_t WiFiClass::beginAP(const char*, const char*, uint8_t)':
/WiFiNINA/src/WiFi.cpp:154:15: error: 'WL_AP_FAILED' was not declared in this scope
      status = WL_AP_FAILED;
               ^
Return code is not 0

All of the errors seem pertain to arduinodroid for some reason not being able to see a bunch of things defined in am enum, which is in the file wifi_spi.h
I'm not sure why, as I've included both the wifinina and wifi_spi libraries using manage libraries.

Any help here will be great appreciated!
Thank you

What board are you compiling for? That very first line defined the NANO constant (-DARDUINO_AVR_NANO) but that is not a supported board.

I’m using the Nano 33 BLE. I selected the Nano in the boards selection but you’re saying it isn’t supported?

1 Like

You have selected the classic Nano, which is a completely different board (apart from the form factor).

Take a look at Getting started with the Arduino NANO 33 BLE.

1 Like

I see, so my Nano 33 BLE is not supported by ArduinoDroid. But this shouldn't have anything to do with this code not compiling, as this isn't a board specific issue. Even when I plug in my Duemilanove, I get the exact same compilation errors. Actually I get these same error, even when I have nothing plugged in at all, and just hit verify without upload.
Any other ideas as to how to solve these?
I really appreciate your help.

/sdk/hardware/tools/avr/bin/avr-g++ -no-canonical-prefixes -std=gnu++11 -c -g -Os -w -mmcu=atmega168 -DF_CPU=16000000L -DUSB_VID=null -DUSB_PID=null -DARDUINO=10812 -DIDE="ArduinoDroid" -DARDUINO_ARCH_AVR -DARDUINO_AVR_DIECIMILA /WiFiNINA/src/WiFi.cpp -o /librariesBuild/WiFiNINA/WiFi.cpp.o In file included from /WiFiNINA/src/WiFi.cpp:21:0:
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::readFile(const char*, uint8_t, uint32_t, uint8_t*, uint32_t)':
/WiFiNINA/src/utility/wifi_drv.h:303:30: error: 'READ_FILE' was not declared in this scope
         return fileOperation(READ_FILE, filename, filename_len, offset, buffer, buffer_len);
                              ^
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::writeFile(const char*, uint8_t, uint32_t, uint8_t*, uint32_t)':
/WiFiNINA/src/utility/wifi_drv.h:306:30: error: 'WRITE_FILE' was not declared in this scope
         return fileOperation(WRITE_FILE, filename, filename_len, offset, buffer, buffer_len);
                              ^
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::deleteFile(const char*, uint8_t)':
/WiFiNINA/src/utility/wifi_drv.h:309:30: error: 'DELETE_FILE' was not declared in this scope
         return fileOperation(DELETE_FILE, filename, filename_len, 0, NULL, 0);
                              ^
/WiFiNINA/src/utility/wifi_drv.h: In static member function 'static int8_t WiFiDrv::existsFile(const char*, uint8_t, uint32_t*)':
/WiFiNINA/src/utility/wifi_drv.h:313:23: error: 'EXISTS_FILE' was not declared in this scope
         fileOperation(EXISTS_FILE, filename, filename_len, 0, (uint8_t*)&length, sizeof(length));
                       ^
/WiFiNINA/src/WiFi.cpp: In member function 'uint8_t WiFiClass::beginAP(const char*, uint8_t)':
/WiFiNINA/src/WiFi.cpp:128:14: error: 'WL_AP_FAILED' was not declared in this scope
     status = WL_AP_FAILED;
              ^
/WiFiNINA/src/WiFi.cpp: In member function 'uint8_t WiFiClass::beginAP(const char*, const char*, uint8_t)':
/WiFiNINA/src/WiFi.cpp:154:15: error: 'WL_AP_FAILED' was not declared in this scope
      status = WL_AP_FAILED;
               ^
Return code is not 0

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.