Re: Simulator, NOR flash file system, MTD

2023-01-27 Thread Xiang Xiao
You can try the follow config directly: 1.spi flash simulator + smartfs: https://github.com/apache/nuttx/blob/master/arch/sim/src/sim/sim_initialize.c#L59-L225 2.ram mtd + :smartfs/littlefs/nxffs: https://github.com/apache/nuttx/blob/master/boards/sim/sim/sim/src/sim_bringup.c#L157-L238 On Sat,

Re: Pass interrupt status to handler

2023-01-27 Thread Xiang Xiao
On Sat, Jan 28, 2023 at 2:46 AM Gregory Nutt wrote: > Typically, if you want to pass a small amount of information from an > interrupt handler to a task, you would use a normal IPC like sigqueue() > (https://pubs.opengroup.org/onlinepubs/7908799/xsh/sigqueue.html) which > allows to send a type

Re: Lua fails to build

2023-01-27 Thread Xiang Xiao
Please try this stock config before making your own one: https://github.com/apache/nuttx/blob/master/boards/sim/sim/sim/configs/lua/defconfig On Fri, Jan 27, 2023 at 4:28 PM Russell Haley wrote: > Hi, > > I am trying to build the Lua interpreter into the sim:nsh sample code > using the

Re: How to automatically kill all children threads when the main thread die

2023-01-16 Thread Xiang Xiao
no, we can iterate all processes through proc/xxx and call getppid to decide whether to kill it. On Mon, Jan 16, 2023 at 9:48 PM Gregory Nutt wrote: > > But nuttx doesn't support task sesion/group yet, so the simple > solution is extend kill command instead. > > Wouldn't you have to introduce

Re: How to automatically kill all children threads when the main thread die

2023-01-15 Thread Xiang Xiao
rted AFAIK. > > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows > > > > *From: *Xiang Xiao > *Sent: *Sunday, January 15, 2023 9:54 PM > *To: *dev@nuttx.apache.org > *Subject: *Re: How to automatically kill all children thread

Re: How to automatically kill all children threads when the main thread die

2023-01-15 Thread Xiang Xiao
If CONFIG_SIG_DEFAULT, the kernel will terminate all child pthreads, but not child tasks. We can extend kill to support -P flag like pkill: https://linux.die.net/man/1/pkill -P ppid,... Only match processes whose parent process ID is listed. On Mon, Jan 16, 2023 at 10:14 AM Gregory Nutt wrote:

Re: [VOTE] Apache NuttX 12.0.0 RC1 release

2023-01-15 Thread Xiang Xiao
+1, test with sim: ./tools/checkrelease.sh --release 12.0.0-RC1 Downloading release files from https://dist.apache.org/repos/dist/dev/nuttx/12.0.0-RC1/ gpg: directory '/tmp/nuttx-checkrelease/.gnupg' created gpg: keybox '/tmp/nuttx-checkrelease/.gnupg/pubring.kbx' created gpg:

Re: d_len/d_buf arbitration for s32k1xx_flexcan

2023-01-03 Thread Xiang Xiao
e is structured so work queue threads are > used, generally, but in Socket CAN drivers this was "waived" to avoid data > loss, causing the problem I describe. > > Thanks, > > Carlos > > On Tue, Jan 3, 2023 at 6:56 PM Xiang Xiao > wrote: > > > Since tx/rx

Re: d_len/d_buf arbitration for s32k1xx_flexcan

2023-01-03 Thread Xiang Xiao
Since tx/rx share the same d_len/d_buf, you must do send/recv in one and only thread(either by system work thread or driver dedicated thread) to avoid the race condition you describe below. On Wed, Jan 4, 2023 at 1:45 AM Carlos Sanchez wrote: > Hi all, > > I am observing an extrange behavior:

Re: Syslog file max Size wrap issue

2023-01-03 Thread Xiang Xiao
On Tue, Jan 3, 2023 at 8:51 PM Simon Filgis wrote: > Hi Alan, > > Thanks for your email. > > I had a closer look and I think I do not think of a bug anymore. > > Filesize is only checked once, while initializing the syslog file channel > with syslog_file_channel() at board level. In other words,

Re: [VOTE] Apache NuttX 12.0.0 RC0 release

2022-12-25 Thread Xiang Xiao
+1. ./tools/checkrelease.sh work well with the new distribution location: ./tools/checkrelease.sh --release 12.0.0-RC0 Downloading release files from https://dist.apache.org/repos/dist/dev/nuttx/12.0.0-RC0/ gpg: directory '/tmp/nuttx-checkrelease/.gnupg' created gpg: keybox

Re: mmap/munmap/ftruncate interface change proposal

2022-12-22 Thread Xiang Xiao
On Thu, Dec 22, 2022 at 2:28 PM Jukka Laitinen wrote: > Hi, > > We've implemented and been using "posix shm" support for nuttx ( not > up-streamed to mainline nuttx so far - I am open to discussion whether > there is interest for it ). For this, we've naturally utilized the > interfaces

Re: Article: Preparing a Pull Request for NuttX

2022-11-28 Thread Xiang Xiao
Nice, it's very useful for new contributors. On Mon, Nov 28, 2022 at 4:07 PM Lee, Lup Yuen wrote: > This article explains how I prepared my Pull Requests for NuttX. I hope > this will be helpful for folks contributing to NuttX for the very first > time :-) > >

Re: New names of repositories

2022-11-18 Thread Xiang Xiao
But NuttX has more features than traditional RTOS(e.g. FreeRTOS). Actually, Xiaomi uses it in the IoT space which has less real time requirements. Other similar OS(e.g. Zephyr) doesn't append rtos suffix. So, I prefer keep nuttx and nuttx-apps. On Fri, Nov 18, 2022 at 1:39 PM Alin Jerpelea

Re: Native Windows build

2022-11-13 Thread Xiang Xiao
On Sat, Nov 12, 2022 at 9:43 PM fft wrote: > Dear all, > > > Through the efforts of Petro and me , NuttX Windows native build is > finally restored again: > > > https://github.com/apache/incubator-nuttx/pull/7572 > https://github.com/apache/incubator-nuttx/pull/7580 >

Re: Native Windows build

2022-11-13 Thread Xiang Xiao
On Sun, Nov 13, 2022 at 10:33 PM fft wrote: > A few years ago, i build NuttX-8.2 in Windows native build it takes about > 1 minutes. the latest nuttx use temporary .ddc to generate Make.dep because > there's so many .ddc file, one type command to process all .ddc file will > give an error: input

Re: libpq and libscpi: how to start

2022-11-07 Thread Xiang Xiao
can always be redeployed to the > correct place prior to the make command. > > Sebastien > > Le 07/11/2022 à 03:50, Xiang Xiao a écrit : > > With https://github.com/apache/incubator-nuttx-apps/pull/1295, you can > just > > clone(or use submodule/repo) the code to the Makefil

Re: libpq and libscpi: how to start

2022-11-06 Thread Xiang Xiao
With https://github.com/apache/incubator-nuttx-apps/pull/1295, you can just clone(or use submodule/repo) the code to the Makefile's expected location, the build system will skip the download step. On Mon, Nov 7, 2022 at 4:23 AM Abdelatif Guettouche < abdelatif.guettou...@gmail.com> wrote: > >

Re: fcntl(fd, F_SETFL, O_NONBLOCK) on Local Socket not working

2022-11-03 Thread Xiang Xiao
value of the variable ret in function local_ioctl (file local_sockif.c) > from OK to -ENOTTY (like the fix in netdev_ioctl), it starts to work in my > case. I think it should not be a problem for other cases. What do you > think? > > On Thu, Nov 3, 2022 at 7:04 PM Xiang Xiao > wrote

Re: fcntl(fd, F_SETFL, O_NONBLOCK) on Local Socket not working

2022-11-03 Thread Xiang Xiao
Does your branch contain this patch? https://github.com/apache/incubator-nuttx/pull/5933 On Fri, Nov 4, 2022 at 1:11 AM Jernej Turnsek wrote: > Hi, > > I am trying to set O_NONBLOCK flag with the help of fcntl on Local Socket > structure (AF_UNIX) and I am not getting the non blocking

Re: [VOTE] Apache NuttX Community Graduation

2022-10-21 Thread Xiang Xiao
+1!!! On Fri, Oct 21, 2022 at 8:47 PM Nathan Hartman wrote: > Dear Apache NuttX Community, > > Following the [DISCUSS] thread which has gone 72 hours without any > further issues raised [1]: > > This is a call to VOTE on Graduation of Apache NuttX from the > Incubator to Top-Level Project

Re: [DISCUSS] Graduate NuttX as TLP

2022-10-18 Thread Xiang Xiao
+1. We are ready after two years of incubation! On Wed, Oct 19, 2022 at 1:07 PM Alin Jerpelea wrote: > +1 > I think that we are ready to graduate > > > Best regards > Alin > > On Wed, 19 Oct 2022, 06:16 Tomek CEDRO, wrote: > > > Just my vote for the path names: > > apache/nuttx_rtos > >

Re: NuttX and Gigadevice ARM processors?

2022-10-07 Thread Xiang Xiao
Gigadevice made a port recently: add chip GD32F450 of GD32MCU by GD32-MCU · Pull Request #7011 · apache/incubator-nuttx (github.com) You can try it. On Fri, Oct 7, 2022 at 10:10 PM Frank-Christian Kruegel wrote: > Hi; > > there is a global

Re: Subject: [VOTE] Apache NuttX 11.0.0 (incubating) RC2 release

2022-09-14 Thread Xiang Xiao
+1 with tools/checkelease.sh: ./tools/checkrelease.sh --release 11.0.0-RC2 Downloading release files from https://dist.apache.org/repos/dist/dev/incubator/nuttx/11.0.0-RC2/ gpg: directory '/tmp/nuttx-checkrelease/.gnupg' created gpg: keybox '/tmp/nuttx-checkrelease/.gnupg/pubring.kbx' created gpg:

Re: Driver for combined battery charger and regulator

2022-09-08 Thread Xiang Xiao
On Fri, Sep 9, 2022 at 12:19 AM TimH wrote: > Apologies for the long post, but given the absence of many/any voltage > regulator drivers - especially PMICs - I feel I need to get this all sorted > and agreed. So I have looked long and hard at the Nuttx files and Linux > documentation and to see

Re: [VOTE] Apache NuttX 11.0.0 (incubating) RC1 release

2022-09-08 Thread Xiang Xiao
+1. Check with tools/checkrelease.sh script: Downloading release files from https://dist.apache.org/repos/dist/dev/incubator/nuttx/11.0.0-RC1/ gpg: directory '/tmp/nuttx-checkrelease/.gnupg' created gpg: keybox '/tmp/nuttx-checkrelease/.gnupg/pubring.kbx' created gpg:

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Xiang Xiao
On Wed, Sep 7, 2022 at 10:26 PM TimH wrote: > Looking further, I'm thinking that this driver template has never been > used, is undocumented, and is therefore bordering on unusable. > > Please correct me if I'm still missing something, as there are zero clues > I can find as to what each ops

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Xiang Xiao
On Wed, Sep 7, 2022 at 9:20 PM TimH wrote: > >From: Xiang Xiao > >Sent: 07 September 2022 13:40 > > > >On Wed, Sep 7, 2022 at 8:13 PM TimH wrote: > > > >> >From: Alan Carvalho de Assis > >> >Sent: 06 September 2022 13:51 >

Re: Driver for combined battery charger and regulator

2022-09-07 Thread Xiang Xiao
On Wed, Sep 7, 2022 at 8:13 PM TimH wrote: > >From: Alan Carvalho de Assis > >Sent: 06 September 2022 13:51 > >I think for ACT8945A should be included a regulator at > drivers/power/supply/ > >and will implement the functions from and will > >register itself with regulator_register(). > >

Re: Driver for combined battery charger and regulator

2022-09-06 Thread Xiang Xiao
Battery driver is a special one because the framework doesn't define any ioctl to enable/disable the device, which means you have to enable it in register. On Tue, Sep 6, 2022 at 10:18 PM TimH wrote: > Thanks! > > I think I will take the following approach: > > - Use Kconfig to determine the

Re: Reevaluate the C89 Requirement

2022-08-30 Thread Xiang Xiao
On Tue, Aug 30, 2022 at 5:30 PM Sebastien Lorquet wrote: > Hi, > > That would be -1 for me too. > > Reason 1 from Nathan could change my vote. > > But reason 2 would be a shame. We have one of the few a RTOS that > support CPUs outside ARM. > > > TBH, there is no solid technical reason to change

Re: Re: Reevaluate the C89 Requirement

2022-08-30 Thread Xiang Xiao
On Wed, Aug 31, 2022 at 3:39 AM Gregory Nutt wrote: > Yes. 2.95 > > > > > Classic Z80 is probably not viable due to the 64Kb address limitation > but > > > is still relevant for Z80 derived parts with MMUs such as Z180 and the > ZX > > > Spectrum Next or with wider address buses such as the

Re: Re: Reevaluate the C89 Requirement

2022-08-30 Thread Xiang Xiao
On Tue, Aug 30, 2022 at 10:43 PM Gregory Nutt wrote: > > Just FYI, based on what Byron points out with regard to the Zilog > families needing C89 (and possibly other archs that weren't mentioned), I > would probably vote -1 unless... > > There have been several other cases over the years where

Re: Lua on NuttX blog posts

2022-08-27 Thread Xiang Xiao
On Sun, Aug 28, 2022 at 1:07 AM Fotis Panagiotopoulos wrote: > Hello Mike! > > I have also been using Lua on microcontrollers for many years, with great > success. > For The last couple of years I have been running Lua on NuttX, these two > are great when combined! > > Quite recently I tried

Re: Lua on NuttX blog posts

2022-08-27 Thread Xiang Xiao
On Sun, Aug 28, 2022 at 1:07 AM Fotis Panagiotopoulos wrote: > Hello Mike! > > I have also been using Lua on microcontrollers for many years, with great > success. > For The last couple of years I have been running Lua on NuttX, these two > are great when combined! > > Quite recently I tried

Re: NuttX Code Coverage

2022-08-25 Thread Xiang Xiao
ch in the power off process. > > On Thu, Aug 25, 2022 at 5:15 PM Xiang Xiao > wrote: > > > On Thu, Aug 25, 2022 at 10:05 PM Fotis Panagiotopoulos < > > f.j.pa...@gmail.com> > > wrote: > > > > > Ah, yes. I didn't have CONFIG_BOARDCTL_POWER

Re: NuttX Code Coverage

2022-08-25 Thread Xiang Xiao
On Thu, Aug 25, 2022 at 10:05 PM Fotis Panagiotopoulos wrote: > Ah, yes. I didn't have CONFIG_BOARDCTL_POWEROFF enabled, so I didn't see > this command. > > Nevertheless, it is still not working. > Indeed the simulator exits, but the .gcda files are not generated. > > Try this tools:

Re: Reevaluate the C89 Requirement

2022-08-24 Thread Xiang Xiao
On Wed, Aug 24, 2022 at 11:38 AM Nathan Hartman wrote: > On Tue, Aug 23, 2022 at 8:33 PM Alan Rosenthal > wrote: > > > Hello NuttXers, > > > > I recently posted an issue to the NuttX Github page: > > https://github.com/apache/incubator-nuttx/issues/6896 > > > > I'll summarize my thoughts here.

Re: Porting Nuttx to new board: Question about SPI-FRAM / malloc

2022-07-27 Thread Xiang Xiao
You can either: 1. Or expose FRAM as a tmpfs through mount pointer 2. If you want to use FRAM as PSRAM, you can add FRAM to the system heap with kmm_addregion 3. If you want to use FRAM as an separated heap, you can call mm_initialize, mm_malloc and mm_free

Re: Simulator loop task.

2022-07-22 Thread Xiang Xiao
ssues. > > On Thu, Jul 21, 2022 at 10:14 PM Xiang Xiao > wrote: > > > On Fri, Jul 22, 2022 at 12:12 AM Fotis Panagiotopoulos < > > f.j.pa...@gmail.com> > > wrote: > > > > > Here is the actual issue: > > > > > > The timer g_syst

Re: Simulator loop task.

2022-07-21 Thread Xiang Xiao
nd I > don't expect side effects). > * Move the remaining logic within the idle task to the loop task. > > > What do you think? > > I think it's fine or better to use the highest priority thread to simulate the interrupt. > > On Thu, Jul 21, 2022 at 6:56 PM Xiang X

Re: Simulator loop task.

2022-07-21 Thread Xiang Xiao
On Thu, Jul 21, 2022 at 11:27 PM Fotis Panagiotopoulos wrote: > Hello, > > I am having some issues with scheduling in simulator. > I noticed that there is a "loop task", that performs various house-keeping > tasks. > > This task is started with a priority of SCHED_PRIORITY_MIN. > Is this correct

Re: Can musl libc replace the libc of nuttx system?

2022-07-11 Thread Xiang Xiao
musl is designed to work exclusively with Linux and then there is no OS abstraction layer. So it's hard to adapt musl to other OS. Alan asks a good question: what benefit do you want to get from replacing NuttX' libc with musl? On Tue, Jul 12, 2022 at 9:50 AM Alan Carvalho de Assis wrote: > Hi

Re: net/if_arp.h - standard header?

2022-06-29 Thread Xiang Xiao
On Thu, Jun 30, 2022 at 12:40 AM Nathan Hartman wrote: > On Wed, Jun 29, 2022 at 12:23 PM Xiang Xiao > wrote: > > > > On Wed, Jun 29, 2022 at 4:44 AM Nathan Hartman > > > wrote: > > > > > On Tue, Jun 28, 2022 at 4:05 PM Nathan Hartman

Re: net/if_arp.h - standard header?

2022-06-29 Thread Xiang Xiao
On Wed, Jun 29, 2022 at 4:44 AM Nathan Hartman wrote: > On Tue, Jun 28, 2022 at 4:05 PM Nathan Hartman > wrote: > > > > I have a program that builds under Linux, BSD, and macOS which > > includes the net/if_arp.h header. > > > > This header does not seem to exist under NuttX. > > > > It is

Re: NuttX-aware debugging.

2022-06-25 Thread Xiang Xiao
heck. Could you try this patch? https://github.com/apache/incubator-nuttx/pull/6520 > > > On Thu, Jun 23, 2022 at 6:11 PM Xiang Xiao > wrote: > > > We document the JLinker plugin usage, but it's the Chinese version only. > > Pengxiang, please prepare a document. >

Re: NuttX-aware debugging.

2022-06-23 Thread Xiang Xiao
; >> > wrote: > >> > > >> >> Ahhh, so it is your Fedora 36 issue, hahaha > >> >> > >> >> Here on Ubuntu "make -C tools -f Makefile.host all" works fine. > >> >> > >> >> It created the jlink-nuttx.s

Re: NuttX-aware debugging.

2022-06-22 Thread Xiang Xiao
Did you enable CONFIG_DEBUG_TCBINFO in your defconfig: incubator-nuttx/Kconfig at master · apache/incubator-nuttx (github.com) The plugin needs the g_tcbinfo to know the critical offset of the field in tcb_s structure. On

Re: [VOTE] Apache NuttX 10.3.0 (incubating) RC4 release

2022-06-10 Thread Xiang Xiao
+1. Run with ./tools/checkrelease.sh, the report looks good: xiaoxiang@LAPTOP-MCMVB0JB:~/backup/os/nuttx/nuttx$ ./tools/checkrelease.sh --release 10.3.0-RC4 Downloading release files from https://dist.apache.org/repos/dist/dev/incubator/nuttx/10.3.0-RC4/ gpg: directory

Re: Pull Request #6330: Is the network still locked on every call to net_driver->d_txavail?

2022-06-05 Thread Xiang Xiao
The net lock should be held to keep the assumption, how about this patch: https://github.com/apache/incubator-nuttx/pull/6368 On Sun, Jun 5, 2022 at 5:02 PM Michael Jung wrote: > Hello everybody, > > With pull request #6330 there is a call to net_driver->d_txavail() from > tcp_timer_expiry(),

Re: LDFLAGS -nostdlib for arm-nuttx-elf?

2022-05-18 Thread Xiang Xiao
-nostdlib is specific to clang/gcc toolchain, not specific to arm or elf. Only gcc/clang toolchain add this flag, other toolchain(e.g. z80) still keep as before. On Wed, May 18, 2022 at 8:59 PM Nathan Hartman wrote: > I noticed that we are unconditionally using: > > LDFLAGS += -nostdlib > > Is

Re: [VOTE] Apache NuttX 10.3.0 (incubating) RC2 release

2022-05-10 Thread Xiang Xiao
+1. Download, build and test on sim:asan with checkrelease.sh, all check pass. Thanks Xiang On Thu, May 5, 2022 at 6:34 PM Alin Jerpelea wrote: > Hello all, > > > Apache NuttX (Incubating) 10.3.0 RC2 has been staged under [1] and it's > time to vote on accepting it for release. If approved we

Re: [VOTE] Apache NuttX 10.3.0 (incubating) RC1 release

2022-04-28 Thread Xiang Xiao
+1. Test with checkrelease.sh. On Wed, Apr 27, 2022 at 4:01 PM Alin Jerpelea wrote: > Hello all, > > > Apache NuttX (Incubating) 10.3.0 RC1 has been staged under [1] and it's > time to vote on accepting it for release. If approved we will seek > final release approval from the IPMC. Voting will

Re: Documentation about using Segger SystemView

2022-04-26 Thread Xiang Xiao
Look like you forget to implement up_perf API, please look at this issue: https://github.com/apache/incubator-nuttx/issues/5843 On Wed, Apr 27, 2022 at 3:04 AM Bartek22 wrote: > Hi, > Is there any documentation about configuring any other board than SIM for > using Segger SystemView ? I've

Re: Is there a standard way to build e.g. a nshlib.a static library from the apps repository?

2022-04-26 Thread Xiang Xiao
You may try to overwrite BIN in nshlib/Makefile to libnsh.a. On Tue, Apr 26, 2022 at 2:38 PM Michael Jung wrote: > Hello everybody, > > I am currently experimenting with buildroot to create a NuttX SDK, which > includes a GCC toolchain build using NuttX as the C library and basically a >

Re: Creating posix shm interface

2022-04-07 Thread Xiang Xiao
On Thu, Apr 7, 2022 at 1:51 PM Jukka Laitinen wrote: > > On 7.4.2022 8.18, Xiang Xiao wrote: > > On Wed, Apr 6, 2022 at 8:20 PM Jukka Laitinen > wrote: > > > >> Hi! > >> > >> Just started crafting the posix shm driver, with the following:

Re: Creating posix shm interface

2022-04-06 Thread Xiang Xiao
t; This patch associate struct file with strucct fs_rammap_s, may help you: https://github.com/apache/incubator-nuttx/pull/5997 -Jukka > > > On 5.4.2022 14.04, Xiang Xiao wrote: > > On Tue, Apr 5, 2022 at 5:08 PM Jukka Laitinen > wrote: > > > >> Hi! > >> >

Re: [VOTE] Apache NuttX 10.3.0 (incubating) RC0 release

2022-04-06 Thread Xiang Xiao
> > > > > On Wed, 6 Apr 2022, 18:09 Xiang Xiao, wrote: > > > +1 to release > > check with ./tools/checkrelease.sh --release nuttx-10.3.0-RC0 and report > > DISCLAIMER-WIP.not present correctly. > > > > On Fri, Apr 1, 2022 at 9:55 PM Nathan Hart

Re: [VOTE] Apache NuttX 10.3.0 (incubating) RC0 release

2022-04-06 Thread Xiang Xiao
+1 to release check with ./tools/checkrelease.sh --release nuttx-10.3.0-RC0 and report DISCLAIMER-WIP.not present correctly. On Fri, Apr 1, 2022 at 9:55 PM Nathan Hartman wrote: > On Wed, Mar 30, 2022 at 12:50 PM Alin Jerpelea wrote: > > > > Hello all, > > > > > > Apache NuttX (Incubating)

Re: Websockets with NuttX

2022-04-06 Thread Xiang Xiao
Look like libwebsockets is more mature and still actively maintained. On Wed, Apr 6, 2022 at 1:47 PM Michael Jung wrote: > Hello Alan and Petro, > > I have used libwebsockets on NuttX a couple of years ago. This is an > awesome piece of Software and meanwhile it is MIT licensed. I an planing

Re: Creating posix shm interface

2022-04-05 Thread Xiang Xiao
On Tue, Apr 5, 2022 at 5:08 PM Jukka Laitinen wrote: > Hi! > > I would like to do the posix shm interface for NuttX (shm_open, > shm_unlink etc.); with the following properties > > - Would work in all memory protection modes (flat, protected and kernel). > > - In flat it would just "malloc"

Re: register_driver with 0000 mode

2022-04-02 Thread Xiang Xiao
Yes, for example if I want to set the serial device baud rate(TCSETS), should I open it with O_WRONLY? On Sat, Apr 2, 2022 at 10:56 PM Gregory Nutt wrote: > On 4/2/2022 7:03 AM, Xiang Xiao wrote: > > Many functionality is accessed through ioctl callback, what permission is > >

Re: register_driver with 0000 mode

2022-04-02 Thread Xiang Xiao
Many functionality is accessed through ioctl callback, what permission is needed before invoking ioctl? On Sat, Apr 2, 2022 at 8:45 PM Gregory Nutt wrote: > If I understand correctly we can add one single "dummy_read" implementation > > for all drivers that do not supply the read method. This

Re: PR 5782 and code reviee process

2022-04-01 Thread Xiang Xiao
On Sat, Apr 2, 2022 at 3:16 AM Jukka Laitinen wrote: > I am not the author there, just feel that the process is not fair for the > author. > > The PR has over 300 comments, and they come in bunches of 20, every day > one bunch more. Most of them are just of type "please replace xxxyyy with >

Re: register_driver with 0000 mode

2022-04-01 Thread Xiang Xiao
lan Carvalho de Assis > пише: > > > I think the device file shouldn't be created with permission 000. > > > > Look inside your Linux /dev all device files have RW permission for > > root, some give only R for group and others. > > > > So, probably we need to fix t

Re: register_driver with 0000 mode

2022-04-01 Thread Xiang Xiao
on denied > > >> > > > >> > You can even try to create a C program just to open it, and it will > > >> > fail. > > >> > > > >> > See the man page of open function: > > >> > > > >> >

Re: NuttX github code review practices

2022-03-28 Thread Xiang Xiao
our stuff at least), and can only work in FLAT_BUILD mode (if even in > > that?). > > > > How does stuff like this get in? Xiaomi does and approves by > > themselves? Sorry for being blunt, but this is really irritating. > > > > -Jukka > > > > > > On

Re: NuttX github code review practices

2022-03-28 Thread Xiang Xiao
. Anyone could give the feedback on github and all comments must be addressed before merging. If you look at this patch closely: 1. This patch was created 15 days ago 2. And has more than 20 comments > -Jukka > > > On 25.3.2022 21.47, Xiang Xiao wrote: > > On Fri, Ma

Re: NuttX github code review practices

2022-03-25 Thread Xiang Xiao
On Fri, Mar 25, 2022 at 6:53 PM Jukka Laitinen wrote: > Hi, > > I was trying to make a more general statement than starting discussion > on separate PRs, but let me shortly answer still > > On 25.3.2022 10.32, Xiang Xiao wrote: > > On Fri, Mar 25, 2022 at 3:35 PM J

Re: NuttX github code review practices

2022-03-25 Thread Xiang Xiao
On Fri, Mar 25, 2022 at 3:35 PM Jukka Laitinen wrote: > Hi, > > > As an another example, we would very much like to bring in > CONFIG_BUILD_KERNEL support for RISC-V for NuttX, as we have worked hard > on this for some time, and have it working. Now, even when this work it > is only additions,

Re: Abstract "channels" driver model

2022-03-21 Thread Xiang Xiao
On Fri, Mar 18, 2022 at 3:17 AM Matthew Trescott wrote: > On Thu, Mar 17, 2022 at 2:41 AM Xiang Xiao > wrote: > > > > We are working on this to provide multiple read/poll support. The basic > > idea is that: > > > >1. Upper half driver hold FIFO shared

Re: Abstract "channels" driver model

2022-03-17 Thread Xiang Xiao
On Thu, Mar 17, 2022 at 6:24 PM Tim wrote: > Just a "thumbs up" from me if you do this (or find something that exists > that'll do it) - it's a perfect fit for my current project :) > > So the update matches your expectation, please watch github PR notification, we will upstream the patch after

Re: Abstract "channels" driver model

2022-03-17 Thread Xiang Xiao
On Thu, Mar 17, 2022 at 1:55 PM Matthew Trescott wrote: > Hi everyone, > > I was thinking about how to implement the software for my project > (control module for a Formula SAE car) and realized that the basic ADC > driver model is a bit inconvenient and creates a lot of extra overhead > in

Re: NuttX and C++ libraries: boost / ASIO / std::chrono

2022-03-02 Thread Xiang Xiao
We use both uClibc++ and libc++, both work fine. But never try the boost library. On Wed, Mar 2, 2022 at 9:16 PM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Hello team, > > I would like to ask who has used C++ libraries with NuttX. For example > if I have a C++ application that

Re: [DISCUSS]: Self merge and Single company/organization merge gating

2022-02-18 Thread Xiang Xiao
On Fri, Feb 18, 2022 at 3:52 PM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Hi, > > I agree that auto-merge should not be used. > > But I disagree that "as it is now since almost all patches follow the > rule and seldom someone self-merges a patch". Here is a list of > patches

Re: Using Nuttx with the CORTEXM33 STM32U5

2022-02-09 Thread Xiang Xiao
Here is the chip use M33: https://github.com/apache/incubator-nuttx/tree/master/arch/arm/src/rtl8720c On Thu, Feb 10, 2022 at 11:12 AM Gregory Nutt wrote: > There is good support for ARMv8-M and there are contributors using > proprietary ARMv8-M parts (probably Cortex-M33???), but no support

Re: Right way to start a lightweight kernel thread without copying open file descriptors?

2022-01-30 Thread Xiang Xiao
It's better to let kernel thread skip the duplication of caller's file handler, here is the patch: https://github.com/apache/incubator-nuttx/pull/5379 Michael, could you try it? On Mon, Jan 31, 2022 at 12:59 AM Michael Jung wrote: > Hi Xiang, Hi Matthew, > > Thanks for your responses. > >

Re: register_driver with 0000 mode

2022-01-28 Thread Xiang Xiao
doesn't encode the required permissions into ioctl code, the check has to be done by an individual ioctl handler. > Best regards, > Petro > > пт, 28 січ. 2022 р. о 11:39 Xiang Xiao пише: > > > > If we want to do the correct permission check, the ioctl handler needs to > &

Re: Right way to start a lightweight kernel thread without copying open file descriptors?

2022-01-28 Thread Xiang Xiao
In the kernel, you should call file_open(file_close...) instead open(close...) to avoid the problem you described below. On Fri, Jan 28, 2022 at 7:43 PM Michael Jung wrote: > Hello everybody, > > I am developing a device driver, which is exposed as a character device > (i.e. /dev/pcd) and which

Re: register_driver with 0000 mode

2022-01-28 Thread Xiang Xiao
If we want to do the correct permission check, the ioctl handler needs to check R/W bit by itself based on how the ioctl is implemented. Or follow up how Linux encode the needed permission into each IOCTL: https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/ioctl.h#L85-L91 and

Re: SD Card in Simulation

2022-01-24 Thread Xiang Xiao
You can try HostFS. On Mon, Jan 24, 2022 at 7:07 PM Fotis Panagiotopoulos wrote: > Hello, > > I am working on a system that uses an SD card to read various files. > I am also using the simulator for testing this firmware. > > I would like to test the parts of the system that read and parse

Re: Question about backtrace_malloc

2022-01-20 Thread Xiang Xiao
rintf already support this special case: https://github.com/apache/incubator-nuttx/blob/master/libs/libc/stdio/lib_snprintf.c#L42-L46 sprintf does not(but conform the spec): https://github.com/apache/incubator-nuttx/blob/master/libs/libc/stdio/lib_sprintf.c#L38 > On Thu, Jan 20, 2022 at 6:50 AM Xiang Xia

Re: Question about backtrace_malloc

2022-01-20 Thread Xiang Xiao
On Thu, Jan 20, 2022 at 8:43 PM Arie de Muijnck wrote: > > > On 2022-01-20 13:11, Xiang Xiao wrote: > > On Thu, Jan 20, 2022 at 7:33 PM Jukka Laitinen > > wrote: > > > >> Hi, > >> > >> Sorry if this question comes several times, it seems tha

Re: Question about backtrace_malloc

2022-01-20 Thread Xiang Xiao
On Thu, Jan 20, 2022 at 7:33 PM Jukka Laitinen wrote: > Hi, > > Sorry if this question comes several times, it seems that for some > reason my emails are not always coming through to the mailing list... So > re-sending. > > I started getting this build error from the latest NuttX: > >

Re: Move to C99 for common code

2022-01-10 Thread Xiang Xiao
Even no people complain about the inline usage, but it's always good to isolate the inline keyword in compiler.h like others. On Tue, Jan 11, 2022 at 4:37 AM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Following the discussion related to the "inline" keyword usage in common >

Re: Move to C99 for common code

2022-01-07 Thread Xiang Xiao
nctions? Those are also a part on C99. > > > > Are those old architectures checked by the CI? I mean do we have a proof > > that those are still compilable with the latest release? > > > > Best regards, > > Petro > > > > On Sat, Jan 8, 2022, 6:37 AM Xian

Re: Move to C99 for common code

2022-01-07 Thread Xiang Xiao
> > On Sat, Jan 8, 2022, 6:37 AM Xiang Xiao wrote: > > > > > > > On Sat, Jan 8, 2022 at 6:29 AM Petro Karashchenko < > > petro.karashche...@gmail.com> wrote: > > > >> Hello team, > >> > >> Recently I mr. @Xiang Xiao had a

Re: Move to C99 for common code

2022-01-07 Thread Xiang Xiao
On Sat, Jan 8, 2022 at 6:29 AM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Hello team, > > Recently I mr. @Xiang Xiao had a discussion > in one of the PR's related to C89 code compliance. Particularly related to > initializing a structure by field names (de

Re: Change default behavior of semaphores?

2022-01-05 Thread Xiang Xiao
On Thu, Jan 6, 2022 at 4:23 AM Gregory Nutt wrote: > > I truly believe that priority inheritance on counting semaphores should > be > > explicitly enabled (disabled by default) and enabling it by default might > > lead to unexpected priority boost for low priority tasks that violates > >

Re: Change default behavior of semaphores?

2022-01-05 Thread Xiang Xiao
Here are the two patch which demo that POSIX compliant code crash directly when CONFIG_PRIORITY_INHERITANCE is enabled: https://github.com/apache/incubator-nuttx/pull/5170 https://github.com/apache/incubator-nuttx-apps/pull/960 Please give your more feedback at

Re: Top Apache Projects

2022-01-04 Thread Xiang Xiao
Agree, it's time to graduate! On Wed, Jan 5, 2022 at 11:22 AM Nathan Hartman wrote: > On Tue, Jan 4, 2022 at 9:08 PM Gregory Nutt wrote: > > > > Interesting: > > > https://thestack.technology/top-apache-projects-in-2021-from-superset-to-nuttx/ > > Wow that's cool! Thanks for sharing. > > Now

Re: Article: SPI on BL602 and ESP32

2021-12-13 Thread Xiang Xiao
r/net/can https://github.com/apache/incubator-nuttx/tree/master/net/bluetooth > > On Mon, Dec 13, 2021 at 11:47 AM Xiang Xiao > wrote: > > > It will be a good addition if you can mainline the integration of LoRa > high > > level stack. > > > > On M

Re: Article: SPI on BL602 and ESP32

2021-12-12 Thread Xiang Xiao
It will be a good addition if you can mainline the integration of LoRa high level stack. On Mon, Dec 13, 2021 at 9:57 AM Lee, Lup Yuen wrote: > Here's my new article about NuttX SPI on BL602 and ESP32... > > https://lupyuen.github.io/articles/spi2 > > Now that NuttX is talking OK to Semtech

Re: blockmtd device on top of /dev/null

2021-12-01 Thread Xiang Xiao
If you want to test a new file system and want to isolate it from the potential MTD driver problem, you can try RAMMTD: https://github.com/apache/incubator-nuttx/blob/master/drivers/mtd/rammtd.c On Thu, Dec 2, 2021 at 7:06 AM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Hello, > >

Re: Kernel ticking and progmem writes

2021-11-30 Thread Xiang Xiao
On Tue, Nov 30, 2021 at 5:55 PM Fotis Panagiotopoulos wrote: > Hello everyone, > > I have some issues with the watchdogs and possibly the scheduling of the > kernel. > > I am not sure if this is a bug, or if I am miss-using something... > > I am working on an STM32F427, and I am using the

Re: Article: NuttX on BL602 / BL604

2021-11-25 Thread Xiang Xiao
Sure. On Thu, Nov 25, 2021 at 3:08 PM Lee, Lup Yuen wrote: > Hi Xiao Xiang: If you would like to reproduce or translate my article into > Chinese, please go ahead thanks :-) > > On Thu, 25 Nov 2021, 2:03 pm Xiang Xiao, > wrote: > > > On Thu, Nov 25, 2021 at 1:36

