From cc33cb4de57934c42278db20747ee0f9eeda04bc Mon Sep 17 00:00:00 2001 From: ALTracer <11005378+ALTracer@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:51:47 +0300 Subject: [PATCH] s32k3xx: Remove assert * Pulling __assert_func() and fiprintf() costs ~1.5 KiB of BMF flash * Target flash layer is guaranteed to call this with len=writesize anyways --- src/target/s32k3xx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/target/s32k3xx.c b/src/target/s32k3xx.c index f79fac94ee6..06f02847806 100644 --- a/src/target/s32k3xx.c +++ b/src/target/s32k3xx.c @@ -23,8 +23,6 @@ * the XML memory map and Flash memory programming. */ -#include - #include "command.h" #include "general.h" #include "target.h" @@ -250,8 +248,6 @@ static bool s32k3xx_flash_erase(target_flash_s *const flash, target_addr_t addr, static bool s32k3xx_flash_write(target_flash_s *flash, target_addr_t dest, const void *src, size_t len) { - assert(len == flash->writesize); - const uint32_t *const s_data = src; s32k3xx_flash_prepare(flash); target_mem32_write32(flash->t, PFCPGM_PEADR_L, dest);