Is there a way to do accomplish a similar end result of something like this in a scatter load file?
LR_NORFLASH 0x80000000 0x08000000 { ROM 0x80000000 NOCOMPRESS { #ifdef RELEASE * (norimagetoc, +First) ; load external NOR flash chip data #else #warning *** NOR FLASH DATA NOT LOADED #endif * (.nordata) } }
The problem I have is related to the large amount of data that resides in an external NOR flash chip that takes a really long time to load (minutes) via the JTAG interface. So, during development/debug I typically comment out the line that's after the #ifdef RELEASE preprocessor directive. However, I'd like to see a warning in the output window whenever the app is built in non-release mode (to help ensure I don't generate a release target that doesn't load the external NOR flash chip).
What I'm looking for is a way to use something like these C/C++ preprocessor directives in a scatter load file to conditionally include or exclude part(s) of a scatter load file AND generate some message in the build output window or cause the build to fail when building in release mode if a required part of the scatter load file is not included.