ANALYSIS OF STM32 FAMILY SUPPORT IN THE .NET ECO-SYSTEM AND PERSPECTIVES FOR COMMUNITY TARGETS DEVELOPMENT

Authors

DOI:

https://doi.org/10.35546/kntu2078-4481.2025.4.3.25

Keywords:

NET nanoFramework, STM32, microcontrollers, managed code, portability, embedded systems, IoT, CLR, BSP, peripheral modules

Abstract

This article presents a systematic review of the support provided for the STM32 microcontroller series within the managed environment of.NET nanoFramework. The platform architecture is examined, including its multi-layered structure composed of the bootloader (nanoBooter), runtime core (nanoCLR), peripheral abstraction layer (PAL), and device libraries, as well as the specifics of its adaptation to various STM32 families such as F4, F7, and H7. The study identifies the primary advantages of using managed code on microcontrollers, including reduced development time due to the object-oriented programming model, rapid prototyping capabilities, integration with Visual Studio and Dev Containers, and simplified handling of peripheral modules via the C# API. Simultaneously, the limitations and portability challenges are discussed, such as CLR resource demands, differences in DMA, USB, and caching support across STM32 series, and the need for manual BSP and project configuration to ensure stable operation across different targets. A comparative analysis of the STM32 series in the context of nanoFramework support is provided: mid-range series (F4) are optimal for prototyping and educational projects, lower-end series (F0, L0) are limited in memory and peripheral features, and high-performance series (F7, H7) enable complex multithreaded and IoT applications given proper configuration of caches, DMA, and clock multipliers. Based on literature analysis and open-source sources, practical recommendations are offered: select the STM32 series according to task complexity, optimize memory usage, adhere to BSP standards and test code portability across series, utilize automation tools for build and deployment, and in time-critical applications, combine C# with native C code. This article targets embedded systems developers, IoT researchers, and educational institutions seeking to effectively employ managed code on STM32 while maintaining software flexibility and portability.

References

Ramel, D. Code Small with C# in.NET nanoFramework for Embedded Systems. Visual Studio Magazine. 2020. URL:https://visualstudiomagazine.com/articles/2020/10/01/net-nanoframework.aspx (дата звернення: 04.11.2025).

Ellerbach, L. Show.NET: Running my.NET nanoFramework for 8 years on a battery. The.NET Blog (Microsoft). 2021. June 10. URL: https://devblogs.microsoft.com/dotnet/show-dotnet-running-my-net-nanoframework-for-8-years-on-a-battery (дата звернення: 04.11.2025).

Gorter, F. nanoFramework – C# for microcontrollers with 64 KB RAM. Feiko.io Blog. 2021. May 17. URL: https://www.feiko.io/posts/2021-05-17-nanoframework-c-for-microcontrollers-with-64k-ram (дата звернення: 04.11.2025).

Vrbančič, F., Kocijančič, S. Strategy for learning microcontroller programming – a graphical or a textual start? Education and Information Technologies. 2024. Vol. 29, No. 2. URL: https://doi.org/10.1007/s10639-023-12024-9

Atwood, J. On Managed Code Performance, Again. Coding Horror Blog. 2005. May 23. URL: https://blog.codinghorror.com/on-managed-code-performance-again (дата звернення: 04.11.2025).

Li, W., Guan, L., Lin, J., Shi, J., Li, F. From Library Portability to Para-rehosting: Natively Executing Microcontroller Software on Commodity Hardware. arXiv preprint arXiv:2107.12867. 2021. URL: https://arxiv.org/abs/2107.12867 (дата звернення: 04.11.2025).

Lin, J., Chen, W.-M., Lin, Y., Cohn, J., Gan, C., Han, S. MCUNet: Tiny Deep Learning on IoT Devices. arXiv preprint arXiv:2007.10319. 2020. URL: https://arxiv.org/abs/2007.10319 (дата звернення: 04.11.2025).

Haug, S., Böhm, C., Mayer, D. Automated Code Generation and Validation for Software Components of Microcontrollers. arXiv preprint arXiv:2502.18905. 2025. URL: https://arxiv.org/abs/2502.18905 (дата звернення: 04.11.2025).

.NET nanoFramework Docs. nanoFramework Documentation – STM32 Community Targets [Електронний ресурс]. 2024. URL: https://docs.nanoframework.net/content/community-targets/index.html (дата звернення: 04.11.2025).

.NET nanoFramework Docs. Building for STM32 Boards –. NET nanoFramework Developer Guide [Електронний ресурс]. 2024. URL: https://docs.nanoframework.net/content/building/build-stm32.html (дата звернення: 04.11.2025).

.NET nanoFramework Docs. Creating a Community Board for STM32 in.NET nanoFramework [Електронний ресурс]. 2024. URL: https://docs.nanoframework.net/content/stm32/create-community-board.html (дата звернення: 04.11.2025).

