Questions & AnswersCategory: Library and FirmwareDevDuino compilation problem on ArduinoDroid
magneval asked 7 months ago

Hello,

It’s a very good project but I have an issue when compiling on ArduinoDroid on Android.
As soon as I add the folowing include line,

I’ve got this wired error message :
mmcu=atmega32u4 -DF_CPU=16000000L -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -DIDE=”ArduinoDroid” -DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO /storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/bcd.cpp -o /librariesBuild/DevDuino/bcd.cpp.o //sdk/hardware/tools/avr/bin/avr-g++ -std=gnu++11 -c -g -Os -w -mmcu=atmega32u4 -DF_CPU=16000000L -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -DIDE=”ArduinoDroid” -DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO /storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/buzzer.cpp -o /librariesBuild/DevDuino/buzzer.cpp.o //sdk/hardware/tools/avr/bin/avr-g++ -std=gnu++11 -c -g -Os -w -mmcu=atmega32u4 -DF_CPU=16000000L -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=105 -DIDE=”ArduinoDroid” -DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO /storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp -o /librariesBuild/DevDuino/console.cpp.o /storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp: In constructor ‘Console::Console(const Display&, const Font*, bool)’:
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:47:41: error: passing ‘const Display’ as ‘this’ argument of ‘uint8_t Display::getHeight()’ discards qualifiers [-fpermissive]
setTextPosition(0, (display.getHeight() – 1) – this->font->getSize());
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:47:70: error: passing ‘const Font’ as ‘this’ argument of ‘virtual uint8_t Font::getSize()’ discards qualifiers [-fpermissive]
setTextPosition(0, (display.getHeight() – 1) – this->font->getSize());
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp: In member function ‘Console& Console::newLine()’:
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:80:37: error: passing ‘const Font’ as ‘this’ argument of ‘virtual uint8_t Font::getSize()’ discards qualifiers [-fpermissive]
textY -= fontSize * font->getSize() + 1;
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp: In member function ‘Console& Console::flush()’:
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:122:17: error: passing ‘const Display’ as ‘this’ argument of ‘void Display::flush()’ discards qualifiers [-fpermissive]
display.flush();
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp: In member function ‘Console& Console::clear()’:
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:132:17: error: passing ‘const Display’ as ‘this’ argument of ‘void Display::clear()’ discards qualifiers [-fpermioidssive]
display.clear();
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:134:41: error: passing ‘const Display’ as ‘this’ argument of ‘uint8_t Display::getHeight()’ discards qualifiers [-fpermissive]
setTextPosition(0, (display.getHeight() – 1) – this->font->getSize());
^
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:134:70: error: passing ‘const Font’ as ‘this’ argument of ‘virtual uint8_t Font::getSize()’ discards qualifiers [-fpermissive]
setTextPosition(0, (display.getHeight() – 1) – this->font->getSize());
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp: In member function ‘void Console::print(uint8_t, uint8_t)’:
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:148:79: error: passing ‘const Font’ as ‘this’ argument of ‘virtual int8_t Font::getGlyphKerning(uint8_t, uint8_t)’ discards qualifiers [-fpermissive]
int8_t kerning = font->getGlyphKerning(characterCode, previousCharacterCode);
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:149:53: error: passing ‘const Font’ as ‘this’ argument of ‘virtual uint8_t Font::getGlyphWidth(uint8_t)’ discards qualifiers [-fpermissive]
uint8_t width = font->getGlyphWidth(characterCode);
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:153:55: error: passing ‘const Font’ as ‘this’ argument of ‘virtual uint8_t Font::getGlyphHeight(uint8_t)’ discards qualifiers [-fpermissive]
uint8_t height = font->getGlyphHeight(characterCode);
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:156:33: error: passing ‘const Display’ as ‘this’ argument of ‘void Display::verticalScroll(int8_t, bool)’ discards qualifiers [-fpermissive]
display.verticalScroll(textY);
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:160:50: error: passing ‘const Display’ as ‘this’ argument of ‘int8_t Display::getVerticalScroll()’ discards qualifiers [-fpermissive]
uint8_t y = textY + display.getVerticalScroll();
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:161:57: error: passing ‘const Font’ as ‘this’ argument of ‘virtual const uint8_t* Font::getGlyphPixels(uint8_t)’ discards qualifiers [-fpermissive]
display.drawBuffer(font->getGlyphPixels(characterCode), textX + kerning, y, width, height / 8 + 1, false, true);
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:161:114: error: passing ‘const Display’ as ‘this’ argument of ‘void Display::drawBuffer(const uint8_t*, uint8_t, uint8_t, uint8_t, uint8_t, bool, bool)’ discards qualifiers [-fpermissive]
display.drawBuffer(font->getGlyphPixels(characterCode), textX + kerning, y, width, height / 8 + 1, false, true);
^
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp: In member function ‘Console& Console::newLine(uint8_t)’:
/storage/emulated/0/ArduinoDroid/libraries/DevDuino/src/console.cpp:172:52: error: passing ‘const Display’ as ‘this’ argument of ‘uint8_t Display::getWidth()’ discards qualifiers [-fpermissive]
if (textX + fontSize * pixels > display.getWidth()) {
^
Return code is not 0
I’ve install the lybrairy correctly, but I can not compile.
It’s look a bit like the Linux Bug.

1 Answers
Alex Staff answered 7 months ago

Did you try to make it work on Windows?

magneval replied 7 months ago

yes, I can speak french if you prefer !

Alex Staff replied 7 months ago

Did it 100% work on Windows?
I don’t mind speaking English.

magneval replied 7 months ago

Bonjour Alex,
pour la faire claire, j’ai pu compiler et lancer des programmes depuis Windows, sans problème.
Mais je n’ais pas toujours accès a cet OS.
Sous Linux, en utilisant la Librairie corrigée, je n’ai pas de soucis.
Sous ArdiunoDroid, je peux compiler et télécharger des programmes sans soucis, tant que je ne fait pas un #include devduino.h
J’ai l’erreur
Mais si je fait juste un #include console.h je n’ai pas le soucis !