Re: Duplicate task_spawn()

2020-06-01 Thread Gregory Nutt

On 5/30/2020 1:27 AM, Yang Chung Fan wrote:

Hi,

Did anyone also noticed that when building with CONFIG_LIB_SYSCALL=y,
the linker is unhappy about the duplicated task_spawn() symbols?

One of them is in sched/ and other one is in libs/libc.


PR 1168 should take care of this.



RE: NuttX config browser

2020-06-01 Thread David Sidrane
Hi Maciej,

Could you have an option to upload a defconfig to see the settings based on
it?

David

-Original Message-
From: Maciej Wójcik [mailto:w8j...@gmail.com]
Sent: Sunday, May 31, 2020 8:23 PM
To: dev@nuttx.apache.org
Subject: Re: NuttX config browser

Hello Alan,

A suggestion: when the user click on the option it should be nice to
> see the Help for that option.


Sure, I will add a side pane.

Regarding online IDE. I was trying few times to switch to online
development. The problem is that to debug or even to connect to nsh, one
still needs local software and local copy of entire project. Which is
against the basic reason why we would like to develop online. It is also a
bit difficult to come up with own, custom online IDE. It is simply a lot of
work, for a team of people.

That being said I can easily imagine using existing online IDE to develop
NuttX project. It could be just described how to do it efficiently. For
example git repository can be cloned to GitLab and opened with their IDE.
Then binary comes from pipeline which can be flashed to the
microcontroller. Some simple client can be created which automates
flashing. Still the issue of debugging remains.

I will take a look at MBED and see how did they solve the issue.

Am So., 31. Mai 2020 um 22:09 Uhr schrieb Alan Carvalho de Assis <
acas...@gmail.com>:

> Hi Maciej,
>
> A suggestion: when the user click on the option it should be nice to
> see the Help for that option.
>
> Do you think it could be possible to do it?
>
> Did you test MBED platform in the browser ever? They have an online
> IDE where people can create an application, compile it and load the
> firmware in the board.
>
> It should be nice if we could have a way to compile NuttX in the
> browser, like MBED is doing for a long time (more than 8 years at
> least).
>
> BR,
>
> Alan
>
> On 5/31/20, Maciej Wójcik  wrote:
> >>
> >> Maciej's tool is much easier to use. Maciej has several other cool
> >> NuttX
> >> tools.
> >
> >
> > Thank you Greg for a good word. I will work on this configuration
> > browser
> > more and I am glad to contribute it if the community will find it
> > useful.
> > Regarding the other tools, I had one more project but I overcomplicated
> it
> > and it ended up nowhere. I am still working on it from time to time, but
> I
> > can't promise it will ever be production ready.
> >
> > Am So., 31. Mai 2020 um 19:18 Uhr schrieb spudaneco  >:
> >
> >> The configuration document he is referring to is not in the repository.
> >> I
> >> used to create it only for releases using a custom tool at
> >> tools/mkconfigvars.shMaciej's tool is much easier to use.Maciej has
> >> several
> >> other cool NuttX tools.  In a meritocracy, I think contributing these
> >> to
> >> the project would score pretty high (hint, hint, hint)Sent from Samsung
> >> tablet.
> >>  Original message From: Brennan Ashton <
> >> bash...@brennanashton.com> Date: 5/31/20  11:04 AM  (GMT-06:00) To:
> >> dev@nuttx.apache.org Subject: Re: NuttX config browser On Sun, May 31,
> >> 2020, 9:17 AM Maciej Wójcik  wrote:> That document is
> >> old, from NuttX 8.2 and needs to be updated.>>> Yes, now I remember
> >> that
> >> there was some page with configuration options. I> think it serves the
> >> purpose. It could be auto generated using CI, then it> wouldn't be
> >> outdated. Still I thought it could be a bit more interactive>It is
> >> built
> >> via CI on every build, but only hosts the latest releaseversion not
> >> master.Maybe there is a regeneration step that's actually missing... I
> >> will
> >> needto look at that, right now we just issue the inlining in the docs
> >> build.--Brennan>
> >
>


RE: [OT] Linux now using 100 char lines as default

2020-06-01 Thread David Sidrane
Let's one up them and keep it binary at the same time 128! :)

