Skip to content

Commit 47fd7ad

Browse files
committed
wscript: adjust max fw size when building PRF variants
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
1 parent 81e7d00 commit 47fd7ad

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

wscript

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,11 +1585,17 @@ def _check_firmware_image_size(ctx, path):
15851585
# 2048k of flash and 32k bootloader
15861586
max_firmware_size = (2048 - 32) * BYTES_PER_K
15871587
elif ctx.env.MICRO_FAMILY == 'NRF52840':
1588-
# 1024k of flash and 32k bootloader
1589-
max_firmware_size = (1024 - 32) * BYTES_PER_K
1588+
if ctx.variant == 'prf' and not ctx.env.IS_MFG:
1589+
max_firmware_size = 512 * BYTES_PER_K
1590+
else:
1591+
# 1024k of flash and 32k bootloader
1592+
max_firmware_size = (1024 - 32) * BYTES_PER_K
15901593
elif ctx.env.MICRO_FAMILY == 'SF32LB52':
1591-
# 3072k of flash
1592-
max_firmware_size = 3072 * BYTES_PER_K
1594+
if ctx.variant == 'prf' and not ctx.env.IS_MFG:
1595+
max_firmware_size = 512 * BYTES_PER_K
1596+
else:
1597+
# 3072k of flash
1598+
max_firmware_size = 3072 * BYTES_PER_K
15931599
else:
15941600
ctx.fatal('Cannot check firmware size against unknown micro family "{}"'
15951601
.format(ctx.env.MICRO_FAMILY))

0 commit comments

Comments
 (0)