Add Renesas platform integration#59
Conversation
ea07e2b to
2923af7
Compare
- Add the Renesas-specific OSAL platform implementation, configuration headers and sample TLVs - Move firmware management config to platform types - Add Renesas IANA Private Enterprise Number - Fix Renesas CC-RX compiler warnings
2923af7 to
752ba23
Compare
| #define GECKO_BTL_UPLOAD_SLOT_ID 0 | ||
| #define GECKO_BTL_BACKUP_SLOT_ID 1 | ||
|
|
||
| // Firmware Management Configuration |
There was a problem hiding this comment.
#define CSMP_FWMGMT_ACTIVE_SLOTS 3 // 0-RUN, 1-UPLOAD, 2-BACKUP
#define CSMP_FWMGMT_SLOTIMG_SIZE (512*1024) // 512 Kb
#define CSMP_FWMGMT_BLKMAP_CNT (32)
osal_platform_types.h was originally added to hold only platform specific data types.
Generic MACROS and other declarations will be in osal.h - unless there is a need for moving these here?
Is the intent here to use different slot numbers, slot size and blk count? We need to consider the CSMP/TLV and FND expectations/dependencies on active slots and blk count. Slot size could be different across platforms though which could be sourced from platform config.
| return OSAL_SUCCESS; | ||
| } | ||
|
|
||
| osal_basetype_t osal_read_groups(uint32_t *groups, uint8_t num_groups) |
There was a problem hiding this comment.
osal_read_groups and osal_write_groups APIs are still dummy funcs returning SUCCESS always.
Isn't there going to be a platform specific implementation which is the intent of this change for these APIs as discussed in previous review discussion?
|
|
||
| // Firmware Management Configuration | ||
| #define CSMP_FWMGMT_ACTIVE_SLOTS 3 // 0-RUN, 1-UPLOAD, 2-BACKUP | ||
| #define CSMP_FWMGMT_SLOTIMG_SIZE (30*1024) // 30 Kb |
There was a problem hiding this comment.
Refer previous comments on this change.
Slot size could be different across platforms but the slot count and block count has dependency on CSMP/TLV and FND.
|
|
||
| /* | ||
| * The following functions are not used in any CSMP platform independent code. | ||
| * For the Renesas platform, the functionalities are already provided by the dedicated |
There was a problem hiding this comment.
Please capture the Fw upgrade APIs that are directly called for Renesas in the comment.
| return OSAL_SUCCESS; | ||
| } | ||
|
|
||
| int R_CSMP_Start(const r_ipv6addr_t* serverAddr, const uint8_t* localEui64, uint32_t regImin, uint32_t regImax) |
There was a problem hiding this comment.
Could we rename "R_CSMP" to anything more readable? Applies to all other such instances...
| #define HWID_SIZE 32 | ||
| #define BLOCK_SIZE 1024 | ||
|
|
||
| // IMAGE SLOT INFO |
There was a problem hiding this comment.
The removal of these Fw upgrade slots to be reviewed considering the previous comments on this change, we'll discuss this in review discussion.
| if(xfer_req) { | ||
| // Firmware status check | ||
| if (!xfer_req->has_status || xfer_req->status != FWHDR_STATUS_DOWNLOAD) { | ||
| if (!xfer_req->has_status || xfer_req->status != (uint32_t) FWHDR_STATUS_DOWNLOAD) { |
There was a problem hiding this comment.
Did you notice any specific issue without this explicit typecast ?
| static uint32_t m_GroupIds[CSMP_GROUP_NUM_TYPES] = {0}; | ||
| static bool m_bLastMatchValid; | ||
|
|
||
| int initGroups() |
There was a problem hiding this comment.
As suggested previously, good to group all init functions in one initialization API/func in the sample app.
| * | ||
| * @return int 0 is success | ||
| */ | ||
| int initGroups(); |
There was a problem hiding this comment.
As suggested previously, good to group all init functions in one initialization API/func in the sample app.
| (message->n_unknown_fields++); | ||
| ufield->tag = scanned_member->tag; | ||
| ufield->wire_type = scanned_member->wire_type; | ||
| ufield->wire_type = (ProtobufCWireType) scanned_member->wire_type; |
There was a problem hiding this comment.
Please elaborate on this change and the issue noted due to this.
|
We'll discuss and resolve the review comments in the scheduled review discussion. Thanks. |
Summary
This PR adds the Renesas Wi-SUN platform integration for OpenCSMP.
It introduces the Renesas-specific OSAL implementation, platform configuration headers, wrapper interface, vendor documentation/resources, and sample Renesas TLVs.
This branch includes the following related changes:
Changes
Renesas platform integration
Vendors/Renesas/Readme.mdVendors/Renesas/resources/renesas-logo.jpgosal/renesas_wisun/osal_platform_types.hosal/renesas_wisun/osal_renesas_config.hosal/renesas_wisun/osal_renesas_wisun.cosal/renesas_wisun/osal_renesas_wrapper.hsample/tlvs/renesas_tlvs.cIncluded prerequisite changes
RENESAS = 63257osal/osal.hheader to platform-specificosal_platform_types.hheadersMotivation
The Renesas Wi-SUN platform requires a dedicated OSAL integration layer and platform-specific configuration to use OpenCSMP in a Renesas-based environment.
This PR adds the required platform abstraction files and keeps Renesas-specific configuration and wrapper code separated from the generic OSAL interface.
The included prerequisite changes are needed to make the codebase suitable for the Renesas toolchain and platform structure.
Related issues
Fixes #44
Fixes #51