Skip to content

Commit b93f89c

Browse files
committed
Add board/firmware versions to OD generator
This patch ensures that the board and firmware versions make it somewhere into the built artefacts. The script itself puts them into the object dictionary at the appropriate locations. The firmware version is pretty easy, it's just the output of `git describe`. As long as tags are maintained it will do the right thing. Board version is kind of nebulous, currently it just pulls the name of the board config directory in. There's not really a better string defined anywhere that I can see? Also because of the way the OD is generated it's hard to get something from inside a file like a #define so using the directory is easy to implement.
1 parent af4c388 commit b93f89c

File tree

10 files changed

+20
-10
lines changed

10 files changed

+20
-10
lines changed

src/f0/app_adcs/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ ifeq ($(ORESAT),)
111111
ORESAT = 0.5
112112
endif
113113
# generate OD.c/OD.h from oresat-configs
114-
$(shell oresat-gen-fw-files --oresat $(ORESAT) imu -d $(ODDIR))
114+
FW_VERSION = $(shell git describe)
115+
$(shell oresat-gen-fw-files --oresat $(ORESAT) imu -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
115116
# add them
116117
ALLCSRC += $(ODDIR)/OD.c
117118
ALLINC += $(ODDIR)

src/f0/app_battery/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
$(shell oresat-gen-fw-files --oresat $(ORESAT) battery -d $(ODDIR))
119+
FW_VERSION = $(shell git describe)
120+
$(shell oresat-gen-fw-files --oresat $(ORESAT) battery -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD) -fw $(FW_VERSION) -hw $(BOARD))
120121
# add them
121122
ALLCSRC += $(ODDIR)/OD.c
122123
ALLINC += $(ODDIR)

src/f0/app_devboard/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR))
119+
FW_VERSION = $(shell git describe)
120+
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
120121
# add them
121122
ALLCSRC += $(ODDIR)/OD.c
122123
ALLINC += $(ODDIR)

src/f0/app_protocard/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR))
119+
FW_VERSION = $(shell git describe)
120+
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
120121
# add them
121122
ALLCSRC += $(ODDIR)/OD.c
122123
ALLINC += $(ODDIR)

src/f0/app_solar/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ ifeq ($(ORESAT),)
116116
endif
117117

118118
# generate OD.c/OD.h from oresat-configs
119-
$(shell oresat-gen-fw-files --oresat $(ORESAT) solar -d $(ODDIR))
119+
FW_VERSION = $(shell git describe)
120+
$(shell oresat-gen-fw-files --oresat $(ORESAT) solar -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
120121
# add them
121122
ALLCSRC += $(ODDIR)/OD.c
122123
ALLINC += $(ODDIR)

src/f4/app_cantest/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR))
114+
FW_VERSION = $(shell git describe)
115+
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
115116
# add them
116117
ALLCSRC += $(ODDIR)/OD.c
117118
ALLINC += $(ODDIR)

src/f4/app_control/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR))
114+
FW_VERSION = $(shell git describe)
115+
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
115116
# add them
116117
ALLCSRC += $(ODDIR)/OD.c
117118
ALLINC += $(ODDIR)

src/f4/app_devboard/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR))
114+
FW_VERSION = $(shell git describe)
115+
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
115116
# add them
116117
ALLCSRC += $(ODDIR)/OD.c
117118
ALLINC += $(ODDIR)

src/l4/app_devboard/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR))
114+
FW_VERSION = $(shell git describe)
115+
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
115116
# add them
116117
ALLCSRC += $(ODDIR)/OD.c
117118
ALLINC += $(ODDIR)

src/l4/app_devboard_cpp/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ ifeq ($(ORESAT),)
111111
endif
112112

113113
# generate OD.c/OD.h from oresat-configs
114-
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR))
114+
FW_VERSION = $(shell git describe)
115+
$(shell oresat-gen-fw-files --oresat $(ORESAT) base -d $(ODDIR) -fw $(FW_VERSION) -hw $(BOARD))
115116
# add them
116117
ALLCSRC += $(ODDIR)/OD.c
117118
ALLINC += $(ODDIR)

0 commit comments

Comments
 (0)