Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when compiling StandardFirmataWiFi for MKR WiFi 1010 board #457

Open
fredbouchard opened this issue Jul 11, 2020 · 3 comments
Open
Labels

Comments

@fredbouchard
Copy link

fredbouchard commented Jul 11, 2020

Version

Firmata: latest from master
Arduino IDE: 1.8.13
Board: Arduino MKRWIFI1010 board
OS version: macOS Catalina 10.15.4

What am I trying to achieve?

I'm trying to compile the StandardFirmataWiFi.inoor the StandardFirmata.ino with the MKR 1010 board.

Issue

When compiling I'm getting the following error.

/Users/{Redacted}/Documents/Arduino/libraries/Firmata/utility/SerialFirmata.cpp: In member function 'void SerialFirmata::checkSerial()':
/Users/{Redacted}/Documents/Arduino/libraries/Firmata/utility/SerialFirmata.cpp:364:56: error: 'SERIAL_RX_BUFFER_SIZE' was not declared in this scope
           if (!((bytesToRead <= 0 && bytesAvailable >= SERIAL_RX_BUFFER_SIZE/2)
                                                        ^~~~~~~~~~~~~~~~~~~~~
/Users/{Redacted}/Documents/Arduino/libraries/Firmata/utility/SerialFirmata.cpp:364:56: note: suggested alternative: 'SERIAL_BUFFER_SIZE'
           if (!((bytesToRead <= 0 && bytesAvailable >= SERIAL_RX_BUFFER_SIZE/2)
                                                        ^~~~~~~~~~~~~~~~~~~~~
                                                        SERIAL_BUFFER_SIZE
@soundanalogous
Copy link
Member

Fixed. Thanks for the report!

@soundanalogous
Copy link
Member

soundanalogous commented Jul 12, 2020

Actually my fix is only temporary. If FIRMATA_SERIAL_RX_DELAY is uncommented, the issue will still occur. The real problem is that UART_TX_FIFO_SIZE does not appear to be defined for Arduino M0 board packages, so SERIAL_RX_BUFFER_SIZE never gets defined, leading to the compile time issue pointed out here. I'll look to @jnsbyr to provide a proper fix. This may also be an issue for other architectures supported by Firmata. I've only tested for M0 and AVR so far. There was no issue with AVR boards.

@jnsbyr
Copy link
Contributor

jnsbyr commented Jul 12, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants