DOI QR코드

DOI QR Code

Porting gcc Based eCos OS and PROFINET Communication Stack to IAR

gcc 기반 eCos 운영체제 및 PROFINET 통신 스택의 IAR 포팅 방법

  • Received : 2022.10.07
  • Accepted : 2022.12.28
  • Published : 2023.04.30

Abstract

This paper describes how to port the eCos operating system and PROFINET communication stack developed based on gcc to the IAR compiler. The eCos operating system provides basic functions such as multi-thread, TCP/IP, and device driver for PROFINET operation, so there is no need to change it when developing PROFINET applications. Therefore, in this study, we reuse an eCos library built with gcc and it link with PROFINET communication stack that are ported to IAR complier. Due to the different of the gcc and IAR linker, symbol definitions and address of the constructors should be changed using the external tool that generates symbol definitions and address of the constructors from MAP file. In order to verify the proposed method, it was confirmed that the actual I/O was operating normally through PROFINET IRT communication by connecting to the Siemens PLC. IAR compiler has better performance in both the compile time and the size of the generated binary. The proposed method in this study is expected to help port various open sources as well as eCos and PROFINET communication stacks to other compilers.

본 논문에서는 gcc 기반으로 개발된 eCos 운영체제 및 PROFINET 통신 스택을 IAR 컴파일러로 포팅하는 방법에 대해 설명한다. eCos 운영체제의 경우 PROFINET 구동을 위한 멀티 스레드, TCP/IP, 디바이스 드라이버 등의 기반 기능을 제공하고 있어, PROFINET 어플리케이션 개발시 변경할 필요가 없다. 따라서, 본 연구에서는 eCos는 gcc로 빌드된 라이브러리를 활용하고, 개발시 변경이 필요한 PROFINET 통신 스택은 IAR 로 포팅하여 함께 링킹하는 방안을 제안한다. IAR 링커와 gcc 링커의 차이로 인해 일부 섹션의 주소를 정의하는 심볼과 생성자의 주소가 정상적으로 생성되지 못하는 문제가 있어, MAP 파일을 읽어 해당 심볼 및 주소를 저장하는 외부 툴을 개발하였으며, 이 툴과 연동하여 동작할 수 있도록 부트로더의 소스 코드를 수정하였다. 제안하는 방법을 검증하기 위해 실제 지멘스 사의 PLC와 연결하여 PROFINET IRT 통신으로 실제 I/O 가 정상 동작하는지 검증하였으며, IAR 컴파일러가 컴파일 시간 및 생성된 바이너리 크기 모두 더 좋은 성능을 가지고 있음을 확인하였다. 본 연구에서 제안하는 방법은 eCos 및 PROFINET 통신 스택뿐 아니라 다양한 오픈 소스를 상용 컴파일러로 포팅하는데 도움을 줄 것으로 기대한다.

Keywords

Acknowledgement

이 연구결과물은 2019년도 경남대학교 신진교수연구비 지원에 의한 것임.

References

  1. M. Felser, "Industrial communication systems and their future challenges: Next-generation ehternet, IIoT, and 5G," Proceedings of the IEEE, Vol.107, No.6, pp.944-961, 2019. https://doi.org/10.1109/JPROC.2019.2901314
  2. T. Moore, Industrial Ethernet Growing but Fieldbus Remains Dominant [Internet], http://www.automation.com/
  3. IEC Std. 61158, Digital data communications for measurement and control - Fieldbus for use in industrial control systems, IEC, 2007.
  4. V. Q. Nguyen, N. V. P. Tran, H. N. Tran, K. M. Le, and J. W. Jeon, "A closed-loop stepper motor drive based on EtherCAT," in 43rd Annual Conference of the IEEE Industrial Electronics Society(IECON), pp.3361-3365, 2017.
  5. J. H. Fey, F. Hinrichsen, G. Carstens, and R. Mallwitz, "Development of a modular multilevel converter demonstrator with EtherCAT communication," in 2019 IEEE 13th International Conference on Compatibility, Power Electronics and Power Engineering (CPE-POWERENG), pp.1-6, 2019.
  6. C. Kang, Y. Pang, C. Ma, and C. Li, "Development of EtherCAT slave based on multi-core DSP," in 2018 15th International Conference on Control, Automation, Robotics and Vision (ICARCV), pp.157-161, 2018.
  7. J. Liu, H. Zhang, X. Guo, and W. Chen, "Design of EtherCAT slave system based on Zynq-7020 chip," in 2020 15th IEEE Conference on Industrial Electronics and Applications (ICIEA), pp.1916-1920, 2020.
  8. A. L. Dias, G. S. Sestito, A. C. Turcato, and D. Brandao, "Panorama, challenges and opportunities in PROFINET protocol research," in 2018 13th IEEE International Conference on Industry Applications (INDUSCON), pp.186-193, 2018.
  9. G. Cheng and X. Wang, "Design of tri-axial motion servo control systems based on EtherCAT," in 2012 IEEE International Conference on Information Science and Technology, pp.51-54, 2012.
  10. SIEMENS, PROFINET Readme Evaluation Kit ERTEC 200P PN IO V4.7.0 [Internet], https://cache.industry.siemens.co m/dl/files/250/109784250/att_1040173/v1/Readme_Eval Kit_ERTEC200P_PN_IO_V4.7.0.pdf.
  11. A. J. Massa, Embedded Software Development with eCos, Pearson, 2002.
  12. Linux Foundation, Tool Interface Standard (TIS) Execuable and Linking Format (ELF) Specification v. 1.2 [Internet], https://refspecs.linuxfoundation.org/elf/elf.pdf.