You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by TimH <ti...@jti.uk.com> on 2022/08/17 16:56:32 UTC

10.3 merge issues

Hi All,

 

My project has been in hibernation for 6 months for personal reasons but
today was the day I fired the custom board up again to restart porting work.

 

My 10.2-based "in progress" work behaves as before (which was a relief) so I
decided I would merge in 10.3 to make sure I restarted with the latest
release (not withstanding that 10.4 is close!).

 

Most issues were easily solved by referring to release notes or good ol'
Google but I am left with one major and 1 minor problem.

 

1.	Final change that allowed a compile was when I changed the defconfig
to have the new:

 

CONFIG_INIT_ENTRYPOINT="nsh_main"

CONFIG_INIT_ENTRYNAME="nsh"

 

It all boots and I get the nsh prompt but I get continuous:

 

nsh_session: cle failed: 22

 

I'm assuming that's EINVAL, but I can't work out why?

 

2.	my board Make.defs file is an edited clone of another from the same
device (SAMA5D2) and is virtually identical to many other similar files for
other chips of course. I am running "Ubuntu 20.04.3 TLS"

 

This is included in virtually all these files for any chip/arch:

 

ifeq ($(CONFIG_CYGWIN_WINTOOL),y)

  ARCHSCRIPT = -T "${shell cygpath -w
$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"

else

  ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)

endif

 

But the compiler complains that there's:

 

no rule to make target  '-T/home/{rest of the path}' 

 

If I remove the -T it is fine.

 

Linux/Ubuntu is including the -T in the path I assume? Seems very odd that
10.2 was OK with this but not 10.3 - so not a Ubuntu issue I assume? Linux
skills are definitely lacking, so any suggestions welcomed!


RE: 10.3 merge issues

Posted by TimH <ti...@jti.uk.com>.
Yes - I have CONFIG_NSH_CLE defined.

There are no .o files after a make clean

>-----Original Message-----
>From: Nathan Hartman <ha...@gmail.com>
>Sent: 17 August 2022 19:10
>To: dev@nuttx.apache.org
>Subject: Re: 10.3 merge issues
>
>On Wed, Aug 17, 2022 at 12:56 PM TimH <ti...@jti.uk.com> wrote:
>> 1.      Final change that allowed a compile was when I changed the defconfig
>> to have the new:
>>
>>
>>
>> CONFIG_INIT_ENTRYPOINT="nsh_main"
>>
>> CONFIG_INIT_ENTRYNAME="nsh"
>>
>>
>>
>> It all boots and I get the nsh prompt but I get continuous:
>>
>>
>>
>> nsh_session: cle failed: 22
>>
>>
>>
>> I'm assuming that's EINVAL, but I can't work out why?
>
>
>Looks to me like this message is probably printed from nsh_stdlogin(), but I
>cannot understand where the "nsh_session" part of that printout is coming
>from. Do you have CONFIG_NSH_CLE defined? (NSH_CLE in Kconfig).
>
>More below...
>
>
>> 2.      my board Make.defs file is an edited clone of another from the same
>> device (SAMA5D2) and is virtually identical to many other similar
>> files for other chips of course. I am running "Ubuntu 20.04.3 TLS"
>>
>> This is included in virtually all these files for any chip/arch:
>>
>> ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
>>
>>   ARCHSCRIPT = -T "${shell cygpath -w
>> $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
>>
>> else
>>
>>   ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
>>
>> endif
>>
>> But the compiler complains that there's:
>>
>> no rule to make target  '-T/home/{rest of the path}'
>>
>> If I remove the -T it is fine.
>>
>> Linux/Ubuntu is including the -T in the path I assume? Seems very odd
>> that
>> 10.2 was OK with this but not 10.3 - so not a Ubuntu issue I assume?
>> Linux skills are definitely lacking, so any suggestions welcomed!
>
>
>Regarding question #2:
>
>Dumb question, but after 'make clean' or 'make distclean' could you verify
>there are no stale object files (*.o) anywhere in the nuttx or apps trees? I'm
>asking because I've run into this problem in the past where some obscure
>error in the makefiles caused some stale objects to stay around.
>
>Cheers,
>Nathan