Re: Article: NuttX on BL602 / BL604

2021-11-24 Thread Xiang Xiao
On Thu, Nov 25, 2021 at 1:36 PM Lee, Lup Yuen wrote: > Hi All: I have just published an article about NuttX on BL602 / BL604... > > https://lupyuen.github.io/articles/nuttx > > Nice article! For AES/SHA/RSA hardware support, I have talked with BL602 dev two month ago, and plan to port OpenBSD

Re: Simulator - UART

2021-11-04 Thread Xiang Xiao
trict need of hardware. > > Thank you all! > > > Στις Τετ, 3 Νοε 2021 στις 3:36 μ.μ., ο/η Alan Carvalho de Assis < > acas...@gmail.com> έγραψε: > > > On 11/3/21, Xiang Xiao wrote: > > > On Wed, Nov 3, 2021 at 8:06 PM Tomasz CEDRO wrote: > >

Re: [VOTE] Apache NuttX 10.2.0 (incubating) RC0 release

2021-11-03 Thread Xiang Xiao
+1 1. run "./tools/checkpatch.sh --release 10.2.0-RC0" without error 2. build and run sim:ostest without error On Mon, Nov 1, 2021 at 4:43 PM Alin Jerpelea wrote: > Hello all, > Apache NuttX (Incubating) 10.2.0 RC0 has been staged under [1] and it's > time to vote on accepting it for release.

Re: Simulator - UART

2021-11-03 Thread Xiang Xiao
On Wed, Nov 3, 2021 at 8:06 PM Tomasz CEDRO wrote: > On Wed, Nov 3, 2021 at 11:37 AM Fotis Panagiotopoulos wrote: > > I am working on a new NuttX-based firmware. > > On this application a hardware board will be able to communicate through > > UART with a Linux system. > > > > There is still some

<    1   2   3   4   5   6   >