From 900749e60c9cc8c25d9ef5de391ef952aeb321a2 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 11 Sep 2018 10:55:33 +0700 Subject: [PATCH] fix compile linkage issue with debug.cpp --- cores/nRF5/debug.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cores/nRF5/debug.cpp b/cores/nRF5/debug.cpp index d92d37cc..c40460cd 100644 --- a/cores/nRF5/debug.cpp +++ b/cores/nRF5/debug.cpp @@ -56,7 +56,7 @@ extern uint32_t __StackLimit[]; extern "C" { -int cprintf(const char * format, ...) +int cprintf (char const * format, ...) { char buf[256]; int len; @@ -81,6 +81,8 @@ void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName ) cprintf("%s Stack Overflow !!!", pcTaskName); } +} + int dbgHeapTotal(void) { return ((uint32_t) __HeapLimit) - ((uint32_t) __HeapBase); @@ -114,7 +116,7 @@ int dbgStackUsed(void) return ((uint32_t) p_end) - ((uint32_t) p_buf); } -static void printMemRegion(const char* name, uint32_t top, uint32_t bottom, uint32_t used) +static void printMemRegion (char const * name, uint32_t top, uint32_t bottom, uint32_t used) { char buffer[30]; if ( used ) @@ -181,7 +183,7 @@ static void dump_str_line(uint8_t const* buf, uint16_t count) // each line is 16 bytes for(int i=0; i