Skip to content

Commit

Permalink
app: src: main: include git describe output in banner when available
Browse files Browse the repository at this point in the history
Include the "git describe" output in the CANnectivity boot banner when
available.

Signed-off-by: Henrik Brix Andersen <[email protected]>
  • Loading branch information
henrikbrixandersen committed Dec 18, 2024
1 parent bba877b commit 40d8231
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@

LOG_MODULE_REGISTER(main, CONFIG_CANNECTIVITY_LOG_LEVEL);

#ifdef CONFIG_CANNECTIVITY_BOOT_BANNER
#if defined(APP_BUILD_VERSION) && !IS_EMPTY(APP_BUILD_VERSION)
#define CANNECTIVITY_BANNER_VERSION STRINGIFY(APP_BUILD_VERSION)
#else
#define CANNECTIVITY_BANNER_VERSION APP_VERSION_STRING
#endif
#endif /* CONFIG_CANNECTIVITY_BOOT_BANNER */

#define CHANNEL_CAN_CONTROLLER_DT_GET(node_id) DEVICE_DT_GET(DT_PHANDLE(node_id, can_controller))

static const struct gs_usb_ops gs_usb_ops = {
Expand Down Expand Up @@ -44,7 +52,7 @@ int main(void)
int err;

#ifdef CONFIG_CANNECTIVITY_BOOT_BANNER
printk("*** CANnectivity firmware version " APP_VERSION_STRING " ***\n");
printk("*** CANnectivity firmware " CANNECTIVITY_BANNER_VERSION " ***\n");
#endif /* CONFIG_CANNECTIVITY_BOOT_BANNER */

if (!device_is_ready(gs_usb)) {
Expand Down

0 comments on commit 40d8231

Please sign in to comment.