mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/stm32_bootloader: add test for STM32 bootloader mode
This commit is contained in:
parent
0819f0eb39
commit
43585804b7
10
tests/stm32_bootloader/Makefile
Normal file
10
tests/stm32_bootloader/Makefile
Normal file
@ -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
|
37
tests/stm32_bootloader/main.c
Normal file
37
tests/stm32_bootloader/main.c
Normal file
@ -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 <benpicco@googlemail.com>
|
||||||
|
*
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user