Re: execv obsolet ?

2023-10-12 Thread Gregory Nutt
On 10/12/2023 2:18 PM, Alan C. Assis wrote: The execv on Linux also fails when we can an builtin program, try it: You are right, but the semantics are really confusing.  In Bash, commands that are included inside of Bash are called built-in commands and you cannot execute them.  We ignore

Re: execv obsolet ?

2023-10-12 Thread Gregory Nutt
On 10/12/2023 2:05 PM, Alan C. Assis wrote: Ah ok, I tested using the original code with "ls" instead "/bin/ls" and the result as similar to NuttX: didn't print anything. That is a different problem; it did not find ls.  On linux, use /execvp/ instead of /execv //or //execve/.  With execve,

Re: execv obsolet ?

2023-10-12 Thread Gregory Nutt
On 10/12/2023 2:31 PM, MIGUEL ALEXANDRE WISINTAINER wrote: I can run (execv) i2c from hello  works! Now Gustavo can you this TIP to make work the PCA/PCF GPIO extender  Thanks! nsh> hello Executing 1 /bin/i2c Usage: i2c [arguments] Where is one of: There are

Re: Using static analysis to find (potential) bugs

2023-10-10 Thread Gregory Nutt
I'm not the right guy to talk about CI,but I believe that every modified C file is run through Lint.  If you have questions, I am sure someone else can expound. On 10/10/2023 12:33 PM, Daniel Appiagyei wrote: Hey, I was running the [cppcheck](https://cppcheck.sourceforge.io/) static analysis

Re: Using static analysis to find (potential) bugs

