Is it possible to generate a compile error, when a special command line option is NOT defined? (e. g. I would create an error, if somebody tries to compile my ARM Cortex M4 code without the setting "--bitband" (as then bits are not adressed atomic, this might give very spurious and strange errors for bits used in interrupts - such errors would occur only very seldom and therefore are very difficult to detect elsewise))
BTW: In the help, Chapter Compiler User Guide - Compiler Features - "How the compiler handles bit-band objects placed outside bit-band regions", it says the following: "If the bitband attribute is applied to an object type and --bitband is not specified on the command line, the compiler generates an error." This would be nice - but this is NOT correct (there does NOT appear an error unfortunately).
I assume Keil had to take out this error, as it would give problems for some third supplier demo code ... but then it would be very nice, if there would be some other possibility to generate a compile error, if "--bitband" is not present: e. g.
#pragma ErrorIfNoOption "--bitband"
or something like this... .
Generally you are right, it is a bit the "lazy way".
But the bitband area in Cortex M4 is 1MByte large, and STM32F4 uses only 192kB (strictly speaking only 128kB of it). So no problem to but it all into the bitband region - in fact it anyway is all in the bitband region (except the 64kB CCM memory, but currently I am anyway completely happy with 128k RAM). The "--bitband" option just tells the compiler to use the bitbanding.
If you do it NOT in this general way, then you have to locate all bitband-structs manually (with __attribute__(at....) - this really gets quite cumbersome, and I am frightened I might forget it from time to time when I define a new struct (again the problem that no error/warning appears, if you forget to relocate it correctly ..)).