Okay, but this file contains only basic GPIO definitions, none of which is
useful for the lcd_framebuffer source file... so I dont understand why this
Post by Sebastien Lorquet ***@lorquet.fr [nuttx]Â
Post by Sebastien Lorquet ***@lorquet.fr [nuttx]It does not come from nowhere, I copied these files from the stm32f429
discovery config. Guess what, there are stm32 includes in there.
Yes, many people put those inclusions in the board.h header file and it works
fine until the header file is included in a common driver. The only solution
is to remove the inclusions (or create two different board.h header files for
inclusion at different levels in the architecture.)
Post by Sebastien Lorquet ***@lorquet.fr [nuttx]I tried removing these includes from the include/board.h file, and OK,
"strangely" it still works. This means that this file is relying on the order
of include files from the stm32 drivers. stm32 includes have to happen before
this file is included from these sources.
Yes, that is the natural consequence of a single board.h header file that is
- board.h may not include any microcontroller specific header files (like stm32_gpio.h).
- MCU source files that include board.h must provide all of the header file
dependencies (which, as you already noted it usually... but not always... does).
- board.h should be the last header file that is included by the
microntroller-specific source file
Greg
Sebastien
I added a bit to the porting guide to make the layering concepts a little
clearer: http://nuttx.org/Documentation/NuttxPortingGuide.html#naming
http://nuttx.org/Documentation/NuttxPortingGuide.html#naming under "Scope of
Inclusions."