Fixes to compile "make ENABLE_DEBUG=1 all_platforms" (#515)
This commit is contained in:
parent
7dcb3295c6
commit
00937348b3
|
@ -85,8 +85,8 @@ const struct command_s cmd_list[] = {
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool connect_assert_srst;
|
bool connect_assert_srst;
|
||||||
#ifdef PLATFORM_HAS_DEBUG
|
#if defined(PLATFORM_HAS_DEBUG) && !defined(PC_HOSTED)
|
||||||
bool debug_bmp;
|
bool debug_bmp;
|
||||||
#endif
|
#endif
|
||||||
long cortexm_wait_timeout = 2000; /* Timeout to wait for Cortex to react on halt command. */
|
long cortexm_wait_timeout = 2000; /* Timeout to wait for Cortex to react on halt command. */
|
||||||
|
|
|
@ -260,9 +260,13 @@ enum {
|
||||||
int rdi_write(int fn, const char *buf, size_t len)
|
int rdi_write(int fn, const char *buf, size_t len)
|
||||||
{
|
{
|
||||||
(void)fn;
|
(void)fn;
|
||||||
|
#if defined(PLATFORM_HAS_DEBUG) && !defined(PC_HOSTED)
|
||||||
if (debug_bmp)
|
if (debug_bmp)
|
||||||
return len - usbuart_debug_write(buf, len);
|
return len - usbuart_debug_write(buf, len);
|
||||||
|
#else
|
||||||
|
(void)buf;
|
||||||
|
(void)len;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ static bool adiv5_component_probe(ADIv5_AP_t *ap, uint32_t addr, int recursion,
|
||||||
uint64_t pidr = 0;
|
uint64_t pidr = 0;
|
||||||
uint32_t cidr = 0;
|
uint32_t cidr = 0;
|
||||||
bool res = false;
|
bool res = false;
|
||||||
#if defined(ENABLE_DEBUG)
|
#if defined(ENABLE_DEBUG) && defined(PLATFORM_HAS_DEBUG)
|
||||||
char indent[recursion];
|
char indent[recursion];
|
||||||
|
|
||||||
for(int i = 0; i < recursion; i++) indent[i] = ' ';
|
for(int i = 0; i < recursion; i++) indent[i] = ' ';
|
||||||
|
@ -304,7 +304,7 @@ static bool adiv5_component_probe(ADIv5_AP_t *ap, uint32_t addr, int recursion,
|
||||||
/* ROM table */
|
/* ROM table */
|
||||||
if (cid_class == cidc_romtab) {
|
if (cid_class == cidc_romtab) {
|
||||||
/* Check SYSMEM bit */
|
/* Check SYSMEM bit */
|
||||||
#ifdef ENABLE_DEBUG
|
#if defined(ENABLE_DEBUG) && defined(PLATFORM_HAS_DEBUG)
|
||||||
uint32_t memtype = adiv5_mem_read32(ap, addr | ADIV5_ROM_MEMTYPE) &
|
uint32_t memtype = adiv5_mem_read32(ap, addr | ADIV5_ROM_MEMTYPE) &
|
||||||
ADIV5_ROM_MEMTYPE_SYSMEM;
|
ADIV5_ROM_MEMTYPE_SYSMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue