You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bootloader with vee flash configured for a max record id of 32 (only reads data from flash)
An application with vee flash configured for a max record id of 64
When opening the flash from the bootloader (RM_VEE_FLASH_Open) we sometimes get a crash, which I narrowed down to the record offset assignment in rm_vee_load_record_table (ra\fsp\src\rm_vee_flash\rm_vee_flash.c line 1055 on v5.2.0):
/* Save record offset if complete record found (reset may have occurred during a write) */if (RM_VEE_FLASH_VALID_CODE==p_end->valid_code)
{
// This line may assign an offset out of bounds of the rec_offset arrayp_ctrl->p_cfg->rec_offset[p_end->id] = (uint16_t) (addr-p_ctrl->active_seg_addr);
/* Save for statusGet */p_ctrl->last_id=p_end->id;
}
When parsing all records sometimes record ids (p_end->id) are greater than 32 resulting in an out of bounds write to the p_ctrl->p_cfg->rec_offset array.
A quick fix would be:
/* Save record offset if complete record found (reset may have occurred during a write) */if (RM_VEE_FLASH_VALID_CODE==p_end->valid_code)
{
uint16_trec_id=p_end->id;
if (rec_id <= p_ctrl->p_cfg->record_max_id)
{
p_ctrl->p_cfg->rec_offset[p_end->id] = (uint16_t) (addr-p_ctrl->active_seg_addr);
/* Save for statusGet */// Not sure if this should be inside, or outside the ifp_ctrl->last_id=p_end->id;
}
}
The text was updated successfully, but these errors were encountered:
Hi @sytsereitsma, opening a volume with RM_VEE_Open with a configuration that does not match what is reflected in the volume is not currently supported. Is there a reason you cannot open the volume using the same configuration in both the bootloader and the application?
At present we have no means to field-update our bootloader.
In the beginning we thought 32 records 'ought to be enough for anybody', so now we're stuck with that number. Meanwhile the application has evolved and now uses a max record id of 64 entries.
Hi,
We have the following scenario:
When opening the flash from the bootloader (
RM_VEE_FLASH_Open
) we sometimes get a crash, which I narrowed down to the record offset assignment inrm_vee_load_record_table
(ra\fsp\src\rm_vee_flash\rm_vee_flash.c
line 1055 on v5.2.0):When parsing all records sometimes record ids (
p_end->id
) are greater than 32 resulting in an out of bounds write to thep_ctrl->p_cfg->rec_offset
array.A quick fix would be:
The text was updated successfully, but these errors were encountered: