Skip to content

Commit

Permalink
s32k3xx: Remove assert
Browse files Browse the repository at this point in the history
* Pulling __assert_func() and fiprintf() costs ~1.5 KiB of BMF flash
* Target flash layer is guaranteed to call this with len=writesize anyways
  • Loading branch information
ALTracer committed Aug 18, 2024
1 parent db48ed5 commit cc33cb4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/target/s32k3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* the XML memory map and Flash memory programming.
*/

#include <assert.h>

#include "command.h"
#include "general.h"
#include "target.h"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cc33cb4

Please sign in to comment.