-Original Message-
From: Alan Carvalho de Assis [mailto:acas...@gmail.com]
Sent: Monday, June 01, 2020 4:22 AM
To: dev
Subject: [OT] Linux now using 100 char lines as default

Interesting:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdc48fa11e46f867ea4d75fa59ee87a7f48be144


Re: bug report

2020-06-01 Thread Gregory Nutt

I created PR 1167 to correct this per your description.

On 5/31/2020 9:51 AM, 권석근 wrote:

Hi,

I found a bug at "pty.c" during ssh server implementation.

When I turn on CONFIG_SERIAL_TERMIOS and OPOST|ONLCR on pty device
for nsh console's stdin/stdout (ssh shell service), I've got system crash.

Bugs at line 687 of pty.c, pty_write()
ntotal++;

when converting '\n' to '\r\n', pty_write() will return more than requested
(+1, for example) length. and this will break caller lib_fflush(), line 150
of lib_libfflush.c.
When she get (libfflush()) bytes_nwritten which is greater than nbuffer,
nbuffer goes to negative at line 150 and eventually destroys
*stream->fs_bufpos at line 163 of lib_libflush.c

Removing ntotal++;  line 687 of pty.c will fix this bug.

BTW, nsh using ptm/pty as a ssh shell service works great with libssh +
mbedtls.

Thanks

kwo...@kmd.co.kr





RE: NuttX config browser

2020-06-01 Thread Xiang Xiao
vscode may a good choice here:
https://code.visualstudio.com/
It is totally free, open source and run on macOS/Linux/Windows
Many 3rd party tool build around vscode(e.g. PlatformIO):
https://platformio.org/platformio-ide
And github announce a new IDE base on vscode recently:
https://github.com/features/codespaces/?utm_source=announcement&utm_medium=blog&utm_campaign=satellite-product-recap
The best thing is that online version has the full feature as the local version 
because vscode is built from JS, CSS, and HTML.

> -Original Message-
> From: Maciej Wójcik 
> Sent: Monday, June 1, 2020 11:23 AM
> To: dev@nuttx.apache.org
> Subject: Re: NuttX config browser
> 
> Hello Alan,
> 
> A suggestion: when the user click on the option it should be nice to
> > see the Help for that option.
> 
> 
> Sure, I will add a side pane.
> 
> Regarding online IDE. I was trying few times to switch to online development. 
> The problem is that to debug or even to connect to nsh,
> one still needs local software and local copy of entire project. Which is 
> against the basic reason why we would like to develop online. It
> is also a bit difficult to come up with own, custom online IDE. It is simply 
> a lot of work, for a team of people.
> 
> That being said I can easily imagine using existing online IDE to develop 
> NuttX project. It could be just described how to do it efficiently.
> For example git repository can be cloned to GitLab and opened with their IDE.
> Then binary comes from pipeline which can be flashed to the microcontroller. 
> Some simple client can be created which automates
> flashing. Still the issue of debugging remains.
> 
> I will take a look at MBED and see how did they solve the issue.
> 
> Am So., 31. Mai 2020 um 22:09 Uhr schrieb Alan Carvalho de Assis <
> acas...@gmail.com>:
> 
> > Hi Maciej,
> >
> > A suggestion: when the user click on the option it should be nice to
> > see the Help for that option.
> >
> > Do you think it could be possible to do it?
> >
> > Did you test MBED platform in the browser ever? They have an online
> > IDE where people can create an application, compile it and load the
> > firmware in the board.
> >
> > It should be nice if we could have a way to compile NuttX in the
> > browser, like MBED is doing for a long time (more than 8 years at
> > least).
> >
> > BR,
> >
> > Alan
> >
> > On 5/31/20, Maciej Wójcik  wrote:
> > >>
> > >> Maciej's tool is much easier to use. Maciej has several other cool
> > >> NuttX tools.
> > >
> > >
> > > Thank you Greg for a good word. I will work on this configuration
> > > browser more and I am glad to contribute it if the community will find it 
> > > useful.
> > > Regarding the other tools, I had one more project but I
> > > overcomplicated
> > it
> > > and it ended up nowhere. I am still working on it from time to time,
> > > but
> > I
> > > can't promise it will ever be production ready.
> > >
> > > Am So., 31. Mai 2020 um 19:18 Uhr schrieb spudaneco
> > > > >:
> > >
> > >> The configuration document he is referring to is not in the repository.
> > >> I
> > >> used to create it only for releases using a custom tool at
> > >> tools/mkconfigvars.shMaciej's tool is much easier to use.Maciej has
> > >> several other cool NuttX tools.  In a meritocracy, I think
> > >> contributing these to the project would score pretty high (hint,
> > >> hint, hint)Sent from Samsung tablet.
> > >>  Original message From: Brennan Ashton <
> > >> bash...@brennanashton.com> Date: 5/31/20  11:04 AM  (GMT-06:00) To:
> > >> dev@nuttx.apache.org Subject: Re: NuttX config browser On Sun, May
> > >> 31, 2020, 9:17 AM Maciej Wójcik  wrote:> That
> > >> document is old, from NuttX 8.2 and needs to be updated.>>> Yes,
> > >> now I remember that there was some page with configuration options.
> > >> I> think it serves the purpose. It could be auto generated using
> > >> CI, then it> wouldn't be outdated. Still I thought it could be a
> > >> bit more interactive>It is built via CI on every build, but only
> > >> hosts the latest releaseversion not master.Maybe there is a
> > >> regeneration step that's actually missing... I will needto look at
> > >> that, right now we just issue the inlining in the docs
> > >> build.--Brennan>
> > >
> >



