Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app: src: main: include git describe output in banner when available #46

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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