Skip to content

Commit

Permalink
riscv32: Fixed the case where firmware is being built with debug enab…
Browse files Browse the repository at this point in the history
…led and DEBUG_PROTO() is still defined to do nothing
  • Loading branch information
dragonmux authored and esden committed Nov 17, 2023
1 parent 0bd8cef commit 98f11d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/target/riscv32.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,9 @@ void riscv32_mem_read(target_s *const target, void *const dest, const target_add

#if ENABLE_DEBUG
DEBUG_PROTO("%s: @ %08" PRIx32 " len %zu:", __func__, src, len);
#ifndef DEBUG_PROTO_IS_NOOP
const uint8_t *const data = (const uint8_t *)dest;
#endif
for (size_t offset = 0; offset < len; ++offset) {
if (offset == 16U)
break;
Expand All @@ -578,7 +580,9 @@ void riscv32_mem_write(target_s *const target, const target_addr_t dest, const v
{
#if ENABLE_DEBUG
DEBUG_PROTO("%s: @ %" PRIx32 " len %zu:", __func__, dest, len);
#ifndef DEBUG_PROTO_IS_NOOP
const uint8_t *const data = (const uint8_t *)src;
#endif
for (size_t offset = 0; offset < len; ++offset) {
if (offset == 16U)
break;
Expand Down

0 comments on commit 98f11d4

Please sign in to comment.