Arduventure failed to upload

Dear All,

I recently received my Arduboy, which I’m truly happy about,

However, I didn’t manage to install Arduventure on it (other games were fine to install).

I used a Mac with Arduino to upload the game.

I select the correct board and port, I choose arduventure in my Arduino folder and when I try to upload it, like any other games (after switching on and plugin the arduboy) I get this error during the sketch compilation:

Arduino : 1.8.6 (Mac OS X), Carte : “Arduino Leonardo”

In file included from /Users/Martin/Documents/Arduino/ID-46-Arduventure-1.0.1/ARDU_AB/ARDU_AB.ino:21:0:
songs.h:166:1: error: narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:166:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:166:1: error: narrowing conversion of ‘-8’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:166:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:211:1: error: narrowing conversion of ‘-8’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:211:1: error: narrowing conversion of ‘-7’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:211:1: error: narrowing conversion of ‘-5’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:274:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:274:1: error: narrowing conversion of ‘-3’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:318:1: error: narrowing conversion of ‘-12’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:318:1: error: narrowing conversion of ‘-7’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:318:1: error: narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:377:1: error: narrowing conversion of ‘-6’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:377:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:377:1: error: narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:469:1: error: narrowing conversion of ‘-6’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:469:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:469:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:469:1: error: narrowing conversion of ‘-4’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:469:1: error: narrowing conversion of ‘-5’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:469:1: error: narrowing conversion of ‘-7’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:469:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:469:1: error: narrowing conversion of ‘-8’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:554:1: error: narrowing conversion of ‘-8’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:554:1: error: narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:554:1: error: narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:554:1: error: narrowing conversion of ‘-4’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:554:1: error: narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:554:1: error: narrowing conversion of ‘-4’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:554:1: error: narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:637:1: error: narrowing conversion of ‘-4’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:637:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:637:1: error: narrowing conversion of ‘-5’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:637:1: error: narrowing conversion of ‘-16’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:637:1: error: narrowing conversion of ‘-4’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
songs.h:727:1: error: narrowing conversion of ‘-6’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
};
^
songs.h:727:1: error: narrowing conversion of ‘-12’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]
exit status 1
narrowing conversion of ‘-2’ from ‘int’ to ‘uint8_t {aka unsigned char}’ inside { } [-Wnarrowing]

Ce rapport pourrait être plus détaillé avec
l’option “Afficher les résultats détaillés de la compilation”
activée dans Fichier -> Préférences.

I’ve downloaded the suggested libraries (including arduboy2) but it still doesn’t work…

Can you help me?

Are you trying to compile with the Arduino IDE or something else?

Normally the Arduino IDE doesn’t treat warnings as errors.

Arduino 1.8.6 for Mac OSX

Can you print out the preferences file for Arduino? Its location is highlighted below on the Arduino Preferences page.

Is it this file?

board=leonardo
build.warn_data_percentage=75
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
editor.antialias=true
editor.auto_close_braces=true
editor.caret.blink=true
editor.code_folding=false
editor.divider.size=0
editor.external=false
editor.font=Monaco,plain,12
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=false
editor.keys.home_and_end_beginning_end_of_doc=false
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.linenumbers=false
editor.save_on_verify=true
editor.tabs.expand=true
editor.tabs.size=2
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=false
export.application.platform=true
export.application.stop=true
export.delete_target_folder=true
gui.scale=auto
last.ide.1.8.6.daterun=1536561539
last.ide.1.8.6.hardwarepath=/Applications/Arduino.app/Contents/Java/hardware
last.screen.height=900
last.screen.width=1440
last.sketch.count=1
last.sketch.default.location=940,228,500,600,456,0
last.sketch.default.path=/Users/Martin/Documents/Arduino/ArduRPG/ARDU_AB/ARDU_AB.ino
last.sketch0.location=940,228,500,600,456,0
last.sketch0.path=/Users/Martin/Documents/Arduino/ArduRPG/ARDU_AB/ARDU_AB.ino
last.sketch1.location=887,233,500,600,456,0
last.sketch1.path=/Users/Martin/Documents/Arduino/ArduRPG/ARDU_AB/ARDU_AB.ino
last.sketch2.location=837,230,500,600,456,0
last.sketch2.path=/Users/Martin/Documents/Arduino/ID-46-Arduventure-1.0.1/ARDU_AB/ARDU_AB.ino
last.sketch3.location=570,226,500,600,456,0
last.sketch3.path=/Users/Martin/Documents/Arduino/Dark-And-Under/Dark-And-Under.ino
platform.auto_file_type_associations=true
preferences.readonly=false
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.,java.net.,java.text.,java.util.,java.util.zip.,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:avrispmkii
recent.sketches=/Users/Martin/Documents/Arduino/Nineteen43/Nineteen43.ino,/Users/Martin/Documents/Arduino/ArduRPG/ARDU_AB/ARDU_AB.ino,/Users/Martin/Documents/Arduino/StarHonor/StarHonor.ino,/Users/Martin/Documents/Arduino/CastleBoy/CastleBoy/CastleBoy.ino,/Users/Martin/Documents/Arduino/ID-46-Arduventure-1.0.1/ARDU_AB/ARDU_AB.ino,/Users/Martin/Documents/Arduino/ID-31-RMH-1.4/RMH_AB/RMH_AB.ino,/Users/Martin/Documents/Arduino/ID-28-Blob-Attack-1.8.1/BLBA_AB/BLBA_AB.ino,/Users/Martin/Documents/Arduino/Dark-And-Under/Dark-And-Under.ino,/Users/Martin/Documents/Arduino/ard-drivin/Ard-Drivin.ino,/Users/Martin/Documents/Arduino/ID-40-VIRUS-LQP-79-1.6/VLQP_AB/VLQP_AB.ino,/Users/Martin/Documents/Arduino/ID-34-Mystic-Balloon-1.7.0/MYBL_AB/MYBL_AB.ino,/Users/Martin/Documents/Arduino/ID-42-Sirene-1.2.2/SRN_AB/SRN_AB.ino
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=true
run.present.stop.color=#cccccc
serial.databits=8
serial.debug_rate=9600
serial.line_ending=1
serial.parity=N
serial.port=/dev/cu.usbmodem1421
serial.port.file=cu.usbmodem1421
serial.port.iserial=(null)
serial.stopbits=1
sketchbook.path=/Users/Martin/Documents/Arduino
software=ARDUINO
target_package=arduino
target_platform=avr
update.check=true
update.id=-7616737137111561577
upload.using=bootloader
upload.verify=true

Confirmed - with ‘Compiler Warnings’ set to ‘Default’ Arduventure will not compile with IDE 1.8.6!

Works when it is set to ‘None’.

Using IDE 1.8.5 it will compile even with the warnings…

Might be due to gcc 5.4.0 being used since the recent IDE release? Not sure why these signed values are being used with uint8_t variables anyway?!

EDIT: Also compiles a little smaller under 1.8.6 (28640 vs. 27834 bytes!)

1 Like

I tried with 1.8.5 and it works! thanks :slight_smile:

ps: in the preferences of 1.8.6, compiler warning was already to none :confused:

…guessed right - known issue:

2 Likes

I updated the github with the song warnings cleaned up as well as a few other warnings fixed. Thank you!

1 Like