-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imxrt-flash: support for calulating CRC32 of selected region #494
Conversation
70f7bee
to
202e123
Compare
JIRA: NIL-574
d012992
to
ebb4991
Compare
ebb4991
to
997d217
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
storage/imxrt-flash/flashsrv.c
Outdated
return res; | ||
} | ||
|
||
buf = malloc(CRC32_BUFSZ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The imxrt-flash is a legally relevant part of fw. All allocated memory should be known at initialization stage or compile time. Using malloc/free at each call to function may lead to memory fragmentation during long-term operation (MISRA Dir 4.12 req.).
Btw. NOR page size is 256 bytes @ 4KiB sector size, you can use smaller buffer for it e.g. of page size 256 bytes if allocated statically to save ram space.
997d217
to
5e30166
Compare
CRC32 can be calulated for selected region of flash memory or raw partition. To calculate automatically CRC32 of whole memory/partition set addr and len to 0. JIRA: NIL-574
5e30166
to
0bf50dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
CRC32 can be calulated for selected region of flash memory or raw partition. To calculate automatically CRC32 of whole memory/partition set addr and len to 0.
JIRA: NIL-574
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment