I tried to include a .h file in my scatter file using the armcc -E option. Including a header file, that contains nothing but makros allready works, but i cannot include a header, containing function declaration or includes like stdint.h (i think because they also contain non makro code), getting a bunch of errors like:
error: L6292E: Ignoring unknown attribute 'signed' specified for region typedef.
error: L6292E: Ignoring unknown attribute 'short' specified for region typedef.
I think they occur cause pre-processor inlines all includes and the scatter file cannot handle the c Syntax of included files. Is there any way to still include these header files, or can only makros be included into my scatterfile.
PS.: The reason i want to include the headerfiles with "real" c syntax is to increase the readability, i dont want anybody to browse 3-4 headerfiles to get all the information needed
Why would you expect this to work?
A Scatter file is not a 'C' source file - there is no reason to expect it to accept 'C' source!
The question is more like how can i prevent that the 'C' code get also included into my scatter-file.
Maybe i should have asked something like: "how do i prevent certain code segments from beeing included into my scatterfile, or if its not possible how can i make the scatter file ignore the 'C' code"
Just don't do it!
Make sure that anything you do include in your scatter file includes no 'C' code.
Or I guess you could have a pre-build step which preprocesses the file(s) to give something suitable for use in a scatter file. You could use the 'C' preprocessor for that ...
Scatter file syntax:
View all questions in Keil forum