Why am I getting #warning "BOARD_FLASH_SIZE not set; using 0 as default value"?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why am I getting #warning "BOARD_FLASH_SIZE not set; using 0 as default value"?

1,106 Views
m4l490n
Contributor V

When compiling my project, I'm getting:

#warning "BOARD_FLASH_SIZE not set; using 0 as default value"

And I don't know why. I tried to search in the Pins, Clocks, and Peripherals configurations but I could not find a configuration that would relate to this warning.

I have checked in the project properties and MCU Settings, and the flash size is configured correctly there, though I'm not sure if that warning is related to that configuration.

Why am I getting this warning?

0 Kudos
3 Replies

1,099 Views
bobpaddock
Senior Contributor III

That warning is put into board.c when you request the Config Tool to create an empty board file.


It can be defined to your real flash size in the in Project/Preferences/C/C++ Build/Preproocessor.

It seems to be a pointless warning that can be removed from board.c, as I could find nothing that ever used that define.

Seems a lot of configuration paths are untested...

 

1,087 Views
m4l490n
Contributor V

Ok, that's what I was thinking. I just thought that definition should have been filled automatically when generating the code as opposed to me having to do that manually.

That config tool is not doing a very good job. I'm having all kinds of little issues here and there with it.

0 Kudos

1,082 Views
bobpaddock
Senior Contributor III

"Ok, that's what I was thinking. I just thought that definition should have been filled automatically when generating the code as opposed to me having to do that manually."

I agree that it should be filed in, if it is needed, as the Flash Size is known to the tool.
The better question is why is it there at all as nothing I could find used it.

"That config tool is not doing a very good job. I'm having all kinds of little issues here and there with it."

I've had that problem with the whole experience using this IDE.
Just some decent example initialization code is all I really needed.
I've spent far to much time trying to get what I want out of this, which is some initialization code for the K32L and something that might work with the broken LPI2C module.

I'm far more productive with EMACS and Make.

 

0 Kudos