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 wou

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: 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] http

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 w

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 actual

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 wh

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 t

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 ba

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 tic

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, this

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 impl

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 valu

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, th

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: https://github.com/apache/nutt

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 on

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 format

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: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 o

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, howeve

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 ./sama5d4-ek/src/

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 that

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 l

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: 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, th

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 in

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: [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 long

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: https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripheral

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 CO

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: 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 tha

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 additi

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 ST32F40

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 con

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 created

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 fi

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 h

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 ex

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-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 b

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 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
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
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./ /dev/audio/pc

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
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 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 di

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 g

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 t

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 of

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 NS

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
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: 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: [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 l

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 o

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 iso

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 experime

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 thing

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 the

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 th

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 intern

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: 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)))    \     __assert(__A

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 t

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 several

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, y

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 t

Re: execv obsolet ?

2023-10-12 Thread Gregory Nutt
On 10/12/2023 3:26 PM, MIGUEL ALEXANDRE WISINTAINER wrote: Some idea how to capture the data returned by exec ? exec does really return any data other than an int status code which only indicates if the task was correctly started. If you want some text output, you would have to add instrum

Re: execv obsolet ?

2023-10-12 Thread Gregory Nutt
.  Uros was replacing file system tasks with internal flash tasks so from his point of view, the FLASH based tasks were internal (or built-in) and not external (on a file system). On 10/12/2023 3:16 PM, Alan C. Assis wrote: Hi Greg, On 10/12/23, Gregory Nutt wrote: On 10/12/2023 2:18 PM, Alan C

Re: Could I use nuttx core to replace linux core in ubuntu OS?

2023-10-14 Thread Gregory Nutt
On 10/14/2023 1:48 AM, guangyuan wang wrote: Hi I note that the Nuttx supports POSIX well. And I'd like to check whether I could use Nuttx core to replace the Linux core in Ubuntu OS. No, probably not.  It depends on what you mean and how much effort you want to put into it.  Remember that y

Re: nsh_fileapps and usage of sched_lock()

2023-10-25 Thread Gregory Nutt
On 10/25/2023 8:18 AM, Alan C. Assis wrote: On 10/25/23, Nathan Hartman wrote: On Wed, Oct 25, 2023 at 5:16 AM Ville Juven wrote: Hi all, I noticed that when spawning a new task/process from a file in nsh_fileapps, the scheduler is locked prior to calling posix_spawn(), which does the file

Re: nsh_fileapps and usage of sched_lock()

2023-10-25 Thread Gregory Nutt
On 10/25/2023 8:48 AM, Gregory Nutt wrote: On 10/25/2023 8:18 AM, Alan C. Assis wrote: On 10/25/23, Nathan Hartman wrote: On Wed, Oct 25, 2023 at 5:16 AM Ville Juven wrote: Hi all, I noticed that when spawning a new task/process from a file in nsh_fileapps, the scheduler is locked prior

Re: Multiple IP addresses with a single GMAC (RMII PHY)

2023-10-25 Thread Gregory Nutt
On 10/25/2023 9:27 AM, Matthias Roosz wrote: Hi all, forgive my ignorance, I’ve just started diving into networking topics (including handling connections via Berkeley sockets). My final goal is to make my device reachable via two separate IP addresses with a single PHY. Once there are two IP

Re: Multiple IP addresses with a single GMAC (RMII PHY)

2023-10-26 Thread Gregory Nutt
On 10/25/2023 10:41 PM, Zhe Weng 翁喆 wrote: But I do have another idea: Maybe you can try to register two network devices even if you only have a single GMAC, just dup all the rx packets to both interfaces, and let all tx packets go out. Since the IP addresses are different on each interface,

Re: Multiple IP addresses with a single GMAC (RMII PHY)

2023-10-26 Thread Gregory Nutt
On 10/26/2023 4:48 PM, Nathan Hartman wrote: I wonder if this hasn't been solved already in some industry-accepted manner. For example (not saying this is the solution, just thinking out loud) there is a redundancy mechanism that makes two network interfaces look like one, with automatic failove

Re: ID page of EEPROM

2023-11-03 Thread Gregory Nutt
On 11/3/2023 4:02 PM, Robert Middleton wrote: Hi, I am working on a project that will need to be able to read/write the ID page of an EEPROM(currently a M95M02 SPI device from ST). From the code that I have seen, it seems that this chip is already supported, but there is no code to read/write

Re: ID page of EEPROM

2023-11-07 Thread Gregory Nutt
On 11/4/2023 6:12 PM, Robert Middleton wrote: I'm a little confused as to what the difference is between the MTD folder and the EEPROM folder. It seems that both folders have support for the at24xx and at25xx series of chips, so it's not obvious which one is better. MTD is more of a "heavyweigh

Xiaomi Press Release

2023-11-17 Thread Gregory Nutt
Worth taking a look at: https://news.itsfoss.com/xiaomi-vela-open-source/

Re: AVR32 on NuttX

2023-11-18 Thread Gregory Nutt
AFAIK, the Cygwin build using a windows native tool chain has been broken for years. There is no advice anyone can give that that is just going to make it work. It is broken and no one has interest in fixing that which they have broken. People make many changes to the build system but never tes

Re: AVR32 on NuttX

2023-11-20 Thread Gregory Nutt
But again, I think we can avoid this tortuous path and fix the CMake or Makefile to build on Windows. Fully understand. It is likely that you could create a pure Windows native build (using a Windows native toolchain) or a pure Cygwin build (using a tool chain built under Cygwin) with CMake. 

Re: Legal help to (Apache) NuttX RTOS: adding licenseed driver

2023-12-10 Thread Gregory Nutt
On 12/10/2023 7:15 AM, Alan C. Assis wrote: I understand your point. And in fact I think the issue is not your contribution itself, but the future contribution from developers of RTEMS and Linux that are using GPL. I think we have to be careful with the word "contribution".  The ASF cannot acc

Re: Legal help to (Apache) NuttX RTOS: adding licenseed driver

2023-12-10 Thread Gregory Nutt
On 12/10/2023 4:05 PM, Shane Curcuru wrote: I think we have to be careful with the word "contribution".  The ASF cannot accept any contribution that is licensed and copyrighted by some other entity.  To "contribute" the code is to donate the code to the ASF without retaining any claims to i

Re: [Article] NuttX on Ox64 BL808 RISC-V SBC: Bare Metal Experiments

2023-12-16 Thread Gregory Nutt
The Zigbee support is interesting.  NuttX does not have a Zigbee stack, but does have IEEE 802.15.4 which works with the same physical radio. The IEEE 802.15.4 logic is quite an accomplishment.  The original development was done by  Anthony Merlino and Sebasiten Lorquet.  I see that there have

Re: Read response from console

2023-12-20 Thread Gregory Nutt
Might be easier to use if the OPEN option SELECTED the FIFO and named pipes.  That way the POPEN option will appear in the menus when FIFOs are disabled. On 12/20/2023 1:45 PM, Gustavo Soares wrote: After enabling 'FIFO and named pipe drivers' I was able to use popen() and pclose() functions.

Re: NuttX on i486?

2023-12-28 Thread Gregory Nutt
There is a QEMU port to the i486 under boards/x86/qemu-i486 I am not sure of the state that was left in.  I don't think that has been touched for a while so I would also expect some bit rot. That port was tested  on a retro hardware board.  The person that developed that board reported that i

Re: debugassert vs assert in apps

2024-01-02 Thread Gregory Nutt
On Tue, Jan 2, 2024 at 11:16 AM Fotis Panagiotopoulos wrote: DEBUGASSERT shall only be used for the kernel. assert shall only be used for apps. Rationale: DEBUGASSERT is a custom macro that only exists in the NuttX world. As such it is best being used in NuttX-specific code. assert on the ot

Re: debugassert vs assert in apps

2024-01-03 Thread Gregory Nutt
On 1/3/2024 5:12 AM, Fotis Panagiotopoulos wrote: Hello everyone, I am glad that we all agree on this matter. We can handle this in the following steps: 1. Ensure that any new PRs and apps follow this convention. This is up to the reviewers, to enforce. 2. Get rid of all DEBUGASSERTs in apps.

Re: debugassert vs assert in apps

2024-01-03 Thread Gregory Nutt
On 1/3/2024 10:11 AM, Fotis Panagiotopoulos wrote: That would seem a little odd since there was a PR a few years ago to change all instances of assert/ASSERT to DEBUGASSERT to save code size. How is that so? As I see here: https://github.com/apache/nuttx/blob/master/include/assert.h#L122 asser

Re: debugassert vs assert in apps

2024-01-03 Thread Gregory Nutt
+1 On 1/3/2024 10:43 AM, Nathan Hartman wrote: On Wed, Jan 3, 2024 at 11:22 AM Gregory Nutt wrote: On 1/3/2024 10:11 AM, Fotis Panagiotopoulos wrote: That would seem a little odd since there was a PR a few years ago to change all instances of assert/ASSERT to DEBUGASSERT to save code size

Re: debugging user app crashes

2024-01-09 Thread Gregory Nutt
This is old and does not specifically address kernel mode, but I think most of the debug tips do apply in kernel mode too. The load address is a constant for kernel ELF modules so at least that part doesn't apply. But the rest probably does. On 1/9/2024 7:20 PM, yfliu2008 wrote: Alan, Than

Re: debugging user app crashes

2024-01-09 Thread Gregory Nutt
On 1/9/2024 7:28 PM, Alan C. Assis wrote: Hi Yf, Just look at your System.map and you will see that all those main() became _main. It isn't possible to have a unique main() symbol, otherwise we will have a duplicated symbol, also even if the compiler accepted that, how could NuttX know you want

Re: debugging user app crashes

2024-01-09 Thread Gregory Nutt
On 1/9/2024 8:06 PM, yfliu2008 wrote: Yes, in kernel mode each user space program has similar but isolated virtual address spaces. So it seems that we can't set break points to them like FLAT or PROTECTED build. Not sure if we need some sort of debug agent in KERNEL build so that it can hel

Re: debugging user app crashes

2024-01-11 Thread Gregory Nutt
Everything you need to know is in that referenced wiki page: https://cwiki.apache.org/confluence/display/NUTTX/Debugging+ELF+Loadable+Modules I don't know anything about QEMU or RISC-V.  But assuming that NSH is your init application... * NSH is not in memory when you start the OS; it reside

Re: observations on kernel memory

2024-01-19 Thread Gregory Nutt
There is instrumentation in ostest that prints heap usage after each test test.  That should isolate the memory leak. On 1/19/2024 2:07 AM, yfliu2008 wrote: Dear experts, With "rv-virt/knsh32", I noticed the "used Kmem" shown by "free" command keeps growing after each run of "ostest", belo

Re: ideas for managing the two cores of K230

2024-01-21 Thread Gregory Nutt
In general you would have to have two copies of NuttX and run them AMP.  A single OS with multiple CPUs would require SMP.  SMP generally requires that the CPUs appear identical in the two CPU address spaces (with the exception of interrupts). There was a long email thread discussing this exac

Re: Builtin app with its own command processor on stdin

2024-01-23 Thread Gregory Nutt
Are you running app in foreground or background from NSH, i.e., nsh> app nsh> app & The second should show this kind of interleaved behavior.  In the first, nsh should block until the app exits. Do you have waitpid() enabled?  The first behavior depends on the availability of waitpid() Doe

Re: On-demand paging and lazy loading on NuttX;

2024-01-24 Thread Gregory Nutt
The on-demand paging logic is obsolete and incomplete as well as incorrect for the current architecture.  It was an experiment only for the LPC3131 when I was running out of a small SRAM with dynamic paging from SPI flash.  It really should be removed. True on-demand paging as you envision sho

Re: On-demand paging and lazy loading on NuttX;

2024-01-24 Thread Gregory Nutt
On 1/24/2024 3:44 PM, Gregory Nutt wrote: The on-demand paging logic is obsolete and incomplete as well as incorrect for the current architecture.  It was an experiment only for the LPC3131 when I was running out of a small SRAM with dynamic paging from SPI flash.  It really should be

Re: observations on kernel memory

2024-01-25 Thread Gregory Nutt
ment ostest yet. With the help of  "echo used > /proc/memdump", I can see  used  memory nodes list added. If needed I can create a Github ticket to track this so that some experts can reveal the root cause later. Regards, yf Original

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