2023-10-10 Thread Gregory Nutt
These reports with regard to DEBUGASSERT have been reported before. DEBUGASSERT is defined in a ccouple of ways.  Here is one way: do  \     { \   if (predict_false(!(f)))    \    

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
On 10/4/2023 8:02 PM, Gustavo Soares wrote: Hi Greg! Yes, if I use #include this problem is solved, but then the code loses the reference to that specific struct causing another error. And how exactly "the file does not exist"? I can open it and it is at the nuttx repo, I shared it's link.

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
Actually, the problem is very simple.  This file does not exist. #include You probably wanted #include The more I look at what you are trying to do, the more confused I get. There is a file at drivers/ioexpander/pcf8575.h, but you are not permitted to include that.  That contains

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h? Access to internal driver files by applications is specifically forbidden.  This is part of the enforcement of the modular design to assure that people do not do that kind of thing:  Applications must not have access to

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h? Access to internal driver files by applications is specifically forbidden.  This is part of the enforcement of the modular design to assure that people do not do that kind of thing: Applications must not have access to

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
On 10/4/2023 7:02 PM, Gustavo Soares wrote: Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h? Access to internal driver files by applications is specifically forbidden.  This is part of the enforcement of the modular design to assure that people do not do that kind of

Re: different IP than expected

2023-09-21 Thread Gregory Nutt
On 9/21/2023 6:34 AM, Simon Filgis wrote: When I started with networking, I set the IP via kconfig. I remember that it was necessary to enter the same IP at two different places. Netlib and FTP server in my case. Maybe your IP is overwritten by another app? A buildin app that you use for

Re: different IP than expected

2023-09-21 Thread Gregory Nutt
On 9/21/2023 6:53 AM, Petro Karashchenko wrote: setting "address.sin_addr.s_addr" + "bind" is kind of a way you can use to receive requests only from an interface that has a specific IP address. This is useful if your system has multiple network interfaces and you want to provide some kind of

Re: different IP than expected

2023-09-21 Thread Gregory Nutt
On 9/21/2023 5:06 AM, Gustavo Soares wrote: Why is it a different IP? The server is listening to one but this method returns another one. You provide almost no information for anyone to really help you. Where is the server and client?  It sounds like you are saying that the HTTP server is

Re: [EXT] Re: CTU CAN FD driver multi-licence for Nuttx

2023-09-14 Thread Gregory Nutt
On 9/14/2023 8:52 AM, Alan C. Assis wrote: I think the authors of the driver can release the source code using two or more licenses. cd c We already have an example of it in NuttX: SocketCAN Since they add the OR license clause it is fine. The part that bothers me is that I cannot tell which

Re: defconfig options being ignored

2023-09-13 Thread Gregory Nutt
On 9/13/2023 11:54 AM, Mike Moretti wrote: Hi, I'm trying to create a custom board config for our custom board that includes an ESP32S3.  I'm attempting to include all the pin and configuration definitions for the board in the defconfig file. Unfortunately, after running ./tools/configure.sh

Re: File transfer

2023-09-09 Thread Gregory Nutt
On 9/9/2023 9:43 AM, Gustavo Soares wrote: So I have to create and mount a directory to my HTML file and tranfer it to this directory? Even if I have the HTML file embedded on compile? No transfer is necessary.  The ROMFS file system can be built into the code.

Re: File transfer

2023-09-09 Thread Gregory Nutt
On 9/9/2023 9:21 AM, Gustavo Soares wrote: Maybe I don't have to transfer the file to the tmp folder. I think the folder the app is reading is not the app folder but the root, so it won't find the file. Is it possible to access the built-in apps folder on NuttX? So I can make the app to read

Re: File transfer

2023-09-09 Thread Gregory Nutt
*And about rz, do use the same console of shell ? Zmodem* Yes. That might be a problem with tat?  In the past, NSH used special logic that to handle the requirements of a COOKED mode terminal: character echo, CR-LF expansion, etc.  These changes were implemented (mostly) in NSH so that

Re: [EXT] Re: CTU CAN FD driver multi-licence for Nuttx

2023-09-07 Thread Gregory Nutt
I think GPL code shouldn't be included directly, but I think it is fair to allow GPL code be downloaded using the building system case user selected it. We created this directory specifically to hold forks of GPL code that can be used with NuttX:  https://github.com/NuttX .  I am not sure

Re: CTU CAN FD driver multi-licence for Nuttx

2023-09-07 Thread Gregory Nutt
On 9/6/2023 5:15 AM, alin.jerpe...@sony.com wrote: There are known CAN sources that have GPL code and have been documented in the LICENSE File All this code is protected under the include GPL code config option and disabled by default Is this approach approved or we should completely remove

Re: 500ms delay between HTTP request execution

2023-08-31 Thread Gregory Nutt
On 8/31/2023 3:39 PM, Petro Karashchenko wrote: Hello, I'm having an issue with a network based application on NuttX. I have a HTTP server that is built with the help of the "netlib_server" interface. When I'm trying to access my server with curl multiple times in a row I see that there is a

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
On 8/27/2023 7:49 PM, Nathan Hartman wrote: I don't know whether you've had a chance to read [1] yet, but if not, it might help visualize the two-part structure of device drivers in NuttX. (If you've already read it, then never mind, and apologies for the noise. :-) The audio subsystem is

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
On 8/27/2023 4:24 PM, Tim Hardisty wrote: SAMA5D2 specific, I should add. There is no support for the Class D driver for any SAMA5D2 board in the source tree.

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
On 8/27/2023 4:22 PM, Tim Hardisty wrote: The classD driver DOES register itself as /dev/audio/pcm0, and works correctly as such with nx_player. You are mistaken.  The Class D driver does not register itself as a character driver.  grep -r register_driver arch/arm/src/sama5/ proves that is

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
Also, I don't think the /dev/audio/pcm0 device you are talking about is what you think it is.  It is a character driver but not the Class D lower half.  So, yes it can be opened. /Caveat:  It has been ages since I worked with the audio subsystem so I might be completely wrong./

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
I suppose that the easiest thing of all would be to put the tones in small PCM files in a built-in ROMFS file system On 8/27/2023 1:47 PM, Gregory Nutt wrote: On 8/27/2023 5:41 AM, Tim Hardisty wrote: Or am I completely missing the point and I just need to use the nxaudio system!!?? I

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
On 8/27/2023 5:41 AM, Tim Hardisty wrote: Or am I completely missing the point and I just need to use the nxaudio system!!?? I think you have been missing point.  You have two options: 1. As you suggest, extend nxaudio to be a source of tone data (just like audio file data)  and uses the

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
On 8/27/2023 5:25 AM, Tim Hardisty wrote: Looking a little more at the write function of audio_ops_s it is not used by any existing driver and is documented to be for device-specific information...so it is not portable in terms of playing tones by simply writing PCM data word by word. I get

Re: write method for audio driver?

2023-08-27 Thread Gregory Nutt
On 8/27/2023 4:17 AM, Tim Hardisty wrote: Thanks Gregory. The existing ClassD driver is registered as /dev/audio/pcm0 and is a PCM device not PWM. It has the "usual" audio ops to configure it, start/stop/pause/enqueue etc. It is exposed via ioctls so does have a user interface; that is how

Re: write method for audio driver?

2023-08-26 Thread Gregory Nutt
But I want to play simple audio tones, from a sine look-up table, and filling a buffer and enqueuing it seems over the top. If you just want to plane simple audio tones, maybe something drivers/audio/tone.c is what you need?  That is a character driver with a custom tone interface.

Re: write method for audio driver?

2023-08-26 Thread Gregory Nutt
On 8/26/2023 12:18 PM, Tim Hardisty wrote: This is, I'm sure, more a generic POSIX question than NuttX-specific but I am still not that familiar with either! When I wrote the SAMA5D2 ClassD audio driver I followed the methods appropriate for using "apb" so it works well with nxplayer (for

Re: Porting NuttX - console management trouble

2023-08-18 Thread Gregory Nutt
On 8/18/2023 12:14 PM, Philippe Leduc wrote: Hello, I am currently in the process of porting NuttX to the i.MX8MP (Cortex-M7) SoC from NXP. I managed to have a POC that boot and the serial seems to work properly. However the console seems to behave strangely: I need to configure my client to

Re: CDC/ACM console data to NuttX corrupted.

2023-08-17 Thread Gregory Nutt
On 8/17/2023 10:34 AM, Tim Hardisty wrote: I have concluded that CDC/ACM will NOT play alongside SYSLOG - most likely on the SAMA5D2 device, or possibly just on my board for some reason. Whatever I choose as the SYSLOG output (/dev/ttyS0, ttyS1, ttyFC0 and ttyFC1 all of which are working

Re: How does uname work? How is version.h created?

2023-08-16 Thread Gregory Nutt
So the question - how is version.h being created? Even if this is not included upstream, I can have it done at least locally, but being still in starting phase, I need some pointer here... It is created from .version by tools/mkversion under the control of tools/Unix.mk.  .version is

Re: SMP and filesystem interactions.

2023-08-14 Thread Gregory Nutt
I am new to nuttx, and I'm hoping someone could point me in the right direction regarding SMP and filesystem interactions, specifically writing to the SD card. Using multiple threads that are writing to separate files, with sdio buffering enabled, do I need to use mutex to prevent fwrite

Re: STM32F405RG and NuttX

2023-08-13 Thread Gregory Nutt
What I've tried to do: 1. Run configure with a similar processor: ./tools/configure.sh -l nucleo-f4x1re:f401-nsh 2. Change the system type via menuconfig(System Type -> STM32 Chip Selection, select STM32F405RG) When you did this your CONFIG_MM_REGIONS settings became wrong (becuase the

Re: RP2040 Pico SDK

2023-08-12 Thread Gregory Nutt
So is there a simple way of attaching and ISR to a GPIO from user code? You need to think like you were using Linux:  No interrupt handling in user code!  This needs to go into your board logic. Expecially if you are customizing the board to some non-off-the-shelf configuration with

Re: Ethernet issues on LPC17xx/LPC40xx

2023-08-10 Thread Gregory Nutt
On 8/10/2023 4:23 PM, Josh Lange wrote: First of all, thanks to everyone involved in the NuttX project. We really appreciate all the work that has gone into keeping this operating system maintained and functional on a wide variety of hardware. We have several different NuttX-based projects

Re: NuttX on FreeBSD survey

2023-08-06 Thread Gregory Nutt
In the early days, Greg modified buildroot to build a GNU toolchain specifically for NuttX (include files included). I wanted a toolchain that used the hard-float ABI for Armv7E-M. I maintained it (unofficially) for some time submitting patches (up to gcc 8.3, gdb 7.5 IIRC). I’m not sure

Re: Serial LCD example

2023-07-23 Thread Gregory Nutt
Ideally, I’d have configured this from the user application. As they are embedded within the board startup I’d have thought they would have been configurable through kconfig. I assume you are referring to the following in boards/arm/rp2040/common/src/rp2040_common_bringup.c: #ifdef

Re: Raspberry pi 4 Support

2023-07-19 Thread Gregory Nutt
Raspberry Pi is a difficult target. It is not Open Hardware, and there is a bunch of critical closed-source system software. The Broadcom SOCs are not fully documented. All true, but there are a few documents floating around like:

Re: [Article] Boot NuttX from Network with U-Boot and TFTP

2023-07-13 Thread Gregory Nutt
Maybe you could that a look in the minnsh PoC, it was running on MCU with less than 16KB Flash and 8KB RAM. As you can see in the image it is using less than 2KB RAM: To get to the minimal size, that configuration also depended on the ability to disabled file system support (and, in the

Re: Build error 12.2.0

2023-07-06 Thread Gregory Nutt
Jokes aside, I thin we need to release 12.2.1 with a fix, what do you think Alin? If you decide to do another release, I would think that a 12.2.1 release should also include #9716.  This is a pretty serious problem to be in release code as well: https://github.com/apache/nuttx/pull/9716

Re: Prebuilt SmartFS file system (Pico)

2023-07-02 Thread Gregory Nutt
But it would be possible to create a pre-build SmartFS image using the FUSE filesystem under Linux, and then include that image as a binary blob into your application ... you would just have to ensure all the MTD access and alignment are taken care of. Your FUSE filesystem has been lost

Re: Prebuilt SmartFS file system (Pico)

2023-07-02 Thread Gregory Nutt
There are  several examples using a ROMFS file system in apps/ and nuttx/boards/.  There is one at nuttx/boards/sim/sim/sim/src/etctmp with build logic that generates nuttx/boards/sim/sim/sim/src/etctmp.c. Normally, you would probably have to mount the filesystem yourself, but in this case,

Re: Bootloaders other than u-boot?

2023-07-01 Thread Gregory Nutt
What I am trying to cater for is the inevitable occasion where a customer does a firmware update that goes wrong and seems to "brick" the device, as the "app" nor-flash is corrupted and an in-app updater can't be run. Back in the day when I was doing set-top boxes we would support updating

Re: Bootloaders other than u-boot?

2023-07-01 Thread Gregory Nutt
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...naively! You often can't know how deep the water is until you get a

Re: Bootloaders other than u-boot?

2023-07-01 Thread Gregory Nutt
Its a really nice idea but probably really lots of work :-) Possibly less then you might think since using NuttX for the bootloader avoids all hardware driver development (unless you have some special driver need).  You simply write the bootloader app on top of the existing driver and

Re: Bootloaders other than u-boot?

2023-07-01 Thread Gregory Nutt
Bottom line: has anyone used any bootloader other than u-boot to allow usb dfu or RNDIS-type firmware updates, and that easily boot NuttX? There are a few very tiny, minimal function bootloaders that I have used with SAMA5's in the past: ./sama5d3x-ek/src/nor_main.c

Re: NUttX and TI boards

2023-06-14 Thread Gregory Nutt
On 6/14/2023 9:44 AM, Roberto Bucher wrote: Hi We are working with a*Launchpad TMS320F28379D *board and we are looking if somebody already worked with NuttX on this board. Thanks in advance Roberto There are a couple of older parts that are still supported with TMS320 designations,

Re: STM32 and GDB - How do I generate the ELF file?

2023-06-11 Thread Gregory Nutt
On 6/11/2023 11:42 AM, Tim Hardisty wrote: Where should that be in the (current) documentation? I’ll go and add it as I didn’t know this. I am not very familiar with the new documentation.  There should be a document about creating board support and that document should discuss the content

Re: STM32 and GDB - How do I generate the ELF file?

2023-06-11 Thread Gregory Nutt
On 6/11/2023 11:16 AM, Gregory Nutt wrote: On 6/11/2023 11:07 AM, Mark Stevens wrote: Is there any reason for not having the extension? To me the extension adds information about the file. The name is actually BIN = nuttx$(EXEEXT) but EXEEXT is not normally defined. Different toolchains

Re: STM32 and GDB - How do I generate the ELF file?

2023-06-11 Thread Gregory Nutt
On 6/11/2023 11:07 AM, Mark Stevens wrote: Is there any reason for not having the extension? To me the extension adds information about the file. The name is actually BIN = nuttx$(EXEEXT) but EXEEXT is not normally defined. Different toolchains generate executable images in different

Re: qencoder / long / float / double / maximum values

2023-06-08 Thread Gregory Nutt
On 6/8/2023 6:11 PM, Tomek CEDRO wrote: On Fri, Jun 9, 2023 at 1:53 AM Tomek CEDRO wrote: I am working on ESP32 (no FPU) and using Quadrature Encoder for motor control and range positioning. Current qencoder implementation stores counted values on int32_t so the maximum and minimum value is

Re: STM32F4 tickless

2023-06-07 Thread Gregory Nutt
On 6/7/2023 2:38 PM, Fotis Panagiotopoulos wrote: This is, ultimately, the problem. You can't wait for one tick. There is something wrong with the delay that is asking for the single tick delay. The watchdogs, by design, ask for a single tick delay. Here it is:

Re: STM32F4 tickless

2023-06-07 Thread Gregory Nutt
Later on, up_timer_start() will try to schedule the timer expiration 1 tick in the future. This is, ultimately, the problem.  You can't wait for one tick. There is something wrong with the delay that is asking for the single tick delay. If the single tick delay is valid for some reason,

Re: STM32F4 tickless

2023-06-07 Thread Gregory Nutt
The timer peripheral is a counter with a compare/match interrupt, right?  So the match interrupt is not occurring until the much later than it should?  This sounds like a case where the compare register is being set in the past, that is, the counter has already incremented past the compare

Re: Systick tickless on STM32F4

2023-06-06 Thread Gregory Nutt
On 6/6/2023 4:46 PM, Alan C. Assis wrote: Hi Fotis, On 6/6/23, Fotis Panagiotopoulos wrote: Hello, I just noticed the option STM32_TICKLESS_SYSTICK for the STM32. However, it seems that it does nothing. After a source code search, this option is not used anywhere. There is no tickless

Re: Systick tickless on STM32F4

2023-06-06 Thread Gregory Nutt
On 6/6/2023 4:47 PM, Gregory Nutt wrote: On 6/6/2023 4:31 PM, Nathan Hartman wrote: On Tue, Jun 6, 2023 at 5:44 PM Fotis Panagiotopoulos wrote: Hello, I just noticed the option STM32_TICKLESS_SYSTICK for the STM32. However, it seems that it does nothing. After a source code search

Re: Systick tickless on STM32F4

2023-06-06 Thread Gregory Nutt
On 6/6/2023 4:31 PM, Nathan Hartman wrote: On Tue, Jun 6, 2023 at 5:44 PM Fotis Panagiotopoulos wrote: Hello, I just noticed the option STM32_TICKLESS_SYSTICK for the STM32. However, it seems that it does nothing. After a source code search, this option is not used anywhere. There is no

Re: SD and eMMC performance in Nuttx

2023-06-01 Thread Gregory Nutt
That would help when tickless mode is used. But what about tickful mode? I guess the intent of 7312a553b was to avoid wasting processor cycles on busy waiting, but if tickless isn't being used, perhaps busy waiting is necessary here? It could choose between the two wait types at compile time

Re: SD and eMMC performance in Nuttx

2023-06-01 Thread Gregory Nutt
This may be way off base but, have you tried reverting https://github.com/apache/nuttx/commit/7312a553bbc40f3771c5d53ccded89bed7391f2a It release the CPU but traded that for potentially quantized large delays Yes, I would expect the up_udelay to be in error by about about 0.5 uS (provided

Re: SPI EEPROM

2023-05-25 Thread Gregory Nutt
On 5/25/2023 10:35 AM, Tim Hardisty wrote: I have an SPI EEPROM device on my board, and use "ee25xx_initialize" to register it as /dev/at25. That works fine. But I can't do anything with it. Sure you can.  That is a character device, not an MTD or block driver, and it should behave like the

Re: Touchscreen scaling/LVGL

2023-05-23 Thread Gregory Nutt
On 5/23/2023 12:11 PM, Tim Hardisty wrote: Hi, This is perhaps more a POSIX/general programming question than NuttX but you are all, so often, so very helpful :) A touchscreen peripheral (SAMA5D2 as it happens) delivers X and Y coordinates scaled 0-4095. LVGL wants them scaled to the

Re: [OT] Learning Makefiles

2023-05-23 Thread Gregory Nutt
On 5/23/2023 7:32 AM, Nathan Hartman wrote: On Tue, May 23, 2023 at 8:07 AM Tomek CEDRO wrote: On Tue, May 23, 2023 at 9:31 AM Sebastien Lorquet wrote: Hello Tomek, Whatever is decided, the mere fact of wanting to make a decision on this point will lead to more split. either from people that

Re: New docs not appearing on website?

2023-05-21 Thread Gregory Nutt
On 5/21/2023 8:12 AM, Nathan Hartman wrote: Recently I added the new docs [1] and [2] to Documentation/guides but they are not appearing on the website [3]. Does anyone know what I missed? [1] https://github.com/apache/nuttx/blob/master/Documentation/guides/zerolatencyinterrupts.rst [2]

Re: [OT] Learning Makefiles

2023-05-19 Thread Gregory Nutt
On 5/19/2023 12:11 PM, Lwazi Dube wrote: On Fri, 19 May 2023 at 13:51, Alan C. Assis wrote: Lwazi, I think Greg summarized it well. Yes, and Maciej too. Thanks But we need to get away from statements of fears and marketing statements to understand the clear, real world impacts.

Re: [OT] Learning Makefiles

2023-05-19 Thread Gregory Nutt
Such a big change needs good description.. risks.. clear list of advantages and disadvantages :-) And if it comes down to switching from one to the other as you suggest, then it needs a vote to understand the will of the whole community, not the preference of a few.  The whole community

Re: [OT] Learning Makefiles

2023-05-19 Thread Gregory Nutt
On 5/19/2023 10:25 AM, Lwazi Dube wrote: Alan, Can you summarize? I have not been following this PR. Is make going away? Thanks, -Lwazi On Fri, 19 May 2023 at 11:47, Alan C. Assis wrote: Hi Everyone, While PR #6718 is waiting to get merged, please take a look:

Re: nxsem_tickwait_uninterruptible randomly timeouts one tick too soon?

2023-05-17 Thread Gregory Nutt
On 5/17/2023 7:21 AM, Gregory Nutt wrote: On 5/17/2023 4:21 AM, Jukka Laitinen wrote: Hi, I just observed the behaviour mentioned in the subject; I tried just calling in a loop: "     sem_t sem =SEM_INITIALIZER(0);     int ret;     ret = nxsem_tickwait_uninterruptibl

Re: nxsem_tickwait_uninterruptible randomly timeouts one tick too soon?

2023-05-17 Thread Gregory Nutt
On 5/17/2023 4:21 AM, Jukka Laitinen wrote: Hi, I just observed the behaviour mentioned in the subject; I tried just calling in a loop: "     sem_t sem =SEM_INITIALIZER(0);     int ret;     ret = nxsem_tickwait_uninterruptible(, 1); " , and never posting the sem from anywhere. The

Re: The NuttX Handbook

2023-05-14 Thread Gregory Nutt
https://www.amazon.com/MicroC-OS-II-Kernel-CD-ROM/dp/1578201039 Wow, never heard about that book but just looking at the ToC makes me want to get one :-) The original uC/OS I book published in 1992 was the one that really established uC/OS and led to Micrium.  I think that is this book: 

Re: The NuttX Handbook

2023-05-14 Thread Gregory Nutt
On 5/14/23, Brennan Ashton wrote: Before I do more work to wire this up, please let me know if this pdf I have attached here seems like a reasonable start for people https://github.com/apache/nuttx/issues/9095#issuecomment-1547008998 It is basically the same content on the website, so

Re: www/contributors PMC, IPMC, PPMC.

2023-05-14 Thread Gregory Nutt
On 5/14/2023 12:45 PM, Tomek CEDRO wrote: Hello world :-) I have updated the www with social media section in the Community page :-) Also I have humbly added myself to the contributors list. I was not sure what *PMC to use, so I sipmly used PMC. As project has graduated, I can update all PMC

