diff options
| author | greedyhao <[email protected]> | 2021-08-12 17:12:52 +0800 |
|---|---|---|
| committer | greedyhao <[email protected]> | 2021-08-12 17:12:52 +0800 |
| commit | 4b4ec3e7898126bc566bbf3caf8b4d0646e78501 (patch) | |
| tree | 592f60cb5e60549198790479705d3817fae73dd3 | |
| parent | e6afb03d14355cc4e65e3c66c0125a7ce1504c4e (diff) | |
[bsp][bluetrum] Adding RT_USING_CONSOLE judgment
| -rw-r--r-- | bsp/bluetrum/ab32vg1-ab-prougen/board/board.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bsp/bluetrum/ab32vg1-ab-prougen/board/board.c b/bsp/bluetrum/ab32vg1-ab-prougen/board/board.c index 24d6bd24be..f68ec1bba8 100644 --- a/bsp/bluetrum/ab32vg1-ab-prougen/board/board.c +++ b/bsp/bluetrum/ab32vg1-ab-prougen/board/board.c @@ -30,6 +30,7 @@ static struct rt_mutex mutex_cache = {0}; extern volatile rt_uint8_t rt_interrupt_nest; extern uint32_t __heap_start, __heap_end; +#ifdef RT_USING_CONSOLE void hal_printf(const char *fmt, ...) { rt_device_t console = rt_console_get_device(); @@ -65,6 +66,7 @@ void hal_printf(const char *fmt, ...) #endif va_end(args); } +#endif RT_SECTION(".irq.timer") void timer0_isr(int vector, void *param) @@ -210,8 +212,10 @@ void exception_isr(void) extern long list_thread(void); sys_error_hook(1); +#ifdef RT_USING_CONSOLE rt_console_set_device(RT_NULL); rt_kprintf(stack_info, rt_thread_self()->sp, rt_thread_self()->name); +#endif while(1); } |
