RFQ/BOM 0 Anmelden / Registrieren

Wähle deinen Standort

Benutzerbild

The stm32F449 test code compilation cycle is too long.

MCU
Dezember 21, 2020 by Jina 1875

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?

Alle Kommentare

user image

Jihan Veröffentlicht am December 21, 2020

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

0
user image

Mulan Veröffentlicht am 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 Veröffentlicht am 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 Veröffentlicht am 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

Schreiben Sie eine Antwort

Sie müssen sich anmelden, um antworten zu können. Anmelden | Registrieren