Re: SAMA5 secure fuse controller driver

2023-04-28 Thread Gregory Nutt
struct efuse_param Also .. does not follow the naming standard for structures.   The coding standard requires that all structure names end with _s so, if this is needed, it must be efuse_param_s If it is not needed, then it should be removed.

Re: FAQ :-)

2023-04-28 Thread Gregory Nutt
> 1. Daemon / Service: > > 1.1. I would like to have application running as daemon in the > background all the time. Is this possible? NuttX supports the daemon() API. https://man7.org/linux/man-pages/man3/daemon.3.html Lots of examples to look at: $ grep -ri daemon apps | wc -l 2384

Re: Usage of mutex_t inside libc

2023-04-27 Thread Gregory Nutt
On 4/27/2023 3:50 AM, Ville Juven wrote: Hi, I agree totally that the contents of the stack allocated wait object (whatever) do not need validation, and the user of course cannot access / destroy the contents. What I did not understand before inspecting the Linux kernel code, is how the

Re: Usage of mutex_t inside libc

2023-04-27 Thread Gregory Nutt
I think Xiang refers to how Linux does it. It simply creates a new "waitobj" variable into the kernel stack by declaring it inside the sem_wait()-equivalent function. The wait object is created into the kernel stack, ... Yep, I was not thinking of allocating as a local variable.  So I had

