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?