From ce0e715254f906ba334374bc15cd7f3a8a267cc5 Mon Sep 17 00:00:00 2001 From: Kerogit Date: Wed, 3 Jun 2026 01:50:53 +0200 Subject: [PATCH] boards/avr/avrdx/breadxavr: provide board_late_initialize This patch amends commit f077c0321de which is a part of series that changed (in commit 48db502daf9) default value of BOARD_LATE_INITIALIZE to yes. With this change, the boards are required to provide board_late_initialize function. Commit f077c0321de added this function to many AVR boards but not to this one, making the build with default configuration fail. This patch rectifies that and provides an empty function. With this patch applied, the build no longer fails. Signed-off-by: Kerogit --- boards/avr/avrdx/breadxavr/src/Makefile | 6 +---- boards/avr/avrdx/breadxavr/src/avrdx_init.c | 29 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/boards/avr/avrdx/breadxavr/src/Makefile b/boards/avr/avrdx/breadxavr/src/Makefile index f5ef01580aa..da62b5457ca 100644 --- a/boards/avr/avrdx/breadxavr/src/Makefile +++ b/boards/avr/avrdx/breadxavr/src/Makefile @@ -22,16 +22,12 @@ include $(TOPDIR)/Make.defs -CSRCS = avrdx_boot.c +CSRCS = avrdx_boot.c avrdx_init.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += avr_leds.c endif -ifeq ($(CONFIG_BOARD_EARLY_INITIALIZE),y) -CSRCS += avrdx_init.c -endif - ifeq ($(CONFIG_BREADXAVR_BUTTONS_DRIVER),y) CSRCS += avrdx_buttons.c endif diff --git a/boards/avr/avrdx/breadxavr/src/avrdx_init.c b/boards/avr/avrdx/breadxavr/src/avrdx_init.c index 6e09599e38f..096c1f9730b 100644 --- a/boards/avr/avrdx/breadxavr/src/avrdx_init.c +++ b/boards/avr/avrdx/breadxavr/src/avrdx_init.c @@ -89,3 +89,32 @@ void board_early_initialize(void) } #endif /* CONFIG_BOARD_EARLY_INITIALIZE */ + +/**************************************************************************** + * Name: board_late_initialize + * + * Description: + * Excerpt from Kconfig: + * + * If CONFIG_BOARD_LATE_INITIALIZE is set, board_late_initialize() is + * called after up_initialize() just before the main application is + * started. It can be used to initialize more complex, board-specific + * device drivers. + * + * Function runs on a temporary, internal kernel thread and can therefore + * wait for events. + * + * Currently, the board has no need for this function but the Kconfig + * option is enabled by default so the function either needs to be defined, + * or default configuration needs to be changed. This is why this function + * exists but is empty. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE + +void board_late_initialize(void) +{ +} + +#endif /* CONFIG_BOARD_LATE_INITIALIZE */