Re: 10.3 merge issues

Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Aug 17, 2022 at 12:56 PM TimH <ti...@jti.uk.com> wrote:
> 1.      Final change that allowed a compile was when I changed the defconfig
> to have the new:
>
>
>
> CONFIG_INIT_ENTRYPOINT="nsh_main"
>
> CONFIG_INIT_ENTRYNAME="nsh"
>
>
>
> It all boots and I get the nsh prompt but I get continuous:
>
>
>
> nsh_session: cle failed: 22
>
>
>
> I'm assuming that's EINVAL, but I can't work out why?


Looks to me like this message is probably printed from nsh_stdlogin(),
but I cannot understand where the "nsh_session" part of that printout
is coming from. Do you have CONFIG_NSH_CLE defined? (NSH_CLE in
Kconfig).

More below...


> 2.      my board Make.defs file is an edited clone of another from the same
> device (SAMA5D2) and is virtually identical to many other similar files for
> other chips of course. I am running "Ubuntu 20.04.3 TLS"
>
> This is included in virtually all these files for any chip/arch:
>
> ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
>
>   ARCHSCRIPT = -T "${shell cygpath -w
> $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
>
> else
>
>   ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
>
> endif
>
> But the compiler complains that there's:
>
> no rule to make target  '-T/home/{rest of the path}'
>
> If I remove the -T it is fine.
>
> Linux/Ubuntu is including the -T in the path I assume? Seems very odd that
> 10.2 was OK with this but not 10.3 - so not a Ubuntu issue I assume? Linux
> skills are definitely lacking, so any suggestions welcomed!


Regarding question #2:

Dumb question, but after 'make clean' or 'make distclean' could you
verify there are no stale object files (*.o) anywhere in the nuttx or
apps trees? I'm asking because I've run into this problem in the past
where some obscure error in the makefiles caused some stale objects to
stay around.

Cheers,
Nathan

RE: 10.3 merge issues

Posted by TimH <ti...@jti.uk.com>.
>-----Original Message-----
>From: Nathan Hartman <ha...@gmail.com>
>Sent: 18 August 2022 03:01
>To: dev@nuttx.apache.org
>Subject: Re: 10.3 merge issues
>
>On Wed, Aug 17, 2022 at 3:27 PM Tim Hardisty <ti...@jti.uk.com> wrote:
>
>> I realise, now, I compared mine against 10.2 variants not 10.3...not
>> sure why, but there you go. I'll give that a try tomorrow - thanks!
>
>
>Sure thing! Let us know if that fixes it. I'm pretty sure that change in your
>board's Make.defs (and there might be a couple of others, that's why I
>suggest to compare it to the up-to-date Make.defs of the board you cloned)
>should fix the compile issues...
>
[Tim]Don't know why I compared against previous make.defs examples - silly me! Using the revised syntax it now works - thanks :)


Re: 10.3 merge issues

Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Aug 17, 2022 at 3:27 PM Tim Hardisty <ti...@jti.uk.com> wrote:

> I realise, now, I compared mine against 10.2 variants not 10.3...not sure
> why, but there you go. I'll give that a try tomorrow - thanks!


Sure thing! Let us know if that fixes it. I'm pretty sure that change in
your board's Make.defs (and there might be a couple of others, that's why I
suggest to compare it to the up-to-date Make.defs of the board you cloned)
should fix the compile issues...

Cheers,
Nathan

Re: 10.3 merge issues

Posted by Tim Hardisty <ti...@jti.uk.com>.
I realise, now, I compared mine against 10.2 variants not 10.3...not sure why, but there you go. I'll give that a try tomorrow - thanks!

On 17/08/2022, 20:19, "Nathan Hartman" <ha...@gmail.com> wrote:

    On Wed, Aug 17, 2022 at 3:15 PM Nathan Hartman <ha...@gmail.com> wrote:
    >
    > On Wed, Aug 17, 2022 at 2:38 PM TimH <ti...@jti.uk.com> wrote:
    > > >> no rule to make target  '-T/home/{rest of the path}'
    >
    > See commit: https://github.com/apache/incubator-nuttx/commit/8defb843aa2e1d49b08b1cb7155aea97e1721b6c
    >
    > There have been some refactorings in the build system to reduce code
    > duplication.
    >
    > So instead of writing all this:
    >
    > ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
    > ARCHSCRIPT = -T "${shell cygpath -w
    > $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
    > else
    > ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
    > endif
    >
    > Now you only have to write:
    > ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
    >
    > I recommend to compare your Make.defs with that of the board you
    > cloned and bring over all changes.


    This is the PR: https://github.com/apache/incubator-nuttx/pull/5496

    Cheers,
    Nathan



