diff --git a/src/target/cortexm.c b/src/target/cortexm.c index 8d131fd24df..5f5a0078f21 100644 --- a/src/target/cortexm.c +++ b/src/target/cortexm.c @@ -117,6 +117,7 @@ typedef struct cortexm_priv { uint32_t demcr; } cortexm_priv_s; +#ifdef ENABLE_DEBUG const char *const semihosting_names[] = { "", "SYS_OPEN", @@ -129,7 +130,7 @@ const char *const semihosting_names[] = { "SYS_ISERROR", "SYS_ISTTY", "SYS_SEEK", - "0x0B", + "0x0b", "SYS_FLEN", "SYS_TMPNAM", "SYS_REMOVE", @@ -143,15 +144,14 @@ const char *const semihosting_names[] = { "SYS_HEAPINFO", "0x17", [SEMIHOSTING_SYS_EXIT] = "SYS_EXIT", -#if 0 /* 7 reserved */ [SEMIHOSTING_SYS_EXIT_EXTENDED] = "SYS_EXIT_EXTENDED", /* 15 reserved */ [SEMIHOSTING_SYS_ELAPSED] = "SYS_ELAPSED", [SEMIHOSTING_SYS_TICKFREQ] = "SYS_TICKFREQ", -#endif - "" /* sentinel */ + "", }; +#endif /* Register number tables */ static const uint32_t regnum_cortex_m[CORTEXM_GENERAL_REG_COUNT] = { @@ -1470,6 +1470,7 @@ static int cortexm_hostio_request(target_s *target) target_mem_read(target, params, arm_regs[1], sizeof(params)); int32_t ret = 0; +#ifdef ENABLE_DEBUG const char *syscall_descr = NULL; if (syscall < ARRAY_LENGTH(semihosting_names)) syscall_descr = semihosting_names[syscall]; @@ -1478,6 +1479,7 @@ static int cortexm_hostio_request(target_s *target) DEBUG_INFO("syscall %12s (%" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32 ")\n", syscall_descr, params[0], params[1], params[2], params[3]); +#endif switch (syscall) { #if PC_HOSTED == 1