nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

[13.0] CRC cleanup.

Open cederom opened this issue 8 months ago • 1 comments

Is your feature request related to a problem? Please describe.

  • Current CRC implementation in NuttX in some areas is not compatible with other platforms (i.e. Linux).
  • There various CRC16 and CRC32 algorithms out there, while there is no one common standard.
  • CRC changes impacts various storage, transmission, etc, and may impact self-compatibility.

Describe the solution you'd like

  • We need to provide implementations for other commonly used CRC.
  • We need explicit implementation of various CRC with clearly distinguishable function name or parameters.
  • In order to maintain backward-compatibility any change in defaults may happen in next major release (13.0).
  • Core crc defaults should stay untouched.
  • Where necessary and possible some components crc implementation may change in order to improve compatibility with other platforms.
  • User code may choose what CRC implementation to use, but core components should not allow KConfig like CRC algo selection as this will impact NuttX self-compatibility.

Describe alternatives you've considered

No response

Verification

  • [x] I have verified before submitting the report.

cederom avatar Apr 10 '25 13:04 cederom

  • Where necessary defaults may change in order to improve compatibility with other platforms.

I think you may get roasted over this one, based on the mailing list discussion!

Tangential thought. If there is no standard for these CRCs then is perhaps not the use of them actually non-portable and, therefore, OS-specific? Caveat emptor? So no need for compatibility with Linux or other OS' per se?

But documentation is key. Maybe even a #warning for the (I gather) less common but time-honoured NuttX choices, warning that they may not be compatible with other OS'?

TimJTi avatar Apr 10 '25 13:04 TimJTi