From ed0ae20015edc79ab01a95e2b97e3f2abdd7461d Mon Sep 17 00:00:00 2001 From: dragonmux Date: Mon, 11 Nov 2024 08:24:15 +0000 Subject: [PATCH] hosted/dap: Resized the block buffers in `dap_mem_{read,write}_block()` to exactly fit the max amount transferrable in a go and nothing more --- src/platforms/hosted/dap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/hosted/dap.c b/src/platforms/hosted/dap.c index 8fc51ce306e..253a102e4a0 100644 --- a/src/platforms/hosted/dap.c +++ b/src/platforms/hosted/dap.c @@ -264,7 +264,7 @@ bool dap_mem_read_block( { /* Try to read the 32-bit blocks requested */ const size_t blocks = len >> MIN(align, 2U); - uint32_t data[256U] = {0U}; + uint32_t data[127U] = {0U}; const bool result = perform_dap_transfer_block_read(target_ap->dp, SWD_AP_DRW, blocks, data); /* Unpack the data from those blocks */ @@ -287,7 +287,7 @@ bool dap_mem_write_block( adiv5_access_port_s *const target_ap, target_addr64_t dest, const void *src, const size_t len, const align_e align) { const size_t blocks = len >> MIN(align, 2U); - uint32_t data[256U]; + uint32_t data[126U]; /* Pack the data to send into 32-bit blocks */ if (align > ALIGN_16BIT)