Re: 10.3 merge issues

Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Aug 17, 2022 at 3:15 PM Nathan Hartman <ha...@gmail.com> wrote:
>
> On Wed, Aug 17, 2022 at 2:38 PM TimH <ti...@jti.uk.com> wrote:
> > >> no rule to make target  '-T/home/{rest of the path}'
>
> See commit: https://github.com/apache/incubator-nuttx/commit/8defb843aa2e1d49b08b1cb7155aea97e1721b6c
>
> There have been some refactorings in the build system to reduce code
> duplication.
>
> So instead of writing all this:
>
> ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
> ARCHSCRIPT = -T "${shell cygpath -w
> $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
> else
> ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
> endif
>
> Now you only have to write:
> ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
>
> I recommend to compare your Make.defs with that of the board you
> cloned and bring over all changes.


This is the PR: https://github.com/apache/incubator-nuttx/pull/5496

Cheers,
Nathan

Re: 10.3 merge issues

Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Aug 17, 2022 at 2:38 PM TimH <ti...@jti.uk.com> wrote:
> >> no rule to make target  '-T/home/{rest of the path}'

See commit: https://github.com/apache/incubator-nuttx/commit/8defb843aa2e1d49b08b1cb7155aea97e1721b6c

There have been some refactorings in the build system to reduce code
duplication.

So instead of writing all this:

ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
ARCHSCRIPT = -T "${shell cygpath -w
$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
else
ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
endif

Now you only have to write:
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)

I recommend to compare your Make.defs with that of the board you
cloned and bring over all changes.

Cheers,
Nathan

RE: 10.3 merge issues

Posted by TimH <ti...@jti.uk.com>.
Thanks for the useful tip "V=1" = didn't know that Alan :)

But nothing additional reported, just the same " no rule to make" error


>-----Original Message-----
>From: Alan Carvalho de Assis <ac...@gmail.com>
>Sent: 17 August 2022 18:14
>To: dev@nuttx.apache.org
>Subject: Re: 10.3 merge issues
>
>Hi Tim,
>
>Try to compile with verbose enabled:
>
>$ make V=1
>
>Probably your board is bringing some older definition that is causing a variable
>to be created incorrectly, because "-T/something" doesn't appear a valid
>target.
>
>BR,
>
>Alan
>
>On Wednesday, August 17, 2022, TimH <ti...@jti.uk.com> wrote:
>
>> Hi All,
>>
>>
>>
>> My project has been in hibernation for 6 months for personal reasons
>> but today was the day I fired the custom board up again to restart
>> porting work.
>>
>>
>>
>> My 10.2-based "in progress" work behaves as before (which was a
>> relief) so I decided I would merge in 10.3 to make sure I restarted
>> with the latest release (not withstanding that 10.4 is close!).
>>
>>
>>
>> Most issues were easily solved by referring to release notes or good ol'
>> Google but I am left with one major and 1 minor problem.
>>
>>
>>
>> 1.      Final change that allowed a compile was when I changed the
>> defconfig
>> to have the new:
>>
>>
>>
>> CONFIG_INIT_ENTRYPOINT="nsh_main"
>>
>> CONFIG_INIT_ENTRYNAME="nsh"
>>
>>
>>
>> It all boots and I get the nsh prompt but I get continuous:
>>
>>
>>
>> nsh_session: cle failed: 22
>>
>>
>>
>> I'm assuming that's EINVAL, but I can't work out why?
>>
>>
>>
>> 2.      my board Make.defs file is an edited clone of another from the same
>> device (SAMA5D2) and is virtually identical to many other similar
>> files for other chips of course. I am running "Ubuntu 20.04.3 TLS"
>>
>>
>>
>> This is included in virtually all these files for any chip/arch:
>>
>>
>>
>> ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
>>
>>   ARCHSCRIPT = -T "${shell cygpath -w
>> $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
>>
>> else
>>
>>   ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
>>
>> endif
>>
>>
>>
>> But the compiler complains that there's:
>>
>>
>>
>> no rule to make target  '-T/home/{rest of the path}'
>>
>>
>>
>> If I remove the -T it is fine.
>>
>>
>>
>> Linux/Ubuntu is including the -T in the path I assume? Seems very odd
>> that
>> 10.2 was OK with this but not 10.3 - so not a Ubuntu issue I assume?
>> Linux skills are definitely lacking, so any suggestions welcomed!
>>
>>


