Skip to content

Commit 4b4ec3e

Browse files
committed
[bsp][bluetrum] Adding RT_USING_CONSOLE judgment
1 parent e6afb03 commit 4b4ec3e

File tree

1 file changed

+4
-0
lines changed
  • bsp/bluetrum/ab32vg1-ab-prougen/board

1 file changed

+4
-0
lines changed

bsp/bluetrum/ab32vg1-ab-prougen/board/board.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static struct rt_mutex mutex_cache = {0};
3030
extern volatile rt_uint8_t rt_interrupt_nest;
3131
extern uint32_t __heap_start, __heap_end;
3232

33+
#ifdef RT_USING_CONSOLE
3334
void hal_printf(const char *fmt, ...)
3435
{
3536
rt_device_t console = rt_console_get_device();
@@ -65,6 +66,7 @@ void hal_printf(const char *fmt, ...)
6566
#endif
6667
va_end(args);
6768
}
69+
#endif
6870

6971
RT_SECTION(".irq.timer")
7072
void timer0_isr(int vector, void *param)
@@ -210,8 +212,10 @@ void exception_isr(void)
210212
extern long list_thread(void);
211213
sys_error_hook(1);
212214

215+
#ifdef RT_USING_CONSOLE
213216
rt_console_set_device(RT_NULL);
214217
rt_kprintf(stack_info, rt_thread_self()->sp, rt_thread_self()->name);
218+
#endif
215219

216220
while(1);
217221
}

0 commit comments

Comments
 (0)