Skip to content

Commit

Permalink
[silico_creator,lib,manifet] Generalize for multitop
Browse files Browse the repository at this point in the history
There are no DT structures to store the eflash size yet so use
ifdef for now.

Signed-off-by: Amaury Pouly <[email protected]>
  • Loading branch information
pamaury committed Nov 14, 2024
1 parent 6bf4a12 commit d6b7657
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sw/device/silicon_creator/lib/manifest.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@

#include "sw/device/silicon_creator/lib/base/chip.h"

#ifdef OT_IS_ENGLISH_BREAKFAST
#include "hw/top_englishbreakfast/sw/autogen/top_englishbreakfast.h"
#define EFLASH_SIZE_BYES TOP_ENGLISHBREAKFAST_EFLASH_SIZE_BYTES
#else
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
#define EFLASH_SIZE_BYES TOP_EARLGREY_EFLASH_SIZE_BYTES
#endif

static_assert(CHIP_ROM_EXT_SIZE_MIN >= CHIP_MANIFEST_SIZE,
"`CHIP_ROM_EXT_SIZE_MIN` is too small");
Expand All @@ -18,8 +24,8 @@ static_assert(CHIP_BL0_SIZE_MIN >= CHIP_MANIFEST_SIZE,
"`CHIP_BL0_SIZE_MIN` is too small");
static_assert(CHIP_BL0_SIZE_MAX >= CHIP_BL0_SIZE_MIN,
"`CHIP_BL0_SIZE_MAX` is too small");
static_assert(CHIP_BL0_SIZE_MAX <= ((TOP_EARLGREY_EFLASH_SIZE_BYTES / 2) -
CHIP_ROM_EXT_SIZE_MAX),
static_assert(CHIP_BL0_SIZE_MAX <=
((EFLASH_SIZE_BYES / 2) - CHIP_ROM_EXT_SIZE_MAX),
"`CHIP_BL0_SIZE_MAX` is too large");

// Extern declarations for the inline functions in the manifest header.
Expand Down

0 comments on commit d6b7657

Please sign in to comment.