Re: 10.3 merge issues

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Hi Tim,

Try to compile with verbose enabled:

$ make V=1

Probably your board is bringing some older definition that is causing a
variable to be created incorrectly, because "-T/something" doesn't appear a
valid target.

BR,

Alan

On Wednesday, August 17, 2022, TimH <ti...@jti.uk.com> wrote:

> Hi All,
>
>
>
> My project has been in hibernation for 6 months for personal reasons but
> today was the day I fired the custom board up again to restart porting
> work.
>
>
>
> My 10.2-based "in progress" work behaves as before (which was a relief) so
> I
> decided I would merge in 10.3 to make sure I restarted with the latest
> release (not withstanding that 10.4 is close!).
>
>
>
> Most issues were easily solved by referring to release notes or good ol'
> Google but I am left with one major and 1 minor problem.
>
>
>
> 1.      Final change that allowed a compile was when I changed the
> defconfig
> to have the new:
>
>
>
> CONFIG_INIT_ENTRYPOINT="nsh_main"
>
> CONFIG_INIT_ENTRYNAME="nsh"
>
>
>
> It all boots and I get the nsh prompt but I get continuous:
>
>
>
> nsh_session: cle failed: 22
>
>
>
> I'm assuming that's EINVAL, but I can't work out why?
>
>
>
> 2.      my board Make.defs file is an edited clone of another from the same
> device (SAMA5D2) and is virtually identical to many other similar files for
> other chips of course. I am running "Ubuntu 20.04.3 TLS"
>
>
>
> This is included in virtually all these files for any chip/arch:
>
>
>
> ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
>
>   ARCHSCRIPT = -T "${shell cygpath -w
> $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
>
> else
>
>   ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
>
> endif
>
>
>
> But the compiler complains that there's:
>
>
>
> no rule to make target  '-T/home/{rest of the path}'
>
>
>
> If I remove the -T it is fine.
>
>
>
> Linux/Ubuntu is including the -T in the path I assume? Seems very odd that
> 10.2 was OK with this but not 10.3 - so not a Ubuntu issue I assume? Linux
> skills are definitely lacking, so any suggestions welcomed!
>
>

Re: 10.3 merge issues

Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, Aug 18, 2022 at 6:40 AM TimH <ti...@jti.uk.com> wrote:

