diff --git a/profile/FuSa.md b/profile/FuSa.md index 4fb615e..40435a4 100644 --- a/profile/FuSa.md +++ b/profile/FuSa.md @@ -6,18 +6,16 @@ The [MDK Professional Edition](https://www.keil.arm.com/keil-mdk/#mdk-v6-editions) includes safety features that help developers achieve compliance with standards like ISO 26262 (Automotive), IEC 61508 (Industrial), and IEC 62304 (Medical). It includes the [Arm Compiler for Embedded FuSa](https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Embedded%20FuSa) and the [Arm FuSa Run-Time System](https://developer.arm.com/Tools%20and%20Software/Keil%20MDK/FuSa%20Run-Time%20System). For integration of third-party tools for static code analysis and MISRA checking, Keil Studio creates a standard database. -
- -
- As detailed in [Application Note KAN345](https://developer.arm.com/documentation/KAN345/latest), FuSa RTS provides a set of TÜV Süd certified software components: Keil RTX RTOS, FuSa Event Recorder, FuSa CMSIS-Core for processor access, and FuSa C library specifically implemented for safety applications. The [Application Note KAN326 - Using X-CUBE-STL with Arm FuSa RTS](https://developer.arm.com/documentation/kan326/latest/) explains how to integrate the STMicroelectronics [X-CUBE-STL](https://www.st.com/en/embedded-software/x-cube-stl.html) Software Test Libraries that detect random hardware failures. FuSa RTS includes process isolation capabilities by preventing undesired interference between software components with different safety integrity levels. Spatial isolation is enforced through MPU Protected Zones that control access to memory and peripherals. Safety Classes implement access control to RTOS objects and kernel operations. Temporal isolation is achieved through Thread Watchdog mechanisms that monitor timing constraints, while Controlled System Recovery provides mechanisms to block execution of non-safety application components and to proceed to a safety state operation in case of failures. +
+ ### Traffic Light Safety Example -The [Safety-Example-STM32](https://github.com/Arm-Examples/Safety-Example-STM32) repository demonstrates functional safety concepts on STMicroelectronics devices using Keil Studio. The `TrafficLight.csolution` showcases FuSa RTS process isolation features including safety classes, MPU protected zones, and fault handling in a practical traffic light controller scenario. These examples use the open-source Keil RTX for evaluation purposes with the MDK-Community edition, providing similar functionality to the commercial FuSa RTS. The repository demonstrates integration with the CMSIS-Toolbox and CI workflows, including GitHub Actions for automated builds and hardware-in-the-loop testing on a NUCLEO-H563ZI board. +The [Safety-Example-STM32](https://github.com/Arm-Examples/Safety-Example-STM32) repository demonstrates functional safety concepts on STMicroelectronics devices using Keil Studio. It uses the MPU of the Cortex-M33 (Arm-v8M architecture). The `TrafficLight.csolution` showcases FuSa RTS process isolation features including safety classes, MPU protected zones, and fault handling in a practical traffic light controller scenario. These examples use the open-source Keil RTX for evaluation purposes with the MDK-Community edition, providing similar functionality to the commercial FuSa RTS. The repository demonstrates integration with the CMSIS-Toolbox and CI workflows, including GitHub Actions for automated builds and hardware-in-the-loop testing on a NUCLEO-H563ZI board. ![Traffic Light Example - Structure](https://raw.githubusercontent.com/Arm-Examples/Safety-Example-STM32/main/Doc/traffic_light.png "Traffic Light Example - Structure") -The [Safety-Example-Infineon-T2G](https://github.com/Arm-Examples/Safety-Example-Infineon-T2G) is a similar example, but uses the MPU integrated in Cortex-M7 and showcases the setup on a multicore device. +The [Safety-Example-Infineon-T2G](https://github.com/Arm-Examples/Safety-Example-Infineon-T2G) is a similar example, but uses the MPU integrated in Cortex-M7 (Arm-v7M architecture) and showcases the setup on a multicore device. diff --git a/profile/IntroVideo.png b/profile/IntroVideo.png index f8194bb..920c4a8 100644 Binary files a/profile/IntroVideo.png and b/profile/IntroVideo.png differ diff --git a/profile/ML_Video.png b/profile/ML_Video.png index dff4f33..9e6fd18 100644 Binary files a/profile/ML_Video.png and b/profile/ML_Video.png differ diff --git a/profile/README.md b/profile/README.md index ac9cbc8..70f58f4 100644 --- a/profile/README.md +++ b/profile/README.md @@ -1,8 +1,8 @@ # Examples for Embedded Developers -Arm-Examples contains ready-to-run embedded projects showcasing RTOS, machine learning, functional safety, and CI/CD automation across diverse Arm-based hardware platforms. +Arm-Examples contains ready-to-run embedded projects showcasing RTOS, machine learning, functional safety, and CI/CD automation across diverse Arm-based hardware platforms. -[Introduction to Keil Studio](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250715_Introduction_to_Keil_Studio.mp4 "Introduction to Keil Studio") +[Introduction to Keil Studio](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250715_Introduction_to_Keil_Studio.mp4 "Introduction to Keil Studio") These examples leverage Keil Studio, CMSIS-Toolbox, and Arm FVP models with various compilers (Arm Compiler 6, GCC, LLVM) enabling both desktop and cloud-based CI/CD workflows with physical hardware and simulation models. @@ -12,24 +12,22 @@ Keil Studio is Arm's new IDE for embedded development directly in Visual Studio ## RTOS Applications -Keil Studio is designed for all types of embedded projects, ranging from bare-metal firmware to complex RTOS-based systems. How to choose the right option: bare-metal, Keil RTX, FreeRTOS, and Zephyr? [**Learn more ...**](BareMetal2RTOS.md "Bare-Metal or RTOS") +Keil Studio is designed for all types of embedded projects, ranging from bare-metal firmware to complex RTOS-based systems. [**Learn how to choose the right option:**](BareMetal2RTOS.md "Bare-Metal or RTOS") bare-metal, Keil RTX, FreeRTOS, or Zephyr? | Example | Hardware | Content | |:--------|:---------|:--------| -| [Hello_World](https://github.com/Arm-Examples/Hello_NUCLEO-G474RE) | ST NUCLEO-G474RE | Keil RTX configuration; prints "Hello World, 0..9" on the serial console. | -| [Middleware_USB_FS](https://github.com/Arm-Examples/Middleware_USB_FS) | STM32F7 | Using MDK-Middleware with USB Device and File System. It also shows how to target custom hardware. [Watch the related webinar](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250729_Working_with_STM32_devices.mp4). | -| [CMSIS-Zephyr](https://github.com/Arm-Examples/SDS-Examples) | Various | Examples showing the usage Zephyr applications with Keil Studio. | +| [Hello_World](https://github.com/Arm-Examples/Hello_NUCLEO-G474RE) | Various | Setup of [bare-metal or RTOS](BareMetal2RTOS.md "Bare-Metal or RTOS") configuration with [serial I/O retargeting](Serial.md "Serial I/O Messages"); prints "Hello World .." on serial console. | +| [Middleware_USB_FS](https://github.com/Arm-Examples/Middleware_USB_FS) | STM32F7 | MDK-Middleware with USB Device and File System for evaluation kits and custom hardware. [Watch the related webinar](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250729_Working_with_STM32_devices.mp4). | +| [CMSIS-Zephyr](https://github.com/Arm-Examples/SDS-Examples) | Various | Zephyr application examples with Keil Studio demonstrate multi-target and debug setup. | ## Edge AI and Machine Learning -[Development flow for optimized Edge AI devices](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250812_Multicore_Alif.mp4?#t=07:22 "Development flow for optimized Edge AI devices") +[Development flow for optimized Edge AI devices](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250812_Multicore_Alif.mp4?#t=07:22 "Development flow for optimized Edge AI devices") Comprehensive machine learning capabilities are available with ML Evaluation Kit (MLEK), Synchronous Data Streaming (SDS) Framework, LiteRT (TensorFlow), and Executourch that utilizes CMSIS-NN (for Cortex-M) or Vela (for Ethos-U). **[Watch this video to learn more...](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250812_Multicore_Alif.mp4?#t=07:22 "Development flow for optimized Edge AI devices")**
-
- | Example | Hardware | Content | |:--------|:---------|:--------| | [CMSIS-MLEK-Examples](https://github.com/Arm-Examples/cmsis-mlek-examples) | Alif Ensemble E7 | Pre-configured machine learning (ML) projects using the ML Embedded Evaluation Kit. [Watch the related webinar](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250812_Multicore_Alif.mp4">). | @@ -38,7 +36,7 @@ Comprehensive machine learning capabilities are available with ML Evaluation Kit ## Functional Safety (FuSa RTS) -[Software development for safety critical applications](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250930_FuSa_TRAVEO.mp4?#t=01:35 "Software development for safety critical applications") +[Software development for safety critical applications](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250930_FuSa_TRAVEO.mp4?#t=01:35 "Software development for safety critical applications") The [MDK Professional Edition](https://www.keil.arm.com/keil-mdk/#mdk-v6-editions) includes safety features that help developers achieve compliance with standards like ISO 26262 (Automotive), IEC 61508 (Industrial), and IEC 62304 (Medical). It includes the [Arm Compiler for Embedded FuSa](https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Embedded%20FuSa) and the [Arm FuSa Run-Time System](https://developer.arm.com/Tools%20and%20Software/Keil%20MDK/FuSa%20Run-Time%20System). @@ -46,8 +44,6 @@ The [MDK Professional Edition](https://www.keil.arm.com/keil-mdk/#mdk-v6-edition
-
- | Example | Hardware | Content | |:--------|:---------|:---------| | [Safety-Example-Infineon-T2G](https://github.com/Arm-Examples/Safety-Example-Infineon-T2G) | Infineon Traveo T2G (Cortex-M7)| [Fusa RTS](https://developer.arm.com/Tools%20and%20Software/Keil%20MDK/FuSa%20Run-Time%20System) traffic light example, CMSIS-Driver development and verification. [Watch the related webinar](https://armkeil.blob.core.windows.net/developer/Files/videos/KeilStudio/20250930_FuSa_TRAVEO.mp4). | diff --git a/profile/SafetyVideo.png b/profile/SafetyVideo.png index 461df81..b694545 100644 Binary files a/profile/SafetyVideo.png and b/profile/SafetyVideo.png differ diff --git a/profile/Serial.md b/profile/Serial.md new file mode 100644 index 0000000..38ec261 --- /dev/null +++ b/profile/Serial.md @@ -0,0 +1,60 @@ +[**Arm Examples**](README.md) » **Serial I/O Messages** + +# Serial I/O Messages + +On microcontrollers, serial I/O messages (printf-style output) can be sent to a host PC in several ways. The most widely used are semihosting, UART, and RTT. Each method has different trade-offs in terms of speed, intrusiveness, hardware requirements, and suitability for production code. + + +The Arm CMSIS Debugger extension supports (with pyOCD and Segger J-Link server) semihosting and RTT. For UART communication, a terminal program is used and no special debugger support is required. With Keil Studio, the Serial Monitor can be used to connect to all types of serial I/O messages. For more information, see [CMSIS-View documentation](https://arm-software.github.io/CMSIS-View/latest/index.html). + + +## Technology Overview + +### Semihosting + +Semihosting is a debugger-assisted I/O mechanism defined by Arm. The Cortex-M processor executes a special instruction (usually BKPT), which the debugger intercepts. The debugger then performs I/O operations on behalf of the target, such as printing text to the IDE console. For details, see [Arm Semihosting documentation](https://github.com/ARM-software/abi-aa/blob/main/semihosting/semihosting.rst#introduction). + + +With semihosting, the application calls a C library I/O function (e.g. _write, printf). Inside this library function, the CPU executes a breakpoint (BKPT) instruction. The Debugger halts the CPU, reads the memory that contains the message, the CPU resumes execution, and outputs this message to a TCP port (for display) or file (for logging). + + +Semihosting requires no hardware configuration and is easy to use for quick debugging. No extra pins are required and it is typically used in early in startup (even before clocks are set) of a hardware platform. Due to the communication via a breakpoint, the communication is slow and intrusive (program execution is stopped). It is not recommended for use in production systems. + + +### UART (Serial Port) + +UART is the traditional hardware serial interface. Data is transmitted via dedicated TX/RX pins typically to a serial adapter (USB-to-UART). The application code implements I/O retargeting to an UART peripheral. + +The communication requires an UART peripheral with TX (and optionally RX) pins. As it does not require debugger capabilities, but just a simple terminal program, UART communication can be widely used during application development up to message logging in production hardware. It requires pins, clock setup, and hardware and the bandwidth is limited by the baudrate (typical 115200bps). + + +The implementation of UART communication can be tricky with an RTOS system that runs multiple threads and a blocking printf routine can affect real-time behavior of the software. + +### RTT (Real-Time Transfer) + +RTT is a memory-based debug communication mechanism developed by SEGGER. The application code implements I/O retargeting to RAM ring buffers on the target, and the debugger reads those buffers periodically via the SWD/JTAG interface, without halting the CPU. See [SEGGER RTT documentation](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/) for more information. + + +RTT requires a simple module that is linked into the firmware and is easy to use. No extra pins are required and it is easy to implement in a hardware platform. The communication speed depends on the debugger and the debug clock setup, but is typically faster than UART communication. + +For the communication a debugger with RTT support is required. As the debugger performs a hand-shake protocol, RTT is not suitable for production hardware that should be used without debugger. + +### Summary + +- Semihosting: Best for quick debugging in early bring-up. Simple but intrusive and slow. +- UART: The most versatile and production-ready method. Requires hardware but works everywhere. +- RTT: Ideal real-time debug logging during development when a debugger is connected. + +| Feature | Semihosting | UART | RTT | +|:-------------------|:-------------|:--------------------------|:-----| +| Debugger required | Yes | No | Yes | +| CPU halted | Yes | No | No | +| Speed | Slow | Medium | Fast | +| Hardware pins | None | Yes (TX/RX) | None | +| Real-time safe | No | Depends on implementation | Yes | +| Production use | No | Yes | No | +| Setup complexity | Very low | Medium | Low | + +## Usage + +ToDo \ No newline at end of file