Re: Usage of mutex_t inside libc

2023-04-26 Thread Gregory Nutt
eed. This should be completely regression free for FLAT/PROTECTED, which is very important for me because I don't want to be responsible for breaking such a fundamental OS API for current users ;) Br, Ville On Wed, Apr 26, 2023 at 5:26 PM Gregory Nutt wrote: I have a question about using mute

Re: Usage of mutex_t inside libc

2023-04-26 Thread Gregory Nutt
On 4/26/2023 12:18 PM, Ville Juven wrote: How to protect the integrity of the stack allocated structure is still a bit open but one option is to use kheap as well. Semantics to be figured out, the solution should be feasible. My idea was to put the handle to this data into the user semaphore,

Re: Usage of SEM_INITIALIZER in apps, userspace in general

2023-04-26 Thread Gregory Nutt
On 4/26/2023 4:10 AM, Ville JUven wrote: I know it might be too late to fix the usage of SEM_INITIALIZER macro from user space, as many out-of-tree targets might depend on this as well, but I'd still like to open a discussion about the possibility of removing it from user space. Why remove

Re: Usage of mutex_t inside libc

2023-04-26 Thread Gregory Nutt
I have a question about using mutex_t / struct mutex_s inside libs/libc. The mutex_t definition is kernel internal but some modules inside the libs folder use it directly. My question is, is this intentional ? I don't think such modules should be using mutex_t. ... My question ? Should

