FAT macro

2024-02-01 Thread Saurav Pal
Hi, I was browsing through the source code of FAT implementation, trying to write some documentation, and I came across this macro . Since I'm new to the codebase, I wanted to know if this (especially DIRSEC_NDXMASK(fs)) is corre

Re: FAT macro

2024-02-02 Thread Saurav Pal
Hi Alan, Thank you for looking at our code base and planning to add Documentation, > that is really important! > > NuttX has a long history but our Documentation is still lagging behind, so > your work will be very beneficial for our community. > I'll try my best to contribute some documentation

Re: FAT macro

2024-02-02 Thread Saurav Pal
t; "calls" DIRSEC_BYTENDX. > > On Fri, 2 Feb 2024 at 11:55, Saurav Pal wrote: > > > Hi Alan, > > > > Thank you for looking at our code base and planning to add Documentation, > > > that is really important! > > > > > > NuttX has a long history b

Re: FAT macro

2024-02-02 Thread Saurav Pal
5) > > #define DIRSEC_BYTENDX(f,i) (((i) & DIRSEC_NDXMASK(fs)) << 5) > > I'm curious to know what this mistake could cause to VFAT on NuttX? > > Why haven't we seen any side effects in products using NuttX with VFAT? > > Best Regards, > > Alan &g

Re: FAT macro

2024-02-02 Thread Saurav Pal
; > Some comments explaining what the commit is supposed to do! > > Signed-off-by: Saurav Pal > > -- > > Best Regards, > > Alan > > On Fri, Feb 2, 2024 at 5:14 PM Saurav Pal wrote: > >

Detecting FS

2024-02-12 Thread Saurav Pal
Hi all, I am trying to write some docs for VFS in NuttX, but there's one thing I've been stumbling on for some time. How are the file systems detected from the storage devices? For example, if I have a storage device which has been formatted using VFAT...after (say) power on, how does NuttX detec

Re: Detecting FS

2024-02-12 Thread Saurav Pal
t; Please take a look at "static const struct fsmap_t g_bdfsmap[]" in the file > nuttx/fs/mount/fs_mount.c > > You will figure-out how the "magic" happens. > > Best Regards, > > Alan > > On Mon, Feb 12, 2024 at 9:20 AM Saurav Pal wrote: > > >

Re: Detecting FS

2024-02-12 Thread Saurav Pal
tem is vfat. > > It seems like you should be able to omit the file system type when > mounting and let the system figure out the file system type, but that > does not appear to be supported. > > On 2/12/2024 2:30 PM, Saurav Pal wrote: > > Hi Alan, > > > > Thanks for

syncfs() method of fs

2024-02-14 Thread Saurav Pal
Hi all, I was going through the codebase of different file systems, and I haven't yet understood the syncfs() method of mountpt operations. There aren't any existing filesystems in the codebase that implement it, and I couldn't understand what exactly is required from this method (like what it do

Re: syncfs() method of fs

2024-02-15 Thread Saurav Pal
14/2024 8:16 AM, Saurav Pal wrote: > > Hi all, > > > > I was going through the codebase of different file systems, and I haven't > > yet understood the syncfs() method of mountpt operations. > > > > There aren't any existing filesystems in the codebase tha

Re: syncfs() method of fs

2024-02-15 Thread Saurav Pal
Hi Greg, I've added a comment about `syncfs` in the issue you mentioned. Thanks for pointing out the issue list. I'm looking into adding VFS documentation now, and after that I'll look into this. Thanks and Regards, SP On Thu, Feb 15, 2024 at 8:03 PM Gregory Nutt wrote: > > > However, I think

Device Discovery

2024-02-20 Thread Saurav Pal
Hi all, I am not able to understand how NuttX performs device discovery. I am trying to look for something that is similar to "udev". Can someone please help me understand? Thanks in advance. Regards, SP

Re: Device Discovery

2024-02-20 Thread Saurav Pal
a "udev" for NuttX, but there are > > daemons/services used to detect when a SDCard is plugged, when a USB > > device is attached, etc. > > > > We could add something like a lite "udev" for NuttX. > > > > Best Regards, > > > > Alan > >

Re: Device Discovery

2024-02-20 Thread Saurav Pal
why MCU needs > multiple daemon. > > On Wed, Feb 21, 2024 at 2:07 PM Saurav Pal wrote: > > > Hi, > > > > Thanks for the clarification. > > > > Also, am I right in thinking it would increase performance if there was a > > single daemon working rath

littlefs BIOC_FLUSH in NAND flash

2024-02-24 Thread Saurav Pal
Hi all, I've been trying to develop a device simulator for the NAND flash (in the sim). A short note on what this does is create a virtual NAND flash (from RAM) and provide a driver, as well as a wrapper around the upper half (which for now, does nothing extra). This helps in creating records of

Re: littlefs BIOC_FLUSH in NAND flash

2024-02-24 Thread Saurav Pal
unt: mount failed: 28 > > #define ENOSPC 28 /* No space left on device */ > > BR, > > Alan > > On Sat, Feb 24, 2024 at 9:28 AM Saurav Pal wrote: > > > Hi all, > > > > I've been trying to develop a device simulator for the NAND flash (in the > >

Re: littlefs BIOC_FLUSH in NAND flash

