This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

KEIL Project Linker Include Definitions

Hi All,

I have a linker scatter file that uses "#!armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m33 -xc" command in the first line to preprocess an included header file.

I've noticed a couple issues that I am not sure the best way to resolve within the KEIL environment.

First is that the header file in not found unless I include the path in the previously mentioned preprocessor command by adding "-I..\..\Linker" to the command.

The second issue is that the header file has references to definitions that are at the project level.

I suspect that both of these issues are related to the fact that the project level settings are not being seen during the linker stage. Is there a way to have the C\C++ include directories and #defines from the project be included during the linker scatter preprocessing?

Thanks for any help!

Parents Reply Children
  • This manual page is good for understanding how to get the preprocessor to run on the scatter file (Which I have no problems doing). The question is "Is there a way to have the KEIL project definitions (Defined in the KEIL project c/c++ settings) to be visible when the preprocessor runs on the scatter file?" I want the defines highlighted in yellow in the picture below to be visible to the preprocessor when processing the scatter file.