Re: SAMA5 secure fuse controller driver

2023-04-25 Thread Gregory Nutt
On 4/25/2023 12:32 PM, Tim Hardisty wrote: The SAMA5 support has no driver for the secure fuse peripheral. Kconfig allows you to “enable” it but there’s no underlying code. Before I go ahead and create a character driver for this, is the omission for a “good” reason? The driver would handle

Re: The NuttX Handbook

2023-04-25 Thread Gregory Nutt
On 4/25/2023 11:38 AM, Nathan Hartman wrote: > I like the idea of keeping documentation in sync with the code(as much as > possible given our volunteer-based project). I wouldn't make a plan that depends on that.  Engineers are notoriously bad at maintaining documentation.  And international

Re: The NuttX Handbook

2023-04-25 Thread Gregory Nutt
Thanks Alan! This is why I was a bit surprised why the documentation is not direct part of the source code (i.e. documentation of the file/module/function right in that file/module/function). Kivy does that, it helps understanding the code, allows easy online/pdf documentation out of it, and

Re: The NuttX Handbook

2023-04-25 Thread Gregory Nutt
Yes, using the Documentation/ as base to create a book is a good idea, but it should focus on "OS Components" and "API Reference". I don't think that the documentation should be limited to simple HowTo and WhatIs documentation.  I think it should have some technical meat too!  Like

