Automatic startup_mke02z4 file modification

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

Automatic startup_mke02z4 file modification

ソリューションへジャンプ
2,419件の閲覧回数
mauriziospagni
Contributor II

Each time I save the file startup_mke02z4.c from the MCUxpresso IDE this part of the code:

  __attribute__((used, section(".FlashConfig"))) const struct
  {
    unsigned int word1;
    unsigned int word2;
    unsigned int word3;
    unsigned int word4;
  } Flash_Config = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFEFFFF };

is surreptitiously changed to:

const struct
  __attribute__((used, section(".FlashConfig")))
  {
    unsigned int word1;
    unsigned int word2;
    unsigned int word3;
    unsigned int word4;
  } Flash_Config =
  { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFEFFFF };

I don't care too much about the formatting, but the second form results in:

- "warning: 'used' attribute does not apply to types [-Wattributes]"

- "warning: 'section' attribute does not apply to types [-Wattributes]"

- "arm-none-eabi/bin/ld.exe: Linker Flash Config Support Enabled, but no .FlashConfig section provided within application"

- "error: ld returned 1 exit status"

All that for a change I didn't ask for nor I want.

To make any change I must always modify, and save, that file with an external editor.

Why does MCUxpresso IDE behave so?

ラベル(1)
0 件の賞賛
返信
1 解決策
2,344件の閲覧回数
mauriziospagni
Contributor II

Of course "formatter" was the first place I looked into, but the formatting must be requested.

And in "Save actions", "Format source code" is unchecked.

What I overlooked was "Align const", that was checked.

Thank you

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,344件の閲覧回数
lpcxpresso_supp
NXP Employee
NXP Employee

I don't see this behaviour - no reformatting of that block in code I'm looking at now.

You should check the "Formatter" and "Save Actions" settings in your workspace Preferences.

Regards,

MCUXpresso IDE Support

pastedImage_1.png

0 件の賞賛
返信
2,345件の閲覧回数
mauriziospagni
Contributor II

Of course "formatter" was the first place I looked into, but the formatting must be requested.

And in "Save actions", "Format source code" is unchecked.

What I overlooked was "Align const", that was checked.

Thank you

0 件の賞賛
返信