trns1997 commented on PR #10553:
URL: https://github.com/apache/nuttx/pull/10553#issuecomment-1713794492
> please fix the ci compile error.
@xiaoxiang781216 before i attack the fix for CI. I would like to confirm the
strategy on `<arch/board/board.h>`. Because I noticed that many users have
included their boards iomux/hardware/mcu specific headers in the boards
`boards.h` which causes the build to fail for example:
```
Building NuttX...
In file included from ./misc/assert.c:39:
/github/workspace/sources/nuttx/include/arch/board/board.h:34:10: fatal
error: stm32_rcc.h: No such file or directory
34 | #include "stm32_rcc.h"
| ^~~~~~~~~~~~~
compilation terminated.
```
In terms of strategy should users define other mcu specific headers in this
file or should they be included in sources that require it (the latter seems
more logical). To make it clearer we can look at the following 2 files:
### stm32f411-minimum
file: `boards/arm/stm32/stm32f411-minimum/include/board.h`
Include:
```
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
#include <stm32.h> // CAUSES BUILD TO FAIL
```
In this case the build fails as it is unable to resolve `stm32.h`
### stm32f103-minimum
file: `boards/arm/stm32/stm32f103-minimum/include/board.h`
Include:
```
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
```
Here everything works fine and the user include `stm32.h` in the sources
that need it.
I would like to know your opinion. Based on that I will either go ahead and
clean up the `board.h` headers for all failing boards and include them to the
board sources. Otherwise i am not sure what we should do :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]