ARM과 스택 정렬에서 부동 소수점의 Printf

기술노트 85413

아키텍처:

ARM

컴포넌트:

general

업데이트:

2018-02-28 오전 2:31

Introduction

In some cases, printf of floating point (%f) does not seem to work.

Solution

The IAR C/C++ Compiler for ARM requires the Stack Pointer to be aligned at 8 bytes. 8-byte alignment is required by AEABI (and some instructions generated by the compiler for some cores).

The default cstartup code automatically initializes the ARM core stack(s) to an 8-byte aligned address. Make sure that your application and/or RTOS also does this.

Background

According to the MQX release notes, stack alignment is not ensured in MQX 3.7. The behavior is corrected in MQX 3.8. This problem has also been observed with other RTOSes.


All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.