[OT] Linux now using 100 char lines as default

2020-06-01 Thread Alan Carvalho de Assis
Interesting:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdc48fa11e46f867ea4d75fa59ee87a7f48be144


Re: NuttX config browser

2020-06-01 Thread Alan Carvalho de Assis
Hi Maciej,

On 6/1/20, Maciej Wójcik  wrote:
> Hello Alan,
>
> A suggestion: when the user click on the option it should be nice to
>> see the Help for that option.
>
>
> Sure, I will add a side pane.
>
> Regarding online IDE. I was trying few times to switch to online
> development. The problem is that to debug or even to connect to nsh, one
> still needs local software and local copy of entire project. Which is
> against the basic reason why we would like to develop online. It is also a
> bit difficult to come up with own, custom online IDE. It is simply a lot of
> work, for a team of people.
>
> That being said I can easily imagine using existing online IDE to develop
> NuttX project. It could be just described how to do it efficiently. For
> example git repository can be cloned to GitLab and opened with their IDE.
> Then binary comes from pipeline which can be flashed to the
> microcontroller. Some simple client can be created which automates
> flashing. Still the issue of debugging remains.
>
> I will take a look at MBED and see how did they solve the issue.
>

About the NSH at least we could use Web Serial API:
https://wicg.github.io/serial/

I used Web Serial and Web Bluetooth few years ago to configure a
vehicle tracker powered by NuttX:

https://www.youtube.com/watch?v=sX6h0y29MPE

At that time the Web Bluetooth wasn't supported natively by the web
browsers, now I think they have better support.

About the Debug we need to find a way, maybe using Web USB to create a
communication with ST-LinkV2 and/or J-Link:
https://wicg.github.io/webusb/

BR,

Alan


bug report

2020-06-01 Thread 권석근
Hi,

I found a bug at "pty.c" during ssh server implementation.

When I turn on CONFIG_SERIAL_TERMIOS and OPOST|ONLCR on pty device
for nsh console's stdin/stdout (ssh shell service), I've got system crash.

Bugs at line 687 of pty.c, pty_write()
ntotal++;

when converting '\n' to '\r\n', pty_write() will return more than requested
(+1, for example) length. and this will break caller lib_fflush(), line 150
of lib_libfflush.c.
When she get (libfflush()) bytes_nwritten which is greater than nbuffer,
nbuffer goes to negative at line 150 and eventually destroys
*stream->fs_bufpos at line 163 of lib_libflush.c

Removing ntotal++;  line 687 of pty.c will fix this bug.

BTW, nsh using ptm/pty as a ssh shell service works great with libssh +
mbedtls.

Thanks

kwo...@kmd.co.kr