Re: The NuttX Handbook

2023-04-25 Thread Gregory Nutt
Sorry, I know I am way to anal retentive: In the past, documentation was partly in README files in various directories in the repo, partly on the NuttX website which was running on MediaWiki. It was actually DocuWiki and was the landing page for the old nuttx.org website (not that it matters)

Re: Debugging userspace with Nuttx protected build

2023-04-25 Thread Gregory Nutt
When I was originally developing the kernel mode, I wrote this: https://cwiki.apache.org/confluence/display/NUTTX/Memory+Configurations That was mostly my notes of what I had worked on and my roadmap that was guiding me through the kernel mode development.  I burned out on that before

Re: Debugging userspace with Nuttx protected build

2023-04-25 Thread Gregory Nutt
>>> I was actually quite surprised that Nuttx applications are still partially >>> linked with a protected build and that all sections overlap (start at 0)in >>> the elf file. I had expected the application would be fully linked to >>> virtual addresses as per linux and another RTOS I used

Re: Debugging userspace with Nuttx protected build

2023-04-24 Thread Gregory Nutt
On 4/24/2023 7:27 PM, Andrew Dennison wrote: Are there any examples of a gdb setup to debug a userspace process? One key issue is to setup the section offsets to match the final application location once it has been loaded. You don't describe your build, so I only give you a general answer.

