Abstract
A Matlab/Simulink library for an unsupported microcontroller is developed in this study. The library is implemented by two main steps. First, analyzing and creating Simulink blocks for common peripherals of the microcontroller by using S-Function that combines embedded C language and Target Language Compiler (TLC) language to implement the mechanism for automatic transferring from a peripheral block to a C-embedded program. Second, proposing an algorithm in TLC language to generate automatically an embedded project that links all generated C-files, compile it to binary program, and write to the memory of the target microcontroller. The embedded project is run on the Keil C version 4.0 and the low-cost STM32F4Discovery board developed by STMicroelectronics. The experimental results have shown that the proposed library was designed successfully, generated codes are optimistic, and executed exactly on the target development board. The method in this study can be potentially applied to other microcontrollers.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Berisch, G., Donath, H., Heinrich, F., Huebener, I., Lipke, T., Mende, T., Schriefer, M., Schulte, H., Zajac, M.: Design and development of a low cost rapid control prototyping system applied to an air suspension system. In: Proceedings of the 9th IFAC Symposium Advances in Control Education, Russia, pp. 194–199 (2012)
Horak, K., Zalud, L.: Image processing on raspberry Pi for mobile robotics. Int. J. Signal Process. Syst. 4(6), 494–498 (2016)
Vitale, V., Centioli, C., Iannone, F., Panella, M., Pangione, L., Sabatini, M., Zaccarian, L., Zuccalà , R.: A Matlab based framework for the real-time environment at FTU. Fusion Eng. Des. 82, 1089–1093 (2007)
Zuo, W., Li, Y., Wang, F., Hou, X.: A new design method of automotive electronic real-time control System. Phys. Procedia 25, 1126–1132 (2012)
Lambersky, V.: Model based design and automated code generation from Simulink targeted for TMS570 MCU. In: 5th European DSP Education and Research Conference (EDERC), pp. 225–228 (2012)
Khanh, N.V.: A framework for transferring algorithms designed on Matlab/Simulink to arm microcontroller embedded systems. Can Tho Univ. J. Sci. 4, 36–45 (2016)
Lamberský, V., Vejlupek, J., Sova, V., Grepl, R.: Development of Simulink blockset for embedded system with complex peripherals. In: Proceedings of the 2014 International Conference on Electronics and Communication Systems II (ECS’14), Prague, Czech Republic, pp. 112–117 (2014)
Mathworks: Target Language Compiler Reference Guide. The Mathworks Inc. (1999)
STMElectronics: Discovery Kit with STM32F407VG MCU. User manual (2017)
CMSIS DSP Software Library. https://www.keil.com/pack/doc/CMSIS/DSP/html/. Accessed 28 Oct 2020
Acknowledgements
This study was supported by the Can Tho University, the project number is T2016-11.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Van Khanh, N. et al. (2021). Development of Matlab/Simulink Library for Unsupported Microcontrollers, Case Study: STM32F407. In: Choudhury, S., Gowri, R., Sena Paul, B., Do, DT. (eds) Intelligent Communication, Control and Devices. Advances in Intelligent Systems and Computing, vol 1341. Springer, Singapore. https://doi.org/10.1007/978-981-16-1510-8_16
Download citation
DOI: https://doi.org/10.1007/978-981-16-1510-8_16
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-16-1509-2
Online ISBN: 978-981-16-1510-8
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)