Compile Error with mBlock 5


#1

@tech_support

Hello Everyone, I am just getting started with mBot and mBlock and having some success with the line tracking program. Was able to upload and compile. I had even added obstacle avoidance to one program and it seemed to work, but required some tweeking. Unfortunately, when trying to upload/compile, I’m getting errors on all of my programs. I’m checking all connections, settings, retrying, but no luck. Wondering if there was a recent software upgrade that may be causing it… I can also post my programs that worked previously…

HERE’s THE COMPILE ERROR:

start processing code…

processing code by middleware of arduino_formatter

Arduino server connected.

Arduino compile…

variantPath:/app/src/external/arduino/avr-library/variants/standard

avr-toolchain/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/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/" “/root/mblock-avr/temp/build/src/demo.cpp” -o “/root/mblock-avr/temp/build/src/demo.o”

Command failed: avr-toolchain/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/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/" “/root/mblock-avr/temp/build/src/demo.cpp” -o “/root/mblock-avr/temp/build/src/demo.o” sh: 0: getcwd() failed: No such file or directory /bin/sh: 1: avr-toolchain/bin/avr-g++: not found

Failed to compile file src/demo.cpp

Arduino compile finish.

Arduino server disconnected.


#2

hi

Are you using mBlock Web with mLink or mBlock PC / MAC ???


#3

Hi, I have similar compilation error on mBlock (web version on Chrome + mLink on1.4.0 with Mac).
The same error occurs with Web version + mLink on Chromebook, so I guess this is caused on the server side since the code was compiled with no problem a few days ago.

Clicking “Upload” button causes the error below complaining that
offlineBroadcast.cpp is missing. The source code is for the Upload Mode Broadcast extension, but the extension is properly added.

---- Error message —

start processing code…
processing code by middleware of arduino_formatter
Arduino server connected.
Arduino compile…

variantPath:/app/src/external/arduino/avr-library/variants/standard

avr-toolchain/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/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/" “/root/mblock-avr/temp/build/src/OfflineBroadcast.cpp” -o “/root/mblock-avr/temp/build/src/OfflineBroadcast.o”

Command failed: avr-toolchain/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/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/" “/root/mblock-avr/temp/build/src/OfflineBroadcast.cpp” -o “/root/mblock-avr/temp/build/src/OfflineBroadcast.o” sh: 0: getcwd() failed: No such file or directory /bin/sh: 1: avr-toolchain/bin/avr-g++: not found

Failed to compile file src/OfflineBroadcast.cpp
Arduino compile finish.
Arduino server disconnected.


#4

Hello ! I’m using mBlock Web with mLink on Chromebook…I gave up yesterday, but will pickup again, try to reload the software with any updates and try again. -Monique


#5

@tech_support - Right now our mBot is not working at all and all uploads are failing. I keep trying to check connections, replaced batteries, etc. Nothing works now, even with programs that worked previously. I’m trying to get my daughter ready for Math and Science night at her school and we were just in the process of perfecting the Line Tracking with obstacle avoidance. I did keep upgrading the software, but I didn’t think everything would break. Please let me know if you have any solutions. Thanks!


#6


#7

Hello, I have the same kind of problem using online version of mBlock 5 connected to a mBot with mLink. It seems that “avr-g++” is not found. I’ve tried on a ChromeBook and on Windows 10 and booth fails to compile with the same error message:

###############
start processing code…

processing code by middleware of arduino_formatter

Arduino server connected.

Arduino compile…

variantPath:/app/src/external/arduino/avr-library/variants/standard

avr-toolchain/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/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/" “/root/mblock-avr/temp/build/src/demo.cpp” -o “/root/mblock-avr/temp/build/src/demo.o”

Command failed: avr-toolchain/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/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/" “/root/mblock-avr/temp/build/src/demo.cpp” -o “/root/mblock-avr/temp/build/src/demo.o” sh: 0: getcwd() failed: No such file or directory /bin/sh: 1: avr-toolchain/bin/avr-g++: not found

Failed to compile file src/demo.cpp

Arduino compile finish.

Arduino server disconnected.

#################
The mBot program is very simple:
1 - when mBot(mcore) starts up
2 - move forward at power 50 % for 1 secs

Best regards
Hervé


#8

@tech_support - I’m wondering if this has to do with a recent software upgrade. I thought it would be good to hit the update option frequently to make sure I had the latest software product. However, I’m thinking that one of those updates may have broken my mBot. Perhaps if I go back to an earlier version of the software it will work again? How can we do that ?

-Monique


#9

Hi Monique,

Unable to go back with mBlock Web. However,

I find that the idea of being able to use a previous version would be intellegent.
Makeblock could leave an earlier version so that we can compare.


#10

@Crackel - what do you mean by “Unable to go back with mBlock Web.” ?

Yeah, I’m trying to be patient for them to get back to us. I’m trying to get this in for the Math and Science fair at my daughter’s school. Failure is not an option…

Thanks again !
Monique


#11

@Crackel @Wizicode @edmasec - the good news is that I tried again, was able to do another software update without failing and now my robot seems to be running as good as new again. For some reason, the Ultrasonic sensor part of my program doesn’t seem to be working (line tracker does), so I need to play with it to determine if its some connection issue/sensor issue or I need to fix that part of my program. I will create a new program with just the object avoidance part and see if the ultrasonic sensor works with that. More later…

Thanks for all the suggestions and moral support !

-Monique
@tech_support


#12

Unfortunatelly, for me as yesterday, mBlock 5 online still shows the same compilation error “avr-g++: not found” when I try to upload program to my mBot :frowning:


#13

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


#14

Hi moniquea13, Wizicode

Sorry for the delay. We have tested upload program to mBot with the mBlock5 software, it works!
Hope that the upload issue has been solved already on your side.

As for the ultrasonic sensor issue moniquea13 meet, have you solved it? Feel free to let us know if it hasn’t been solved.