From 34c7d45879e20a0fd5d48c53ddf98f6ed342c1c5 Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Fri, 6 Feb 2015 10:30:43 -0600 Subject: [PATCH 1/5] Hook for Auto-generated Build Version The automatic versioning system extracts a build version number from the SCM system That versioning information is written to the file _Version.h, a file that is NOT preserved in the SCM. If such a file will be present, we include it here to utilize the parameters that are defined therein. --- Marlin/language.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/language.h b/Marlin/language.h index 10ef445d83..690b0b11d0 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -36,6 +36,10 @@ #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) #endif +#ifdef HAS_AUTOMATIC_VERSIONING + #include "_Version.h" +#endif + #define PROTOCOL_VERSION "1.0" #define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin" From a33e20b27d32b816e5fbad9877e6879bfa185cb2 Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Fri, 6 Feb 2015 09:58:04 -0600 Subject: [PATCH 2/5] Adjust per-project .gitignore Refer to http://git-scm.com/docs/gitignore to see why this is appropriate --- .gitignore | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index cd72efb10d..380a028506 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,12 @@ +// Our automatic versioning scheme generates the following file +// NEVER put it in the repository +_Version.h + +// All of the following OS, IDE and compiler generated file +// references should be moved from this file +// They are needed, but they belong in your global .gitignore +// rather than in a per-project file such as this + *.o applet/ *~ From f4599143ebdaf05d12528e1fedaf3e51f413c274 Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Fri, 6 Feb 2015 10:17:17 -0600 Subject: [PATCH 3/5] Allow M115 to better reflect the build --- Marlin/language.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index 690b0b11d0..77c4f36d41 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -41,7 +41,6 @@ #endif #define PROTOCOL_VERSION "1.0" -#define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin" #if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) #undef FIRMWARE_URL @@ -69,13 +68,28 @@ #define MACHINE_NAME "HEPHESTOS" #undef FIRMWARE_URL #define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html" -#else // Default firmware set to Mendel - #define MACHINE_NAME "Mendel" +#else + #ifndef MACHINE_NAME + #define MACHINE_NAME "Mendel" + #endif #endif #ifdef CUSTOM_MENDEL_NAME + #warning 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_MENDEL_NAME + #define MACHINE_NAME CUSTOM_MACHINE_NAME +#endif + +#ifndef FIRMWARE_URL + #define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin" +#endif + +#ifndef BUILD_VERSION + #define BUILD_VERSION "V1; Sprinter/grbl mashup for gen6" #endif #ifndef MACHINE_UUID @@ -126,7 +140,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 V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n" +#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " BUILD_VERSION " FIRMWARE_URL:" FIRMWARE_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)" From ccdaea51babd46fca1351affdaa8168438731fc7 Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Thu, 2 Apr 2015 08:15:55 -0500 Subject: [PATCH 4/5] Add KosselPro --- Marlin/boards.h | 1 + Marlin/language.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Marlin/boards.h b/Marlin/boards.h index a8c980097d..8a60f011d5 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -37,6 +37,7 @@ #define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646) #define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286) #define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make +#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286) #define BOARD_GEN3_PLUS 9 // Gen3+ #define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics #define BOARD_MEGATRONICS 70 // Megatronics diff --git a/Marlin/language.h b/Marlin/language.h index 77c4f36d41..5b7c22f45b 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -68,6 +68,11 @@ #define MACHINE_NAME "HEPHESTOS" #undef FIRMWARE_URL #define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html" +#elif MB(BRAINWAVE_PRO) + #define MACHINE_NAME "Kossel Pro" + #ifndef FIRMWARE_URL + #define FIRMWARE_URL "https://github.com/OpenBeamUSA/Marlin/" + #endif #else #ifndef MACHINE_NAME #define MACHINE_NAME "Mendel" From 8f620de0ff8e0bd07d86bd1937fb77a68b701fa1 Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Wed, 11 Feb 2015 09:00:33 -0600 Subject: [PATCH 5/5] Actually activate Automatic Versioning --- .../Arduino_1.5.x/hardware/marlin/avr/platform.local.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/platform.local.txt diff --git a/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/platform.local.txt b/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/platform.local.txt new file mode 100644 index 0000000000..ff2ad5d22c --- /dev/null +++ b/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/platform.local.txt @@ -0,0 +1 @@ +compiler.cpp.extra_flags=-DHAS_AUTOMATIC_VERSIONING