Open trns1997 opened 1 year ago
@xiaoxiang781216 do you have "make export" in the CI? I think it is important for some customers that aren't using the NuttX building system.
No, ci just invoke make now, it could be changed to "make export" and "make import".
@acassis @xiaoxiang781216,
After some investigation, I've identified the reason behind the absence of the libboard.a
packaging. The issue lies within the file tools/mkexport.sh
, specifically at line 354. This script checks for the existence of the libboard.a
file and packages it accordingly.
I looked into the makefiles and found that FlatLibs.mk
requires the CONFIG_ARCH_BOARD_COMMON
option to be set. This addition enables the inclusion of libboard
in the EXPORTLIBS
list. Consequently, I resolved this problem by setting the CONFIG_ARCH_BOARD_COMMON
flag within my board's defconfig
, effectively resolving the issue.
However, I have a query in relation to this matter:
Wouldn't it be prudent for all boards in the NuttX project to default to CONFIG_ARCH_BOARD_COMMON=y
in their respective defconfig
files? Such an approach would enable immediate execution of apps on Board X. Should a user possess a custom board utilizing the same MCU, they could then deactivate this flag and furnish the necessary functions for their project's functionality.
Regarding the behavior where calling make
prior to make export
results in the generation of libboard.a
, leading to the successful discovery and packaging of the file by the tools/mkexport.sh
script: Is this intended behavior? It seems conceivable that a user might inadvertently execute make export
after generating libboard.a
, potentially leading to its inclusion in the export. This situation might not align with the intended behavior, especially if the CONFIG_ARCH_BOARD_COMMON
flag is deactivated.
My proposition would be maybe to consider invoking make clean
before make export
. This approach would ensure the export process incorporates the correct libraries, aligning with user expectations. Let me know what you guys think.
I encountered this issue while calling "make export" immediately after configuring my board application. It appears that "libboard.a" is not being built or copied to the destination folder before generating the export.
How to reproduce
Result
libboard.a
is missing in the exported archive.Current Work around
Call
make
before callingmake export
Result
As you can see the
libboard.a
was correctly generated and packaged in the second case. I will investigate on my end to see what is causing the issue.