from LPC1788 to LPC4088 but the code flash size is the same

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

from LPC1788 to LPC4088 but the code flash size is the same

915件の閲覧回数
aut
Contributor I

Hi all.

I replaced the LPC1788 microcontroller with his pin-to-pin compatible LPC4088. Since there are a lot of single precision floating point calculations in the LPC1788 code, I thought this migration could reduce the size code using the FPU (floating point unit) of the LPC4088. I was wrong. Even if the FPU unit is enabled, the code size after compilation hasn't changed. It is the same as the LPC1788 one.

Shouldn't using the FPU reduce the code size?

Many thanks

 

 

      

0 件の賞賛
返信
4 返答(返信)

867件の閲覧回数
frank_m
Senior Contributor III

> Even if the FPU unit is enabled, the code size after compilation hasn't changed. It is the same as the LPC1788 one.

Code size is not only about FPU usage.

What are the optimisation settings for the LPC4088 project ?

> Shouldn't using the FPU reduce the code size?

The floating point ABI matters as well (-mfloat-abi).

Using "soft" will result in an emulation, as on the LPC1788 (without FPU).

Using "softfp" will use the FPU, and the core registers for passing parameters.

The option "hard" will produce marginally smaller/faster code, passing parameters in FPU registers.

Code compiled with soft/softfp is interchangeable, code compiled with "hard" is not.

0 件の賞賛
返信

885件の閲覧回数
aut
Contributor I

Hello Alice. Can I have confirm that FPU increase only the floating point calculation speed but don't reduce the code size?   

Thank you

0 件の賞賛
返信

871件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello aut,

I think there is no direct relation between them.

 

BR

Alice

0 件の賞賛
返信

895件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello aut,

As I know, the  FPU (floating point unit) can speed up floating point calculation, don't know whether can reduce code size. 

 

BR

Alice

0 件の賞賛
返信