From 43585804b76074ab46d00985cdbdcf7aa0f417b6 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sat, 23 May 2020 16:04:30 +0200 Subject: [PATCH] tests/stm32_bootloader: add test for STM32 bootloader mode --- tests/stm32_bootloader/Makefile | 10 +++++++++ tests/stm32_bootloader/main.c | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tests/stm32_bootloader/Makefile create mode 100644 tests/stm32_bootloader/main.c diff --git a/tests/stm32_bootloader/Makefile b/tests/stm32_bootloader/Makefile new file mode 100644 index 0000000000..ea9ef31f44 --- /dev/null +++ b/tests/stm32_bootloader/Makefile @@ -0,0 +1,10 @@ +BOARD ?= nucleo-f411re +include ../Makefile.tests_common + +FEATURES_REQUIRED = bootloader_stm32 + +USEMODULE += shell +USEMODULE += shell_commands +USEMODULE += usb_board_reset + +include $(RIOTBASE)/Makefile.include diff --git a/tests/stm32_bootloader/main.c b/tests/stm32_bootloader/main.c new file mode 100644 index 0000000000..f61f9fc6b5 --- /dev/null +++ b/tests/stm32_bootloader/main.c @@ -0,0 +1,37 @@ +/* + * 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 tests + * @{ + * + * @file + * @brief Test application to activate the STM32 bootloader mode. + * + * @author Benjamin Valentin + * + * @} + */ + +#include +#include + +#include "shell.h" +#include "shell_commands.h" + +int main(void) +{ + char line_buf[SHELL_DEFAULT_BUFSIZE]; + + puts("STM32 bootloader test application."); + + /* bootloader command is provided by default */ + shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE); + + return 0; +}