diff options
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | cf-code/cf-fsi-fw.S | 5 | ||||
-rw-r--r-- | cf-code/cf-fsi-romulus.h | 1 | ||||
-rw-r--r-- | cf-code/cf-fsi-witherspoon.h | 2 | ||||
-rw-r--r-- | cf-fsi-fw.h | 8 |
5 files changed, 22 insertions, 1 deletions
@@ -1,6 +1,9 @@ # Main debug switch DEBUG ?= 0 +# FW version +FW_VERSION = 1 + # ARM compiler for userspace test code CROSS_COMPILE ?= arm-linux- CC = $(CROSS_COMPILE)gcc @@ -12,8 +15,10 @@ M68KAS=$(M68KCROSS)as M68KLD=$(M68KCROSS)ld M68KOC=$(M68KCROSS)objcopy +M68KCPPFLAGS = -DFW_VERSION=$(FW_VERSION) + ifeq ($(DEBUG),1) -M68KCPPFLAGS = -DENABLE_TRACE +M68KCPPFLAGS += -DENABLE_TRACE endif M68KAFLAGS = -march=isac M68KLDFLAGS = -Ttext 0 diff --git a/cf-code/cf-fsi-fw.S b/cf-code/cf-fsi-fw.S index 67368f9..a68ce68 100644 --- a/cf-code/cf-fsi-fw.S +++ b/cf-code/cf-fsi-fw.S @@ -195,6 +195,11 @@ _start: /* Configure GPIOs to output */ bsr config_gpio_out + /* Populate version & signature */ + move.w #SYS_SIG,%a1@(SYS_SIG_REG) + move.b #FW_VERSION,%a1@(FW_VERS_REG) + move.b #API_VERSION,%a1@(API_VERS_REG) + /* * Main command loop */ diff --git a/cf-code/cf-fsi-romulus.h b/cf-code/cf-fsi-romulus.h index 3edcb54..fc534b4 100644 --- a/cf-code/cf-fsi-romulus.h +++ b/cf-code/cf-fsi-romulus.h @@ -5,3 +5,4 @@ #define TRANS_GPIO_REG 0x080 #define TRANS_GPIO_BIT 10 +#define SYS_SIG 0x526d /* 'Rm' */ diff --git a/cf-code/cf-fsi-witherspoon.h b/cf-code/cf-fsi-witherspoon.h index aa435fb..c5b4084 100644 --- a/cf-code/cf-fsi-witherspoon.h +++ b/cf-code/cf-fsi-witherspoon.h @@ -4,3 +4,5 @@ #define DATA_GPIO_BIT 0 #define TRANS_GPIO_REG 0x080 #define TRANS_GPIO_BIT 10 + +#define SYS_SIG 0x5773 /* 'Ws' */ diff --git a/cf-fsi-fw.h b/cf-fsi-fw.h index 2d0e2ed..44bd8cc 100644 --- a/cf-fsi-fw.h +++ b/cf-fsi-fw.h @@ -54,6 +54,14 @@ #define ECHO_DLY_REG 0x08 #define SEND_DLY_REG 0x09 +/* Signature & version */ +#define SYS_SIG_REG 0x0c /* 2 bytes system signature */ +#define FW_VERS_REG 0x0e +#define API_VERS_REG 0x0f + +/* Current API version */ +#define API_VERSION 1 + /* Command data area * * Last byte of message must be left aligned |