diff --git a/.gitignore b/.gitignore index 2658902f..3ba8f464 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,17 @@ Firmware/Doc /html /latex /Doxyfile +/lang/*.bin +/lang/*.hex +/lang/*.dat +/lang/*.tmp +/lang/*.out +/lang/not_tran.txt +/lang/not_used.txt +/lang/progmem1.chr +/lang/progmem1.lss +/lang/progmem1.txt +/lang/progmem1.var +/lang/text.sym +/lang/textaddr.txt +/build-env/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..43b49d04 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +dist: trusty +script: + - bash -x build.sh diff --git a/Firmware/config.h b/Firmware/config.h index 64cf1468..7c4341dc 100644 --- a/Firmware/config.h +++ b/Firmware/config.h @@ -43,8 +43,8 @@ #define W25X20CL_SPSR SPI_SPSR(W25X20CL_SPI_RATE) //LANG - Multi-language support -#define LANG_MODE 0 // primary language only -//#define LANG_MODE 1 // sec. language support +//#define LANG_MODE 0 // primary language only +#define LANG_MODE 1 // sec. language support #define LANG_SIZE_RESERVED 0x2f00 // reserved space for secondary language (12032 bytes) diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..45bb9a93 --- /dev/null +++ b/build.sh @@ -0,0 +1,40 @@ +#!/bin/bash +BUILD_ENV="1.0.1" +SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )" + +if [ ! -d "build-env" ]; then + mkdir build-env || exit 1 +fi +cd build-env || exit 2 + +if [ ! -f "PF-build-env-Linux64-$BUILD_ENV.zip" ]; then + wget https://github.com/mkbel/PF-build-env/releases/download/$BUILD_ENV/PF-build-env-Linux64-$BUILD_ENV.zip || exit 3 +fi + +if [ ! -d "../../PF-build-env-$BUILD_ENV" ]; then + unzip PF-build-env-Linux64-$BUILD_ENV.zip -d ../../PF-build-env-$BUILD_ENV || exit 4 +fi + +cd ../../PF-build-env-$BUILD_ENV || exit 5 +BUILD_ENV_PATH="$( pwd -P )" + +cd .. + +if [ ! -d "Prusa-Firmware-build" ]; then + mkdir Prusa-Firmware-build || exit 6 +fi + +cd Prusa-Firmware-build || exit 7 +BUILD_PATH="$( pwd -P )" + +if [ ! -f "$SCRIPT_PATH/Firmware/Configuration_prusa.h" ]; then + cp $SCRIPT_PATH/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h $SCRIPT_PATH/Firmware/Configuration_prusa.h || exit 8 +fi + +$BUILD_ENV_PATH/arduino $SCRIPT_PATH/Firmware/Firmware.ino --verify --board rambo:avr:rambo --pref build.path=$BUILD_PATH || exit 9 + +export ARDUINO=$BUILD_ENV_PATH + +cd $SCRIPT_PATH/lang +./lang-build.sh || exit 10 +./fw-build.sh || exit 11 diff --git a/lang/config.sh b/lang/config.sh index a4aae26e..f518693f 100644 --- a/lang/config.sh +++ b/lang/config.sh @@ -5,17 +5,19 @@ # This file is 'included' in all scripts. # # Arduino main folder: -export ARDUINO=C:/arduino-1.8.5 +if [ -z "$ARDUINO" ]; then + export ARDUINO=C:/arduino-1.8.5 +fi # # Arduino builder: -export BUILDER=$ARDUINO/arduino_debug.exe +export BUILDER=$ARDUINO/arduino-builder # # AVR gcc tools: -export OBJCOPY=$ARDUINO/hardware/tools/avr/bin/avr-objcopy.exe -export OBJDUMP=$ARDUINO/hardware/tools/avr/bin/avr-objdump.exe +export OBJCOPY=$ARDUINO/hardware/tools/avr/bin/avr-objcopy +export OBJDUMP=$ARDUINO/hardware/tools/avr/bin/avr-objdump # # Output folder: -export OUTDIR="../../output" +export OUTDIR="../../Prusa-Firmware-build" # # Objects folder: export OBJDIR="$OUTDIR/sketch" diff --git a/lang/fw-build.sh b/lang/fw-build.sh old mode 100644 new mode 100755 diff --git a/lang/lang-build.sh b/lang/lang-build.sh old mode 100644 new mode 100755 diff --git a/lang/progmem.sh b/lang/progmem.sh old mode 100644 new mode 100755 diff --git a/lang/textaddr.sh b/lang/textaddr.sh old mode 100644 new mode 100755 diff --git a/lang/update_lang.sh b/lang/update_lang.sh old mode 100644 new mode 100755