-
Notifications
You must be signed in to change notification settings - Fork 4
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
OSAL APIs to read/write firmware #27
base: osal
Are you sure you want to change the base?
Conversation
Hi @manojnacsl ! My current errors are from the linux build:
|
@ismilak Regarding the earlier build errors for FreeRTOS/EFR32, as informed in the previous call - our intent was to only add the platform agnostic CSMP encode/decode changes for FreeRTOS/EFR32 in the interest of time - there could be trivial build errors on these platforms which could be addressed during integration. Linux taget built fine and was used for manual testing. |
FILE *file = NULL; | ||
|
||
switch(slotid) { | ||
case RUN_IMAGE: |
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.
Should the enumeration be in osal.h? It will be required for other platforms too. If csmp_info is a library header, the enumeration should be moved into osal.h
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.
I agree, the slots are owned by the osal an consumed by the csmp agent library
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.
@ismilak @silabs-ThibautC - thanks for your feedback. Sounds good, I'll move the declaration of xxx_IMAGE enum and _Csmp_Slothdr to osal.h and accordingly update the API signature.
* @brief read firmware image from storage(file/flash) | ||
* | ||
* input parameters | ||
* @param[in] slotid indicating RUN/UPLOAD/BACKUP slot |
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.
My recommendations for the new APIs:
- slotid type should be osal_basetype_t to be consistent
- _Csmp_Slothdr can be defined in osal_platform_types.h. In this case it can be portable for different platforms, using void* to access raw data is not a "safe" solution. Using appropriate type has more benefits.
- size should be osal_ssize_t or we can introduce a new unsigned size type (this argument is not required if the slot hdr is defined in osal_platform_types.h )
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.
@ismilak - thanks for your feedback. Sounds good, I'll move the declaration of xxx_IMAGE enum and _Csmp_Slothdr to osal.h and accordingly update the API signature.
Proposed OSAL APIs to read/write firmware