diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 16:41:49 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2020-11-24 16:41:49 -0700 |
commit | c29e0323020e0f96932d0f9b09747d5b2e28e5a6 (patch) | |
tree | c6100f1a4702d14548f5b82d72afb85340711a68 /src/kern/log.c | |
parent | 0c0f5c3d8397ba5168f0cd01b25ba70c238b36e0 (diff) | |
download | stm32l4-c29e0323020e0f96932d0f9b09747d5b2e28e5a6.tar.gz stm32l4-c29e0323020e0f96932d0f9b09747d5b2e28e5a6.tar.bz2 stm32l4-c29e0323020e0f96932d0f9b09747d5b2e28e5a6.zip |
Changes to painic. It now prints the stack at the time of failure (if logging is initialized).
Diffstat (limited to 'src/kern/log.c')
-rw-r--r-- | src/kern/log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kern/log.c b/src/kern/log.c index c876759..3331249 100644 --- a/src/kern/log.c +++ b/src/kern/log.c @@ -5,6 +5,7 @@ #include "kern/common.h" #include "kern/gpio/gpio_manager.h" #include "kern/init.h" +#include "kern/delay.h" void setup_usart2(uint32_t baud_rate); @@ -37,7 +38,7 @@ void kvlogf(const char* fmt, va_list l) void kerr_vlogf(const char* fmt, va_list l) { klogf("\x1b[01;31m[ERROR] "); - usart_vprintf(&USART2, fmt, l); + kvlogf(fmt, l); klogf("\x1b[00m"); } |