|
@@ -56,7 +56,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -168,6 +168,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
|
@@ -224,7 +225,7 @@ while getopts b:c:d:g:h:i:j:l:m:n:o:p:v:x:y:?h flag
|
|
|
|
|
|
if [ "$help_flag" == "1" ] ; then
|
|
|
echo "***************************************"
|
|
|
-echo "* PF-build.sh Version: 2.0.1-Build_66 *"
|
|
|
+echo "* PF-build.sh Version: 2.0.1-Build_67 *"
|
|
|
echo "***************************************"
|
|
|
echo "Arguments:"
|
|
|
echo "$(tput setaf 2)-b$(tput sgr0) Build/commit number"
|
|
@@ -258,7 +259,7 @@ echo " -n : '$(tput setaf 2)0$(tput sgr0)' no, '$(tput setaf 2)1$(tput sgr0)' y
|
|
|
echo " -o : '$(tput setaf 2)1$(tput sgr0)' force or '$(tput setaf 2)0$(tput sgr0)' block output and delays"
|
|
|
echo " -p : '$(tput setaf 2)0$(tput sgr0)' no, '$(tput setaf 2)1$(tput sgr0)' yes"
|
|
|
echo " -v : '$(tput setaf 2)All$(tput sgr0)' or variant file name"
|
|
|
-echo " -x : '$(tput setaf 2)8$(tput sgr0)' or '$(tput setaf 2)64$(tput sgr0)' Kb."
|
|
|
+echo " -x : '$(tput setaf 2)8$(tput sgr0)','$(tput setaf 2)16$(tput sgr0)'or'$(tput setaf 2)32$(tput sgr0)' Kb."
|
|
|
echo " -y : '$(tput setaf 2)256$(tput sgr0)','$(tput setaf 2)384$(tput sgr0)','$(tput setaf 2)512$(tput sgr0)','$(tput setaf 2)1024$(tput sgr0)''$(tput setaf 2)32M$(tput sgr0)'"
|
|
|
echo
|
|
|
echo "Example:"
|
|
@@ -334,12 +335,8 @@ if [ ! -z "$board_mem_flag" ] ; then
|
|
|
BOARD_MEM="0x7DFF"
|
|
|
echo "Board mem size : $board_mem_flag Kb, $BOARD_MEM (hex)"
|
|
|
OUTPUT_FILENAME_SUFFIX="${OUTPUT_FILENAME_SUFFIX}_RAM-$board_mem_flag"
|
|
|
- elif [ "$board_mem_flag" == "64" ] ; then
|
|
|
- BOARD_MEM="0xFFFF"
|
|
|
- echo "Board mem size : $board_mem_flag Kb, $BOARD_MEM (hex)"
|
|
|
- OUTPUT_FILENAME_SUFFIX="${OUTPUT_FILENAME_SUFFIX}_RAM-$board_mem_flag"
|
|
|
else
|
|
|
- echo "Unsupported board mem size chosen. Only '8', '64' are allowed."
|
|
|
+ echo "Unsupported board mem size chosen. Only '8', '16' and '32' are allowed."
|
|
|
failures 5
|
|
|
fi
|
|
|
fi
|
|
@@ -1185,7 +1182,7 @@ compile_en_firmware()
|
|
|
|
|
|
CURRENT_BOARD_MEM=$(grep "#define RAMEND" $BUILD_ENV_PATH/hardware/tools/avr/avr/include/avr/iom2560.h | sed -e's/.* //g'|cut -d ' ' -f2 |tr -d ' \t\n\r')
|
|
|
if [ $CURRENT_BOARD_MEM != "0x21FF" ] ; then
|
|
|
- echo "Board mem has been already modified or not reset"
|
|
|
+ echo "$(tput setaf 1)Board mem has been modified or not reset$(tput sgr 0)"
|
|
|
echo "Current:" $CURRENT_BOARD_MEM
|
|
|
PS3="Select $(tput setaf 2)Yes$(tput sgr 0) if you want to reset it."
|
|
|
select yn in "Yes" "No"; do
|
|
@@ -1221,7 +1218,7 @@ compile_en_firmware()
|
|
|
CURRENT_BOARD_FLASH=$(grep "#define FLASHEND" $BUILD_ENV_PATH/hardware/tools/avr/avr/include/avr/iom2560.h | sed -e's/.* //g'|cut -d ' ' -f2 |tr -d ' \t\n\r')
|
|
|
CURRENT_BOARD_maximum_size=$(grep "prusa_einsy_rambo.upload.maximum_size" $BUILD_ENV_PATH/portable/packages/$BOARD_PACKAGE_NAME/hardware/avr/$BOARD_VERSION/boards.txt |cut -d '=' -f2|tr -d ' \t\n\r')
|
|
|
if [[ $CURRENT_BOARD_FLASH != "0x3FFFF" || $CURRENT_BOARD_maximum_size != "253952" ]] ; then
|
|
|
- echo "$(tput setaf 3)Board flash has been already modified or not reset$(tput sgr 0)"
|
|
|
+ echo "$(tput setaf 1)Board flash has been modified or not reset$(tput sgr 0)"
|
|
|
echo "Current flash size:" $CURRENT_BOARD_FLASH
|
|
|
echo "Current max. size:" $CURRENT_BOARD_maximum_size
|
|
|
PS3="Select $(tput setaf 2)Yes$(tput sgr 0) if you want to reset it."
|
|
@@ -1242,11 +1239,11 @@ compile_en_firmware()
|
|
|
esac
|
|
|
done
|
|
|
else
|
|
|
- BOARD_FLASH_MODIFIED=0
|
|
|
+ BOARD_FLASH_MODIFIED=1
|
|
|
fi
|
|
|
|
|
|
if [[ ! -z $BOARD_FLASH && "$BOARD_FLASH" != "0x3FFFF" ]] ; then
|
|
|
- echo "Modifying board flash size (hex):"
|
|
|
+ echo "$(tput setaf 3)Modifying board flash size (hex):$(tput sgr 0)"
|
|
|
echo "Old flash size:" $CURRENT_BOARD_FLASH
|
|
|
echo "New flash size:" $BOARD_FLASH
|
|
|
echo "Old max. size:" $CURRENT_BOARD_maximum_size
|