I try to make my own block with extension builder for sd card.
With my blocks, mblock IDE don’t compile.
This is the message.
start processing code…
processing code by middleware of pinMode
avr-toolchain\bin\avr-g++ -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"C:\Users\Public\Programs\mblock\resources\app\mlink-v1\external\arduino\avr-library\variants\standard" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src" -I"arduino-libraries/makeblock/src/utility/avr" -I"avr-library/libraries/Wire/src/utility" -I"avr-library/libraries/Wire/src/" -I"avr-library/libraries/EEPROM/src/" -I"avr-library/libraries/SPI/src/" -I"avr-library/libraries/SoftwareSerial/src/" -I"arduino-libraries/arduino/WiFi/src/" -I"arduino-libraries/arduino/SD/src/" -I"arduino-libraries/arduino/Bridge/src/" -I"arduino-libraries/arduino/Temboo/src/" -I"arduino-libraries/arduino/Servo/src/" -I"arduino-libraries/arduino/Ethernet/src/" -I"arduino-libraries/arduino/TFT/src/" -I"arduino-libraries/arduino/SpacebrewYun/src/" -I"arduino-libraries/arduino/LiquidCrystal/src/" -I"arduino-libraries/arduino/GSM/src/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/utility/" -I"arduino-libraries/arduino/Esplora/src/" -I"arduino-libraries/arduino/Firmata/" -I"arduino-libraries/arduino/Firmata/utility/" -I"arduino-libraries/arduino/Keyboard/src/" -I"arduino-libraries/arduino/Mouse/src/" -I"arduino-libraries/arduino/Robot_Control/src/" -I"arduino-libraries/arduino/Robot_Motor/src/" -I"arduino-libraries/arduino/RobotIRremote/src/" -I"arduino-libraries/arduino/Stepper/src/" “C:\Users\user\mblock-avr\temp\build\code.cpp” -o “C:\Users\user\mblock-avr\temp\build\code.o”
avr-toolchain\bin\avr-gcc -w -Os -Wl,–gc-sections -mmcu=atmega328p -o “C:\Users\user\mblock-avr\temp\build\out.elf” “C:\Users\user\mblock-avr\temp\build\code.o” “C:\Users\Public\Programs\mblock\resources\app\mlink-v1\external\arduino\mbot\libmbot.a” -lm
Command failed: avr-toolchain\bin\avr-gcc -w -Os -Wl,–gc-sections -mmcu=atmega328p -o “C:\Users\user\mblock-avr\temp\build\out.elf” “C:\Users\user\mblock-avr\temp\build\code.o” “C:\Users\Public\Programs\mblock\resources\app\mlink-v1\external\arduino\mbot\libmbot.a” -lm C:\Users\Public\Programs\mblock\resources\app\mlink-v1\external\arduino\mbot\libmbot.a(Sd2Card.o): In function SPIClass::endTransaction() [clone .part.3]': Sd2Card.cpp:(.text._ZN8SPIClass14endTransactionEv.part.3+0x6): undefined reference to
SPIClass::interruptMode’ Sd2Card.cpp:(.text._ZN8SPIClass14endTransactionEv.part.3+0xa): undefined reference to SPIClass::interruptSave' C:\Users\Public\Programs\mblock\resources\app\mlink-v1\external\arduino\mbot\libmbot.a(Sd2Card.o): In function
SPIClass::beginTransaction(SPISettings)’: Sd2Card.cpp:(.text._ZN8SPIClass16beginTransactionE11SPISettings[SPIClass::beginTransaction(SPISettings)]+0x2): undefined reference to SPIClass::interruptMode' Sd2Card.cpp:(.text._ZN8SPIClass16beginTransactionE11SPISettings[SPIClass::beginTransaction(SPISettings)]+0xe): undefined reference to
SPIClass::interruptMode’ Sd2Card.cpp:(.text._ZN8SPIClass16beginTransactionE11SPISettings[SPIClass::beginTransaction(SPISettings)]+0x18): undefined reference to SPIClass::interruptSave' Sd2Card.cpp:(.text._ZN8SPIClass16beginTransactionE11SPISettings[SPIClass::beginTransaction(SPISettings)]+0x1e): undefined reference to
SPIClass::interruptMask’ Sd2Card.cpp:(.text._ZN8SPIClass16beginTransactionE11SPISettings[SPIClass::beginTransaction(SPISettings)]+0x30): undefined reference to SPIClass::interruptSave' C:\Users\Public\Programs\mblock\resources\app\mlink-v1\external\arduino\mbot\libmbot.a(Sd2Card.o): In function
Sd2Card::chipSelectHigh()’: Sd2Card.cpp:(.text._ZN7Sd2Card14chipSelectHighEv+0x18): undefined reference to SPIClass::interruptMode' C:\Users\Public\Programs\mblock\resources\app\mlink-v1\external\arduino\mbot\libmbot.a(Sd2Card.o): In function
Sd2Card::init(unsigned char, unsigned char)’: Sd2Card.cpp:(.text._ZN7Sd2Card4initEhh+0x38): undefined reference to SPIClass::begin()' Sd2Card.cpp:(.text._ZN7Sd2Card4initEhh+0x64): undefined reference to
SPIClass::interruptMode’ collect2.exe: error: ld returned 1 exit status
arduino build failed.
I don’t understand, because with same sketch, written on mblock, Arduino IDE works.
Help me, Please.