Re: NSH network initialization outside of NSH main

2025-05-02 Thread Xiang Xiao
The quick approach is coping the initialization routine to your application, but it isn't an elegant solution. A better approach is splitting the general initialization functionality from nsh to init like other POSIX operating systems. But, the second approach needs more work. On Thu, May 1, 2025

Re: CAN ioctl units (WAS: socketcan ioctl(...SIOCSCANBITRATE...) brings the interface up)

2025-04-16 Thread Xiang Xiao
On Wed, Apr 16, 2025 at 3:53 PM Peter van der Perk wrote: > can_ioctl_data_s is in a 32-bit union. > > https://github.com/apache/nuttx/blob/40c6af6dec0d769ac57f69e89709f9d6310ee0c6/include/net/if.h#L299 > Making it 64-bit would break that union. > > but lifr_ifru doesn't require its member size t

Re: CAN ioctl units (WAS: socketcan ioctl(...SIOCSCANBITRATE...) brings the interface up)

2025-04-16 Thread Xiang Xiao
On Wed, Apr 16, 2025 at 3:37 PM Carlos Sanchez wrote: > > > I was going to propose another global CAN change, removing the 1000 > > > factor from bitrate thus making bitrate calls use units in Hz instead > > > of kHz, so we can discuss that and (if agreed) I make the change on > > > the same PR t

Re: [EXT] socketcan ioctl(...SIOCSCANBITRATE...) brings the interface up

2025-04-15 Thread Xiang Xiao
On Wed, Apr 16, 2025 at 1:25 AM Carlos Sanchez wrote: > Related PR on the apps side, to make slcan work after the "bitrate no > longer brings interface up" change: > https://github.com/apache/nuttx-apps/pull/3059 > > While testing this, I think I have discovered a small mistake on my > previous,

Re: Vote for using system dd instead of nsh dd, avoid duplicate code

2025-04-14 Thread Xiang Xiao
The functionality in system/dd and nshlib is unsync, this patch: 1. update system/dd to get the same functionality as nshlib/dd 2. remove one copy(nshlib/dd) to avoid the inconsistency in the future. Good work! thanks. On Mon, Apr 14, 2025 at 9:07 PM 董九柱 wrote: > Hello Community, > > I

Re: Vote for default crc16 directory to be CRC-16/XMODEM or CRC-16/IBM

2025-04-08 Thread Xiang Xiao
I am neutral to map crc16 to crc16ibmpart unconditionally, but against changing the map by Kconfig. On Wed, Apr 9, 2025 at 9:56 AM chao an wrote: > I want to reach a consensus with everyone > We have spent too much time explaining similar issues to different > developers. we can see that @Alan

Re: Vote for default crc16 directory to be CRC-16/XMODEM or CRC-16/IBM

2025-04-08 Thread Xiang Xiao
On Wed, Apr 9, 2025 at 2:02 AM Lwazi Dube wrote: > On Tue, 8 Apr 2025 at 13:32, Xiang Xiao wrote: > > > On Wed, Apr 9, 2025 at 1:16 AM Lwazi Dube wrote: > > > > > On Tue, 8 Apr 2025 at 05:23, Sebastien Lorquet > > > wrote: > > > > > > >

Re: Vote for default crc16 directory to be CRC-16/XMODEM or CRC-16/IBM

2025-04-08 Thread Xiang Xiao
On Wed, Apr 9, 2025 at 1:16 AM Lwazi Dube wrote: > On Tue, 8 Apr 2025 at 05:23, Sebastien Lorquet > wrote: > > > Hello, > > > > Nathan proposal to have a kconfig, with a default to the historical > > algorithm, is a good solution. > > > > Kconfig will work if you mean this: > > int16_t crc16(FAR

Re: Proposal: Common IOCTL API for RF Modulation Technologies

2025-03-15 Thread Xiang Xiao
It's totally wrong to change interface definition or meaning by Kconfig. Interfaces mean some contract between kernel and userspace, how do applications follow the changing contract? On Fri, Mar 14, 2025 at 7:47 AM Nathan Hartman wrote: > Hi all, > > I like the fact that there has been a high le

Re: [Vote] NuttX LTS release

2025-02-26 Thread Xiang Xiao
Before we have a solid test suite to ensure the release achieves some quality level, the release is just a snapshot of a developing code base with a very basic verification(nsh+ostest), which quality is far from LTS. So, I suggest to setup the olid verification suite and automation test farm before

Re: Driver poll question

2025-02-11 Thread Xiang Xiao
quiring changes to any > existing drivers. > > Regards > Kian > > From: Xiang Xiao > Sent: 11 February 2025 06:53 > To: dev@nuttx.apache.org > Subject: Re: Driver poll question > > On Tue, Feb 11, 2025 at 2:00 AM Kian Karas (KK) wrote:

Re: Driver poll question

2025-02-10 Thread Xiang Xiao
On Tue, Feb 11, 2025 at 2:00 AM Kian Karas (KK) wrote: > Hi community > > I have a question related to the implementation of poll() in the kernel > and drivers. I am implementing a driver with poll support (through > file_operations::poll) and have observed that "teardown" of the pollfds is > not

Re: The behavior of spin_lock needs everyone's advice

2025-02-04 Thread Xiang Xiao
On Wed, Feb 5, 2025 at 1:06 PM chao an wrote: > Hi, > > The behavior of spin_lock needs everyone's advice > > After PR14578 was merged into > the NuttX, the behavior of spin_lock() and spin_lock_irqsave() added the > feature of disable the preemption:

Re: Explanation request about a the merging of an unacceptable pull request

2025-02-03 Thread Xiang Xiao
The ai bot is a soft suggestion, not a rule from Lup introduces it initially. Many PR already contain the useful information, like these: https://github.com/apache/nuttx/pull/15749 https://github.com/apache/nuttx/pull/15728 But ai bot still complain the information isn't enough. Even https://github

Re: trust in nuttx gone

2025-01-30 Thread Xiang Xiao
-) > Tomek > > we already have a contract with raiden00pl, and could reserve his time help Lup to improve the automation test if he is interested. > On Thu, Jan 30, 2025 at 6:41 AM Xiang Xiao > wrote: > > > > Ok, let's come up with a solid plan. Xiaomi could sponsor &

