56
56
# Some may argue that this is only used by a script, BUT as soon someone accidentally or on purpose starts Arduino IDE
57
57
# it will use the default Arduino IDE folders and so can corrupt the build environment.
58
58
#
59
- # Version: 2.0.2-Build_80
59
+ # Version: 2.0.3-Build_89
60
60
# Change log:
61
61
# 12 Jan 2019, 3d-gussner, Fixed "compiler.c.elf.flags=-w -Os -Wl,-u,vfprintf -lprintf_flt -lm -Wl,--gc-sections" in 'platform.txt'
62
62
# 16 Jan 2019, 3d-gussner, Build_2, Added development check to modify 'Configuration.h' to prevent unwanted LCD messages that Firmware is unknown
183
183
# 06 Jul 2022, 3d-gussner, Change to v1.0.8 and Ardunio_boards v1.0.5-2
184
184
# 06 Jul 2022, 3d-gussner, Fix branch check
185
185
# 12 Jul 2022, 3d-gussner, Check if FW_FLAVAVOR and FW_FLAVERSION are correct
186
+ # 29 Sep 2022, 3d-gussner, Rename EN_ONLY to EN_FARM
187
+ # 03 Oct 2022, 3d-gussner, Update to Arduino boards 1.0.6 and remove gawk
188
+ # 17 Dec 2022, wavexx , Check for the coorect pyton version, improve depencies
189
+ # 14 Mar 2023, 3d-gussner, Rename MMU2 to MMU
190
+ # 11 Oct 2023, 3d-gussner, Fix issues with new cmake build, remove devel flag
186
191
187
192
SCRIPT_PATH=" $( cd " $( dirname " $0 " ) " ; pwd -P ) "
188
193
export SRCDIR=$SCRIPT_PATH
@@ -219,7 +224,6 @@ while getopts b:c:d:g:h:i:j:l:m:n:o:p:v:x:y:?h flag
219
224
case " ${flag} " in
220
225
b) build_flag=${OPTARG} ;;
221
226
c) clean_flag=${OPTARG} ;;
222
- d) devel_flag=${OPTARG} ;;
223
227
g) mk404_graphics_flag=${OPTARG} ;;
224
228
h) help_flag=1;;
225
229
i) IDE_flag=${OPTARG} ;;
@@ -245,7 +249,6 @@ echo "***************************************"
245
249
echo " Arguments:"
246
250
echo " $( tput setaf 2) -b$( tput sgr0) Build/commit number"
247
251
echo " $( tput setaf 2) -c$( tput sgr0) Do not clean up lang build"
248
- echo " $( tput setaf 2) -d$( tput sgr0) Devel build"
249
252
echo " $( tput setaf 2) -g$( tput sgr0) Start MK404 graphics"
250
253
echo " $( tput setaf 2) -i$( tput sgr0) Arduino IDE version"
251
254
echo " $( tput setaf 2) -j$( tput sgr0) Arduino IDE verbose output"
@@ -264,7 +267,6 @@ echo " $(tput setaf 2)./PF-build.sh$(tput sgr0) [-b] [-c] [-d] [-g] [-i] [-j] [
264
267
echo
265
268
echo " -b : '$( tput setaf 2) Auto$( tput sgr0) ' needs git or a number"
266
269
echo " -c : '$( tput setaf 2) 0$( tput sgr0) ' clean up, '$( tput setaf 2) 1$( tput sgr0) ' keep"
267
- echo " -d : '$( tput setaf 2) GOLD$( tput sgr0) ', '$( tput setaf 2) RC$( tput sgr0) ', '$( tput setaf 2) BETA$( tput sgr0) ', '$( tput setaf 2) ALPHA$( tput sgr0) ', '$( tput setaf 2) DEBUG$( tput sgr0) ', '$( tput setaf 2) DEVEL$( tput sgr0) ' and '$( tput setaf 2) UNKNOWN$( tput sgr0) '"
268
270
echo " -g : '$( tput setaf 2) 0$( tput sgr0) ' no '$( tput setaf 2) 1$( tput sgr0) ' lite '$( tput setaf 2) 2$( tput sgr0) ' fancy '$( tput setaf 2) 3$( tput sgr0) ' lite with Quad_HR '$( tput setaf 2) 4$( tput sgr0) ' fancy with Quad_HR"
269
271
echo " -i : '$( tput setaf 2) 1.8.5$( tput sgr0) ', '$( tput setaf 2) 1.8.19$( tput sgr0) '"
270
272
echo " -j : '$( tput setaf 2) 0$( tput sgr0) ' no, '$( tput setaf 2) 1$( tput sgr0) ' yes"
@@ -897,18 +899,6 @@ else
897
899
failures 5
898
900
fi
899
901
fi
900
- # Check if DEV_STATUS is selected via argument '-d'
901
- if [ ! -z " $devel_flag " ] ; then
902
- if [[ " $devel_flag " == " GOLD" || " $devel_flag " == " RC" || " $devel_flag " == " BETA" || " $devel_flag " == " ALPHA" || " $devel_flag " == " DEVEL" || " $devel_flag " == " DEBUG" || " $devel_flag " == " UNKNOWN" ]] ; then
903
- DEV_STATUS_SELECTED=$devel_flag
904
- elif [[ " $devel_flag " == " atmega404" || " $devel_flag " == " atmega404_no_bootloader" ]] ; then
905
- MK404_DEBUG=$devel_flag
906
- else
907
- echo " $( tput setaf 1) Development argument is wrong!$( tput sgr0) "
908
- echo " Only $( tput setaf 2) 'GOLD', 'RC', 'BETA', 'ALPHA', 'DEVEL', 'DEBUG' or 'UNKNOWN' $( tput sgr0) are allowed as devel '-d' argument!$( tput sgr0) "
909
- failures 5
910
- fi
911
- fi
912
902
913
903
# Check if Build is selected via argument '-b'
914
904
if [ ! -z " $build_flag " ] ; then
@@ -990,14 +980,14 @@ prepare_code_for_compiling()
990
980
# FW=$(grep --max-count=1 "\bFW_VERSION\b" $SCRIPT_PATH/Firmware/Configuration.h | sed -e's/ */ /g'|cut -d '"' -f2|sed 's/\.//g')
991
981
if [ -z " $BUILD " ] ; then
992
982
# Find build version in Configuration.h file and use it to generate the hex filename
993
- BUILD=$( grep --max-count=1 " \bFW_COMMIT_NR \b" $SCRIPT_PATH /Firmware/Configuration.h | sed -e' s/ */ /g' | cut -d ' ' -f3)
983
+ BUILD=$( grep --max-count=1 " \bFW_COMMITNR \b" $SCRIPT_PATH /Firmware/Configuration.h | sed -e' s/ */ /g' | cut -d ' ' -f3)
994
984
else
995
985
# Find and replace build version in Configuration.h file
996
- BUILD_ORG=$( grep --max-count=1 " \bFW_COMMIT_NR \b" $SCRIPT_PATH /Firmware/Configuration.h | sed -e' s/ */ /g' | cut -d ' ' -f3)
986
+ BUILD_ORG=$( grep --max-count=1 " \bFW_COMMITNR \b" $SCRIPT_PATH /Firmware/Configuration.h | sed -e' s/ */ /g' | cut -d ' ' -f3)
997
987
echo " Original build number: $BUILD_ORG "
998
988
if [ " $BUILD_ORG " != " $BUILD " ]; then
999
989
echo " New build number : $BUILD "
1000
- sed -i -- " s/^#define FW_COMMIT_NR .*/#define FW_COMMIT_NR $BUILD /g" $SCRIPT_PATH /Firmware/Configuration.h
990
+ sed -i -- " s/^#define FW_COMMITNR .*/#define FW_COMMITNR $BUILD /g" $SCRIPT_PATH /Firmware/Configuration.h
1001
991
fi
1002
992
fi
1003
993
# Check if the motherboard is an EINSY and if so only one hex file will generated
@@ -1024,44 +1014,6 @@ prepare_code_for_compiling()
1024
1014
failures 26
1025
1015
fi
1026
1016
fi
1027
- # DEV_CHECK=$(grep --max-count=1 "\bFW_VERSION\b" $SCRIPT_PATH/Firmware/Configuration.h | sed -e's/ */ /g'|cut -d '"' -f2|sed 's/\.//g'|cut -d '-' -f2)
1028
- if [ -z " $DEV_STATUS_SELECTED " ] ; then
1029
- if [[ " $DEV_CHECK " == * " RC" * ]] ; then
1030
- DEV_STATUS=" RC"
1031
- elif [[ " $DEV_CHECK " == * " ALPHA" * ]]; then
1032
- DEV_STATUS=" ALPHA"
1033
- elif [[ " $DEV_CHECK " == * " BETA" * ]]; then
1034
- DEV_STATUS=" BETA"
1035
- elif [[ " $DEV_CHECK " == " DEVEL" ]]; then
1036
- DEV_STATUS=" DEVEL"
1037
- elif [[ " $DEV_CHECK " == " DEBUG" ]]; then
1038
- DEV_STATUS=" DEBUG"
1039
- else
1040
- DEV_STATUS=" UNKNOWN"
1041
- echo
1042
- echo " $( tput setaf 5) DEV_STATUS is UNKNOWN. Do you wish to set DEV_STATUS to GOLD?$( tput sgr0) "
1043
- PS3=" Select YES only if source code is tested and trusted: "
1044
- select yn in " Yes" " No" ; do
1045
- case $yn in
1046
- Yes)
1047
- DEV_STATUS=" GOLD"
1048
- DEV_STATUS_SELECTED=" GOLD"
1049
- break
1050
- ;;
1051
- No)
1052
- DEV_STATUS=" UNKNOWN"
1053
- DEV_STATUS_SELECTED=" UNKNOWN"
1054
- break
1055
- ;;
1056
- * )
1057
- echo " $( tput setaf 1) This is not a valid DEV_STATUS$( tput sgr0) "
1058
- ;;
1059
- esac
1060
- done
1061
- fi
1062
- else
1063
- DEV_STATUS=$DEV_STATUS_SELECTED
1064
- fi
1065
1017
}
1066
1018
# ### End: Prepare code for compiling
1067
1019
@@ -1121,7 +1073,6 @@ list_usefull_data()
1121
1073
echo " Firmware :" $FW
1122
1074
echo " Build # :" $BUILD
1123
1075
echo " Dev Check :" $DEV_CHECK
1124
- echo " DEV Status :" $DEV_STATUS
1125
1076
echo " Motherboard :" $MOTHERBOARD
1126
1077
echo " Board flash :" $BOARD_FLASH
1127
1078
echo " Board mem :" $BOARD_MEM
@@ -1147,9 +1098,6 @@ prepare_variant_for_compiling()
1147
1098
cp -f $SCRIPT_PATH /Firmware/variants/$VARIANT .h $SCRIPT_PATH /Firmware/Configuration_prusa.h || failures 12
1148
1099
fi
1149
1100
1150
- # Prepare Configuration.h to use the correct FW_DEV_VERSION to prevent LCD messages when connecting with OctoPrint
1151
- sed -i -- " s/#define FW_DEV_VERSION FW_VERSION_.*/#define FW_DEV_VERSION FW_VERSION_$DEV_STATUS /g" $SCRIPT_PATH /Firmware/Configuration.h
1152
-
1153
1101
# set FW_REPOSITORY
1154
1102
sed -i -- ' s/#define FW_REPOSITORY "Unknown"/#define FW_REPOSITORY "Prusa3d"/g' $SCRIPT_PATH /Firmware/Configuration.h
1155
1103
@@ -1407,10 +1355,9 @@ cleanup_firmware()
1407
1355
fi
1408
1356
1409
1357
# Restore files to previous state
1410
- sed -i -- " s/^#define FW_DEV_VERSION FW_VERSION_.*/#define FW_DEV_VERSION FW_VERSION_UNKNOWN/g" $SCRIPT_PATH /Firmware/Configuration.h
1411
1358
sed -i -- ' s/^#define FW_REPOSITORY.*/#define FW_REPOSITORY "Unknown"/g' $SCRIPT_PATH /Firmware/Configuration.h
1412
1359
if [ ! -z " $BUILD_ORG " ] ; then
1413
- sed -i -- " s/^#define FW_COMMIT_NR .*/#define FW_COMMIT_NR $BUILD_ORG /g" $SCRIPT_PATH /Firmware/Configuration.h
1360
+ sed -i -- " s/^#define FW_COMMITNR .*/#define FW_COMMITNR $BUILD_ORG /g" $SCRIPT_PATH /Firmware/Configuration.h
1414
1361
fi
1415
1362
echo $MULTI_LANGUAGE_CHECK
1416
1363
# sed -i -- "s/^#define LANG_MODE * /#define LANG_MODE $MULTI_LANGUAGE_CHECK/g" $SCRIPT_PATH/Firmware/config.h
0 commit comments