.NET nanoFramework Website. Overview of the.NET nanoFramework [Електронний ресурс]. 2023. URL: https://nanoframework.net/overview-of-nanoframework (дата звернення: 04.11.2025).

.NET nanoFramework Blog. Celebrating IoT Day with.NET nanoFramework: Empowering IoT Solutions with Ease. nanoFramework Blog. 2024. URL: https://nanoframework.net/celebrating-iot-day-with-net-nanoframework- empowering-iot-solutions-with-ease (дата звернення: 04.11.2025).

.NET nanoFramework Official Site. Home –. NET nanoFramework [Електронний ресурс]. 2025. URL: https:// nanoframework.net/home (дата звернення: 04.11.2025).

.NET nanoFramework Project Page. 502 – Status and Release Roadmap [Електронний ресурс]. 2023. URL: https://nanoframework.net/502-2 (дата звернення: 04.11.2025).

STMicroelectronics Documentation. STM32Cube Programmer (UM2237) [Електронний ресурс]. 2023. URL: https://www.st.com/en/development-tools/stm32cubeprog.html (дата звернення: 04.11.2025).

STMicroelectronics. STM32 Cube HAL Driver User Manual [Електронний ресурс]. 2023. URL: https://www.st.com/en/embedded-software/stm32cubef4.html (дата звернення: 04.11.2025).

STMicroelectronics. STM32 Discovery Boards Overview [Електронний ресурс]. 2024. URL: https://www.st.com/en/evaluation-tools/stm32-discovery-kits.html (дата звернення: 04.11.2025).

STMicroelectronics Corporate Site. MCU and MPU Portfolio – STM32 Families [Електронний ресурс]. 2025. URL: https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html (дата звернення: 04.11.2025).

Microsoft Docs..NET Runtime and IL Execution Model [Електронний ресурс]. 2024. URL: https://learn. microsoft.com/en-us/dotnet/standard/managed-code (дата звернення: 04.11.2025).

Microsoft Docs. CLR Internals – Garbage Collection in Embedded Environments [Електронний ресурс]. 2024. URL: https://learn.microsoft.com/en-us/dotnet/standard/garbage-collection (дата звернення: 04.11.2025).

Pizlo, F. Garbage Collection in Real-Time and Embedded Systems: A Survey. ACM Computing Surveys. 2020. URL: https://doi.org/10.1145/3406090

Microsoft Learn. Compare.NET nanoFramework with.NET IoT – Code Samples [Електронний ресурс]. 2023. June 29. URL: https://learn.microsoft.com/en-us/samples/dotnet/samples/compare-nanoframework-with-dotnet-core-iot/ (дата звернення: 04.11.2025).

de Souza, D., Ribeiro, M., Martins, A. Benchmarking Managed vs Native Code on Embedded Cortex-M Systems. IEEE Access. 2021. Vol. 9. P. 116523–116534.

Martinsen, H., Kvale, S. Portability Strategies for C# in Embedded Systems. Journal of Embedded Computing. 2023. Vol. 18, No. 4. P. 227–241

Carbone, S., Cassar, M. Managed Languages in Low-Power Embedded Applications: Trade-offs and Future Trends. Microprocessors and Microsystems. 2023. Vol. 98. P. 104941. URL: https://doi.org/10.1016/j.micpro.2023.104941 (дата звернення: 04.11.2025).

Plauska I., Liutkevičius A. Performance Evaluation of C/C++, MicroPython, Rust and TinyGo on ESP32. Electronics. 2023, No. 12. URL: https://doi.org/10.3390/electronics12010143.

Ryu, J., Han, Y. Adaptive Memory Management for IoT Devices. Sensors. 2023. Vol. 23, No. 8. P. 3751.

Stack Overflow. NanoFramework STM32 Nucleo_F103RB E5006 [Електронний ресурс]. 2024. January 23. URL: https://stackoverflow.com/questions/77866771/nanoframework-stm32-nucleo-f103rb-e5006 (дата звернення: 04.11.2025).

.NET nanoFramework Docs. Porting and Board Bring-Up Guide for.NET nanoFramework [Електронний ресурс]. 2024. URL: https://docs.nanoframework.net/content/building/porting.html (дата звернення: 04.11.2025).

GitHub. nanoframework/nfCommunityTargets [Електронний ресурс]. n.d. URL: https://github.com/nanoframework/nf-Community-Targets (дата звернення: 04.11.2025).

NuGet. nanoFramework.Hardware.Stm32 [Електронний ресурс]. n.d. URL: https://www.nuget.org/packages/nanoFramework.Hardware.Stm32 (дата звернення: 04.11.2025).

Downloads

Published

2025-12-31