Re: trust in nuttx gone

2025-01-29 Thread Xiang Xiao
course, we can decide that LTS releases are not a good fit for us and > improve the testing anyway. > > Cheers, > Nathan > > On Wed, Jan 29, 2025 at 11:28 PM Xiang Xiao > wrote: > > > Before we have a solid automation test, how do we declare the release is > > go

Re: trust in nuttx gone

2025-01-29 Thread Xiang Xiao
Before we have a solid automation test, how do we declare the release is good enough to be LTS release? As I mentioned before, it's impossible to have a stable base or LTS release without enough automation test. On Thu, Jan 30, 2025 at 4:05 AM Nathan Hartman wrote: > On Wed, Jan 29, 2025 at 8:21

Re: Sensor fusion on NuttX

2025-01-29 Thread Xiang Xiao
like `orb_advertise`? > we normally launch the userspace daemon with rc like Unix, you can reference how this done on sim: https://github.com/apache/nuttx/tree/master/boards/sim/sim/sim/src/etc/init.d > > Matteo > > On Wed, Jan 29, 2025 at 12:17 AM Xiang Xiao > wrote:

Re: Sensor fusion on NuttX

2025-01-28 Thread Xiang Xiao
On Wed, Jan 29, 2025 at 6:34 AM Matteo Golin wrote: > Hello again everyone, > > I was going through some of the NuttX documentation for UORB again since > InSpace is using it in our applications and > also to mock our sensors to see our system response in different scenarios > (we are planning to

Re: Extending UORB for thermocouples

2025-01-20 Thread Xiang Xiao
Android define both: https://github.com/apache/nuttx/pull/15610 On Mon, Jan 20, 2025 at 1:14 AM Tomek CEDRO wrote: > On Sat, Jan 18, 2025 at 8:30 AM raiden00pl wrote: > > Can we just rename `SENSOR_TYPE_AMBIENT_TEMPERATURE` to > > `SENSOR_TYPE_TEMPERATURE` > > and update the comments that this

Re: Seeking Guidance on High-Resolution Timer Implementation in NuttX for STM32H7

2025-01-13 Thread Xiang Xiao
why not use perf count from DWT for performance measurement: https://github.com/apache/nuttx/blob/master/arch/arm/src/armv7-m/arm_perf.c On Mon, Jan 13, 2025 at 11:59 PM Roberto Bucher wrote: > Hi Jiawei Wang > > I have a similar requirement. The solution with SysTick and a little > tick in conf

Re: SERIOUS BUG: Zero Latency Interrupts are broken!

2024-12-09 Thread Xiang Xiao
On Tue, Dec 10, 2024 at 5:53 AM Nathan Hartman wrote: > Hi all, > > Unfortunately I missed the PR before it was merged, but PR-15073 has > broken High Priority, Zero Latency Interrupts! Fortunately I caught it > now. It was merged 17 hours ago. > > Zero Latency Interrupts doesn't remove from PR-1

Re: [External Mail]RE: [EXT] Re: RPMsg FS on NuttX and Linux

2024-11-12 Thread Xiang Xiao
> > Actually, only some minor updates: > > ‍ > > - We changed the rpmsg_fs and rpmsg_tty to kernel modules, and I have > > attached the new rpmsg_fs.c and rpmsg_tty.c in this email, you can check > > them; > > - We also add some kernel version checks in rpmsg_fs and rpmsg_

Re: Change time_t to signed type

2024-11-05 Thread Xiang Xiao
Yes, I prefer 64bit time_t to map to int64_t unconditionally, since 64bit time_t is seldom selected by NuttX supported boards now, and no 2038 problem. For 32bit time_t, we can add a Kconfig to let the user select signed/unsigned and default to unsigned for compatibility reasons. On Wed, Nov 6, 20

Re: Change time_t to signed type

2024-11-05 Thread Xiang Xiao
Here is a simple example demonstrate that why the signed/unsigned is very important for time_t: one function records a timestamp: time_t t1 = time(NULL); another function records a second timestamp: time_t t2 = time(NULL); and check which one is early by: if (t2 - t1 < 0) { printf("t2 is ea

Re: Change time_t to signed type

2024-11-04 Thread Xiang Xiao
It isn't only glibc, many other libc implementations(e.g. musl, newlib, bionic) follow this convention. I think 64bit time_t should be fine to change to signed integer, but keep 32bit time_t as before. On Tue, Nov 5, 2024 at 4:51 AM wrote: > Hi Guiding, > > Both your reference and the Open Group

Re: FAT FS on mtd partition of NOR flash

2024-11-01 Thread Xiang Xiao
e a 32MByte NOR flash running LittleFS for syslog and userlogs. In the > limit I may just use a FAT formatted RAMdisk for the upgrade staging, but > it depends on how much RAM my app ends up needing. > > > On 1 Nov 2024, at 15:12, Xiang Xiao wrote: > > > > it mayn'

Re: FAT FS on mtd partition of NOR flash

2024-11-01 Thread Xiang Xiao
; mkfats fs is not available to use in bringup code as I understand it > otherwise I would mount the FS in my bringup too. > > On 01/11/2024 02:07, Xiang Xiao wrote: > > On Wed, Oct 30, 2024 at 2:00 AM Tim Hardisty > > wrote: > > > >> Whilst FAT on a NOR f

Re: FAT FS on mtd partition of NOR flash

2024-10-31 Thread Xiang Xiao
On Wed, Oct 30, 2024 at 2:00 AM Tim Hardisty wrote: > Whilst FAT on a NOR flash may generally be seen a not such a great > idea...please ignore that and confirm if... > > ...I am right in deducing that I can't simply make a FAT file system on > (say) the third mtd partition (with 512 byte sector

Re: Re: Power safe file systems for NuttX

2024-10-29 Thread Xiang Xiao
> > NuttX have a better way to format an SD into two partitions via an > > internal > > > API, similar to how you can call `nx_mount` with "forceformat" to > > re-format > > > an entire block device? > > > > > > Thank you so much

Re: Re: Power safe file systems for NuttX

2024-10-28 Thread Xiang Xiao
On Tue, Oct 29, 2024 at 10:02 AM Jia Lin wrote: > On 2024/10/26 05:27:35 Xiang Xiao wrote: > > have you enable CONFIG_GPT_PARTITION or CONFIG_MBR_PARTITION and > > call parse_block_partition: > > > > https://github.com/apache/nuttx/blob/master/include/nuttx/fs/part

Re: Power safe file systems for NuttX

2024-10-25 Thread Xiang Xiao
have you enable CONFIG_GPT_PARTITION or CONFIG_MBR_PARTITION and call parse_block_partition: https://github.com/apache/nuttx/blob/master/include/nuttx/fs/partition.h#L81 to register partitions as block devices again, so you can mount the different file systems on these new block devices. Thanks Xi

Re: The right way to implement an event-driven application - SPI SLAVE

2024-10-16 Thread Xiang Xiao
Please create an issue on github, I can add Donny or other people to ask your question. On Wed, Oct 16, 2024 at 1:27 AM Felipe Moura Oliveira wrote: > Hello Xiang Xiao, > > Can you connect me with Donny or can you help me to understand spi_slave > semaphore "unlock&qu

Re: The right way to implement an event-driven application - SPI SLAVE

2024-10-16 Thread Xiang Xiao
Felipe Moura Oliveira wrote: > Hello Xiang Xiao, > > thanks for sharing with me about rpmsg, to be honest it is new for me =/, I > was locked in baremetal for several years. For now I cannot use it because > my host mcu is running baremetal (maybe in the future we will change it).

Re: The right way to implement an event-driven application - SPI SLAVE

2024-10-15 Thread Xiang Xiao
Yes, we use DMA for both SPI master/slave, but DMA is more related to the driver not the framework. On Tue, Oct 15, 2024 at 2:08 PM Tomek CEDRO wrote: > One question by the way someone asked me recently - can NuttX SPI Slave > work in DMA mode? :-) > > -- > CeDeROM, SQ7MHZ, http://www.tomek.cedr

Re: The right way to implement an event-driven application - SPI SLAVE

2024-10-14 Thread Xiang Xiao
We just upstreamed a general SPI master/slave solution you can use directly or as a reference: https://github.com/apache/nuttx/blob/master/drivers/rpmsg/rpmsg_port.c https://github.com/apache/nuttx/blob/master/drivers/rpmsg/rpmsg_port_spi.c https://github.com/apache/nuttx/blob/master/drivers/rpmsg/

Re: [VOTE] Apache NuttX 12.7.0 RC0 release

2024-10-08 Thread Xiang Xiao
more fix is waiting merging: https://github.com/apache/nuttx/issues?q=is%3Aissue+label%3Ablocker+sort%3Aupdated-desc+is%3Aopen On Tue, Oct 8, 2024 at 9:18 PM alin.jerpe...@sony.com < alin.jerpe...@sony.com> wrote: > Hi all , > > sim: fix sim smp boot regression > https://github.com/apache/nuttx/

Re: [Embedded Bytes] The RTOS Performance Report Results

2024-09-26 Thread Xiang Xiao
here is another tool: https://github.com/zephyrproject-rtos/rtos-benchmark we already provide a nuttx port, you can try it. On Thu, Sep 26, 2024 at 8:16 PM Jacob Beningo wrote: > Isn't Coremark used only to measure the performance of the microcontroller > core? You see companies like ST, NXP, et

Re: Help us to create a distributed board testing farm

2024-08-07 Thread Xiang Xiao
Yanfeng, There is a basic automation test running on sim/qemu after the ci build finish: https://github.com/apache/nuttx/blob/master/tools/ci/cirun.sh you can add more tests and boards as needed. On Thu, Aug 8, 2024 at 11:10 AM yfliu2008 wrote: > Alan, > > > Just want to add that besides a testi

Re: Using external libraries with NuttX

2024-07-12 Thread Xiang Xiao
You can add the search path to my_project/Make.defs, other places will search the new patch automatically. Of course, it's better to only add the well designed include path to Make.defs to avoid the potential conflict. On Fri, Jul 12, 2024 at 2:14 PM Michal Lenc wrote: > Hello all, > > I am curr

Re: RPMsg FS on NuttX and Linux

2024-06-25 Thread Xiang Xiao
rpmsg_fs isn't upstreamed to the Linux community yet. Bowen could give you a patch to try. On Tue, Jun 25, 2024 at 8:44 PM Andre Heinemans wrote: > Hi, > > I am searching for a solution to share a disk or directory on a Linux host > and make it accessible in NuttX through RPMsg. It looks like >

Re: Installing apps dynamically in runtime

2024-06-21 Thread Xiang Xiao
On Fri, Jun 21, 2024 at 7:44 PM Gregory Nutt wrote: > On 6/21/2024 3:55 AM, Xiang Xiao wrote: > > but there is no stable ABI on NuttX, so you can't copy elf from one type > of > > device to another. > Wouldn't that work if (1) the ELF module is partially linked so

Re: Installing apps dynamically in runtime

2024-06-21 Thread Xiang Xiao
t > with any other code on the MCU? > > no, elf can call functions in base image. But since the different image expose a different API set, you can't launch elf on other devices. > > > Xiang Xiao ezt írta (időpont: 2024. jún. 21., > P, 11:55): > > > On Fr

Re: Installing apps dynamically in runtime

2024-06-21 Thread Xiang Xiao
On Fri, Jun 21, 2024 at 5:50 PM Gábor Kiss-Vámosi wrote: > Hi, > > A smartwatch manufacturer company wants to dynamically add/remove apps at > runtime on their MCU based devices . Similarly to how it works on > smartphones. > > Example: The user wants to extend the smartwatch with an Alarm clock

Re: Fw: Problem initializing hardware timer in stm32 board

2024-06-11 Thread Xiang Xiao
Sangam, could you try this patch: https://github.com/apache/nuttx/pull/12484 ? On Tue, Jun 11, 2024 at 12:20 PM Xiang Xiao wrote: > Could you share the call stack when the assert happens? > > On Mon, Jun 10, 2024 at 4:02 PM Sangam Thapa > wrote: > >> >>

Re: Fw: Problem initializing hardware timer in stm32 board

2024-06-10 Thread Xiang Xiao
Could you share the call stack when the assert happens? On Mon, Jun 10, 2024 at 4:02 PM Sangam Thapa wrote: > > -- > *From:* Sangam Thapa > *Sent:* Monday, June 10, 2024 1:44 PM > *To:* dev-thread.12...@nuttx.apache.org > > *Subject:* Problem initializing hardware t

Re: NAND Flash supported Board suggestion

2024-05-26 Thread Xiang Xiao
On Mon, May 27, 2024 at 4:00 AM Gregory Nutt wrote: > There is some brief information about dhara here: > https://github.com/dlbeer/dhara . It is an FTL that provides many of the > features described previously: > > * Wear leveling, > * Hardware/software EEC > > It does not appear to do > >

Re: exFAT or other large options for file system storage.

2024-03-22 Thread Xiang Xiao
If you search exfat implementation: FatFS from http://elm-chan.org/fsw/ff/00index_e.html is a good choice, since it's: 1. has a better friend license than GPL/LGPL 2. designed for small embedded device natively BTW, if the community wants another fat implementation, we could upstream NuttX

Re: [EXT] Re: uart rpmsg driver compatibility

2024-03-12 Thread Xiang Xiao
ou have any problems, feel free to contact me. > > Regards, > Bowen Wang > > Xiang Xiao <mailto:xiaoxiang781...@gmail.com> 于2024年3月11日周一 23:43写道: > On Mon, Mar 11, 2024 at 11:13 PM Andre Heinemans andre.heinem...@nxp.com> > wrote: > > > Hi, > > > > Does

Re: uart rpmsg driver compatibility

2024-03-11 Thread Xiang Xiao
On Mon, Mar 11, 2024 at 11:13 PM Andre Heinemans wrote: > Hi, > > Does the NuttX uart_rpmsg.c driver have a Linux counterpart to interact > with? Yes, the old version is here: https://lore.kernel.org/lkml/CAH2Cfb87Wacgsh=xz9h9kgwygbkxnbdbcdj4w3ups2likbt...@mail.gmail.com/ > I want to achieve

Re: littlefs BIOC_FLUSH in NAND flash

2024-02-24 Thread Xiang Xiao
BIOC_FLUSH is used to flush the cache which may exist in mtd driver to guarantee the power-loss resilience. It's optional, so it's enough that mtd_nand returns -ENOTTY. On Sat, Feb 24, 2024 at 8:28 PM Saurav Pal wrote: > Hi all, > > I've been trying to develop a device simulator for the NAND fla

Re: Device Discovery

2024-02-20 Thread Xiang Xiao
mon working rather than multiple? (I am thinking in terms of > context switches for tasks, even if, say, somehow the memory consumption > remains the same). > > Regards, > SP > > On Tue, Feb 20, 2024 at 10:13 PM Xiang Xiao > wrote: > > > Since all devices expose through

Re: Assert macro causing problems when building Sqlite

2024-02-20 Thread Xiang Xiao
Here is the fix: https://github.com/apache/nuttx/pull/11734. sqlite porting is also upstreamed: https://github.com/apache/nuttx-apps/pull/2297 On Tue, Feb 20, 2024 at 3:17 PM Jernej Turnsek wrote: > Hi, > > the same problem as new UNUSED macro was causing me problems when building > external lib

Re: Device Discovery

2024-02-20 Thread Xiang Xiao
Since all devices expose through vfs (/dev, /proc), udev could be implemented through inotify API. On Tue, Feb 20, 2024 at 11:31 PM Alan C. Assis wrote: > Hi Saurav, > > There is not something like a "udev" for NuttX, but there are > daemons/services used to detect when a SDCard is plugged, when

Re: fcntl F_SETLK, F_SETLKW, F_GETLK

2024-02-20 Thread Xiang Xiao
here is the patch set: https://github.com/apache/nuttx/pull/11724 On Tue, Feb 20, 2024 at 3:29 PM Jernej Turnsek wrote: > Cool. Is there a possibility to share your work via PM? This way I can test > the solution on my side also. > Jernej > > On Tue, Feb 20, 2024 at 8:23 AM Xian

Re: fcntl F_SETLK, F_SETLKW, F_GETLK

2024-02-19 Thread Xiang Xiao
We have implemented file lock to support the database engine like sqlite and unqlite. The implementation will go upstream soon. On Tue, Feb 20, 2024 at 3:04 PM Jernej Turnsek wrote: > Hi, > I would like to use Sqlite on NuttX and I have managed to successfully > build the Sqlite3 library. When r

Re: RPTUN questions

2024-02-15 Thread Xiang Xiao
On Tue, Feb 13, 2024 at 9:49 AM yfliu2008 wrote: > Dear Xiang and Bowen, > > > > > Hope you've had a pleasant spring festival.  > > > > > As for RPTUN, I have it basically  work using share memory only, > though not very efficient but it has less hardware dependencies. I even can > mount master's

Re: Re: RPTUN usage

2024-02-07 Thread Xiang Xiao
a as you suggested. > > > > > Regards, > yf > > > > Original > > > > From:"Xiang Xiao"< xiaoxiang781...@gmail.com >; > > Date:2024/2/7 20:09 > > To:"dev"< dev@nuttx.apache.org >; > > Subject:Re: RPTUN usage > >

Re: RPTUN usage

2024-02-07 Thread Xiang Xiao
You can try: 1. echo hello > /dev/ttyRpmsg on one core 2. and cat /dev/ttyRpmsg on another core to confirm rpmsg uart work as expected before testing with cu. On Wed, Feb 7, 2024 at 8:00 PM yfliu2008 wrote: > Xiang and Bowen, > > > > I noticed that I didn't initialize the call the "uart_

Re: RPTUN share memory requirements

2024-01-31 Thread Xiang Xiao
On Thu, Feb 1, 2024 at 10:03 AM yfliu2008 wrote: > Xiang & Bowen, > > > Can you please teach if there are any requirements from RPTUN/RPMSG > drivers for the share memory? For example, the share memory should be > cache-less etc. > > It's better to use bufferable, but no cacheable memory. If you

Re: Re:Re:Re: RPTUN and RPMSG

2024-01-28 Thread Xiang Xiao
On Mon, Jan 29, 2024 at 2:13 PM yfliu2008 wrote: > Bowen & Xiang, > > > > > I am considering to use RPTUN on K230 target, initally between the two > RISC-V cores. NuttX can run on both RISC-V cores with the help of U-Boot. I > browsed the "nrf53_rptun.c" and "sim_rptun.c" in NuttX repository, how

Re: RPTUN and RPMSG

2024-01-25 Thread Xiang Xiao
On Fri, Jan 26, 2024 at 1:01 PM yfliu2008 wrote: > Dear experts, > > > > > I am wondering where we can find high level introduction about the RPTUN > and RPMSG concepts in NuttX? > > > 2022 online workshop has a introduction presentation: https://www.youtube.com/watch?v=6uehz3WQ0vU&t=211s > > >

Re: debugassert vs assert in apps

2024-01-02 Thread Xiang Xiao
Here is the issue to track debug.h created before: https://github.com/apache/nuttx/issues/8986 On Wed, Jan 3, 2024 at 2:30 AM Gregory Nutt wrote: > > On Tue, Jan 2, 2024 at 11:16 AM Fotis Panagiotopoulos > > wrote: > >> DEBUGASSERT shall only be used for the kernel. > >> assert shall only be u

Re: SPI EEPROM, losetup, LittleFS

2023-12-15 Thread Xiang Xiao
On Fri, Dec 15, 2023 at 5:17 PM Sebastien Lorquet wrote: > Hi, > > I dont think you can use losetup to create a mtd device. loop devices > are regular block devices. You can use lomtd to setup a mtd device loop: https://github.com/apache/nuttx-apps/blob/master/nshlib/nsh_fscmds.c#L1144-L1306

Re: regarding latest boards/Board.mk

2023-12-14 Thread Xiang Xiao
The attachment is deleted by email server, could you create a pr on: https://github.com/apache/nuttx? On Fri, Dec 15, 2023 at 11:20 AM yfliu2008 wrote: > Hi, > > > It seems that the latest boards/Board.mk leaks "etctmp.c" and "etctmp/" > folder. > > I am unsure if it is desired or not. > > If it

Re: Job opportunity

2023-11-22 Thread Xiang Xiao
Sure. On Wed, Nov 22, 2023 at 12:44 AM Tomek CEDRO wrote: > On Tue, Nov 21, 2023 at 5:38 PM Xiang Xiao wrote: > > Is anyone interested in signing a contract with Xiaomi to improve the > NuttX > > components(e.g. X86_64, Xtensa, hypervisor etc)? > > Please send me an e

Job opportunity

2023-11-21 Thread Xiang Xiao
Is anyone interested in signing a contract with Xiaomi to improve the NuttX components(e.g. X86_64, Xtensa, hypervisor etc)? Please send me an email if you want to know more information. Thanks Xiang

Re: [VOTE] Apache NuttX 12.3.0 RC1 release

2023-10-23 Thread Xiang Xiao
+1 for sim: ./tools/checkrelease.sh --release 12.3.0-RC1 Downloading release files from https://dist.apache.org/repos/dist/dev/nuttx/12.3.0-RC1/ gpg: directory '/tmp/nuttx-checkrelease/.gnupg' created gpg: keybox '/tmp/nuttx-checkrelease/.gnupg/pubring.kbx' created gpg: /tmp/nuttx-checkrelease/.gnu

Re: execv obsolet ?

2023-10-12 Thread Xiang Xiao
you need enable CONFIG_LIBC_EXECFUNCS: https://github.com/apache/nuttx/blob/master/libs/libc/unistd/lib_execv.c#L29 On Fri, Oct 13, 2023 at 1:59 AM MIGUEL ALEXANDRE WISINTAINER < tcpipc...@hotmail.com> wrote: > #include > #include > #include > #include > > #ifdef CONFIG_BUILD_KERNEL > int mai

Re: [VOTE] Apache NuttX 12.3.0 RC0 release

2023-10-11 Thread Xiang Xiao
A recent change limits c++20 requirement to libcxx: https://github.com/apache/nuttx/pull/10860 The owner of libcxx decided not to support the build of libcxx by an old compiler, It's very hard to sync with the last libcxx version, and keep the support of the old compiler at the same time in the lon

Re: Using static analysis to find (potential) bugs

2023-10-10 Thread Xiang Xiao
There are patch to integrate the CodeChecker into ci: https://github.com/apache/nuttx/pull/7114 https://github.com/apache/nuttx/pull/7090 you can follow them for cppcheck too. The hard problem is that tools normally report many false alarms which make it impractical to enable the check in ci/cd. O

Re: Enforcing C++ compatibility with C code in CI/CD

2023-10-09 Thread Xiang Xiao
? > > On Sun, Oct 8, 2023 at 10:44 PM Xiang Xiao > wrote: > > > We can add a simple test like this: > > > >1. Create a context target in Makefile to generate a .cxx file which > >list and include all header files in nuttx/include > >2. Add the ge

Re: Enforcing C++ compatibility with C code in CI/CD

2023-10-08 Thread Xiang Xiao
We can add a simple test like this: 1. Create a context target in Makefile to generate a .cxx file which list and include all header files in nuttx/include 2. Add the generated file to CXXSRCS If we just want to ensure the public nuttx header files are compatible with c++ syntax. On Mon

Re: Error: Unrecognized gnu++20, did you mean gnu++2a?

2023-10-02 Thread Xiang Xiao
>From https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/C-Dialect-Options.html, gnu++2a equals gnu++2a, so it's fine to change the default o gnu++2a. On Mon, Oct 2, 2023 at 6:43 AM Nathan Hartman wrote: > Hi all, > > Commit d6453cfc3cd4771a5221528cab3056660be4b1e3 (PR # 8244) changes > the default

Re: riscv64 libm link question

2023-09-17 Thread Xiang Xiao
On Mon, Sep 18, 2023 at 7:01 AM Lee, Lup Yuen wrote: > Here's what Ken and I have tried for the riscv64 libm linking problem: > > (1) The recommended toolchain for NuttX on riscv64 is SiFive Freedom Tools. > But it doesn't support Raspberry Pi OS (64-bit Debian). > > (2) So we used Debian gcc-ris

Re: riscv64 libm link question

2023-09-17 Thread Xiang Xiao
On Mon, Sep 18, 2023 at 4:16 AM wrote: > On 2023-09-17 12:47, Petro Karashchenko wrote: > > Hi, > > > > What kind of RISC-V toolchain are you using? > > Raspian:RasPi4:~/RISCV/NuttX/apps >>> apt search riscv64-unknown > Sorting... Done > Full Text Search... Done > binutils-riscv64-unknown-elf/old

Re: Enforcing C++ compatibility with C code in CI/CD

2023-09-16 Thread Xiang Xiao
I think at least the c header file should be compatible with c++ compiler, but the c source file could use sme incompatible language features. On Sat, Sep 16, 2023 at 8:47 AM Daniel Appiagyei wrote: > Hi, > I'm following up on an issue >

Re: Serialrx

2023-08-29 Thread Xiang Xiao
On Wed, Aug 30, 2023 at 5:49 AM Bert Voldenuit wrote: > Hi, > Alan, > I use ./tool/configure.sh arduino-m0/nsh > Thanks to your blog, I am porting an arduino project to Nuttx > > Xiang Xiao, > Indeed DEFAULT_SMALL was activated. it works with CONFIG_FILE_STREAM > e

Re: Serialrx

2023-08-28 Thread Xiang Xiao
Do you enable DEFAULT_SMALL? If so, you have to enable CONFIG_FILE_STREAM in defconfig explicitly. On Tue, Aug 29, 2023 at 6:11 AM Bert Voldenuit wrote: > Hello, > > I am trying to run the serialrx app (out of the box) from the examples, but > i get the following errors: > > - Some warnings beca

Re: [DISCUSS] Out-of-tree builds should be standard?

2023-08-25 Thread Xiang Xiao
NuttX supports two build system, when a new feature is added, three cases can happen: 1. Modify Makefile only 2. Modify CMakelist.txt only 3. Modify both Makefile and CMakelist.txt Since different people use different workflows, tools and have different priorities. What I suggest it that

Re: how to enable RPMSG...

2023-07-25 Thread Xiang Xiao
On Tue, Jul 25, 2023 at 10:48 PM Ed Sutter wrote: > Xiang, > Thanks for your responses. > I'm still trying to get my head around OpenAMP, RPMSG and RPTUN. > > I see RPMSG mentioned almost everywhere OpenAMP is discussed; however, no > mention of RPTUN. Is RPTUN something unique to Nuttx or is it

Re: how to enable RPMSG...

2023-07-24 Thread Xiang Xiao
On Mon, Jul 24, 2023 at 7:47 AM Ed Sutter wrote: > Thanks Xiang, > I'm working off of 11.0.0, and don't see any of the files you point to in > my tree. > Can I start with one of the files below an integrate it into my > board-specific port > of 11.0.0 or do I need to start with a newer version? >

Re: how to enable RPMSG...

2023-07-21 Thread Xiang Xiao
On Sat, Jul 22, 2023 at 1:56 AM Ed Sutter wrote: > Hi, > I'm in the process of building up Nuttx on the M7 core of an iMX8MP SOC. > I started by creating a new chip and board directory duplicating the imxrt > stuff but renaming them appropriately. From there I've been slowly > creeping up in fun

Re: OpenFLASHLoader

2023-07-13 Thread Xiang Xiao
If you are using JLINK, you may implement a general flash programer by reusing NuttX flash driver: https://wiki.segger.com/SEGGER_Flash_Loader On Thu, Jul 13, 2023 at 10:51 PM Simon Filgis < si...@ingenieurbuero-filgis.de> wrote: > Dear all, > > I need to load an FPGA bitstream via JTAG bitbang.

Re: App crashes if entrypoint but not from nsh

2023-07-05 Thread Xiang Xiao
Do you try CONFIG_INIT_STACKSIZE instead? On Thu, Jul 6, 2023 at 1:01 AM Tim Hardisty wrote: > Having got u-boot to actually do something, I now have a board that > powers up autonomously and runs nsh with no intervention from me. Quite > relieved! > > As a step towards it booting my own (barely

Re: Bootloaders other than u-boot?

2023-07-01 Thread Xiang Xiao
On Sun, Jul 2, 2023 at 12:42 AM Gregory Nutt wrote: > On 7/1/2023 10:27 AM, Tim Hardisty wrote: > > Lots of work to do a full u-boot replacement, yes. But a basic one > > using existing NuttX stuff such as RNDIS, dfu, mtd etc. - for MY board > > at least - would not be much work. He said...naivel

Re: Bootloaders other than u-boot?

2023-07-01 Thread Xiang Xiao
Why not develop a nuttx based bootloader? We have produced more than ten million devices, all run nuttx with different configurations in the different phases(bootloader, ota, gui app), cores(sensor hub, audio dsp), even security mode(tee). The benefit of this approach include: 1. You just need

Re: C++ Support

2023-06-25 Thread Xiang Xiao
Mark, could you try this patch: https://github.com/apache/nuttx/pull/9610 On Sun, Jun 25, 2023 at 3:50 PM Mark Stevens wrote: > So a little more progress on this one. > > Turning on C++ Exception support for the PicoW:nsh build configuration > generates errors: > > CC: pthread/pthread_testcance

Re: sendfile() problems - Destination unreachable

2023-06-04 Thread Xiang Xiao
lob/master/net/tcp/tcp_sendfile.c#L259-L262: sendfile never sends one package larger than MSS which should smaller than MTU in most case. > On Sun, Jun 4, 2023 at 5:33 PM Xiang Xiao > wrote: > > > On Sun, Jun 4, 2023 at 10:23 PM Fotis Panagiotopoulos < > f.j.pa...@gmail.com > >

Re: sendfile() problems - Destination unreachable

2023-06-04 Thread Xiang Xiao
7 Fotis Panagiotopoulos > >> wrote: > >> > >>> > sendfile should return an error in this case, but senfile should only > >>> be > >>> > used with TCP, not UDP, since sendfile doesn't have any logic to ack > or > >>>

Re: sendfile() problems - Destination unreachable

2023-05-29 Thread Xiang Xiao
> sendfile should return an error in this case, but senfile should only be used with TCP, not UDP, since sendfile doesn't have any logic to ack or retry.. > > > On Mon, May 29, 2023 at 11:42 AM Xiang Xiao > wrote: > > > On Sun, May 28, 2023 at 11:55 PM Fotis Panagiotopou

Re: sendfile() problems - Destination unreachable

2023-05-29 Thread Xiang Xiao
e blocked here: > > https://github.com/apache/nuttx/blob/master/net/udp/udp_sendto_unbuffered.c#L469 > > Shouldn't this failure also post the semaphore? > And let the code proceed returning an error in `send()`? > > > On Sun, May 28, 2023 at 5:26 PM Fotis Panagi

Re: sendfile() problems - Destination unreachable

2023-05-27 Thread Xiang Xiao
On Sat, May 27, 2023 at 8:19 PM Fotis Panagiotopoulos wrote: > Hello, > > I encounter some problems using sendfile(). > > I am using sendfile to... send a file to a remote server, with my own > implementation of an FTP client. > sendfile() indeed starts to transmit chunks of the file, but as I se

Re: CI tests (was: Re: [OT] Learning Makefiles)

2023-05-23 Thread Xiang Xiao
Here is the script to run the basic test: https://github.com/apache/nuttx/blob/master/tools/ci/cirun.sh Add a link in your config: https://github.com/apache/nuttx/blob/master/boards/risc-v/qemu-rv/rv-virt/configs/citest/run Build script will run it and report the result after the build pass: https:

Re: CI tests (was: Re: [OT] Learning Makefiles)

2023-05-23 Thread Xiang Xiao
I agree with Brennan. If the ci build is too slow, let's optimize the ci process instead of bypassing it totally. Since I have checked almost all ci braak before, I expect that many board's config can't pass the compile without the guard from the ci system. Actually, I think the big imperfection of

Re: CI tests (was: Re: [OT] Learning Makefiles)

2023-05-22 Thread Xiang Xiao
Why not start the test infrastructure from sim/qemu? It's more simple to set up and has unlimited resources. Once the sim/qemu test workflow is ready, it isn't very hard to duplicate to the real boards. On Tue, May 23, 2023 at 8:42 AM Alan C. Assis wrote: > On 5/22/23, Tomek CEDRO wrote: > > Th

Re: [OT] Learning Makefiles

2023-05-22 Thread Xiang Xiao
CWIKI mayn't be a good place since it requires that the user has an Apache account at least to make any change as far as I know. It's better to be tracked by a github issue. On Tue, May 23, 2023 at 9:27 AM Nathan Hartman wrote: > On Mon, May 22, 2023 at 8:44 PM Alan C. Assis wrote: > > > On 5/2

Re: [OT] Learning Makefiles

2023-05-19 Thread Xiang Xiao
The change doesn't replace Makefile with CMake, both can work. So I would suggest the vote is "Enable CMake support". On Sat, May 20, 2023 at 12:53 AM Gregory Nutt wrote: > On 5/19/2023 10:25 AM, Lwazi Dube wrote: > > Alan, > > > > Can you summarize? I have not been following this PR. Is make go

Re: BL616/618 Support

2023-04-27 Thread Xiang Xiao
bouffalolab is porting BL616 to NuttX, you can ask FAE for the detailed schedule. On Fri, Apr 28, 2023 at 1:40 PM Yebin Lee wrote: > Is anyone working on adding BL616/618 to NuttX? > It seems it's good timing to add support for this wireless SoC as > their recent SDK now supports WiFi, BLE, and

Re: Usage of mutex_t inside libc

2023-04-27 Thread Xiang Xiao
; sem_waitirq() is the problem I have, and fixing it is nasty. The > >> semaphore > >> is accessed via tcb->waitobj and this access can happen from > >> interrupt or > >> signal dispatch. This means the context of sem_wait() / sem_post() is > >> _not_ > &g

  1   2   3   4   5   6   >