diff options
Diffstat (limited to 'chip/mchp/lfw')
-rw-r--r-- | chip/mchp/lfw/ec_lfw.ld | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chip/mchp/lfw/ec_lfw.ld b/chip/mchp/lfw/ec_lfw.ld index 315ad1bcfd..8e8601a5ee 100644 --- a/chip/mchp/lfw/ec_lfw.ld +++ b/chip/mchp/lfw/ec_lfw.ld @@ -14,11 +14,18 @@ */ MEMORY { - VECTOR(r ) : ORIGIN = 0x0E0000, LENGTH = 24 - SRAM (xrw) : ORIGIN = 0x0E0018, LENGTH = 0x1000 - LENGTH(VECTOR) + VECTOR(r ) : ORIGIN = 0x0E0000, LENGTH = 0x18 + SRAM (xrw) : ORIGIN = 0x0E0018, LENGTH = 0xFE8 } /* + * ld does not allow mathematical expressions in ORIGIN/LENGTH, so check the + * values here. + */ +ASSERT(ORIGIN(VECTOR) + LENGTH(VECTOR) == ORIGIN(SRAM), "Invalid SRAM origin.") +ASSERT(LENGTH(VECTOR) + LENGTH(SRAM) == 0x1000, "Invalid VECTOR+SRAM length.") + +/* * The entry point is informative, for debuggers and simulators, * since the Cortex-M vector points to it anyway. */ |