RFQ/BOM 0 로그인 / 등록하다

귀하의 위치를 선택하세요

사용자 이미지

The stm32F449 test code compilation cycle is too long.

MCU
12월 21, 2020 by Jina 1836

sprintf(rgbhChar,"%4.4f",1234.5678);


After testing it, this sentence took 18740 machine cycles.

In my impression, I have tested Keil's C51 before, and it seems that the more complicated conversion is only 2K~4K machine cycles (a long time, is the memory accurate?)


The current CPU is STM32F449, the compiler is IAR, and the hardware multiplier has been selected in the engineering tab.

Why is it so slow?

모든 댓글

user image

Jihan 게시 날짜 December 21, 2020

Is the test code on C51 consistent? Could it be caused by different test conditions?

0
user image

Mulan 게시 날짜 December 21, 2020

It is useful to compare under the same conditions; it is recommended to figure out what the c51 is.

0
user image

Bailyn 게시 날짜 December 21, 2020

1. Why is the instruction (cycle) difference after compilation for the same C statement so much? Is this the case for the reduced instruction set?

2. For library functions, they should all be provided with obj, that is, they are all pre-compiled.

0
user image

Wing 게시 날짜 December 21, 2020

This is the characteristic of the reduced instruction set. For the same operation, the number of compiled instructions will be much larger (depending on what you are doing, some require more instructions, some require less).

0

답변 작성

답글을 달려면 로그인이 필요합니다. 로그인 | 등록하다