Skip to content

Commit

Permalink
fix: ensure flash or memory could hold registers data
Browse files Browse the repository at this point in the history
Signed-off-by: jiaxiaoyu <[email protected]>
  • Loading branch information
xyyy1420 committed Feb 6, 2025
1 parent 8f65e8c commit 03465a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/checkpoint/serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ void Serializer::serialize(uint64_t inst_count) {
uint8_t* serialize_reg_base_addr = NULL;

if (store_cpt_in_flash) {
IFDEF(CONFIG_HAS_FLASH, serialize_reg_base_addr = get_flash_base());
IFDEF(CONFIG_HAS_FLASH, serialize_reg_base_addr = get_flash_base(); assert(get_flash_size() >= 1000000U));
IFNDEF(CONFIG_HAS_FLASH, Log("Please enable the flash device to activate the functionality of saving checkpoints to flash."); assert(0));
} else {
serialize_reg_base_addr = get_pmem();
assert(MEMORY_SIZE >= 1000000U);
}
assert(serialize_reg_base_addr);

Expand Down

0 comments on commit 03465a3

Please sign in to comment.