RFQ/BOM 0 Registrazione / Registrati

Seleziona la tua posizione

immagine dell'utente

The stm32F449 test code compilation cycle is too long.

MCU
dicembre 21, 2020 by Jina 1879

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?

Tutti i commenti

user image

Jihan postato su December 21, 2020

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

0
user image

Mulan postato su 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 postato su 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 postato su 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

Scrivi una risposta

È necessario effettuare il login per rispondere. Registrazione | Registrati