I'm working with the RealView Compiler and have a strange problem with the usart.
I've installed one typedef struct in a headerfile - when I try to install a array of this struct in the c-file (as global struct variable) - I'm not able to get some printf() messages over the usart (no data abort or anything else (the program seems to work) - only no messages over the usart..
When I install the array of this struct in a function within this c-file (not global) - everything works ok...
Could there be a problem with less stack size?
tobi
If the compiler is fast in comparison to the project size, and you want to be lazy, you might add most of your includes into a "global" header file and include from all other source files.
If the compiler supports precompiled headers, then it is normally an advantage to make user of a global master header file.
Anything that shouldn't be generaly visible may then be put into the single source file that uses them, or a specific header file that is only included for the set of source files that are allowed to know this extra information.