2024-02-24 Thread Saurav Pal
ut each of 4096 pages in a 2MB virtual device). PS: I had to use vi to view the logs in nsh in a sane manner, though a tool like less would be godsend in such cases. BR, SP On Sat, Feb 24, 2024 at 9:23 PM Saurav Pal wrote: > Hi Xiang and Alan, > > Thanks for the info Xiang. > &

Re: Rust in the OS?

2024-03-15 Thread Saurav Pal
Hi, I think some of the reasons why Rust was included in Rust would help. *Pros*: - Memory safe if used correctly. - A central toolchain like cargo (some might consider it as a con, but it's easy to attract new blood if they don't have to learn an entire new toolchain for a project). - As Linus p

Re: Rust in the OS?

2024-03-15 Thread Saurav Pal
*Rust was included in Linux would help On Sat, Mar 16, 2024 at 10:40 AM Saurav Pal wrote: > Hi, > > I think some of the reasons why Rust was included in Rust would help. > > *Pros*: > - Memory safe if used correctly. > - A central toolchain like cargo (some might cons

Re: Welcoming Saurav Pal to NuttX GSoC

2024-05-02 Thread Saurav Pal
dance whenever and wherever possible. Thank you again for selecting me and my proposal. I am aiming to exceed your expectations! Regards, Saurav Pal On Fri, 3 May, 2024, 00:56 Alan C. Assis, wrote: > Hi NuttXers, > > As Lup commented, we have two NuttX proposals accepted to the GSoC 2024.

NAND Flash supported Board suggestion

2024-05-24 Thread Saurav Pal
Hi all, I'm working on creating a file system for NAND Flash for NuttX as part of GSoC '24. I would be thankful of any suggestions that you might have for the type of board that I should use and the NAND flash as well. Thank you in advance. Regards, Saurav Pal

Re: NAND Flash supported Board suggestion

2024-05-26 Thread Saurav Pal
Hi all, Thank you for the knowledgeable insights! Regards, Saurav Pal On Sun, 26 May, 2024, 18:03 Alan C. Assis, wrote: > It is at drivers/mtd/dhara.c > > Unfortunately NuttX is full of "hidden features", that is something that I > try to avoid during the code view: >

Journal Size for a File System

2024-06-27 Thread Saurav Pal
Hi all, I would love to receive your suggestions on the number of bytes required for a field storing the number of blocks in the journal of a file system? The journal starts with a 8 byte magic sequence, then stores the number of blocks used by the journal, and then an array for storing the block

Re: How to demystify some myths about NuttX

2024-07-09 Thread Saurav Pal
Hi, I agree on a lot of things with Michal (while I can't comment on other things), being almost a beginner to the project (and embedded systems in general) I think my viewpoint can help. Because of the coverage of nsh across videos and documentation, I never knew for sure if nsh was a requirement

Using const in function arguments.

2024-07-11 Thread Saurav Pal
e compiler can make better optimizations for const, and because of this, I try to spam const anywhere and everywhere I can. But I don't see too many such usages across the codebase, so I was wondering why that is (or I just maybe reading the code wrong, in which case, forgive me 🙏). Regards, Saurav Pal.

Re: Using const in function arguments.

2024-07-12 Thread Saurav Pal
have heard that const helps in optimizations. Regards, Saurav Pal. On Fri, Jul 12, 2024 at 6:28 PM Alan C. Assis wrote: > Hi Saurav, > > I don't know why it is not much used, maybe Greg or Xiang have some idea. > > I think the most common use of const for variables that you want to keep

Re: Using const in function arguments.

2024-07-14 Thread Saurav Pal
subject to the author's preference. Thank you all for providing your help on this matter. Best regards, Saurav Pal. On Sun, Jul 14, 2024 at 8:10 PM Nathan Hartman wrote: > That is correct. I was not suggesting to change the interface. We were > only using read() as an example. &g

Re: Using const in function arguments.

2024-07-14 Thread Saurav Pal
st sb, FAR char *data, const mfs_t datalen, const off_t page, const mfs_t pgoff) { /* TODO */ return OK; } Best regards, Saurav Pal. On Sun, Jul 14, 2024 at 10:27 PM Saurav Pal wrote: > Hi all, > > First up, I am extremely sorry for the la

GSoC Mid Term Blog/Report on NAND Flash File System Support

2024-08-12 Thread Saurav Pal
ther blog/report will follow in some weeks post the end evaluations as well! I would love to get any suggestions and constructive criticism on the contents. Thank you and best regards, Saurav Pal. PS: A lot of stuff happened in my personal life which kept my mind occupied, and posting this on the ma

GSoC Final Report on mnemofs

2024-09-12 Thread Saurav Pal
Hi all, Here's my final report <https://resyfer.github.io/blogs/mnemofs/endeval/> on mnemofs, a NAND flash file system for NuttX, on which I worked during my tenure as a GSoC 2024 Contributor for ASF. I would be grateful for any suggestions and criticism. Best regards, Saurav Pal.

Re: GSoC Final Report on mnemofs

2024-09-13 Thread Saurav Pal
osecond precision. No need for pulses, just an > adjustable > > > > delay. Test is triggered by a command that also start a > > countdown, and > > > > timeout is increased microsecond by microsecond until you > > reach the > >