Skip to content

Commit 6c7adc4

Browse files
committed
Add commit sha to firmware string
1 parent 4bd112b commit 6c7adc4

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Firmware/base.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
/**
4545
* @brief Firmware version string, used at startup and for the 'i' command.
4646
*/
47-
#define BP_FIRMWARE_STRING "Community Firmware v7.1 - goo.gl/gCzQnW "
47+
#define _STRINGIFY(x) #x
48+
#define STRINGIFY(x) _STRINGIFY(x)
49+
#define BP_FIRMWARE_STRING "Community Firmware v7.1 - goo.gl/gCzQnW - " STRINGIFY(VERSION) " \r\n"
4850

4951
/**
5052
* @brief Current mode configuration settings structure.

Firmware/busPirate.X/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ all: .all-post
8585

8686
.all-pre:
8787
# Add your pre 'all' code here...
88+
VERSION:=${shell git rev-parse --short HEAD}
8889

8990
.all-post: .all-impl
9091
# Add your post 'all' code here...

Firmware/busPirate.X/nbproject/configurations.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314
<property key="scalar-model" value="default"/>
315315
<property key="use-cci" value="true"/>
316316
<property key="use-iar" value="false"/>
317-
<appendMe value="-save-temps -finline"/>
317+
<appendMe value="-save-temps -finline -DVERSION=\&quot;$(VERSION)\&quot;"/>
318318
</C30>
319319
<C30-AR>
320320
<property key="additional-options-chop-files" value="false"/>

0 commit comments

Comments
 (0)