Re: [Discuss] Migrate the build system to CMake

2021-06-09 Thread Fotis Panagiotopoulos
For me, cmake would be a no. The reasons are greatly outlined by Sebastien. However, I am not very experienced with it. (I just never liked it...) Are there any hard advantages that would justify such a migration? Are there things that can only be done in cmake, or that are so much easier that it

Undefined reference to longjmp/setjmp

2021-06-09 Thread Fotis Panagiotopoulos
Hi everyone! I just started adding Lua to my NuttX-based project, but I have some problems with it. I am getting undefined references to longjmp/setjmp. I am using an STM32F4 and GCC: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-bra

Re: [Discuss] Migrate the build system to CMake

2021-06-09 Thread Fotis Panagiotopoulos
t; wrote: > > > > On Wed, Jun 9, 2021, 11:04 AM Fotis Panagiotopoulos > > > wrote: > > > >> For me, cmake would be a no. > >> The reasons are greatly outlined by Sebastien. > >> > >> However, I am not very experienced with it. (I just

Re: [Discuss] Migrate the build system to CMake

2021-06-09 Thread Fotis Panagiotopoulos
Trying to be fair, (and leaving my personal preference aside). My machine takes less than 6 seconds to perform a clean build (with ccache). If a windows machine takes "minutes", then maybe the build system can be considered broken... On Wed, Jun 9, 2021, 23:47 TimH wrote: > My view on this...b

Re: Undefined reference to longjmp/setjmp

2021-06-10 Thread Fotis Panagiotopoulos
Regarding Lua. I have been using Lua in MCU environment for many years now. This is the first time to use it along with NuttX. I am using Lua 5.2.4, for which I have ported the LTR patch, as described here: http://www.eluaproject.net/doc/v0.9/en_arch_ltr.html The way I am using it, is to enable

Re: Undefined reference to longjmp/setjmp

2021-06-11 Thread Fotis Panagiotopoulos
nfiguration > > http://nuttx-config.nxtlabs.pl/#/?current=SYSTEM_SYSTEM > > > Am Do., 10. Juni 2021 um 17:52 Uhr schrieb Fotis Panagiotopoulos < > f.j.pa...@gmail.com>: > > > Regarding Lua. > > > > I have been using Lua in MCU environment for many years now.

LPC1769 Progmem

2021-07-02 Thread Fotis Panagiotopoulos
Hello, I am porting an old application to NuttX. This is running on a hardware board that uses the NXP LPC1769 MCU. I am in need of the up_progmem interface. Unfortunately, I see that this driver is broken. It is not working, always returning an error. I checked its internals, but it is quite a m

Re: LPC1769 Progmem

2021-07-02 Thread Fotis Panagiotopoulos
m/apache/incubator-nuttx/pull/3834 > > On Fri, Jul 2, 2021 at 6:28 PM Fotis Panagiotopoulos > wrote: > > > Hello, > > > > I am porting an old application to NuttX. > > This is running on a hardware board that uses the NXP LPC1769 MCU. > > I am in need of the u

Re: LPC1769 Progmem

2021-07-08 Thread Fotis Panagiotopoulos
by checking the functions descriptions now, I guess this shouldn't be correct? Or should "page" here refer to the 4k/32k sectors? Στις Παρ, 2 Ιουλ 2021 στις 2:08 μ.μ., ο/η Fotis Panagiotopoulos < f.j.pa...@gmail.com> έγραψε: > Oh, that's great. That should definit

Re: LPC1769 Progmem

2021-07-08 Thread Fotis Panagiotopoulos
FAR struct mtd_dev_s *s512_mtd = s512_initialize(raw_mtd); > > > On 7/8/2021 7:30 AM, Fotis Panagiotopoulos wrote: > > Still looking at this driver, and how to improve it. > > > > The LPC1769 needs data to be written in 256 bytes chunks, but Flash > sectors > >

Simulator - UART

2021-11-03 Thread Fotis Panagiotopoulos
Hello everyone! I am working on a new NuttX-based firmware. On this application a hardware board will be able to communicate through UART with a Linux system. There is still some testing and development to be done on this Linux program, so I thought that this is a great use for the simulator. Ins

Re: Simulator - UART

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

Kernel ticking and progmem writes

2021-11-30 Thread Fotis Panagiotopoulos
Hello everyone, I have some issues with the watchdogs and possibly the scheduling of the kernel. I am not sure if this is a bug, or if I am miss-using something... I am working on an STM32F427, and I am using the independent watchdog timer. I have enabled the watchdog automonitor using a timer (

Re: Kernel ticking and progmem writes

2021-11-30 Thread Fotis Panagiotopoulos
iang Xiao < xiaoxiang781...@gmail.com> έγραψε: > On Tue, Nov 30, 2021 at 5:55 PM Fotis Panagiotopoulos > > wrote: > > > Hello everyone, > > > > I have some issues with the watchdogs and possibly the scheduling of the > > kernel. > > > > I am not su

Re: Kernel ticking and progmem writes

2021-12-02 Thread Fotis Panagiotopoulos
> Is this a dual bank part? Is so you can avoid the bus lock by operating on > the other bank. Well, eventually this is what I ended up using. It works perfectly in this configuration. It is just that memory mapping had to be changed, and this ended up to be an effort. > Yes, they are called ramf

Re: Redirect syslog to file

2022-01-13 Thread Fotis Panagiotopoulos
Hello, Yes, all these exist. You need to set: SYSLOG_FILE=y and then you may attach a file to the logger using: syslog_file_channel() If you want to also keep the UART logger active, then also set: SYSLOG_MAX_CHANNELS=2 SYSLOG_DEFAULT=y To have automatic rotations of the log files, you may use

SD Card in Simulation

2022-01-24 Thread Fotis Panagiotopoulos
Hello, I am working on a system that uses an SD card to read various files. I am also using the simulator for testing this firmware. I would like to test the parts of the system that read and parse these files, so I need a way to simulate the SD card. Is there any way to achieve this? Ideally,

Re: SD Card in Simulation

2022-01-26 Thread Fotis Panagiotopoulos
lated SPI or SD would have to get,recognize and execute SD > commands, and it would get its storage from the host disk or memory. > > This is a bit cumbersome, so if only a more functional file storage is > required, romfs or hostfs could be enough. > > Sebastien > > Le 24/0

ICMP responses on UDP broadcasts

2022-05-10 Thread Fotis Panagiotopoulos
Hello, I just noticed that NuttX responds with an ICMP port unreachable on UDP broadcasts. AFAIK this shouldn't happen. I followed the code, and I found that the broadcast reaches udp_input.c: line 256, where the ICMP response is generated. There is a note there that indeed the ICMP shouldn't be

Re: ICMP responses on UDP broadcasts

2022-05-11 Thread Fotis Panagiotopoulos
I was thinking the same thing. Which layer is responsible for this check? IP, UDP, or ICMP? Στις Τρί 10 Μαΐ 2022 στις 2:41 μ.μ., ο/η Nathan Hartman < hartman.nat...@gmail.com> έγραψε: > On Tue, May 10, 2022 at 6:01 AM Fotis Panagiotopoulos > > wrote: > > > Hello, >

Re: ICMP responses on UDP broadcasts

2022-05-13 Thread Fotis Panagiotopoulos
nat...@gmail.com> έγραψε: > On Thu, May 12, 2022 at 5:18 AM Bernd Walter > wrote: > > > > On Wed, May 11, 2022 at 07:13:17PM -0400, Nathan Hartman wrote: > > > On Wed, May 11, 2022 at 5:19 AM Fotis Panagiotopoulos > > > wrote: > > > > > > >

Network deadlock and priority inheritance.

2022-05-13 Thread Fotis Panagiotopoulos
Hello! I am facing various issues with networking in NuttX, including a nasty deadlock. I tried to track down this deadlock, and it seems that it is related to g_netlock. I am not sure yet what is the sequence that leads to this. I have CONFIG_PRIORITY_INHERITANCE enabled. However, I see that SE

Re: Network deadlock and priority inheritance.

2022-05-16 Thread Fotis Panagiotopoulos
itself. I will spend some more time investigating this, and report here. Στις Παρ 13 Μαΐ 2022 στις 6:27 μ.μ., ο/η Nathan Hartman < hartman.nat...@gmail.com> έγραψε: > On Fri, May 13, 2022 at 6:43 AM Fotis Panagiotopoulos > wrote: > > > > Hello! > > > > I am faci

NuttX-aware debugging.

2022-06-22 Thread Fotis Panagiotopoulos
Hello, I am in need of debugging NuttX in a thread-aware fashion, as I still hit a dead-lock in networking that I haven't managed to track down yet. I am using a custom target, based on the STM32F427VI and JLink as the debugger. I see that there is a plug-in for JLink GDB that was added in #4810

Re: NuttX-aware debugging.

2022-06-22 Thread Fotis Panagiotopoulos
b.com/apache/incubator-nuttx/blob/master/Kconfig#L1857-L1863 > > > The plugin needs the g_tcbinfo to know the critical offset of the field in > tcb_s structure. > > On Thu, Jun 23, 2022 at 2:10 AM Fotis Panagiotopoulos > > wrote: > > > Hello, > > > > I am i

Re: NuttX-aware debugging.

2022-06-23 Thread Fotis Panagiotopoulos
issue, hahaha > > Here on Ubuntu "make -C tools -f Makefile.host all" works fine. > > It created the jlink-nuttx.so file. > > BR, > > Alan > > On 6/22/22, Fotis Panagiotopoulos wrote: > > Yes I enabled CONFIG_DEBUG_TCBINFO. > > (When disable

Re: NuttX-aware debugging.

2022-06-23 Thread Fotis Panagiotopoulos
x/ > $ make -C tools -f Makefile.host all > $ ls -l tools/jlink* > -rwxrwxr-x 1 alan alan 17144 jun 23 11:02 tools/jlink-nuttx > -rw-rw-r-- 1 alan alan 16804 jun 23 11:01 tools/jlink-nuttx.c > > I didn't test it with JLinkGDBServer, but at least I can tell you it > is

Re: NuttX-aware debugging.

2022-06-24 Thread Fotis Panagiotopoulos
, do you have a documentation about the JLink integration? BTW, > > any news about the guy/gal Xiaomi was contracting to write better > > documentation to NuttX ? > > > > BR, > > > > Alan > > > > On 6/23/22, Fotis Panagiotopoulos wrote: > > >

Re: NuttX-aware debugging.

2022-06-27 Thread Fotis Panagiotopoulos
iao wrote: > On Fri, Jun 24, 2022 at 5:42 PM Fotis Panagiotopoulos > > wrote: > > > Hello everyone! > > > > I got it working. > > > > > Good luck. > > > > The issue is in RTOS_SetThreadReg(). > > For some reason g_plugin_

STM32F4 Ethernet Issues

2022-07-19 Thread Fotis Panagiotopoulos
Hello! I am using Ethernet on an STM32F427 target, but I am facing some issues. Initially the device works correctly. After some hours of continuous operation I completely lose all network communications. Trying to troubleshoot the issue, I enabled assertions and various other debug features. Ag

Re: STM32F4 Ethernet Issues

2022-07-19 Thread Fotis Panagiotopoulos
e > reports if a card becomes unreachable. None has so far outside of > dedicated tests. > > So I believe that there is no obvious hard bug in these drivers. > > Most certainly a build option on your particular config. debug is a > possible issue, thread problems is another

Re: [NuttX] CONFIG_NET_TCP_WRITE_BUFFERS=y deadlock issue

2022-07-20 Thread Fotis Panagiotopoulos
Hi Petro, > ... At > some point of time the system runs out of IOBs (actually I have > CONFIG_IOB_THROTTLE=8, so 8 IOB buffers are still available) and the device > wants to send the FTP response message. Do you refer to an actual FTP response here, or to a TCP level response? Is the problem caus

Simulator loop task.

2022-07-21 Thread Fotis Panagiotopoulos
Hello, I am having some issues with scheduling in simulator. I noticed that there is a "loop task", that performs various house-keeping tasks. This task is started with a priority of SCHED_PRIORITY_MIN. Is this correct / on-purpose? I would expect this task to run on maximum priority, simulating

Re: Simulator loop task.

2022-07-21 Thread Fotis Panagiotopoulos
effects). * Move the remaining logic within the idle task to the loop task. What do you think? On Thu, Jul 21, 2022 at 6:56 PM Xiang Xiao wrote: > On Thu, Jul 21, 2022 at 11:27 PM Fotis Panagiotopoulos < > f.j.pa...@gmail.com> > wrote: > > > Hello, > > > >

Re: Simulator loop task.

2022-07-22 Thread Fotis Panagiotopoulos
; > > > What do you think? > > > > > I think it's fine or better to use the highest priority thread to simulate > the interrupt. > > > > > > On Thu, Jul 21, 2022 at 6:56 PM Xiang Xiao > > wrote: > > > > > On Thu, Jul 21, 2

Re: Simulator loop task.

2022-07-22 Thread Fotis Panagiotopoulos
oneshot_callback() in the file nuttx/drivers/timers/arch_alarm.c. I will investigate further... On Fri, Jul 22, 2022 at 3:29 PM Xiang Xiao wrote: > On Fri, Jul 22, 2022 at 6:58 PM Fotis Panagiotopoulos > > wrote: > > > The loop task indeed needs to run in high priority. I provided

Re: STM32F4 Ethernet Issues

2022-07-26 Thread Fotis Panagiotopoulos
y higher layer? On Tue, Jul 19, 2022 at 10:30 PM Fotis Panagiotopoulos wrote: > Hello, > > > We have deployed hundreds of boards with stm32f427 and ethernet, they > > have all been working reliably for months without stopping, we know it > > because they critically depend

Re: STM32F4 Ethernet Issues

2022-08-09 Thread Fotis Panagiotopoulos
more expertise about this. > > Just a note, dont forget that not all PHY have an interrupt, the one on > the nucleo stm32h743zi[2] board does not have one. > > Sebastien > > Le 26/07/2022 à 11:05, Fotis Panagiotopoulos a écrit : > > Hello, > > > > I have eve

Re: STM32F4 Ethernet Issues

2022-08-12 Thread Fotis Panagiotopoulos
is, > > Are you in sync with mainline? > > If you can create a host application to induce the issue will be > easier for us to test. > > BR, > > Alan > > On 8/9/22, Fotis Panagiotopoulos wrote: > > Hello, > > > > still trying to make the network work

Re: STM32F4 Ethernet Issues

2022-08-12 Thread Fotis Panagiotopoulos
gs with the server communication, that's why this is so hard to reproduce. On Fri, Aug 12, 2022 at 5:13 PM Fotis Panagiotopoulos wrote: > Hi Alan, > > I am trying hard to reproduce the issue reliably, but I haven't been able > to do so yet. > > I noticed that wh

Re: STM32F4 Ethernet Issues

2022-08-13 Thread Fotis Panagiotopoulos
t; > Yes, I understood the point. Because it needs the right timing it > could be trick to duplicate. > > Did you try to create a simple host server to try to emulate this > connection issue? > > BR, > > Alan > > On 8/12/22, Fotis Panagiotopoulos wrote: > > I

Re: STM32F4 Ethernet Issues

2022-08-23 Thread Fotis Panagiotopoulos
any follow up on this point? > > Sebastien > > > Le 13/08/2022 à 16:44, Fotis Panagiotopoulos a écrit : > > Ok, I just managed to reproduce the issue on a NUCLEO-F429ZI, using the > > NuttX apps. > > > > Please check my fork on > > https://github.com/fjp

NuttX Code Coverage

2022-08-25 Thread Fotis Panagiotopoulos
Hello, I am trying to use gcov with NuttX simulator, to have code coverage reports generated. I have enabled CONFIG_ARCH_COVERAGE and the executable is properly build and run. The .gcno files are properly generated. However, the needed .gcda files are not generated. Usually these are generated w

Re: NuttX Code Coverage

2022-08-25 Thread Fotis Panagiotopoulos
Ah, yes. I didn't have CONFIG_BOARDCTL_POWEROFF enabled, so I didn't see this command. Nevertheless, it is still not working. Indeed the simulator exits, but the .gcda files are not generated. On Thu, Aug 25, 2022 at 4:52 PM Gregory Nutt wrote: > > But there is no way to terminate the simulator

Re: NuttX Code Coverage

2022-08-25 Thread Fotis Panagiotopoulos
"standard" expected behavior, and maybe the only solution to systems without NSH. On Thu, Aug 25, 2022 at 5:15 PM Xiang Xiao wrote: > On Thu, Aug 25, 2022 at 10:05 PM Fotis Panagiotopoulos < > f.j.pa...@gmail.com> > wrote: > > > Ah, yes. I didn't have CONFIG_BOA

Re: Lua on NuttX blog posts

2022-08-27 Thread Fotis Panagiotopoulos
Hello Mike! I have also been using Lua on microcontrollers for many years, with great success. For The last couple of years I have been running Lua on NuttX, these two are great when combined! Quite recently I tried running the Lua tests suite (http://www.lua.org/tests) on NuttX, and to my surpri

Re: Lua on NuttX blog posts

2022-08-28 Thread Fotis Panagiotopoulos
ibrary. On the simulator I had to set the stack to 1M. I am afraid that this specific library may not be usable on actual MCU systems... On Sat, Aug 27, 2022 at 8:40 PM Xiang Xiao wrote: > On Sun, Aug 28, 2022 at 1:07 AM Fotis Panagiotopoulos > > wrote: > > > Hello Mike! >

Networking on simulator

2022-08-31 Thread Fotis Panagiotopoulos
Hello, motivated by the recent issues of the network, I would like to perform more tests on NuttX and maybe automate some of them. The simulator sounds great for this case, but unfortunately I never got it working. Can someone please help me with that? I am using Fedora 36. I need to have the

Re: Networking on simulator

2022-09-02 Thread Fotis Panagiotopoulos
traffic between tap and ethernet. I have spend hours on this, but I haven't managed to make this work. On Wed, Aug 31, 2022 at 4:38 PM Nathan Hartman wrote: > On Wed, Aug 31, 2022 at 5:12 AM Fotis Panagiotopoulos > wrote: > > I enabled all network prints. > > > > I c

Re: Lua on NuttX blog posts

2022-09-02 Thread Fotis Panagiotopoulos
Oops, sorry I missed this email. Coroutines is a standard Lua library, included in the official code. More information here: http://www.lua.org/pil/9.1.html. I haven't examined the internals of this library yet. It may indeed have excessive memory requirements, or it may be that the tests are pre

Re: Crash in ostest prioinherit?

2022-09-06 Thread Fotis Panagiotopoulos
Hello, Priority inheritance has a known bug, and it is not working correctly. See issue #6310: https://github.com/apache/incubator-nuttx/issues/6310 I had to disable it in our application, as it causes lots of problems. As I see, there are a couple of propositions on fixing this, but none of the

Unicode characters in codebase.

2022-10-10 Thread Fotis Panagiotopoulos
Hello! A few weeks ago I had some problems with a static analysis tool that couldn't parse NuttX code, due to non-Unicode characters. I provided a couple of PRs and fixed the issues, but it got me thinking... Do we really need Unicode characters within the codebase? I can only think of problems

DHCP renewal problem.

2022-10-10 Thread Fotis Panagiotopoulos
Hello everyone, While I am still tracking down various issues regarding networking with NuttX, I observed something interesting within the DHCP client code. When dhcpc_request is called, the current IP address is set to INADDR_ANY. This is in file dhcpc.c, line 714. This sounds normal for the in

Re: Unicode characters in codebase.

2022-10-10 Thread Fotis Panagiotopoulos
s, wrote: > > > Agree! It is better to avoid it. > > > > On 10/10/22, Fotis Panagiotopoulos wrote: > > > Hello! > > > > > > A few weeks ago I had some problems with a static analysis tool that > > > couldn't parse NuttX code, due to n

Re: Unicode characters in codebase.

2022-10-10 Thread Fotis Panagiotopoulos
gt; >> Let's remove them! > >> > >> Thanks for looking into this issue > >> > >> Best Regards > >> Alin > >> > >> On Mon, 10 Oct 2022, 17:25 Alan C. Assis, wrote: > >> > >>> Agree! It is better to avo

Re: Unicode characters in codebase.

2022-10-10 Thread Fotis Panagiotopoulos
re are some files that contain an unreadable mess within the comments. See attached. [image: image.png] On Mon, Oct 10, 2022 at 6:49 PM Fotis Panagiotopoulos wrote: > > nxstyle should only complain if this is a source or build file, right? > > And only if if the unicode is outside of

Re: ARM -m startup does not check for idle thread stack space

2022-11-04 Thread Fotis Panagiotopoulos
I think this issue is related? https://github.com/apache/incubator-nuttx/issues/2001 On Thu, Nov 3, 2022 at 9:12 PM Alan C. Assis wrote: > Hi Carlos, > > I tested and confirmed the issue: > > $ patch -p1 < > ~/Desktop/0001-Changes-to-force-fill-bss-section-causing-sp-past-th.patch > patching f

Re: New names of repositories

2022-11-19 Thread Fotis Panagiotopoulos
+1 for nuttx and nuttx-apps. On Sat, Nov 19, 2022, 14:53 Thiago Costa de Paiva wrote: > How about? > > nuttx/kernel > nuttx/apps > > > 2022/11/19 13:26:53, raiden00pl: > > +1 for nuttx and nuttx-apps > > > > sob., 19 lis 2022 o 12:17 Abdelatif Guettouche < > > abdelatif.guettou...@gmail.com> nap

Re: Apologies

2022-11-25 Thread Fotis Panagiotopoulos
Hi Tim, Someone told me about this: https://github.com/k88hudson/git-flight-rules I haven't read it myself, but they say it is good. I hope you find it helpful. On Fri, Nov 25, 2022, 21:31 Alan C. Assis wrote: > Hi Tim, > > Don't worry, after you get used to it things become easier. > > If y

Code donation

2022-12-04 Thread Fotis Panagiotopoulos
Hello everyone! Christmas arrived a bit earlier for NuttX as I would like to donate some of my personal code to the community! A bit of context. Over the years that I am working on embedded systems, I have developed lots of software that I use in my projects. Some of it is quite general-purpose,

Re: Code donation

2022-12-05 Thread Fotis Panagiotopoulos
7;s > of interest, see if it makes sense, then get it working right for NuttX and > do a PR...in the fullness of time (i.e. I'm a slow worker!) > > On 04/12/2022, 16:55, "Fotis Panagiotopoulos" > wrote: > > Hello everyone! > > Christmas arrived a bit e

Re: Including Lua scripts on filesystem

2023-01-31 Thread Fotis Panagiotopoulos
Hello, Indeed the "proper" way of including a script would be to store it in a file system. However, when I needed to include a single and small script and I didn't want to introduce a complete FS just for this, I used xxd. xxd can convert any file to a C header file. You can then include the he

Re: Bug? in stm32_sdio.c

2023-02-11 Thread Fotis Panagiotopoulos
Hello, A fix has already been merged. https://github.com/apache/nuttx/pull/8502 On Sat, Feb 11, 2023 at 9:48 PM Alan C. Assis wrote: > Hi Pierre-Noel, > > Good catch! Although the right file is > arch/arm/src/stm32/stm32_sdio.c, not boards/... > > This file has this possible BUG since when it

Embedded World 2023

2023-03-12 Thread Fotis Panagiotopoulos
Hello, Is anyone planning a visit to Embedded World? I am flying tonight to Nuremberg. It would be nice if we can arrange a meet-up! Fotis.

Re: Embedded World 2023

2023-03-12 Thread Fotis Panagiotopoulos
regards, > Petro > > On Sun, Mar 12, 2023, 5:26 PM Alin Jerpelea wrote: > > > hi > > I will be there and I hope to meet some of our awesome community members > > > > Best regards > > Alin > > > > On Sun, 12 Mar 2023, 17:06 Nathan Hartman, &

asprintf failure

2023-03-28 Thread Fotis Panagiotopoulos
Hello, I just noticed that there are some problems with the usage of asprintf() throughout the code base. This function is not properly checked for failure, which can lead to nasty crashes. I am checking here: https://linux.die.net/man/3/asprintf It states: > Return Value When successful, these

Re: asprintf failure

2023-03-29 Thread Fotis Panagiotopoulos
> Since, as you point out, this may be a lot of work, I think we should > try to split the work across several devs... Yes please, I am beyond burn-out lately... > To do that, we'd grep for all uses of asprintf() to find out which > files use it and post that list in reply to this email. I can d

Re: asprintf failure

2023-03-29 Thread Fotis Panagiotopoulos
s.%s", index_name, key); 3304: ret = asprintf(&dir, NVS_DIR_BASE"%s.%s", index_name, key); 3372: ret = asprintf(&dir, NVS_DIR_BASE"%s.%s", index_name, key); fs/unionfs/fs_unionfs.c 717: ret = asprintf(&relpath, "%s%s", path, name); 721:

Re: asprintf failure

2023-03-29 Thread Fotis Panagiotopoulos
> strdup? Thanks, I will check this too. I went through all the asprintf calls in the list. These are the ones that actually need to be fixed. Everything else is properly checked. drivers/net/telnet.c 698: ret = asprintf(&devpath, TELNET_DEVFMT, priv->td_minor); libs/libc/uuid/lib_uuid_to_

Re: asprintf failure

2023-03-29 Thread Fotis Panagiotopoulos
There are also some cases in the `tools` directory, but these are less important. The worst thing that can happen is the build to fail, not having a system crash... On Wed, Mar 29, 2023 at 6:34 PM Fotis Panagiotopoulos wrote: > > strdup? > > Thanks, I will check this too. > >

Re: Development priorities (was: [Breaking change] Move nxmutex to sched)

2023-04-01 Thread Fotis Panagiotopoulos
> >> I have mixed feelings myself and hope that we get some consensus through > >> dialog. One one hand, it is important to stay faithful to documented > >> standard and undocumented conventions for the use the a POSIX/Unix > >> systems. But on the other hand, unlike other OSs that strive toward

Re: [Breaking change] Move nxmutex to sched

2023-04-01 Thread Fotis Panagiotopoulos
There are two issues that I would like to bring to your attention. #7393 - https://github.com/apache/nuttx/issues/7393 #5973 - https://github.com/apache/nuttx/issues/5973 On Sat, Apr 1, 2023 at 12:07 AM Gregory Nutt wrote: > > > BTW, https://github.com/apache/nuttx/pull/5070 report that the sys

Re: Networking and kernel workers

2023-04-01 Thread Fotis Panagiotopoulos
Thank you very much for this explanation. > This is really outside of the scope of the OS. There is no OS imposed > rule about what priorities you should use for your applications or for > the low priority work queue. So I don't think there is a rule or a > correct answer. You just need to expe

Re: Networking and kernel workers

2023-04-01 Thread Fotis Panagiotopoulos
>> Is there any limitation anywhere that dictates the relationship between >> these two priorities? > Since they run synchronously and generally don't overlap in time, I > would say that the answer is no I think this answers my question, thank you. So, It doesn't really matter what the priority o

os_test failure - Improper use of semaphores?

2023-04-04 Thread Fotis Panagiotopoulos
Hello, Recently we saw the following commit get merged: commit 758e88672b703bcb0d1251ae9731b2ec295e81c0 Author: Gregory Nutt Date: Fri Mar 31 16:25:45 2023 -0600 Assert if a thread attempts to post a semaphore incorrectly. Assert in nxsem_post if: - Priority inheritance is enabl

Re: os_test failure - Improper use of semaphores?

2023-04-04 Thread Fotis Panagiotopoulos
Sorry, maybe it was a bad example. Here is a much more minimal config that you can run directly. https://pastebin.com/x775E7iF For me, it crashes almost immediately after starting. Trying again with 4ff4562401401a3a86c74cb2bda9a1a2b8d94e6d and it moves along. On Tue, Apr 4, 2023 at 10:21 PM Gr

Re: os_test failure - Improper use of semaphores?

2023-04-04 Thread Fotis Panagiotopoulos
t_tcb() that tries to access g_pidhash. But! g_pidhash is deallocated at this point! And thus it points to garbage. KASAN is right to complain. On Wed, Apr 5, 2023 at 12:24 AM Gregory Nutt wrote: > > On 4/4/2023 2:43 PM, Fotis Panagiotopoulos wrote: > > Sorry, maybe it

Re: os_test failure - Improper use of semaphores?

2023-04-04 Thread Fotis Panagiotopoulos
I drafted this change here: https://github.com/apache/nuttx/pull/8965 Have a look, please. Although, I don't know if there will be any other places to be fixed like that? Or if this is the best approach to this issue. This was just a quick experiment. On Wed, Apr 5, 2023 at 12:34 AM Gregory Nut

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

2023-04-20 Thread Fotis Panagiotopoulos
Specifically for CE and E-mark (that I am mostly experienced with), module certifications have no value. The complete and finished product must be certified from scratch. As a whole. It must be able to demonstrate that it is functional (to some degree). So in the end, you will have to go through l

Re: sched_lock() should be completely removed

2023-04-23 Thread Fotis Panagiotopoulos
Hello, just a recommendation. If something is prone to missuse by the users, don't remove it. Rather: * Document clearly it's quirks. * Provide checks and assertions catching the missuse. On Sun, Apr 23, 2023, 14:49 Sebastien Lorquet wrote: > Hello, > > I have a similar feeling about this. >

Re: asprintf failure

2023-04-26 Thread Fotis Panagiotopoulos
anyone has any free time, I would encourage you to improve the apps or the tools in this regard. On Wed, Mar 29, 2023 at 8:07 PM Nathan Hartman wrote: > On Wed, Mar 29, 2023 at 5:02 AM Fotis Panagiotopoulos > > wrote: > > > > In my opinion asprintf should set the pointer

Re: asprintf failure

2023-04-27 Thread Fotis Panagiotopoulos
Indeed your suggestion is valid. I created the following issues: https://github.com/apache/nuttx/issues/9126 https://github.com/apache/nuttx-apps/issues/1727 On Thu, Apr 27, 2023 at 5:06 AM Nathan Hartman wrote: > On Wed, Apr 26, 2023 at 9:32 AM Fotis Panagiotopoulos > wrote: > &g

Re: faq: context vs global variables

2023-05-04 Thread Fotis Panagiotopoulos
Hello Tomek, you may also have a look here: https://github.com/fjpanag/code_for_nuttx/tree/main/settings On Sun, Apr 30, 2023 at 3:12 PM Alan C. Assis wrote: > On 4/30/23, Tomek CEDRO wrote: > > On Sat, Apr 29, 2023 at 10:16 PM Alan C. Assis wrote: > >> Take a look at apps/system/cfgdata it co

sendfile() problems - Destination unreachable

2023-05-27 Thread Fotis Panagiotopoulos
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 see in Wireshark, I get an ICMP response "Destination unreachable (Fragmentat

Re: sendfile() problems - Destination unreachable

2023-05-28 Thread Fotis Panagiotopoulos
On Sat, May 27, 2023 at 5:35 PM Xiang Xiao wrote: > 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

Re: sendfile() problems - Destination unreachable

2023-05-28 Thread Fotis Panagiotopoulos
ttx/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 Panagiotopoulos wrote: > > On Sat, May 27, 2023 at 5:35 PM Xiang Xiao > wrote: &g

Re: sendfile() problems - Destination unreachable

2023-05-29 Thread Fotis Panagiotopoulos
expected behavior. But, instead of dropping the packet, the system hangs because the semaphore is never posted. It just tries endlessly to call devif_send() which always fails. On Mon, May 29, 2023 at 11:42 AM Xiang Xiao wrote: > On Sun, May 28, 2023 at 11:55 PM Fotis Panagiotopoulos &l

Re: sendfile() problems - Destination unreachable

2023-05-29 Thread Fotis Panagiotopoulos
o transmit a buffer larger than the MTU. Instead of getting an error, the application hangs indefinitely. `devif_send()` is called periodically, but of course it always fails. On Mon, May 29, 2023 at 1:13 PM Xiang Xiao wrote: > On Mon, May 29, 2023 at 5:02 PM Fotis Panagiotopoulos > >

Re: sendfile() problems - Destination unreachable

2023-05-29 Thread Fotis Panagiotopoulos
The failure scenario is a bit more complicated... Give me some time and I will provide a correct and reproducible example, with a clear explanation. On Mon, May 29, 2023, 13:27 Fotis Panagiotopoulos wrote: > > sendfile should return an error in this case, but senfile should only be &g

Re: sendfile() problems - Destination unreachable

2023-05-29 Thread Fotis Panagiotopoulos
void), so improved error handling can take place. On Mon, May 29, 2023 at 1:41 PM Fotis Panagiotopoulos wrote: > The failure scenario is a bit more complicated... > > Give me some time and I will provide a correct and reproducible example, > with a clear explanation. > &

Re: sendfile() problems - Destination unreachable

2023-06-04 Thread Fotis Panagiotopoulos
2023 at 12:28 AM Fotis Panagiotopoulos wrote: > I can see that there are two different problems with MTU. > They are completely independent from each other, so let's start with the > simple case first. > > I am testing on an STM32F427, using Ethernet. > > As previously

Re: sendfile() problems - Destination unreachable

2023-06-04 Thread Fotis Panagiotopoulos
As said, this is sendfile(). I do not have control on the size of the chunks sent. sendfile is also using TCP. So, sendfile cannot take advantage of PMTUD? On Sun, Jun 4, 2023 at 5:33 PM Xiang Xiao wrote: > On Sun, Jun 4, 2023 at 10:23 PM Fotis Panagiotopoulos > > wrote: > >

Re: sendfile() problems - Destination unreachable

2023-06-04 Thread Fotis Panagiotopoulos
As I see, sendfile uses MSS instead of MTU. Wouldn't it be better to scale also MSS along with MTU when PMTUD is enabled? On Sun, Jun 4, 2023 at 5:40 PM Fotis Panagiotopoulos wrote: > As said, this is sendfile(). I do not have control on the size of the > chunks sent. sendfile is

Systick tickless on STM32F4

2023-06-06 Thread Fotis Panagiotopoulos
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 implementation that supports the systick timer. Shall I remove this?

STM32F4 tickless

2023-06-07 Thread Fotis Panagiotopoulos
Hello I have just started experimenting with tickless on an STM32F427. I had some (configuration) issues initially, but now everything seems to be working correctly. However, after some seconds of operation, the Hardware/STM32 Watchdog timer triggers a system reset. I have configured: - CONFIG_

Re: STM32F4 tickless

2023-06-07 Thread Fotis Panagiotopoulos
resume operation. It just happens that the "stuck" period is less than the timeout period of the HW watchdog timer, and the system does not reboot. On Wed, Jun 7, 2023 at 12:23 PM Fotis Panagiotopoulos wrote: > Hello > > I have just started experimenting with tickless on an S

Re: STM32F4 tickless

2023-06-07 Thread Fotis Panagiotopoulos
processing is deferred for a long time, perhaps by another interrupt? > > On 6/7/2023 1:00 PM, Fotis Panagiotopoulos wrote: > > As a first test, I added another (NuttX) watchdog timer, to toggle a > board > > LED. > > > > I can confirm that at some point the NuttX

Re: STM32F4 tickless

2023-06-07 Thread Fotis Panagiotopoulos
quot; or "less. But I am not sure about the accumulation of these errors yet. It depends on the implementation of the scheduler. On Wed, Jun 7, 2023 at 10:45 PM Nathan Hartman wrote: > On Wed, Jun 7, 2023 at 3:39 PM Fotis Panagiotopoulos > wrote: > > > Ah! Ye

Re: STM32F4 tickless

2023-06-07 Thread Fotis Panagiotopoulos
> Yes, it is a free-running timer and represents the current time. It is > read whenever anything asks for the current time. It is read frequently > during the interval timer interrupt processing to avoid/minimize > situations like you describe. > > Should the timer be stopped? > > You can't stop

Re: STM32F4 tickless

2023-06-07 Thread Fotis Panagiotopoulos
#L406 When the wdog->lag is 0, then the delay is set to 1 tick. On Wed, Jun 7, 2023 at 11:25 PM Fotis Panagiotopoulos wrote: > > Yes, it is a free-running timer and represents the current time. It is > > read whenever anything asks for the current time. It is read frequently >

  1   2   >