Compiling example on Arduino VIDOR 4000 fails
Closed this issue · 6 comments
thanks for providing a new binary for the VIDOR.
I tried to compile the example "Replay_Boot"
this is what I get
Library replay_mkrvidor4000 has been declared precompiled: Using precompiled library in /Users/bluemax/Documents/Arduino/libraries/replay_mkrvidor4000/src/cortex-m0plus /Users/bluemax/Documents/Arduino/libraries/replay_mkrvidor4000/src/cortex-m0plus/libreplay.a(vidor.o): In function 'vidor_SPI_beginTransaction(unsigned char)': (.text._ZL26vidor_SPI_beginTransactionh+0x16): undefined reference to 'SPIClass::beginTransaction(SPISettings)' /Users/bluemax/Documents/Arduino/libraries/replay_mkrvidor4000/src/cortex-m0plus/libreplay.a(vidor.o): In function 'vidor_SPI_endTransaction(unsigned char)': (.text._ZL24vidor_SPI_endTransactionh+0x16): undefined reference to 'SPIClass::endTransaction()' /Users/bluemax/Documents/Arduino/libraries/replay_mkrvidor4000/src/cortex-m0plus/libreplay.a(vidor.o): In function 'SPI_Init': (.text.SPI_Init+0x44): undefined reference to 'SPIClass::begin()' /Users/bluemax/Documents/Arduino/libraries/replay_mkrvidor4000/src/cortex-m0plus/libreplay.a(vidor.o): In function 'rSPI': (.text.rSPI+0x6): undefined reference to 'SPIClass::transfer(unsigned char)' /Users/bluemax/Documents/Arduino/libraries/replay_mkrvidor4000/src/cortex-m0plus/libreplay.a(vidor.o): In function 'JTAG_Init': (.text.JTAG_Init+0x4a): undefined reference to 'SPIClass::begin()' (.text.JTAG_Init+0x54): undefined reference to 'SPIClass::beginTransaction(SPISettings)' /Users/bluemax/Documents/Arduino/libraries/replay_mkrvidor4000/src/cortex-m0plus/libreplay.a(vidor.o): In function 'FPGA_WriteBitstream': (.text.FPGA_WriteBitstream+0x58): undefined reference to 'SPIClass::transfer(unsigned char)' collect2: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino MKR Vidor 4000.
any clue?
we'll have a look. Ping me for an invite to the slack group for direct chat btw, but good to have some public discussion here as well.
@mbanzi my quick guess (without looking) is that it's somehow not including the Arduino SPI library when linking.. but why that is I'm not entirely sure atm..
@mbanzi I believe that #include "SPI.h"
in Replay_Boot.ino should trigger the IDE to include the SPI code.. but maybe there is something I'm missing here (or don't remember correctly)
@mbanzi Turns out there is a compatibility issue in relation to the Arduino-SAMD release 1.8.11.
The workaround is to downgrade the Arduino SAMD (32-bits ARM Cortex-M0+)
board to version 1.8.9, under Tools -> Boards -> Board Manager
.
I'll have a look to see if we can just upgrade our CI script for the Vidor build of the Replay firmware.
Technical details :
This change removes the SPIClass
type in favor of SPIClassSAMD
and uses a #define
to allow code to continue to use SPIClass
. But pre-compiling a library against the old code will no longer work as the type actually doesn't exist anymore.
thanks for diagnosing the problem so quickly, I'll test it today