> Looks like some kind of conflict with syslog settings in the config
> (either "default SYSLOG device" or "Use SYSLOG for /dev/console". I've not
> been using syslog, so probably something I'd tried (i.e. stab in the dark!)
> for some reason in the past that was benign in 10.2 and not in 10.4.


Well, if you ever figure out what it was, let us know!! Could be some kind
of regression that should be fixed.

Glad those two issues were straightened out.

Cheers,
Nathan

RE: 10.3 merge issues

Posted by TimH <ti...@jti.uk.com>.
Looks like some kind of conflict with syslog settings in the config (either "default SYSLOG device" or "Use SYSLOG for /dev/console". I've not been using syslog, so probably something I'd tried (i.e. stab in the dark!) for some reason in the past that was benign in 10.2 and not in 10.4.

Working again on Minicom with either readline or CLE.

Back to development now...until 11.0 comes along and I go through it all again lol.

>-----Original Message-----
>From: TimH <ti...@jti.uk.com>
>Sent: 18 August 2022 10:59
>To: dev@nuttx.apache.org
>Subject: RE: 10.3 merge issues
>
>>-----Original Message-----
>>From: Gregory Nutt <sp...@gmail.com>
>>Sent: 17 August 2022 19:16
>>To: dev@nuttx.apache.org
>>Subject: Re: 10.3 merge issues
>>
>>
>>>
>>> It all boots and I get the nsh prompt but I get continuous:
>>>
>>> nsh_session: cle failed: 22
>>>
>>> I'm assuming that's EINVAL, but I can't work out why?
>>>
>>>
>>
>>What kind of terminal do you use?  CLE only works with a
>>VT100-compatible terminal and will return -EINVAL to nsh_session if the
>>terminal does not respond correctly to a VT100 request for the current
>cursor position.
>>
>[Tim] Vt102 on Minicom. Putty behaves the same.
>
>If I disable CLE and use the basic readline console I get a different error and it
>hangs:
>
>NuttShell (NSH) NuttX-10.3.0
>nsh> nsh: nsh_session: readline failed: 0
>
>Undoubtedly some conflict in my .config from a change between 10.2 and 10.3
>but seems a pretty basic thing to have been changed/broken? Any
>suggestions very welcome!



RE: 10.3 merge issues

Posted by TimH <ti...@jti.uk.com>.
>-----Original Message-----
>From: Gregory Nutt <sp...@gmail.com>
>Sent: 17 August 2022 19:16
>To: dev@nuttx.apache.org
>Subject: Re: 10.3 merge issues
>
>
>>
>> It all boots and I get the nsh prompt but I get continuous:
>>
>> nsh_session: cle failed: 22
>>
>> I'm assuming that's EINVAL, but I can't work out why?
>>
>>
>
>What kind of terminal do you use?  CLE only works with a VT100-compatible
>terminal and will return -EINVAL to nsh_session if the terminal does not
>respond correctly to a VT100 request for the current cursor position.
>
[Tim] Vt102 on Minicom. Putty behaves the same.

If I disable CLE and use the basic readline console I get a different error and it hangs:

NuttShell (NSH) NuttX-10.3.0
nsh> nsh: nsh_session: readline failed: 0

Undoubtedly some conflict in my .config from a change between 10.2 and 10.3 but seems a pretty basic thing to have been changed/broken? Any suggestions very welcome!


RE: 10.3 merge issues

Posted by TimH <ti...@jti.uk.com>.
>-----Original Message-----
>From: Gregory Nutt <sp...@gmail.com>
>Sent: 17 August 2022 19:16
>Subject: Re: 10.3 merge issues
>
>
>> 1.	Final change that allowed a compile was when I changed the defconfig
>> to have the new:
>>
>>
>>
>> CONFIG_INIT_ENTRYPOINT="nsh_main"
>>
>> CONFIG_INIT_ENTRYNAME="nsh"
>>
>>
>>
>> It all boots and I get the nsh prompt but I get continuous:
>>
>>
>>
>> nsh_session: cle failed: 22
>>
>>
>>
>> I'm assuming that's EINVAL, but I can't work out why?
>>
>>
>
>What kind of terminal do you use?  CLE only works with a VT100-compatible
>terminal and will return -EINVAL to nsh_session if the terminal does not
>respond correctly to a VT100 request for the current cursor position.
>
[Tim] Minicom (via serial->USB) under WSL (main build/dev environment is a "proper" Linux machine, but run Minicom via WSL for historic reasons)

It has a choice of VT102 or ANSI - both behave the same.


Re: 10.3 merge issues

Posted by Gregory Nutt <sp...@gmail.com>.
> 1.	Final change that allowed a compile was when I changed the defconfig
> to have the new:
>
>   
>
> CONFIG_INIT_ENTRYPOINT="nsh_main"
>
> CONFIG_INIT_ENTRYNAME="nsh"
>
>   
>
> It all boots and I get the nsh prompt but I get continuous:
>
>   
>
> nsh_session: cle failed: 22
>
>   
>
> I'm assuming that's EINVAL, but I can't work out why?
>
>   

What kind of terminal do you use?  CLE only works with a 
VT100-compatible terminal and will return -EINVAL to nsh_session if the 
terminal does not respond correctly to a VT100 request for the current 
cursor position.