Print git revision on startup

This commit is contained in:
Markus Koch 2021-03-02 19:44:27 +01:00
parent 8e25479ab5
commit 154980ee10
2 changed files with 2 additions and 2 deletions

View File

@ -13,9 +13,8 @@ OD=$(PREFIX)-objdump
OBJCOPYFLAGS = -O binary OBJCOPYFLAGS = -O binary
BIN=$(CP) -O ihex BIN=$(CP) -O ihex
CCBASE = colorchord/embeddedstm32f407 CCBASE = colorchord/embeddedstm32f407
DEFS = -DSTM32F40_41xxx -DHSE_VALUE=8000000 DEFS = -DSTM32F40_41xxx -DHSE_VALUE=8000000 -DREVISION=\"`git rev-parse HEAD`\"
STARTUP = $(CCBASE)/lib/startup_stm32f40_41xxx.s STARTUP = $(CCBASE)/lib/startup_stm32f40_41xxx.s
STLIB = $(CCBASE)/STM32F4xx_StdPeriph_Driver STLIB = $(CCBASE)/STM32F4xx_StdPeriph_Driver
EMCOM = $(CCBASE)/../embeddedcommon EMCOM = $(CCBASE)/../embeddedcommon

View File

@ -123,6 +123,7 @@ int main(void)
InitSPI2812(); InitSPI2812();
adc_init(); adc_init();
printf("\r\nThis is Sabik-CPU, commit %s.\r\n", REVISION);
printf("Operating at %.3fMHz\r\n", fv ); printf("Operating at %.3fMHz\r\n", fv );
int this_samp = 0; int this_samp = 0;