Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
57 changes: 57 additions & 0 deletions demos/STM32/RT-STM32-XSHELL/cfg/stm32u575zi_nucleo144/portab.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

/**
* @file portab.c
* @brief Application portability module code.
*
* @addtogroup application_portability
* @{
*/

#include "hal.h"

#include "portab.h"

/*===========================================================================*/
/* Module local definitions. */
/*===========================================================================*/

/*===========================================================================*/
/* Module exported variables. */
/*===========================================================================*/

/*===========================================================================*/
/* Module local types. */
/*===========================================================================*/

/*===========================================================================*/
/* Module local variables. */
/*===========================================================================*/

/*===========================================================================*/
/* Module local functions. */
/*===========================================================================*/

/*===========================================================================*/
/* Module exported functions. */
/*===========================================================================*/

void portab_setup(void) {

}

/** @} */
76 changes: 76 additions & 0 deletions demos/STM32/RT-STM32-XSHELL/cfg/stm32u575zi_nucleo144/portab.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

/**
* @file portab.h
* @brief Application portability macros and structures.
*
* @addtogroup application_portability
* @{
*/

#ifndef PORTAB_H
#define PORTAB_H

/*===========================================================================*/
/* Module constants. */
/*===========================================================================*/

#define PORTAB_LINE_LED1 LINE_LED_GREEN
#define PORTAB_LINE_LED2 LINE_LED_BLUE
#define PORTAB_LED_OFF PAL_LOW
#define PORTAB_LED_ON PAL_HIGH

#define PORTAB_LINE_BUTTON LINE_BUTTON
#define PORTAB_BUTTON_PRESSED PAL_HIGH

#define PORTAB_SIOD1 SIOD1

/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/

/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/

/*===========================================================================*/
/* Module data structures and types. */
/*===========================================================================*/

/*===========================================================================*/
/* Module macros. */
/*===========================================================================*/

/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/

#ifdef __cplusplus
extern "C" {
#endif
void portab_setup(void);
#ifdef __cplusplus
}
#endif

/*===========================================================================*/
/* Module inline functions. */
/*===========================================================================*/

#endif /* PORTAB_H */

/** @} */
4 changes: 2 additions & 2 deletions demos/STM32/RT-STM32-XSHELL/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2025 Giovanni Di Sirio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -143,7 +143,7 @@ int main(void) {
*/
static thread_t thd1;
static const THD_DECL_STATIC(thd1_desc, "blinker", thd1_stack,
NORMALPRIO + 10, thd1_func, NULL, NULL);
NORMALPRIO + 10, thd1_func, NULL);
chThdSpawnRunning(&thd1, &thd1_desc);

/*
Expand Down
57 changes: 57 additions & 0 deletions demos/STM32/RT-STM32-XSHELL/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
*****************************************************************************
** ChibiOS/RT X-Shell Demo for STM32. **
*****************************************************************************

** TARGET **

The demo supports multiple STM32 target boards:
- STM32 Nucleo144-H563ZI board (stm32h563zi_nucleo144.make)
- STM32 Nucleo144-U575ZI board (stm32u575zi_nucleo144.make)
- STM32 Nucleo64-C071RB board (stm32c071rb_nucleo64.make)
- STM32 Nucleo64-G474RE board (stm32g474re_nucleo64.make)
- STM32 Nucleo64-U083RC board (stm32u083rc_nucleo64.make)
- STM32 Nucleo64-U385RG board (stm32u385rg_nucleo64.make)

** The Demo **

This demo demonstrates the X-Shell (extended shell) functionality on various
STM32 boards. X-Shell provides an interactive command-line interface with
features like command history, editing, and various built-in commands.

The shell is accessible via the serial port (typically mapped on USB virtual
COM port or STLink v2-1 Virtual COM Port, depending on the board).

Available shell commands include:
- halt: Halts the system
- write: Write test command
- clock: Clock-related commands
- test: Run system tests (RT and OSLIB test suites)
- systime: Display system time
- mem: Display memory information
- threads: List running threads
- And other standard X-Shell commands

** Build Procedure **

The demo can be built for different target boards by using the corresponding
makefile in the make/ directory:

make -f make/stm32h563zi_nucleo144.make
make -f make/stm32u575zi_nucleo144.make
make -f make/stm32g474re_nucleo64.make
make -f make/stm32c071rb_nucleo64.make
make -f make/stm32u083rc_nucleo64.make
make -f make/stm32u385rg_nucleo64.make

Alternatively, run 'make' at the root to build all targets.

The demo has been tested using the free GCC ARM embedded toolchain.

** Notes **

Some files used by the demo are not part of ChibiOS/RT but are copyright of
ST Microelectronics and are licensed under a different license.
Also note that not all the files present in the ST library are distributed
with ChibiOS/RT, you can find the whole library on the ST web site:

http://www.st.com