diff --git a/Makefile.include b/Makefile.include index 4ce3bb43c4..462c3ab82e 100644 --- a/Makefile.include +++ b/Makefile.include @@ -584,6 +584,9 @@ USEMODULE_INCLUDES = include $(RIOTBASE)/sys/Makefile.include +# add default board_init() +DIRS += $(RIOTBASE)/boards/common/init + # include Makefile.includes of each driver modules if they exist -include $(USEMODULE:%=$(RIOTBASE)/drivers/%/Makefile.include) diff --git a/boards/Kconfig b/boards/Kconfig index 14933a9d99..d4c143b36d 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -15,3 +15,10 @@ config MODULE_BOARD depends on TEST_KCONFIG help Module which holds all board-specific files. + +config MODULE_BOARD_COMMON_INIT + bool + default y + depends on TEST_KCONFIG + help + Common board initialization module diff --git a/boards/acd52832/board.c b/boards/acd52832/board.c deleted file mode 100644 index 0f720c68e4..0000000000 --- a/boards/acd52832/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2017 HAW Hamburg - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_acd52832 - * @{ - * - * @file - * @brief Board initialization for the ACD52832 - * - * @author Dimitri Nahm - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/adafruit-itsybitsy-m4/board.c b/boards/adafruit-itsybitsy-m4/board.c index e135d12b64..f908ebbf21 100644 --- a/boards/adafruit-itsybitsy-m4/board.c +++ b/boards/adafruit-itsybitsy-m4/board.c @@ -53,7 +53,3 @@ static mtd_spi_nor_t samd51_nor_dev = { mtd_dev_t *mtd0 = (mtd_dev_t *)&samd51_nor_dev; #endif /* MODULE_MTD */ - -void board_init(void) -{ -} diff --git a/boards/adafruit-itsybitsy-nrf52/board.c b/boards/adafruit-itsybitsy-nrf52/board.c deleted file mode 100644 index eb55cf822d..0000000000 --- a/boards/adafruit-itsybitsy-nrf52/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2020 Bruno Chianca - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_adafruit-itsybitsy-nrf52 - * @{ - * - * @file - * @brief Board initialization for the Adafruit ItsyBitsy nRF52840 - * - * @author Bruno Chianca - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/alientek-pandora/board.c b/boards/alientek-pandora/board.c deleted file mode 100644 index a71107ac7e..0000000000 --- a/boards/alientek-pandora/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2021 Luo Jia (HUST IoT Security Lab) - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_alientek-pandora - * @{ - * - * @file - * @brief Board specific implementations for the Alientek Pandora board - * - * @author Luo Jia - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/arduino-nano-33-ble/board.c b/boards/arduino-nano-33-ble/board.c deleted file mode 100644 index 867a1f27b7..0000000000 --- a/boards/arduino-nano-33-ble/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2020 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_arduino-nano-33-ble - * @{ - * - * @file - * @brief Board initialization for the Arduino Nano 33 BLE - * - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/arduino-nano-33-iot/board.c b/boards/arduino-nano-33-iot/board.c deleted file mode 100644 index 6c24a6edd7..0000000000 --- a/boards/arduino-nano-33-iot/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2020 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_arduino-nano-33-iot - * @{ - * @file - * @brief Board common implementations for the Arduino Nano 33 IoT - * - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/b-l475e-iot01a/board.c b/boards/b-l475e-iot01a/board.c deleted file mode 100644 index ccf524a335..0000000000 --- a/boards/b-l475e-iot01a/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2017 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_b-l475e-iot01a - * @{ - * - * @file - * @brief Board specific implementations for the ST B-L475E-IOT01A board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/bluepill-stm32f030c8/board.c b/boards/bluepill-stm32f030c8/board.c deleted file mode 100644 index 719d7c6a82..0000000000 --- a/boards/bluepill-stm32f030c8/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2020 Benjamin Valentin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_bluepill-stm32f030c8 - * @{ - * - * @file - * @brief Board initialization code for the bluepill-stm32f030c8 board. - * - * @author Benjamin Valentin - * - * @} - */ - -#include "board.h" -#include "cpu.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/cc1312-launchpad/board.c b/boards/cc1312-launchpad/board.c deleted file mode 100644 index e6d598a1b4..0000000000 --- a/boards/cc1312-launchpad/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2016 Nicholas Jackson - * 2017 HAW Hamburg - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_cc1312_launchpad - * @{ - * - * @file - * @brief Board specific implementations for TI CC1312 LaunchPad - * - * @author Nicholas Jackson - * @author Sebastian Meiling - */ - -#include "cpu.h" -#include "board.h" - -/** - * @brief Initialise the board. - */ - -void board_init(void) -{ -} diff --git a/boards/cc1350-launchpad/board.c b/boards/cc1350-launchpad/board.c deleted file mode 100644 index 87a0f77cef..0000000000 --- a/boards/cc1350-launchpad/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2021 Jean Pierre Dudey - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_cc1350_launchpad - * @{ - * - * @file - * @brief Board specific implementations for TI CC1350 LaunchPad - * - * @author Jean Pierre Dudey - */ - -#include "cpu.h" -#include "board.h" - -/** - * @brief Initialise the board. - */ - -void board_init(void) -{ -} diff --git a/boards/cc1352-launchpad/board.c b/boards/cc1352-launchpad/board.c deleted file mode 100644 index 33ca6b4a8a..0000000000 --- a/boards/cc1352-launchpad/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2016 Nicholas Jackson - * 2017 HAW Hamburg - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_cc1352_launchpad - * @{ - * - * @file - * @brief Board specific implementations for TI CC1352 LaunchPad - * - * @author Nicholas Jackson - * @author Sebastian Meiling - */ - -#include "cpu.h" -#include "board.h" - -/** - * @brief Initialise the board. - */ - -void board_init(void) -{ -} diff --git a/boards/cc1352p-launchpad/board.c b/boards/cc1352p-launchpad/board.c deleted file mode 100644 index dd736c426f..0000000000 --- a/boards/cc1352p-launchpad/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2020 Locha Inc - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_cc1352p_launchpad - * @{ - * - * @file - * @brief Board specific implementations for TI CC1352P LaunchPad - * - * @author Luis A. Ruiz - */ - -#include "cpu.h" -#include "board.h" - -/** - * @brief Initialise the board. - */ - -void board_init(void) -{ -} diff --git a/boards/cc2538dk/board.c b/boards/cc2538dk/board.c deleted file mode 100644 index aa7da4e768..0000000000 --- a/boards/cc2538dk/board.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2014 Loci Controls Inc. - * 2016 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_cc2538dk - * @{ - * - * @file - * @brief Board specific implementations for the CC2538DK board - * - * @author Ian Martin - * @author Hauke Petersen - * - * @} - */ - -#include - -#include "board.h" -#include "cpu.h" - -/** - * @brief Initialize the SmartRF06 board - */ -void board_init(void) -{ -} diff --git a/boards/cc2650-launchpad/board.c b/boards/cc2650-launchpad/board.c deleted file mode 100644 index 13190c2f36..0000000000 --- a/boards/cc2650-launchpad/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2016 Nicholas Jackson - * 2017 HAW Hamburg - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_cc2650_launchpad - * @{ - * - * @file - * @brief Board specific implementations for TI CC2650 LaunchPad - * - * @author Nicholas Jackson - * @author Sebastian Meiling - */ - -#include "cpu.h" -#include "board.h" - -/** - * @brief Initialise the board. - */ - -void board_init(void) -{ -} diff --git a/boards/cc2650stk/board.c b/boards/cc2650stk/board.c deleted file mode 100644 index c62255be08..0000000000 --- a/boards/cc2650stk/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2016 Leon George - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ -/** - * @ingroup boards_cc2650stk - * @{ - * - * @file - * @brief Board specific implementations for the CC2650STK board - * - * @author Leon M. George - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -/** - * @brief initialize the board - */ -void board_init(void) -{ -} diff --git a/boards/common/arduino-due/board.c b/boards/common/arduino-due/board.c deleted file mode 100644 index a4127bec7f..0000000000 --- a/boards/common/arduino-due/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2014-2017 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common_arduino_due - * @{ - * - * @file - * @brief Board specific for Arduino-due-based boards - * - * @author Hauke Petersen - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/common/arduino-mkr/board.c b/boards/common/arduino-mkr/board.c deleted file mode 100644 index 8771cba735..0000000000 --- a/boards/common/arduino-mkr/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2016 Freie Universität Berlin - * 2016-2017 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common_arduino-mkr - * @{ - * @file - * @brief Board common implementations for the Arduino MKR boards - * - * @author Hauke Pertersen - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/common/arduino-zero/board.c b/boards/common/arduino-zero/board.c deleted file mode 100644 index f404a0f56e..0000000000 --- a/boards/common/arduino-zero/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2016 Freie Universität Berlin - * 2016 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common_arduino_zero - * @{ - * - * @file - * @brief Board specific implementations for the Arduino Zero board and - * clones - * - * @author Hauke Pertersen - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/common/atmega/board.c b/boards/common/atmega/board.c deleted file mode 100644 index 40f3ce1c71..0000000000 --- a/boards/common/atmega/board.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2018 Kaspar Schleiser - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common - * @{ - * - * @file - * @brief Common implementations for Atmega boards - * - * @author Kaspar Schleiser - * - * @} - */ - -#include "board.h" - -void __attribute__((weak)) board_init(void) -{ -} diff --git a/boards/common/atxmega/board.c b/boards/common/atxmega/board.c deleted file mode 100644 index dd639b3d1f..0000000000 --- a/boards/common/atxmega/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2021 Gerson Fernando Budke - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common - * @{ - * - * @file - * @brief Common implementations for ATxmega boards - * - * @author Gerson Fernando Budke - * - * @} - */ - -#include "board.h" -#include "cpu.h" - -void __attribute__((weak)) board_init(void) -{ -} diff --git a/boards/common/blxxxpill/board.c b/boards/common/blxxxpill/board.c deleted file mode 100644 index a99258aa66..0000000000 --- a/boards/common/blxxxpill/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2015 TriaGnoSys GmbH - * 2017 Alexander Kurth, Sören Tempel, Tristan Bruns - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_bluepill - * @{ - * - * @file - * @brief Board specific implementations for the bluepill board - * - * @author Víctor Ariño - * @author Sören Tempel - * @author Tristan Bruns - * @author Alexander Kurth - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/common/esp8266/board_common.c b/boards/common/esp8266/board_common.c index 29591d4e61..8a39fb86a3 100644 --- a/boards/common/esp8266/board_common.c +++ b/boards/common/esp8266/board_common.c @@ -27,10 +27,6 @@ extern "C" { #endif -void board_init(void) -{ -} - extern void adc_print_config(void); extern void dac_print_config(void); extern void pwm_print_config(void); diff --git a/boards/common/init/Makefile b/boards/common/init/Makefile new file mode 100644 index 0000000000..ceda92ec0e --- /dev/null +++ b/boards/common/init/Makefile @@ -0,0 +1,2 @@ +MODULE = board_common_init +include $(RIOTBASE)/Makefile.base diff --git a/boards/common/init/board_common.c b/boards/common/init/board_common.c new file mode 100644 index 0000000000..5883c2ab5b --- /dev/null +++ b/boards/common/init/board_common.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2021 ML!PA Consulting GmbH + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards + * @{ + * + * @file + * @brief Generic board functions + * + * @author Benjamin Valentin + * @} + */ + +#include "board.h" +#include "periph/gpio.h" +#include "kernel_defines.h" + +/* + * Allow overwriting board_init if common implementation doesn't work. + * If at link time another implementation of board_init() not marked as weak + * ((a.k.a. a strong symbol) is present, it will be linked in instead. + */ +void __attribute__((weak)) board_init(void) +{} diff --git a/boards/common/iotlab/board_init.c b/boards/common/iotlab/board_init.c deleted file mode 100644 index 9c07e3e595..0000000000 --- a/boards/common/iotlab/board_init.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_iotlab-m3 - * @{ - * - * @file - * @brief Board specific implementations for the iotlab-m3 board - * - * @author Thomas Eichinger - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/common/kw41z/board.c b/boards/common/kw41z/board.c deleted file mode 100644 index 0f882234b8..0000000000 --- a/boards/common/kw41z/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2017 Eistec AB - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_common_kw41z - * @{ - * - * @file - * @brief Board specific initialization for the FRDM-KW41Z - * - * @author Joakim Nohlgård - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/common/nrf51/board.c b/boards/common/nrf51/board.c deleted file mode 100644 index ff7c4de9e0..0000000000 --- a/boards/common/nrf51/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_common_nrf51 - * @{ - * - * @file - * @brief Board initialization for the nRF51 based boards - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "cpu.h" - -void board_init(void) -{ -} diff --git a/boards/common/nrf52xxxdk/board.c b/boards/common/nrf52xxxdk/board.c deleted file mode 100644 index accba4e3d4..0000000000 --- a/boards/common/nrf52xxxdk/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2017 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common_nrf52 - * @{ - * - * @file - * @brief Board initialization for the nRF52xxx DK - * - * @author Hauke Petersen - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -void board_init(void) -{ -} diff --git a/boards/common/nucleo/board_common_nucleo_init.c b/boards/common/nucleo/board_common_nucleo_init.c deleted file mode 100644 index 806603326d..0000000000 --- a/boards/common/nucleo/board_common_nucleo_init.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2014-2017 Freie Universität Berlin - * 2015 Lari Lehtomäki - * 2015 TriaGnoSys GmbH - * 2016-2017 Inria - * 2016-2017 OTA keys - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common_nucleo - * @{ - * - * @file - * @brief Board initialization code for all Nucleo boards - * - * @author Hauke Petersen - * @author Thomas Eichinger - * @author Lari Lehtomäki - * @author Alexandre Abadie - * @author Víctor Ariño - * @author José Alamos - * @author Vincent Dupont - * - * @} - */ - -/* - * Allow overwriting board_init if common implementation doesn't work. - * If at link time another implementation of board_init() not marked as weak - * ((a.k.a. a strong symbol) is present, it will be linked in instead. - */ -void __attribute__((weak)) board_init(void) -{ -} diff --git a/boards/common/saml1x/board.c b/boards/common/saml1x/board.c deleted file mode 100644 index 648a95c0e6..0000000000 --- a/boards/common/saml1x/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 Mesotic SAS - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common_saml1x - * @{ - * - * @file board.c - * @brief Board specific implementations for the Microchip - * SAML10 and SAML11 Xplained Pro board - * - * @author Dylan Laduranty - * - * @} - */ - -#include "board.h" - -void board_init(void) -{ -} diff --git a/boards/common/sodaq/board.c b/boards/common/sodaq/board.c deleted file mode 100644 index ab3edbde58..0000000000 --- a/boards/common/sodaq/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2016 Kees Bakker, SODAQ - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_common_sodaq - * @{ - * - * @file - * @brief Board common implementations for the SODAQ boards - * - * @author Kees Bakker - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/common/weact-f4x1cx/board.c b/boards/common/weact-f4x1cx/board.c index 8fcf933f6e..ade4f31cb8 100644 --- a/boards/common/weact-f4x1cx/board.c +++ b/boards/common/weact-f4x1cx/board.c @@ -53,7 +53,3 @@ static mtd_spi_nor_t weact_nor_dev = { mtd_dev_t *mtd0 = (mtd_dev_t *)&weact_nor_dev; #endif /* MODULE_MTD */ - -void board_init(void) -{ -} diff --git a/boards/dwm1001/board.c b/boards/dwm1001/board.c deleted file mode 100644 index 0665000202..0000000000 --- a/boards/dwm1001/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2020 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_dwm1001 - * @{ - * - * @file - * @brief Board initialization for the DWM1001 dev board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/ek-lm4f120xl/board.c b/boards/ek-lm4f120xl/board.c deleted file mode 100644 index 31b4bd8b1c..0000000000 --- a/boards/ek-lm4f120xl/board.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2015 Rakendra Thapa - * - * @} - */ - -#include "board.h" - -void board_init(void) -{ -} diff --git a/boards/esp32-ethernet-kit-v1_0/include/board.h b/boards/esp32-ethernet-kit-v1_0/include/board.h index 42d16b78d1..b8c3771211 100644 --- a/boards/esp32-ethernet-kit-v1_0/include/board.h +++ b/boards/esp32-ethernet-kit-v1_0/include/board.h @@ -25,14 +25,6 @@ extern "C" { #endif -/** - * @brief Initialize the board specific hardware - */ -static inline void board_init(void) { - /* there is nothing special to initialize on this board */ - board_init_common(); -} - #if !MODULE_ESP_ETH || DOXYGEN /** * @name Button pin definitions diff --git a/boards/esp32-heltec-lora32-v2/include/board.h b/boards/esp32-heltec-lora32-v2/include/board.h index 246dc58b94..4e5a104da7 100644 --- a/boards/esp32-heltec-lora32-v2/include/board.h +++ b/boards/esp32-heltec-lora32-v2/include/board.h @@ -101,14 +101,6 @@ extern "C" { #endif -/** - * @brief Initialize the board specific hardware - */ -static inline void board_init(void) { - /* there is nothing special to initialize on this board */ - board_init_common(); -} - #ifdef __cplusplus } /* end extern "C" */ #endif diff --git a/boards/esp32-mh-et-live-minikit/include/board.h b/boards/esp32-mh-et-live-minikit/include/board.h index 005b6d79ad..135a02a345 100644 --- a/boards/esp32-mh-et-live-minikit/include/board.h +++ b/boards/esp32-mh-et-live-minikit/include/board.h @@ -54,14 +54,6 @@ extern "C" { #endif -/** - * @brief Initialize the board specific hardware - */ -static inline void board_init(void) { - /* there is nothing special to initialize on this board */ - board_init_common(); -} - #ifdef __cplusplus } /* end extern "C" */ #endif diff --git a/boards/esp32-olimex-evb/include/board.h b/boards/esp32-olimex-evb/include/board.h index 8ac64b4014..c8d01f7de3 100644 --- a/boards/esp32-olimex-evb/include/board.h +++ b/boards/esp32-olimex-evb/include/board.h @@ -122,14 +122,6 @@ extern "C" { #endif -/** - * @brief Initialize the board specific hardware - */ -static inline void board_init(void) { - /* there is nothing special to initialize on this board */ - board_init_common(); -} - #ifdef __cplusplus } /* end extern "C" */ #endif diff --git a/boards/esp32-wemos-lolin-d32-pro/include/board.h b/boards/esp32-wemos-lolin-d32-pro/include/board.h index 597e35ecd0..a0094dee53 100644 --- a/boards/esp32-wemos-lolin-d32-pro/include/board.h +++ b/boards/esp32-wemos-lolin-d32-pro/include/board.h @@ -76,14 +76,6 @@ extern "C" { #endif -/** - * @brief Initialize the board specific hardware - */ -static inline void board_init(void) { - /* there is nothing special to initialize on this board */ - board_init_common(); -} - #ifdef __cplusplus } /* end extern "C" */ #endif diff --git a/boards/esp32-wroom-32/include/board.h b/boards/esp32-wroom-32/include/board.h index e6580c5c3d..19234330f4 100644 --- a/boards/esp32-wroom-32/include/board.h +++ b/boards/esp32-wroom-32/include/board.h @@ -85,14 +85,6 @@ extern "C" { #endif -/** - * @brief Initialize the board specific hardware - */ -static inline void board_init(void) { - /* there is nothing special to initialize on this board */ - board_init_common(); -} - #ifdef __cplusplus } /* end extern "C" */ #endif diff --git a/boards/esp32-wrover-kit/board.c b/boards/esp32-wrover-kit/board.c new file mode 100644 index 0000000000..880b5107f6 --- /dev/null +++ b/boards/esp32-wrover-kit/board.c @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2019 Gunar Schorcht + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_esp32_esp-wrover-kit + * @{ + * + * @file + * @brief Board specific definitions for esp32-wrover-kit + * + * @author Gunar Schorcht + */ + +#include "board.h" + +void board_init(void) +{ +#if MODULE_ILI9341 + gpio_init(LCD_BACKLIGHT, GPIO_OUT); +#endif + + /* there is nothing special to initialize on this board */ + board_init_common(); +} diff --git a/boards/esp32-wrover-kit/include/board.h b/boards/esp32-wrover-kit/include/board.h index 918ff58b3b..5275f02183 100644 --- a/boards/esp32-wrover-kit/include/board.h +++ b/boards/esp32-wrover-kit/include/board.h @@ -149,18 +149,6 @@ extern "C" { #endif -/** - * @brief Initialize the board specific hardware - */ -static inline void board_init(void) { -#if MODULE_ILI9341 - gpio_init(LCD_BACKLIGHT, GPIO_OUT); -#endif - - /* there is nothing special to initialize on this board */ - board_init_common(); -} - #ifdef __cplusplus } /* end extern "C" */ #endif diff --git a/boards/f4vi1/board.c b/boards/f4vi1/board.c deleted file mode 100644 index da9593f120..0000000000 --- a/boards/f4vi1/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_f4vi1 - * @{ - * - * @file - * @brief Board specific implementations for the f4vi1 board - * - * @author Stefan Pfeiffer - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/feather-m0/board.c b/boards/feather-m0/board.c deleted file mode 100644 index 8ffc970327..0000000000 --- a/boards/feather-m0/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_feather-m0 - * @{ - * - * @file - * @brief Board specific implementations for the Adafruit Feather M0 boards - * - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/feather-nrf52840/board.c b/boards/feather-nrf52840/board.c deleted file mode 100644 index 80108843f3..0000000000 --- a/boards/feather-nrf52840/board.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2020 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @{ - * - * @file - * @author Martine Lenders - */ - -#include "cpu.h" -#include "board.h" - -#include "periph/gpio.h" - -void board_init(void) -{ -} - -/** @} */ diff --git a/boards/firefly/board.c b/boards/firefly/board.c index 6fb07f0d61..79bceb2301 100644 --- a/boards/firefly/board.c +++ b/boards/firefly/board.c @@ -22,10 +22,6 @@ #include "cpu.h" #include "fancy_leds.h" -void board_init(void) -{ -} - /** * @brief Initialize the boards on-board LEDs * diff --git a/boards/frdm-k22f/board.c b/boards/frdm-k22f/board.c deleted file mode 100644 index 26f45187c3..0000000000 --- a/boards/frdm-k22f/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * Copyright (C) 2014 PHYTEC Messtechnik GmbH - * Copyright (C) 2017 Eistec AB - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_frdm-k22f - * @{ - * - * @file - * @brief Board specific implementations for the FRDM-K22F - * - * @author Joakim Nohlgård - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/frdm-kl43z/board.c b/boards/frdm-kl43z/board.c deleted file mode 100644 index 3b6a535a41..0000000000 --- a/boards/frdm-kl43z/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2018 Eistec AB - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_frdm-kl43z - * @{ - * - * @file - * @brief Board specific implementations for the FRDM-KL43Z - * - * @author Joakim Nohlgård - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/hamilton/board.c b/boards/hamilton/board.c deleted file mode 100644 index bd50e0c125..0000000000 --- a/boards/hamilton/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2016 University of California, Berkeley - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_hamilton - * @{ - * - * @file - * @brief Board specific implementations for the Hamilton mote - * - * @author Michael Andersen - * - * @} - */ - -#include - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/hifive1/board.c b/boards/hifive1/board.c deleted file mode 100644 index 7a84836d40..0000000000 --- a/boards/hifive1/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017 Ken Rabold, JP Bonn - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_hifive1 - * @{ - * - * @file - * @brief Support for the SiFive HiFive1 RISC-V board - * - * @author Ken Rabold, JP Bonn - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/hifive1b/board.c b/boards/hifive1b/board.c deleted file mode 100644 index c4b97df284..0000000000 --- a/boards/hifive1b/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017, 2019 Ken Rabold, JP Bonn - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_hifive1b - * @{ - * - * @file - * @brief Support for the SiFive HiFive1b RISC-V board - * - * @author Ken Rabold, JP Bonn - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/i-nucleo-lrwan1/board.c b/boards/i-nucleo-lrwan1/board.c deleted file mode 100644 index 850d940327..0000000000 --- a/boards/i-nucleo-lrwan1/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_i-nucleo-lrwan1 - * @{ - * - * @file - * @brief Board specific implementations for the ST I-NUCLEO-LRWAN1 board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/im880b/board.c b/boards/im880b/board.c deleted file mode 100644 index 9712002db1..0000000000 --- a/boards/im880b/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_im880b - * @{ - * - * @file - * @brief Board specific implementations for the im880b board - * - * @author Francisco Molina - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/limifrog-v1/board.c b/boards/limifrog-v1/board.c deleted file mode 100644 index 65a158d925..0000000000 --- a/boards/limifrog-v1/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2015 Hamburg University of Applied Sciences - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_limifrog-v1 - * @{ - * - * @file - * @brief Board specific implementations for the limifrog-v1 board - * - * @author Katja Kirstein - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/lsn50/board.c b/boards/lsn50/board.c deleted file mode 100644 index 8b5d5ac7d2..0000000000 --- a/boards/lsn50/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_lsn50 - * @{ - * - * @file - * @brief Board specific implementations for the LSN50 board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/maple-mini/board.c b/boards/maple-mini/board.c deleted file mode 100644 index 64f4bc462a..0000000000 --- a/boards/maple-mini/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2016 Frits Kuipers - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_maple-mini - * @{ - * - * @file - * @brief Board specific implementations for the maple-mini board - * - * @author Frits Kuipers - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/mcb2388/board_init.c b/boards/mcb2388/board_init.c index a150cd8df7..4e4a199022 100644 --- a/boards/mcb2388/board_init.c +++ b/boards/mcb2388/board_init.c @@ -37,7 +37,3 @@ void led_init(void) FIO2DIR |= LED0_MASK | LED1_MASK | LED2_MASK | LED3_MASK \ | LED4_MASK | LED5_MASK | LED6_MASK | LED7_MASK; } - -void board_init(void) -{ -} diff --git a/boards/msba2/board_init.c b/boards/msba2/board_init.c index f5c2411e9a..0b59e720d4 100644 --- a/boards/msba2/board_init.c +++ b/boards/msba2/board_init.c @@ -35,7 +35,3 @@ extern const mtd_desc_t mtd_mci_driver; static mtd_dev_t _mtd_mci = { .driver = &mtd_mci_driver }; mtd_dev_t *mtd0 = &_mtd_mci; #endif - -void board_init(void) -{ -} diff --git a/boards/nrf51dongle/board.c b/boards/nrf51dongle/board.c deleted file mode 100644 index f391dfc120..0000000000 --- a/boards/nrf51dongle/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2015 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_nrf51dongle - * @{ - * - * @file - * @brief Board initialization code for the nRF51 Dongle - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - -} diff --git a/boards/nrf52832-mdk/board.c b/boards/nrf52832-mdk/board.c deleted file mode 100644 index dd4aeeed2c..0000000000 --- a/boards/nrf52832-mdk/board.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2019 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_nrf52832-mdk - * @{ - * - * @file - * @brief Board initialization for the nRF52832-MDK - * - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -#include "periph/gpio.h" - -void board_init(void) -{ - -} diff --git a/boards/nrf52840-mdk-dongle/board.c b/boards/nrf52840-mdk-dongle/board.c deleted file mode 100644 index 2e133cba0f..0000000000 --- a/boards/nrf52840-mdk-dongle/board.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2020 Benjamin Valentin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_nrf52840-mdk-dongle - * @{ - * - * @file - * @brief Board initialization for the nRF52840-dongle - * - * @author Benjamin Valentin - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -#include "periph/gpio.h" - -void board_init(void) -{ - -} diff --git a/boards/nrf52840-mdk/board.c b/boards/nrf52840-mdk/board.c deleted file mode 100644 index a089a38d1c..0000000000 --- a/boards/nrf52840-mdk/board.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2018 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_nrf52840-mdk - * @{ - * - * @file - * @brief Board initialization for the nRF52840-MDK - * - * @author Alexandre Abadie - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -#include "periph/gpio.h" - -void board_init(void) -{ - -} diff --git a/boards/nrf52840dongle/board.c b/boards/nrf52840dongle/board.c deleted file mode 100644 index 066d6ad877..0000000000 --- a/boards/nrf52840dongle/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2019 Christian Amsüss - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_nrf52840dongle - * @{ - * - * @file - * @brief Board initialization for the nRF52840-dongle - * - * @author Christian Amsüss - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -#include "periph/gpio.h" - -void board_init(void) -{ - - -} diff --git a/boards/nrf6310/board.c b/boards/nrf6310/board.c index 2d76ab2433..b909139fef 100644 --- a/boards/nrf6310/board.c +++ b/boards/nrf6310/board.c @@ -29,7 +29,3 @@ void led_init(void) NRF_GPIO->DIRSET = LED0_MASK | LED1_MASK | LED2_MASK; NRF_GPIO->OUTSET = LED0_MASK | LED1_MASK | LED2_MASK; } - -void board_init(void) -{ -} diff --git a/boards/nz32-sc151/board.c b/boards/nz32-sc151/board.c deleted file mode 100644 index 96347ad85a..0000000000 --- a/boards/nz32-sc151/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2016 Fundacion Inria Chile - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_nz32-sc151 - * @{ - * - * @file - * @brief Board specific implementations for the nz32-sc151 board - * - * @author Francisco Molina - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/openmote-cc2538/board.c b/boards/openmote-cc2538/board.c deleted file mode 100644 index 388f186179..0000000000 --- a/boards/openmote-cc2538/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_openmote-cc2538 - * @{ - * - * @file - * @brief Board specific implementations for the OpenMote-cc2538 board - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - -} diff --git a/boards/p-l496g-cell02/board.c b/boards/p-l496g-cell02/board.c deleted file mode 100644 index e4dc396e41..0000000000 --- a/boards/p-l496g-cell02/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_p-l496g-cell02 - * @{ - * - * @file - * @brief Board specific implementations for the P-L496G-CELL02 board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/pic32-wifire/wifire.c b/boards/pic32-wifire/wifire.c index 1565a3dc57..bf78155cb6 100644 --- a/boards/pic32-wifire/wifire.c +++ b/boards/pic32-wifire/wifire.c @@ -19,9 +19,6 @@ extern void dummy(void); void board_init(void) { - /* Turn off all LED's */ - - /* Stop the linker from throwing away the PIC32 config register settings */ dummy(); } diff --git a/boards/pyboard/board.c b/boards/pyboard/board.c deleted file mode 100644 index 4c2911d6cb..0000000000 --- a/boards/pyboard/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2019 Inria - * 2019 Freie Universität Berlin - * 2019 Kaspar Schleiser - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_pyboard - * @{ - * - * @file - * @brief Board specific implementations for the pyboard - * - * @author Kaspar Schleiser - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/rpi-pico/board.c b/boards/rpi-pico/board.c deleted file mode 100644 index 730c9dd4c2..0000000000 --- a/boards/rpi-pico/board.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2021 Otto-von-Guericke-Universität Magdeburg - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_rpi_pico - * @{ - * - * @file - * @brief Board specific implementations for the Raspberry Pi Pico - * - * @author Marian Buschsieweke - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/saml21-xpro/board.c b/boards/saml21-xpro/board.c deleted file mode 100644 index bcd95d5eed..0000000000 --- a/boards/saml21-xpro/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2015 Kaspar Schleiser - * 2015 FreshTemp, LLC. - * 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_saml21-xpro - * @{ - * - * @file board.c - * @brief Board specific implementations for the Atem SAM L21 Xplained Pro board - * - * @author Thomas Eichinger - * @author Kaspar Schleiser - * - * @} - */ - -#include "board.h" - -void board_init(void) -{ -} diff --git a/boards/seeedstudio-gd32/board.c b/boards/seeedstudio-gd32/board.c deleted file mode 100644 index 6770fd78c2..0000000000 --- a/boards/seeedstudio-gd32/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2020 Koen Zandberg - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_seeedstudio-gd32 - * @{ - * - * @file - * @brief Support for the SeeedStudio GD32 RISC-V board - * - * @author Koen Zandberg - * - * @} - */ - -#include "cpu.h" -#include "board.h" - -void board_init(void) -{ -} diff --git a/boards/seeeduino_xiao/board.c b/boards/seeeduino_xiao/board.c deleted file mode 100644 index c658defcc7..0000000000 --- a/boards/seeeduino_xiao/board.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2021 Franz Freitag, Justus Krebs, Nick Weiler - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_seeeduino_xiao - * @{ - * - * @file - * @brief Board specific implementations for the Seeeduino XIAO board - * - * @author Franz Freitag - * @author Justus Krebs - * @author Nick Weiler - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" -#include "timex.h" - -void board_init(void) -{ - -} diff --git a/boards/serpente/board.c b/boards/serpente/board.c index 4e5aba9750..e63deb5516 100644 --- a/boards/serpente/board.c +++ b/boards/serpente/board.c @@ -55,8 +55,3 @@ static mtd_spi_nor_t serpente_nor_dev = { mtd_dev_t *mtd0 = (mtd_dev_t *)&serpente_nor_dev; #endif /* MODULE_MTD */ - -void board_init(void) -{ - -} diff --git a/boards/stm32f030f4-demo/board.c b/boards/stm32f030f4-demo/board.c deleted file mode 100644 index f96bf9551f..0000000000 --- a/boards/stm32f030f4-demo/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2019 Benjamin Valentin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_stm32f030f4-demo - * @{ - * - * @file - * @brief Board initialization code for the stm32f030f4-demo board. - * - * @author Benjamin Valentin - * - * @} - */ - -#include "board.h" -#include "cpu.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/stm32f0discovery/board.c b/boards/stm32f0discovery/board.c deleted file mode 100644 index 96fbbf23ff..0000000000 --- a/boards/stm32f0discovery/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32f0discovery - * @{ - * - * @file - * @brief Board specific implementations for the STM32F0Discovery evaluation board - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/stm32f3discovery/board.c b/boards/stm32f3discovery/board.c deleted file mode 100644 index f5cb5510af..0000000000 --- a/boards/stm32f3discovery/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32f3discovery - * @{ - * - * @file - * @brief Board specific implementations for the STM32F3Discovery evaluation board - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/stm32f429i-disc1/board.c b/boards/stm32f429i-disc1/board.c deleted file mode 100644 index 70fa8580b5..0000000000 --- a/boards/stm32f429i-disc1/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2018 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32f429i-disc1 - * @{ - * - * @file - * @brief Board specific implementations for the STM32F429I-DISC1 evaluation board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/stm32f469i-disco/board.c b/boards/stm32f469i-disco/board.c deleted file mode 100644 index 937aa994df..0000000000 --- a/boards/stm32f469i-disco/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2021 luisan00 - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32f469i-disco - * @{ - * - * @file - * @brief Board specific implementations for the STM32F469I-DISCO board - * - * @author Luis A. Ruiz - * @} - */ -#include "board.h" -#include "periph/gpio.h" - -#include - -void board_init(void) -{ -} diff --git a/boards/stm32f4discovery/board.c b/boards/stm32f4discovery/board.c deleted file mode 100644 index 32e1ba63b5..0000000000 --- a/boards/stm32f4discovery/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2014 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32f3discovery - * @{ - * - * @file - * @brief Board specific implementations for the STM32F4Discovery evaluation board - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/stm32f723e-disco/board.c b/boards/stm32f723e-disco/board.c deleted file mode 100644 index 7b6a10e665..0000000000 --- a/boards/stm32f723e-disco/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2019 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32f723e-disco - * @{ - * - * @file - * @brief Board specific implementations for the STM32F723E-DISCO board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -#include - -void board_init(void) -{ -} diff --git a/boards/stm32f769i-disco/board.c b/boards/stm32f769i-disco/board.c deleted file mode 100644 index ef70732d0c..0000000000 --- a/boards/stm32f769i-disco/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 OTA keys S.A. - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32f769i-disco - * @{ - * - * @file - * @brief Board specific implementations for the STM32F769I-DISCO board - * - * @author Vincent Dupont - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -#include - -void board_init(void) -{ -} diff --git a/boards/stm32l0538-disco/board.c b/boards/stm32l0538-disco/board.c deleted file mode 100644 index 803386e357..0000000000 --- a/boards/stm32l0538-disco/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2018 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32l0538-disco - * @{ - * - * @file - * @brief Board specific implementations for the STM32L0538-DISCO evaluation board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/stm32l476g-disco/board.c b/boards/stm32l476g-disco/board.c deleted file mode 100644 index b6d406ff12..0000000000 --- a/boards/stm32l476g-disco/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2018 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_stm32l476g-disco - * @{ - * - * @file - * @brief Board specific implementations for the STM32L476G-DISCO board - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/stm32mp157c-dk2/board.c b/boards/stm32mp157c-dk2/board.c deleted file mode 100644 index d1188bd51e..0000000000 --- a/boards/stm32mp157c-dk2/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2020 Savoir-faire Linux - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License v2.1. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @ingroup boards_stm32mp157c-dk2 - * @{ - * - * @file - * @brief Board specific implementations for the STM32MP157C-DK2 board - * - * @author Gilles DOFFE - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -#include - -void board_init(void) -{ -} diff --git a/boards/teensy31/board.c b/boards/teensy31/board.c deleted file mode 100644 index 0c59003a86..0000000000 --- a/boards/teensy31/board.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2017 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_teensy31 - * @{ - * - * @file - * @brief Board specific implementations for the Teensy3.1 & 3.2 boards - * - * @author Loïc Dauphin - * - * @} - */ - -#include -#include - -#include "board.h" -#include "cpu.h" -#include "periph/gpio.h" - -void board_init(void) -{ - -} diff --git a/boards/ublox-c030-u201/board.c b/boards/ublox-c030-u201/board.c deleted file mode 100644 index b0aa265417..0000000000 --- a/boards/ublox-c030-u201/board.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2018 OTA keys S.A. - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_ublox-c030-u201 - * @{ - * - * @file - * @brief Board specific implementations for the Ublox C030-U201 board - * - * @author Vincent Dupont - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/boards/yarm/board.c b/boards/yarm/board.c deleted file mode 100644 index b73e670a11..0000000000 --- a/boards/yarm/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020 Antonio Galea - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_yarm - * @{ - * - * @file board.c - * @brief Board specific implementations for the Acmesystems - * YARM board - * - * @author Antonio Galea - * - * @} - */ - -#include - -#include "board.h" -#include "cpu.h" -#include "periph/gpio.h" - -void board_init(void) -{ -} diff --git a/cpu/esp32/startup.c b/cpu/esp32/startup.c index 281cb34382..a0c216777b 100644 --- a/cpu/esp32/startup.c +++ b/cpu/esp32/startup.c @@ -372,6 +372,7 @@ static NORETURN void IRAM system_init (void) #endif /* initialize the board */ + extern void board_init(void); board_init(); /* route a software interrupt source to CPU as trigger for thread yields */ diff --git a/doc/doxygen/src/porting-boards.md b/doc/doxygen/src/porting-boards.md index f729cb0ec1..a5f1bda18e 100644 --- a/doc/doxygen/src/porting-boards.md +++ b/doc/doxygen/src/porting-boards.md @@ -61,8 +61,8 @@ configurations. e.g: somewhere else then they must be added to the include path. In `Makefile.include`: `INCLUDES += -I//` -Board initialization functions are defined in `board.c`. This file must at -least define a `board_init()` function that is called at startup. +Board initialization functions are defined in `board.c`. +This file can define a `board_init()` function that is called at startup. It is run before the scheduler is started, so it must not block (e.g. by performing I2C operations). diff --git a/makefiles/defaultmodules.inc.mk b/makefiles/defaultmodules.inc.mk index 65ab128606..74849bbbab 100644 --- a/makefiles/defaultmodules.inc.mk +++ b/makefiles/defaultmodules.inc.mk @@ -1,4 +1,4 @@ -DEFAULT_MODULE += board cpu core core_init core_msg core_panic sys +DEFAULT_MODULE += board board_common_init cpu core core_init core_msg core_panic sys # Include potentially added default modules by the board -include $(BOARDDIR)/Makefile.default