1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

stdio_semihosting: Add shell-based test application

This commit is contained in:
Koen Zandberg 2020-02-09 12:52:52 +01:00
parent 99ca736b53
commit 11ee5ff2cf
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B
3 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,10 @@
include ../Makefile.tests_common
USEMODULE += stdio_semihosting
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += ps
RIOT_TERMINAL = semihosting
include $(RIOTBASE)/Makefile.include

View File

@ -0,0 +1,13 @@
# Semihosting STDIO test
This test aims to test ARM semihosting based STDIO on RIOT. The test is manual,
starting a debugger on the CI for automated test is not supported.
## Usage
1. Flash the test on a board with an ARM-based MCU.
2. Use `make term RIOT_TERMINAL=semihosting` to start a debug session with
semihosting enabled.
3. Restart the microcontroller via the debug session.
The shell prompt should be available in the GDB session.

View File

@ -0,0 +1,35 @@
/*
* 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 tests
* @{
*
* @file
* @brief STDIO Semihosting test application using simple shell
* interaction
*
* @author Koen Zandberg <koen@bergzand.net>
*
* @}
*/
#include <stdio.h>
#include "shell.h"
#include "shell_commands.h"
int main(void)
{
puts("STDIO semihosting test application");
char line_buf[SHELL_DEFAULT_BUFSIZE];
shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE);
return 0;
}