On 22/10/2018 16:28, Sebastian Huber wrote: > On 20/10/2018 02:04, Chris Johns wrote: >> On 19/10/18 5:47 pm, Sebastian Huber wrote: >>> ----- Am 18. Okt 2018 um 19:56 schrieb Chris Johns chr...@rtems.org: >>> >>>> On 18/10/18 6:38 pm, Sebastian Huber wrote: >>>>> Use a test body with a proper RTEMS application configuration to avoid a >>>>> dependency on the default configuration. Do not include >>>>> <rtems/score/cpuopts.h> directly since this header file is an >>>>> implementation detail. >>>>> >>>>> Update #3551. >>>>> --- >>>>> rtems.py | 30 +++++++++++++++++------------- >>>>> 1 file changed, 17 insertions(+), 13 deletions(-) >>>>> >>>>> diff --git a/rtems.py b/rtems.py >>>>> index 1b0da60..c7a1966 100644 >>>>> --- a/rtems.py >>>>> +++ b/rtems.py >>>>> @@ -259,13 +259,18 @@ def configure(conf, bsp_configure = None): >>>>> # >>>>> # Checks for various RTEMS features. >>>>> # >>>>> - conf.multicheck({ 'header_name': 'rtems/score/cpuopts.h'}, >>>>> - msg = 'Checking for RTEMS CPU options header', >>>>> - mandatory = True) >>>>> - load_cpuopts(conf, ab, rtems_path) >>>> OK. >>>> >>>>> - conf.multicheck({ 'header_name': 'rtems.h'}, >>>>> - msg = 'Checking for RTEMS header', >>>>> - mandatory = True) >>>> Why remove the test? I see the app test below checks for the header >>>> however the >>>> test creates a nice specific error message. >>> The test is not a simple compile test and dosen't only check that you can >>> include <rtems.h>. In addition it checks that you can link a sample >>> application successfully. >> The test you have added is a good addition. I am asking, why not keep both >> tests? It comes down to the error message and how user friendly it is. If >> 'rtems.h' is present we can assume it is an installed RTEMS. The second test >> can >> check the quality of the install. I would like to avoid users needing to dig >> into a config log to find an error and then try to understand it to figure >> out >> they have a bad path on the command line. > > Waf doesn't simply check that you can include a header file. In addition it > tries to link an executable:
Thanks, this now makes sense. > > Using a simple main() requires the default configuration. > >> >> What is the error report with just the 'main' test you added and an invalid >> RTEMS path? > > When I remove the rtems.h from the BSP installation, then I get this: > > Building a trivial RTEMS application : no Should this be: Checking for a valid RTEMS BSP installation : no ? > The configuration failed > (complete log in /scratch/git-rtems-libbsd/build/config.log) > > In config.log: > > Building a trivial RTEMS application > ==> > #include <rtems.h> > void Init(rtems_task_argument arg) { (void)arg; } > #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER 1 > #define CONFIGURE_MAXIMUM_TASKS 1 > #define CONFIGURE_RTEMS_INIT_TASKS_TABLE > #define CONFIGURE_INIT > #include <rtems/confdefs.h> > > <== > [1/2] Compiling > [32mbuild/.conf_check_506c35a0aa2e9f571a9e7ed38df523b2/test.c[0m > > ['/build/rtems/5/bin/powerpc-rtems5-gcc', '-qrtems', > '-B/build/rtems/5/powerpc-rtems5/lib/', > '-B/build/rtems/5/powerpc-rtems5/qoriq_e500/lib/', '--specs', 'bsp_specs', > '-mcpu=8540', '-mcpu=8540', '-meabi', '-meabi', '-msdata=sysv', > '-msdata=sysv', > '-fno-common', '-fno-common', '-mstrict-align', '-mstrict-align', '-mspe', > '-mspe', '-mabi=spe', '-mabi=spe', '-mfloat-gprs=double', > '-mfloat-gprs=double', > '-ffunction-sections', '-ffunction-sections', '-fdata-sections', > '-fdata-sections', '../test.c', '-c', '-o', > '/scratch/git-rtems-libbsd/build/.conf_check_506c35a0aa2e9f571a9e7ed38df523b2/testbuild/test.c.1.o'] > > err: ../test.c:1:10: fatal error: rtems.h: No such file or directory > #include <rtems.h> > ^~~~~~~~~ > compilation terminated. This a pretty good. The gcc command line has the valid BSP details. Chris _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel