Re: CRC32 what gives?

2022-07-15 Thread Alan Carvalho de Assis
We also have CRC4 used by MS5611 barometer sensor. It should be nice to have all available in the kernel On Friday, July 15, 2022, Nimish Telang wrote: > Whichever one is chosen, there should be a table-free implementation for > code size reasons. FWIW there are more crc implementations in the z

Re: CRC32 what gives?

2022-07-15 Thread Nimish Telang
Whichever one is chosen, there should be a table-free implementation for code size reasons. FWIW there are more crc implementations in the zmodem app: https://github.com/apache/incubator-nuttx-apps/blob/master/system/zmodem/host/crc16.c From: Sebastien Lorquet Date: Friday, July 15, 2022 at 4

Is there a way to have NSH loaded as the init task from an sd card?

2022-07-15 Thread Nimish Telang
I’m trying to load nsh as the init task from an SD card on the SPRESENSE CXD5602 board (a FLAT build). Normally it just calls nsh_main from the user init function when INIT_ENTRYPOINT is defined. I’m not able to determine which combination of symtab options, if any, I should use with the init f

Re: CRC32 what gives?

2022-07-15 Thread Sebastien Lorquet
@Nathan: Yes, of course. @Alan: Of course not, the structure passed to init can be set up to describe the required algorithm. But the partial update situation can be useful for protocols where the message is fragmented (eg radio transceivers with short FIFOs), or where only some fields ent

Re: CRC32 what gives?

2022-07-15 Thread Nathan Hartman
On Fri, Jul 15, 2022 at 1:40 PM Alan Carvalho de Assis wrote: > > Hi Sebastien, I think we don't need these three functions for each > CRC, just one like in the Linux kernel is enough: > > https://www.kernel.org/doc/htmldocs/kernel-api/API-crc-ccitt.html > > BR, > > Alan Could have one generic f

Re: CRC32 what gives?

2022-07-15 Thread Alan Carvalho de Assis
Hi Sebastien, I think we don't need these three functions for each CRC, just one like in the Linux kernel is enough: https://www.kernel.org/doc/htmldocs/kernel-api/API-crc-ccitt.html BR, Alan On 7/15/22, Sebastien Lorquet wrote: > Hi, > > Sorry to throw a rock in the pond but having a single f

Re: CRC32 what gives?

2022-07-15 Thread Alan Carvalho de Assis
On 7/15/22, Karel Kočí wrote: > The impact might be pretty significant from my search and that is also why I > > rather discuss instead of suggesting changes. > > The significant place where the current crc32 implementation is used is in > file systems (such as smartfs or nxffs). The change would

Re: CRC32 what gives?

2022-07-15 Thread Sebastien Lorquet
Hi, Sorry to throw a rock in the pond but having a single function named "crc32" is very wrong and is not sufficient. As you have discussed the polynomial length is just not enough to describe a crc, the initial value, bit orders of input and output, and bit inversion on input and output are

Re: CRC32 what gives?

2022-07-15 Thread Karel Kočí
Excerpts from Nathan Hartman's message of July 15, 2022 6:47 pm: > On Fri, Jul 15, 2022 at 12:45 PM Karel Kočí wrote: >> >> The impact might be pretty significant from my search and that is also why I >> rather discuss instead of suggesting changes. >> >> The significant place where the current cr

Re: CRC32 what gives?

2022-07-15 Thread Nathan Hartman
On Fri, Jul 15, 2022 at 12:45 PM Karel Kočí wrote: > > The impact might be pretty significant from my search and that is also why I > rather discuss instead of suggesting changes. > > The significant place where the current crc32 implementation is used is in > file systems (such as smartfs or nxff

Re: CRC32 what gives?

2022-07-15 Thread Karel Kočí
The impact might be pretty significant from my search and that is also why I rather discuss instead of suggesting changes. The significant place where the current crc32 implementation is used is in file systems (such as smartfs or nxffs). The change would break any existing formating of those F

Re: CRC32 what gives?

2022-07-15 Thread Alan Carvalho de Assis
This site is very good to compare and test CRCs: http://www.sunshine2k.de/coding/javascript/crc/crc_js.html The result is CRC32_JAMCRC as Karel pointed. So, just like CRC-16, there are many CRC-32 implementations. Since crc32() function is already used in many places on NuttX I don't know the i

Re: CRC32 what gives?

2022-07-15 Thread Karel Kočí
Excerpts from Nathan Hartman's message of July 15, 2022 2:59 pm: > On Fri, Jul 15, 2022 at 8:10 AM Karel Kočí wrote: >> >> Hi >> >> I hit an issue with crc32 implementation in NuttX's LibC and it took me some >> time to figure out that crc32 is implemented differently in NuttX than I was >> expec

Re: [DISCUSS] Graduate NuttX as TLP

2022-07-15 Thread Nathan Hartman
On Fri, Jul 15, 2022 at 6:55 AM 张铎(Duo Zhang) wrote: > > Let's first make sure we have done all the things in the check list? > > Abdelatif Guettouche 于2022年7月13日周三 19:40写道: > > > It would be nice to hear from the mentors or anyone from the IPMC. We still need to: (1) Fill in the STATUS file: h

Re: CRC32 what gives?

2022-07-15 Thread Nathan Hartman
On Fri, Jul 15, 2022 at 8:10 AM Karel Kočí wrote: > > Hi > > I hit an issue with crc32 implementation in NuttX's LibC and it took me some > time to figure out that crc32 is implemented differently in NuttX than I was > expecting. Let me explain... > > Common implementations are using same precompu

CRC32 what gives?

2022-07-15 Thread Karel Kočí
Hi I hit an issue with crc32 implementation in NuttX's LibC and it took me some time to figure out that crc32 is implemented differently in NuttX than I was expecting. Let me explain... Common implementations are using same precomputed table as there is in the NuttX, but the initial value is a

Re: [DISCUSS] Graduate NuttX as TLP

2022-07-15 Thread Duo Zhang
Let's first make sure we have done all the things in the check list? Abdelatif Guettouche 于2022年7月13日周三 19:40写道: > It would be nice to hear from the mentors or anyone from the IPMC. > > On Wed, Jul 13, 2022 at 12:07 AM Nathan Hartman > wrote: > > > > Hi all, > > > > As this [DISCUSS] thread has