From 6827f9fc55e748a069a44f4e3681c26518e1dbca Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Mon, 7 Apr 2014 13:27:50 +0100
Subject: [PATCH] Add uPy welcome message to UNIX and Windows ports; update
 Teensy port.

Partly addresses issue #154.
---
 teensy/main.c  | 3 ++-
 unix/main.c    | 4 ++++
 windows/main.c | 4 ++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/teensy/main.c b/teensy/main.c
index 139bd8868..bfb7413e7 100644
--- a/teensy/main.c
+++ b/teensy/main.c
@@ -19,6 +19,7 @@
 #include "usb.h"
 #include "gc.h"
 #include "led.h"
+#include "build/py/py-version.h"
 
 #include "Arduino.h"
 
@@ -380,7 +381,7 @@ bool do_file(const char *filename) {
 }
 
 void do_repl(void) {
-    stdout_tx_str("Micro Python for Teensy 3.1\r\n");
+    stdout_tx_str("Micro Python build " MICROPY_GIT_HASH " on " MICROPY_BUILD_DATE "; Teensy 3.1 version\n");
     stdout_tx_str("Type \"help()\" for more information.\r\n");
 
     vstr_t line;
diff --git a/unix/main.c b/unix/main.c
index 3ebd9ab82..1200b7d5d 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -22,6 +22,7 @@
 #include "runtime.h"
 #include "repl.h"
 #include "gc.h"
+#include "build/py/py-version.h"
 
 #if MICROPY_USE_READLINE
 #include <readline/readline.h>
@@ -137,6 +138,9 @@ STATIC char *prompt(char *p) {
 }
 
 STATIC void do_repl(void) {
+    printf("Micro Python build " MICROPY_GIT_HASH " on " MICROPY_BUILD_DATE "; UNIX version\n");
+    printf("Type \"help()\" for more information.\n");
+
     for (;;) {
         char *line = prompt(">>> ");
         if (line == NULL) {
diff --git a/windows/main.c b/windows/main.c
index 98d293161..575572ae3 100644
--- a/windows/main.c
+++ b/windows/main.c
@@ -16,6 +16,7 @@
 #include "runtime0.h"
 #include "runtime.h"
 #include "repl.h"
+#include "build/py/py-version.h"
 
 #if MICROPY_USE_READLINE
 #include <readline/readline.h>
@@ -117,6 +118,9 @@ static char *prompt(char *p) {
 }
 
 static void do_repl(void) {
+    printf("Micro Python build " MICROPY_GIT_HASH " on " MICROPY_BUILD_DATE "; Windows version\n");
+    printf("Type \"help()\" for more information.\n");
+
     for (;;) {
         char *line = prompt(">>> ");
         if (line == NULL) {
-- 
GitLab