Re: Telnet broken?

2023-04-24 Thread Gregory Nutt
Including the doubling of characters and momentary display of some characters which seem to change rapidly? That probably comes from NSH.  I think it still sends an escape sequence to clear to the end of the line.  So any additional garbage at the end after the first four characters would

Re: Telnet broken?

2023-04-24 Thread Gregory Nutt
$ ./nuttx login: admin password: User Logged-in! nsh> duk ((o) Duktape 2.5.0 (v2.5.0) duk> hheellpp Note that only the characters sent from the remote peer and echoed by the driver are corrupted. ReferenceError: identifier 'help' undefined at [anon] (duktape/src-noline/duktape.c:83732)

Re: Add g_ prefix to fs file_operations and mountpt_operations

2023-04-24 Thread Gregory Nutt
On 4/24/2023 6:57 AM, Xiang Xiao wrote: From https://nuttx.apache.org/docs/latest/contributing/coding_style.html: - Global variable prefix. All global variables begin with the prefix g_ to indicate the scope of variable. Most global variables follow this guide except a few

Re: sched_lock() should be completely removed

2023-04-23 Thread Gregory Nutt
This is build from the repo and automatically published. This particular file source is located here: https://github.com/apache/nuttx/blob/master/Documentation/reference/user/03_task_control.rst From the main documentation page you would find this under the API Reference section and then

Re: sched_lock() should be completely removed

2023-04-23 Thread Gregory Nutt
On 4/23/2023 10:16 AM, Brennan Ashton wrote: On Sun, Apr 23, 2023, 3:57 PM Gregory Nutt wrote: Possibly stupid idea: Maybe OStest needs That point is that there was a lot of valuable documentation that has been thrown in the shitcan and replaced with superficial how-to documentation

Re: sched_lock() should be completely removed

2023-04-23 Thread Gregory Nutt
Possibly stupid idea: Maybe OStest needs to become part of the OS and not part of apps? That is possible but leads to some issues some of which are only cosmetic and some which are semantic. * If we did that, it would not be an OS test.  It would be an OS self test of some kin. * You

Re: sched_lock() should be completely removed

2023-04-23 Thread Gregory Nutt
Let's focus on the first two item: 1. Add sched_lock()'s ability to the enter_critical_section() Some will need to explain what this means.  What is this?  Why is it needed?  There is not sufficient information in this statement to understand it.

Re: sched_lock() should be completely removed

2023-04-23 Thread Gregory Nutt
hey there Yun, i am also strongly against removing working code that had been here for a long time has been carefully designed gives granular control etc. Good words to like by: * If it ain't broke don't fix it. * Evolution , not revolution. In the case of sched_lock(), it is a

Re: sched_lock() should be completely removed

2023-04-22 Thread Gregory Nutt
On 4/20/2023 7:01 PM, jun hu wrote: Thank you for your reply and providing additional information. Based on your suggestion, I believe a reasonable solution about sched_lock should be step by step. 1 Add sched_lock()'s ability to the enter_critical_section() I am not sure what this mean. 

Re: MCU/Board with WiFi, BT and USB Host

2023-04-20 Thread Gregory Nutt
I'm looking for an MCU or better a development board that has WiFi, BT and USB host capabilities. Can anybody give me advice for that? I need to connect a CDC ACM device to that USB, so maybe there are some alternatives that can be used (there is a device that exposes its functionality via USB

<    1   2   3   4   5   6   7   8   9   10   >