mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
bootloader/loader: print version to log
This commit is contained in:
parent
364bcedb04
commit
4f9f351a16
@ -6,6 +6,7 @@
|
|||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include "sdcard.h"
|
#include "sdcard.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define BOOTLOADER_FGCOLOR 0xFFFF
|
#define BOOTLOADER_FGCOLOR 0xFFFF
|
||||||
#define BOOTLOADER_BGCOLOR 0x0000
|
#define BOOTLOADER_BGCOLOR 0x0000
|
||||||
@ -155,7 +156,7 @@ int main(void)
|
|||||||
display_clear();
|
display_clear();
|
||||||
display_backlight(255);
|
display_backlight(255);
|
||||||
|
|
||||||
BOOTLOADER_PRINTLN("TREZOR Bootloader");
|
BOOTLOADER_PRINTLN("TREZOR Bootloader " VERSION_STR);
|
||||||
BOOTLOADER_PRINTLN("=================");
|
BOOTLOADER_PRINTLN("=================");
|
||||||
BOOTLOADER_PRINTLN("starting bootloader");
|
BOOTLOADER_PRINTLN("starting bootloader");
|
||||||
|
|
||||||
|
9
micropython/bootloader/version.h
Normal file
9
micropython/bootloader/version.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#define VERSION_MAJOR 0
|
||||||
|
#define VERSION_MINOR 1
|
||||||
|
#define VERSION_PATCH 0
|
||||||
|
#define VERSION_BUILD 0
|
||||||
|
|
||||||
|
#define STR_HELPER(X) #X
|
||||||
|
#define STRINGIZE(X) STR_HELPER(X)
|
||||||
|
|
||||||
|
#define VERSION_STR STRINGIZE(VERSION_MAJOR) "." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_PATCH) "." STRINGIZE(VERSION_BUILD)
|
@ -2,3 +2,8 @@
|
|||||||
#define VERSION_MINOR 1
|
#define VERSION_MINOR 1
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 0
|
#define VERSION_BUILD 0
|
||||||
|
|
||||||
|
#define STR_HELPER(X) #X
|
||||||
|
#define STRINGIZE(X) STR_HELPER(X)
|
||||||
|
|
||||||
|
#define VERSION_STR STRINGIZE(VERSION_MAJOR) "." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_PATCH) "." STRINGIZE(VERSION_BUILD)
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#define LOADER_FGCOLOR 0xFFFF
|
#define LOADER_FGCOLOR 0xFFFF
|
||||||
#define LOADER_BGCOLOR 0x0000
|
#define LOADER_BGCOLOR 0x0000
|
||||||
@ -102,7 +103,7 @@ int main(void)
|
|||||||
display_clear();
|
display_clear();
|
||||||
display_backlight(255);
|
display_backlight(255);
|
||||||
|
|
||||||
LOADER_PRINTLN("TREZOR Loader");
|
LOADER_PRINTLN("TREZOR Loader " VERSION_STR);
|
||||||
LOADER_PRINTLN("=============");
|
LOADER_PRINTLN("=============");
|
||||||
LOADER_PRINTLN("starting loader");
|
LOADER_PRINTLN("starting loader");
|
||||||
|
|
||||||
|
@ -2,3 +2,8 @@
|
|||||||
#define VERSION_MINOR 1
|
#define VERSION_MINOR 1
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 0
|
#define VERSION_BUILD 0
|
||||||
|
|
||||||
|
#define STR_HELPER(X) #X
|
||||||
|
#define STRINGIZE(X) STR_HELPER(X)
|
||||||
|
|
||||||
|
#define VERSION_STR STRINGIZE(VERSION_MAJOR) "." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_PATCH) "." STRINGIZE(VERSION_BUILD)
|
||||||
|
Loading…
Reference in New Issue
Block a user